From 771973c13dd5b68fe96fbe5ea96bd11656437dc1 Mon Sep 17 00:00:00 2001 From: Sharang Dashputre Date: Mon, 1 Apr 2019 17:59:37 +0530 Subject: url -> URL where apt except inside actionpack/ --- actioncable/lib/action_cable/connection/test_case.rb | 2 +- actionview/lib/action_view/helpers/form_tag_helper.rb | 2 +- actionview/lib/action_view/helpers/url_helper.rb | 2 +- actionview/test/template/javascript_helper_test.rb | 2 +- actionview/test/ujs/public/test/call-remote.js | 6 +++--- actionview/test/ujs/public/test/data-remote.js | 4 ++-- actionview/test/ujs/public/test/settings.js | 2 +- activerecord/CHANGELOG.md | 4 ++-- activerecord/lib/active_record/database_configurations.rb | 2 +- .../app/controllers/active_storage/disk_controller.rb | 2 +- activestorage/test/models/blob_test.rb | 10 +++++----- activestorage/test/service/disk_service_test.rb | 2 +- activestorage/test/template/image_tag_test.rb | 2 +- guides/source/3_1_release_notes.md | 4 ++-- guides/source/action_mailer_basics.md | 2 +- guides/source/active_support_instrumentation.md | 2 +- guides/source/command_line.md | 2 +- guides/source/configuring.md | 2 +- guides/source/form_helpers.md | 2 +- guides/source/rails_on_rack.md | 2 +- railties/lib/rails/engine.rb | 8 ++++---- railties/test/application/asset_debugging_test.rb | 2 +- railties/test/application/assets_test.rb | 4 ++-- railties/test/application/initializers/frameworks_test.rb | 4 ++-- railties/test/application/middleware/exceptions_test.rb | 2 +- railties/test/application/rake/dbs_test.rb | 4 ++-- 26 files changed, 41 insertions(+), 41 deletions(-) diff --git a/actioncable/lib/action_cable/connection/test_case.rb b/actioncable/lib/action_cable/connection/test_case.rb index 8d25a55c8a..f1673fea08 100644 --- a/actioncable/lib/action_cable/connection/test_case.rb +++ b/actioncable/lib/action_cable/connection/test_case.rb @@ -176,7 +176,7 @@ module ActionCable # # Accepts request path as the first argument and the following request options: # - # - params – url parameters (Hash) + # - params – URL parameters (Hash) # - headers – request headers (Hash) # - session – session data (Hash) # - env – additional Rack env configuration (Hash) diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index c0996049f0..5d4ff36425 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -24,7 +24,7 @@ module ActionView mattr_accessor :default_enforce_utf8, default: true - # Starts a form tag that points the action to a url configured with url_for_options just like + # Starts a form tag that points the action to a URL configured with url_for_options just like # ActionController::Base#url_for. The method for the form defaults to POST. # # ==== Options diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index d63ada3890..df83dff681 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -553,7 +553,7 @@ module ActionView url_string = URI.parser.unescape(url_for(options)).force_encoding(Encoding::BINARY) # We ignore any extra parameters in the request_uri if the - # submitted url doesn't have any either. This lets the function + # submitted URL doesn't have any either. This lets the function # work with things like ?order=asc # the behaviour can be disabled with check_parameters: true request_uri = url_string.index("?") || check_parameters ? request.fullpath : request.path diff --git a/actionview/test/template/javascript_helper_test.rb b/actionview/test/template/javascript_helper_test.rb index 4c28aeaee1..f974e5ae0c 100644 --- a/actionview/test/template/javascript_helper_test.rb +++ b/actionview/test/template/javascript_helper_test.rb @@ -54,7 +54,7 @@ class JavaScriptHelperTest < ActionView::TestCase assert_equal "foo", output_buffer, "javascript_tag without a block should not concat to output_buffer" end - # Setting the :extname option will control what extension (if any) is appended to the url for assets + # Setting the :extname option will control what extension (if any) is appended to the URL for assets def test_javascript_include_tag assert_dom_equal "", javascript_include_tag("/foo") assert_dom_equal "", javascript_include_tag("/foo", extname: false) diff --git a/actionview/test/ujs/public/test/call-remote.js b/actionview/test/ujs/public/test/call-remote.js index 0f92007007..fb033491f9 100644 --- a/actionview/test/ujs/public/test/call-remote.js +++ b/actionview/test/ujs/public/test/call-remote.js @@ -53,7 +53,7 @@ asyncTest('form default method is GET', 1, function() { }) }) -asyncTest('form url is picked up from "action"', 1, function() { +asyncTest('form URL is picked up from "action"', 1, function() { buildForm({ method: 'post' }) submit(function(e, data, status, xhr) { @@ -61,7 +61,7 @@ asyncTest('form url is picked up from "action"', 1, function() { }) }) -asyncTest('form url is read from "action" not "href"', 1, function() { +asyncTest('form URL is read from "action" not "href"', 1, function() { buildForm({ method: 'post', href: '/echo2' }) submit(function(e, data, status, xhr) { @@ -69,7 +69,7 @@ asyncTest('form url is read from "action" not "href"', 1, function() { }) }) -asyncTest('form url is read from submit button "formaction" if submit is triggered by that button', 1, function() { +asyncTest('form URL is read from submit button "formaction" if submit is triggered by that button', 1, function() { var submitButton = $('') buildForm({ method: 'post', href: '/echo2' }) diff --git a/actionview/test/ujs/public/test/data-remote.js b/actionview/test/ujs/public/test/data-remote.js index 55d39b0a52..9e41067549 100644 --- a/actionview/test/ujs/public/test/data-remote.js +++ b/actionview/test/ujs/public/test/data-remote.js @@ -121,7 +121,7 @@ asyncTest('clicking on a link with both query string in href and data-params', 4 App.assertGetRequest(data) equal(data.params.data1, 'value1', 'ajax arguments should have key data1 with right value') equal(data.params.data2, 'value2', 'ajax arguments should have key data2 with right value') - equal(data.params.data3, 'value3', 'query string in url should be passed to server with right value') + equal(data.params.data3, 'value3', 'query string in URL should be passed to server with right value') }) .bindNative('ajax:complete', function() { start() }) .triggerNative('click') @@ -135,7 +135,7 @@ asyncTest('clicking on a link with both query string in href and data-params wit App.assertPostRequest(data) equal(data.params.data1, 'value1', 'ajax arguments should have key data1 with right value') equal(data.params.data2, 'value2', 'ajax arguments should have key data2 with right value') - equal(data.params.data3, 'value3', 'query string in url should be passed to server with right value') + equal(data.params.data3, 'value3', 'query string in URL should be passed to server with right value') }) .bindNative('ajax:complete', function() { start() }) .triggerNative('click') diff --git a/actionview/test/ujs/public/test/settings.js b/actionview/test/ujs/public/test/settings.js index 682d044403..ff2b057012 100644 --- a/actionview/test/ujs/public/test/settings.js +++ b/actionview/test/ujs/public/test/settings.js @@ -18,7 +18,7 @@ App.assertPostRequest = function(requestEnv) { } App.assertRequestPath = function(requestEnv, path) { - equal(requestEnv['PATH_INFO'], path, 'request should be sent to right url') + equal(requestEnv['PATH_INFO'], path, 'request should be sent to right URL') } App.getVal = function(el) { diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 37f31462b3..d73d9ade41 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -5,7 +5,7 @@ *Ryan H. Kerr* -* Add `ActiveRecord::Relation#extract_associated` for extracting associated records from a relation. +* Add `ActiveRecord::Relation#extract_associated` for extracting associated records from a relation. ``` account.memberships.extract_associated(:user) @@ -454,7 +454,7 @@ *Sean Griffin* -* Add support for hash and url configs in database hash of `ActiveRecord::Base.connected_to`. +* Add support for hash and URL configs in database hash of `ActiveRecord::Base.connected_to`. ```` User.connected_to(database: { writing: "postgres://foo" }) do diff --git a/activerecord/lib/active_record/database_configurations.rb b/activerecord/lib/active_record/database_configurations.rb index 7431a1c759..44b5cfc738 100644 --- a/activerecord/lib/active_record/database_configurations.rb +++ b/activerecord/lib/active_record/database_configurations.rb @@ -7,7 +7,7 @@ require "active_record/database_configurations/url_config" module ActiveRecord # ActiveRecord::DatabaseConfigurations returns an array of DatabaseConfig # objects (either a HashConfig or UrlConfig) that are constructed from the - # application's database configuration hash or url string. + # application's database configuration hash or URL string. class DatabaseConfigurations attr_reader :configurations delegate :any?, to: :configurations diff --git a/activestorage/app/controllers/active_storage/disk_controller.rb b/activestorage/app/controllers/active_storage/disk_controller.rb index df8d73cc91..df3116afd7 100644 --- a/activestorage/app/controllers/active_storage/disk_controller.rb +++ b/activestorage/app/controllers/active_storage/disk_controller.rb @@ -3,7 +3,7 @@ # Serves files stored with the disk service in the same way that the cloud services do. # This means using expiring, signed URLs that are meant for immediate access, not permanent linking. # Always go through the BlobsController, or your own authenticated controller, rather than directly -# to the service url. +# to the service URL. class ActiveStorage::DiskController < ActiveStorage::BaseController skip_forgery_protection diff --git a/activestorage/test/models/blob_test.rb b/activestorage/test/models/blob_test.rb index b7b37bacf5..9fd75a1b4a 100644 --- a/activestorage/test/models/blob_test.rb +++ b/activestorage/test/models/blob_test.rb @@ -114,7 +114,7 @@ class ActiveStorage::BlobTest < ActiveSupport::TestCase end end - test "urls expiring in 5 minutes" do + test "URLs expiring in 5 minutes" do blob = create_blob freeze_time do @@ -123,7 +123,7 @@ class ActiveStorage::BlobTest < ActiveSupport::TestCase end end - test "urls force content_type to binary and attachment as content disposition for content types served as binary" do + test "URLs force content_type to binary and attachment as content disposition for content types served as binary" do blob = create_blob(content_type: "text/html") freeze_time do @@ -132,7 +132,7 @@ class ActiveStorage::BlobTest < ActiveSupport::TestCase end end - test "urls force attachment as content disposition when the content type is not allowed inline" do + test "URLs force attachment as content disposition when the content type is not allowed inline" do blob = create_blob(content_type: "application/zip") freeze_time do @@ -141,7 +141,7 @@ class ActiveStorage::BlobTest < ActiveSupport::TestCase end end - test "urls allow for custom filename" do + test "URLs allow for custom filename" do blob = create_blob(filename: "original.txt") new_filename = ActiveStorage::Filename.new("new.txt") @@ -153,7 +153,7 @@ class ActiveStorage::BlobTest < ActiveSupport::TestCase end end - test "urls allow for custom options" do + test "URLs allow for custom options" do blob = create_blob(filename: "original.txt") arguments = [ diff --git a/activestorage/test/service/disk_service_test.rb b/activestorage/test/service/disk_service_test.rb index a0218bff1c..f3c4dd26bd 100644 --- a/activestorage/test/service/disk_service_test.rb +++ b/activestorage/test/service/disk_service_test.rb @@ -7,7 +7,7 @@ class ActiveStorage::Service::DiskServiceTest < ActiveSupport::TestCase include ActiveStorage::Service::SharedServiceTests - test "url generation" do + test "URL generation" do assert_match(/^https:\/\/example.com\/rails\/active_storage\/disk\/.*\/avatar\.png\?content_type=image%2Fpng&disposition=inline/, @service.url(@key, expires_in: 5.minutes, disposition: :inline, filename: ActiveStorage::Filename.new("avatar.png"), content_type: "image/png")) end diff --git a/activestorage/test/template/image_tag_test.rb b/activestorage/test/template/image_tag_test.rb index f0b166c225..258cf702ad 100644 --- a/activestorage/test/template/image_tag_test.rb +++ b/activestorage/test/template/image_tag_test.rb @@ -37,7 +37,7 @@ class ActiveStorage::ImageTagTest < ActionView::TestCase assert_raises(ArgumentError) { image_tag(@user.avatar) } end - test "error when object can't be resolved into url" do + test "error when object can't be resolved into URL" do unresolvable_object = ActionView::Helpers::AssetTagHelper assert_raises(ArgumentError) { image_tag(unresolvable_object) } end diff --git a/guides/source/3_1_release_notes.md b/guides/source/3_1_release_notes.md index 9549b0b911..09faeea614 100644 --- a/guides/source/3_1_release_notes.md +++ b/guides/source/3_1_release_notes.md @@ -240,7 +240,7 @@ Action Pack * Added `config.action_controller.include_all_helpers`. By default `helper :all` is done in `ActionController::Base`, which includes all the helpers by default. Setting `include_all_helpers` to `false` will result in including only application_helper and the helper corresponding to controller (like foo_helper for foo_controller). -* `url_for` and named url helpers now accept `:subdomain` and `:domain` as options. +* `url_for` and named URL helpers now accept `:subdomain` and `:domain` as options. * Added `Base.http_basic_authenticate_with` to do simple http basic authentication with a single class method call. @@ -293,7 +293,7 @@ Action Pack You can restrict it to some actions by using `:only` or `:except`. Please read the docs at [`ActionController::Streaming`](https://api.rubyonrails.org/v3.1.0/classes/ActionController/Streaming.html) for more information. -* The redirect route method now also accepts a hash of options which will only change the parts of the url in question, or an object which responds to call, allowing for redirects to be reused. +* The redirect route method now also accepts a hash of options which will only change the parts of the URL in question, or an object which responds to call, allowing for redirects to be reused. ### Action Dispatch diff --git a/guides/source/action_mailer_basics.md b/guides/source/action_mailer_basics.md index df74b4ebd0..f600cf29ce 100644 --- a/guides/source/action_mailer_basics.md +++ b/guides/source/action_mailer_basics.md @@ -573,7 +573,7 @@ web addresses. Thus, you should always use the "_url" variant of named route helpers. If you did not configure the `:host` option globally make sure to pass it to the -url helper. +URL helper. ```erb <%= user_url(@user, host: 'example.com') %> diff --git a/guides/source/active_support_instrumentation.md b/guides/source/active_support_instrumentation.md index d7dbc5cea8..e5ed283c45 100644 --- a/guides/source/active_support_instrumentation.md +++ b/guides/source/active_support_instrumentation.md @@ -580,7 +580,7 @@ Active Storage | ------------ | ------------------- | | `:key` | Secure token | | `:service` | Name of the service | -| `:url` | Generated url | +| `:url` | Generated URL | Railties -------- diff --git a/guides/source/command_line.md b/guides/source/command_line.md index ddb30a3aec..a83724f1bb 100644 --- a/guides/source/command_line.md +++ b/guides/source/command_line.md @@ -344,7 +344,7 @@ irb(main):001:0> Inside the `rails console` you have access to the `app` and `helper` instances. -With the `app` method you can access url and path helpers, as well as do requests. +With the `app` method you can access URL and path helpers, as well as do requests. ```bash >> app.root_path diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 86e2dd284e..e1c9fad232 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -1162,7 +1162,7 @@ Imagine you have a server which mirrors the production environment but is only u That environment is no different than the default ones, start a server with `rails server -e staging`, a console with `rails console -e staging`, `Rails.env.staging?` works, etc. -### Deploy to a subdirectory (relative url root) +### Deploy to a subdirectory (relative URL root) By default Rails expects that your application is running at the root (eg. `/`). This section explains how to run your application inside a directory. diff --git a/guides/source/form_helpers.md b/guides/source/form_helpers.md index b6674ae7dd..6418005921 100644 --- a/guides/source/form_helpers.md +++ b/guides/source/form_helpers.md @@ -248,7 +248,7 @@ There are a few things to note here: * `@article` is the actual object being edited. * There is a single hash of options. HTML options (except `id` and `class`) are passed in the `:html` hash. Also you can provide a `:namespace` option for your form to ensure uniqueness of id attributes on form elements. The scope attribute will be prefixed with underscore on the generated HTML id. * The `form_with` method yields a **form builder** object (the `f` variable). -* If you wish to direct your form request to a particular url, you would use `form_with url: my_nifty_url_path` instead. To see more in depth options on what `form_with` accepts be sure to [check out the API documentation](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with). +* If you wish to direct your form request to a particular URL, you would use `form_with url: my_nifty_url_path` instead. To see more in depth options on what `form_with` accepts be sure to [check out the API documentation](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with). * Methods to create form controls are called **on** the form builder object `f`. The resulting HTML is: diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md index 69b5f254bf..d60e53b052 100644 --- a/guides/source/rails_on_rack.md +++ b/guides/source/rails_on_rack.md @@ -13,7 +13,7 @@ After reading this guide, you will know: -------------------------------------------------------------------------------- -WARNING: This guide assumes a working knowledge of Rack protocol and Rack concepts such as middlewares, url maps, and `Rack::Builder`. +WARNING: This guide assumes a working knowledge of Rack protocol and Rack concepts such as middlewares, URL maps, and `Rack::Builder`. Introduction to Rack -------------------- diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 9b3698aa5e..778bbebe75 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -230,7 +230,7 @@ module Rails # # If +MyEngine+ is isolated, The routes above will point to # MyEngine::ArticlesController. You also don't need to use longer - # url helpers like +my_engine_articles_path+. Instead, you should simply use + # URL helpers like +my_engine_articles_path+. Instead, you should simply use # +articles_path+, like you would do with your main application. # # To make this behavior consistent with other parts of the framework, @@ -238,7 +238,7 @@ module Rails # normal Rails app, when you use a namespaced model such as # Namespace::Article, ActiveModel::Naming will generate # names with the prefix "namespace". In an isolated engine, the prefix will - # be omitted in url helpers and form fields, for convenience. + # be omitted in URL helpers and form fields, for convenience. # # polymorphic_url(MyEngine::Article.new) # # => "articles_path" # not "my_engine_articles_path" @@ -286,11 +286,11 @@ module Rails # Note that the :as option given to mount takes the engine_name as default, so most of the time # you can simply omit it. # - # Finally, if you want to generate a url to an engine's route using + # Finally, if you want to generate a URL to an engine's route using # polymorphic_url, you also need to pass the engine helper. Let's # say that you want to create a form pointing to one of the engine's routes. # All you need to do is pass the helper as the first element in array with - # attributes for url: + # attributes for URL: # # form_for([my_engine, @user]) # diff --git a/railties/test/application/asset_debugging_test.rb b/railties/test/application/asset_debugging_test.rb index 3e0f31860b..7623e8e352 100644 --- a/railties/test/application/asset_debugging_test.rb +++ b/railties/test/application/asset_debugging_test.rb @@ -95,7 +95,7 @@ module ApplicationTests end end - test "public url methods are not over-written by the asset pipeline" do + test "public URL methods are not over-written by the asset pipeline" do contents = "doesnotexist" cases = { asset_url: %r{http://example.org/#{contents}}, diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 46ee0d670e..a80581211b 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -450,7 +450,7 @@ module ApplicationTests assert_equal 0, files.length, "Expected application.js asset to be removed, but still exists" end - test "asset urls should use the request's protocol by default" do + test "asset URLs should use the request's protocol by default" do app_with_assets_in_view add_to_config "config.asset_host = 'example.com'" add_to_env_config "development", "config.assets.digest = false" @@ -466,7 +466,7 @@ module ApplicationTests assert_match('src="https://example.com/assets/application.self.js', last_response.body) end - test "asset urls should be protocol-relative if no request is in scope" do + test "asset URLs should be protocol-relative if no request is in scope" do app_file "app/assets/images/rails.png", "notreallyapng" app_file "app/assets/javascripts/image_loader.js.erb", "var src='<%= image_path('rails.png') %>';" add_to_config "config.assets.precompile = %w{rails.png image_loader.js}" diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index 3cd4b8fe33..a35247fc43 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -39,7 +39,7 @@ module ApplicationTests assert_equal expanded_path, ActionMailer::Base.view_paths[0].to_s end - test "allows me to configure default url options for ActionMailer" do + test "allows me to configure default URL options for ActionMailer" do app_file "config/environments/development.rb", <<-RUBY Rails.application.configure do config.action_mailer.default_url_options = { :host => "test.rails" } @@ -61,7 +61,7 @@ module ApplicationTests assert_equal "https", ActionMailer::Base.default_url_options[:protocol] end - test "includes url helpers as action methods" do + test "includes URL helpers as action methods" do app_file "config/routes.rb", <<-RUBY Rails.application.routes.draw do get "/foo", :to => lambda { |env| [200, {}, []] }, :as => :foo diff --git a/railties/test/application/middleware/exceptions_test.rb b/railties/test/application/middleware/exceptions_test.rb index 2d659ade8d..17df78ed4e 100644 --- a/railties/test/application/middleware/exceptions_test.rb +++ b/railties/test/application/middleware/exceptions_test.rb @@ -60,7 +60,7 @@ module ApplicationTests assert_equal "YOU FAILED", last_response.body end - test "url generation error when action_dispatch.show_exceptions is set raises an exception" do + test "URL generation error when action_dispatch.show_exceptions is set raises an exception" do controller :foo, <<-RUBY class FooController < ActionController::Base def index diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb index a1e237fa7b..75b9316593 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -40,12 +40,12 @@ module ApplicationTests end end - test "db:create and db:drop without database url" do + test "db:create and db:drop without database URL" do require "#{app_path}/config/environment" db_create_and_drop ActiveRecord::Base.configurations[Rails.env]["database"] end - test "db:create and db:drop with database url" do + test "db:create and db:drop with database URL" do require "#{app_path}/config/environment" set_database_url db_create_and_drop database_url_db_name -- cgit v1.2.3