From eca6c273fe2729b9634907562c2717cf86443b6b Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Mon, 7 Oct 2019 02:18:31 +0200 Subject: [PATCH] [ci skip] switch eg. to proper e.g. --- actionpack/lib/action_dispatch/routing/mapper.rb | 2 +- actionpack/test/dispatch/routing_test.rb | 2 +- actionview/lib/action_view/helpers/form_helper.rb | 8 ++++---- actionview/lib/action_view/helpers/number_helper.rb | 4 ++-- .../lib/active_job/queue_adapters/sucker_punch_adapter.rb | 2 +- .../connection_adapters/abstract/database_statements.rb | 2 +- activerecord/lib/active_record/nested_attributes.rb | 2 +- activerecord/lib/active_record/railties/databases.rake | 4 ++-- activerecord/lib/active_record/sanitization.rb | 2 +- activerecord/lib/active_record/store.rb | 2 +- activesupport/lib/active_support/locale/en.yml | 2 +- activesupport/lib/active_support/number_helper.rb | 4 ++-- .../lib/active_support/number_helper/number_converter.rb | 2 +- activesupport/lib/active_support/subscriber.rb | 2 +- guides/source/5_0_release_notes.md | 4 ++-- guides/source/active_job_basics.md | 2 +- guides/source/configuring.md | 4 ++-- guides/source/contributing_to_ruby_on_rails.md | 2 +- guides/source/form_helpers.md | 2 +- guides/source/routing.md | 2 +- guides/source/ruby_on_rails_guides_guidelines.md | 2 +- .../generators/rails/controller/controller_generator.rb | 2 +- 22 files changed, 30 insertions(+), 30 deletions(-) diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 37dc2da1062..36dc876fc1d 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -560,7 +560,7 @@ module ActionDispatch # Constrains parameters with a hash of regular expressions # or an object that responds to matches?. In addition, constraints # other than path can also be specified with any object - # that responds to === (eg. String, Array, Range, etc.). + # that responds to === (e.g. String, Array, Range, etc.). # # match 'path/:id', constraints: { id: /[A-Z]\d{5}/ }, via: :get # diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index d4a667a13ad..9d5b6c9e341 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -492,7 +492,7 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest get "/projects/status(.:format)" end - # without dup, additional (and possibly unwanted) values will be present in the options (eg. :host) + # without dup, additional (and possibly unwanted) values will be present in the options (e.g. :host) original_options = { controller: "projects", action: "status" } options = original_options.dup diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index cea6dde3c71..de7271da560 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -888,7 +888,7 @@ module ActionView # # Now, when you use a form element with the _destroy parameter, # with a value that evaluates to +true+, you will destroy the associated - # model (eg. 1, '1', true, or 'true'): + # model (e.g. 1, '1', true, or 'true'): # # <%= form_for @person do |person_form| %> # ... @@ -977,7 +977,7 @@ module ActionView # This will allow you to specify which models to destroy in the # attributes hash by adding a form element for the _destroy # parameter with a value that evaluates to +true+ - # (eg. 1, '1', true, or 'true'): + # (e.g. 1, '1', true, or 'true'): # # <%= form_for @person do |person_form| %> # ... @@ -2038,7 +2038,7 @@ module ActionView # # Now, when you use a form element with the _destroy parameter, # with a value that evaluates to +true+, you will destroy the associated - # model (eg. 1, '1', true, or 'true'): + # model (e.g. 1, '1', true, or 'true'): # # <%= form_for @person do |person_form| %> # ... @@ -2127,7 +2127,7 @@ module ActionView # This will allow you to specify which models to destroy in the # attributes hash by adding a form element for the _destroy # parameter with a value that evaluates to +true+ - # (eg. 1, '1', true, or 'true'): + # (e.g. 1, '1', true, or 'true'): # # <%= form_for @person do |person_form| %> # ... diff --git a/actionview/lib/action_view/helpers/number_helper.rb b/actionview/lib/action_view/helpers/number_helper.rb index 827e0bd02ca..4e6cebc5499 100644 --- a/actionview/lib/action_view/helpers/number_helper.rb +++ b/actionview/lib/action_view/helpers/number_helper.rb @@ -297,7 +297,7 @@ module ActionView end # Pretty prints (formats and approximates) a number in a way it - # is more readable by humans (eg.: 1200000000 becomes "1.2 + # is more readable by humans (e.g.: 1200000000 becomes "1.2 # Billion"). This is useful for numbers that can get very large # (and too hard to read). # @@ -305,7 +305,7 @@ module ActionView # size. # # You can also define your own unit-quantifier names if you want - # to use other decimal units (eg.: 1500 becomes "1.5 + # to use other decimal units (e.g.: 1500 becomes "1.5 # kilometers", 0.150 becomes "150 milliliters", etc). You may # define a wide range of unit quantifiers, even fractional ones # (centi, deci, mili, etc). diff --git a/activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb b/activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb index d09e1e9143c..c520cbcafb3 100644 --- a/activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb @@ -10,7 +10,7 @@ module ActiveJob # This reduces the cost of hosting on a service like Heroku along # with the memory footprint of having to maintain additional jobs if # hosting on a dedicated server. All queues can run within a - # single application (eg. Rails, Sinatra, etc.) process. + # single application (e.g. Rails, Sinatra, etc.) process. # # Read more about Sucker Punch {here}[https://github.com/brandonhilkert/sucker_punch]. # diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb index 428d409e094..4731b9ad44e 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb @@ -354,7 +354,7 @@ module ActiveRecord end # Inserts the given fixture into the table. Overridden in adapters that require - # something beyond a simple insert (eg. Oracle). + # something beyond a simple insert (e.g. Oracle). # Most of adapters should implement `insert_fixtures_set` that leverages bulk SQL insert. # We keep this method to provide fallback # for databases like sqlite that do not support bulk inserts. diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb index ab107742ed3..1456dd0fedb 100644 --- a/activerecord/lib/active_record/nested_attributes.rb +++ b/activerecord/lib/active_record/nested_attributes.rb @@ -288,7 +288,7 @@ module ActiveRecord # [:allow_destroy] # If true, destroys any members from the attributes hash with a # _destroy key and a value that evaluates to +true+ - # (eg. 1, '1', true, or 'true'). This option is off by default. + # (e.g. 1, '1', true, or 'true'). This option is off by default. # [:reject_if] # Allows you to specify a Proc or a Symbol pointing to a method # that checks whether a record should be built for a certain attribute diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 6eb717817bc..21c204454d3 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -332,7 +332,7 @@ db_namespace = namespace :db do end namespace :fixtures do - desc "Loads fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures." + desc "Loads fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z. Specify an alternative path (e.g. spec/fixtures) using FIXTURES_PATH=spec/fixtures." task load: :load_config do require "active_record/fixtures" @@ -354,7 +354,7 @@ db_namespace = namespace :db do ActiveRecord::FixtureSet.create_fixtures(fixtures_dir, fixture_files) end - # desc "Search for a fixture given a LABEL or ID. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures." + # desc "Search for a fixture given a LABEL or ID. Specify an alternative path (e.g. spec/fixtures) using FIXTURES_PATH=spec/fixtures." task identify: :load_config do require "active_record/fixtures" diff --git a/activerecord/lib/active_record/sanitization.rb b/activerecord/lib/active_record/sanitization.rb index b16cbb0f840..58c31feedcb 100644 --- a/activerecord/lib/active_record/sanitization.rb +++ b/activerecord/lib/active_record/sanitization.rb @@ -67,7 +67,7 @@ module ActiveRecord ) # Ensure we aren't dealing with a subclass of String that might - # override methods we use (eg. Arel::Nodes::SqlLiteral). + # override methods we use (e.g. Arel::Nodes::SqlLiteral). if condition.first.kind_of?(String) && !condition.first.instance_of?(String) condition = [String.new(condition.first), *condition[1..-1]] end diff --git a/activerecord/lib/active_record/store.rb b/activerecord/lib/active_record/store.rb index 939dbcecf48..5cce0c6672e 100644 --- a/activerecord/lib/active_record/store.rb +++ b/activerecord/lib/active_record/store.rb @@ -23,7 +23,7 @@ module ActiveRecord # You can set custom coder to encode/decode your serialized attributes to/from different formats. # JSON, YAML, Marshal are supported out of the box. Generally it can be any wrapper that provides +load+ and +dump+. # - # NOTE: If you are using structured database data types (eg. PostgreSQL +hstore+/+json+, or MySQL 5.7+ + # NOTE: If you are using structured database data types (e.g. PostgreSQL +hstore+/+json+, or MySQL 5.7+ # +json+) there is no need for the serialization provided by {.store}[rdoc-ref:rdoc-ref:ClassMethods#store]. # Simply use {.store_accessor}[rdoc-ref:ClassMethods#store_accessor] instead to generate # the accessor methods. Be aware that these columns use a string keyed hash and do not allow access diff --git a/activesupport/lib/active_support/locale/en.yml b/activesupport/lib/active_support/locale/en.yml index c64b7598ee3..3d7bea03335 100644 --- a/activesupport/lib/active_support/locale/en.yml +++ b/activesupport/lib/active_support/locale/en.yml @@ -47,7 +47,7 @@ en: # If set to true, precision will mean the number of significant digits instead # of the number of decimal digits (1234 with precision 2 becomes 1200, 1.23543 becomes 1.2) significant: false - # If set, the zeros after the decimal separator will always be stripped (eg.: 1.200 will be 1.2) + # If set, the zeros after the decimal separator will always be stripped (e.g.: 1.200 will be 1.2) strip_insignificant_zeros: false # Used in NumberHelper.number_to_currency() diff --git a/activesupport/lib/active_support/number_helper.rb b/activesupport/lib/active_support/number_helper.rb index 0c87114c0db..58ec8944a45 100644 --- a/activesupport/lib/active_support/number_helper.rb +++ b/activesupport/lib/active_support/number_helper.rb @@ -270,7 +270,7 @@ module ActiveSupport end # Pretty prints (formats and approximates) a number in a way it - # is more readable by humans (eg.: 1200000000 becomes "1.2 + # is more readable by humans (e.g.: 1200000000 becomes "1.2 # Billion"). This is useful for numbers that can get very large # (and too hard to read). # @@ -278,7 +278,7 @@ module ActiveSupport # size. # # You can also define your own unit-quantifier names if you want - # to use other decimal units (eg.: 1500 becomes "1.5 + # to use other decimal units (e.g.: 1500 becomes "1.5 # kilometers", 0.150 becomes "150 milliliters", etc). You may # define a wide range of unit quantifiers, even fractional ones # (centi, deci, mili, etc). diff --git a/activesupport/lib/active_support/number_helper/number_converter.rb b/activesupport/lib/active_support/number_helper/number_converter.rb index 9c1b6b03d98..75509f1eca1 100644 --- a/activesupport/lib/active_support/number_helper/number_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_converter.rb @@ -30,7 +30,7 @@ module ActiveSupport # If set to true, precision will mean the number of significant digits instead # of the number of decimal digits (1234 with precision 2 becomes 1200, 1.23543 becomes 1.2) significant: false, - # If set, the zeros after the decimal separator will always be stripped (eg.: 1.200 will be 1.2) + # If set, the zeros after the decimal separator will always be stripped (e.g.: 1.200 will be 1.2) strip_insignificant_zeros: false }, diff --git a/activesupport/lib/active_support/subscriber.rb b/activesupport/lib/active_support/subscriber.rb index abec701535c..1dc5a573132 100644 --- a/activesupport/lib/active_support/subscriber.rb +++ b/activesupport/lib/active_support/subscriber.rb @@ -85,7 +85,7 @@ module ActiveSupport pattern = prepare_pattern(event) - # Don't add multiple subscribers (eg. if methods are redefined). + # Don't add multiple subscribers (e.g. if methods are redefined). return if pattern_subscribed?(pattern) subscriber.patterns[pattern] = notifier.subscribe(pattern, subscriber) diff --git a/guides/source/5_0_release_notes.md b/guides/source/5_0_release_notes.md index b090c71a57e..c8c9b82f805 100644 --- a/guides/source/5_0_release_notes.md +++ b/guides/source/5_0_release_notes.md @@ -346,8 +346,8 @@ Please refer to the [Changelog][action-pack] for detailed changes. names instead. ([commit](https://github.com/rails/rails/commit/83b767ce)) -* Deprecated accessing mime types via constants (eg. `Mime::HTML`). Use the - subscript operator with a symbol instead (eg. `Mime[:html]`). +* Deprecated accessing mime types via constants (e.g. `Mime::HTML`). Use the + subscript operator with a symbol instead (e.g. `Mime[:html]`). ([Pull Request](https://github.com/rails/rails/pull/21869)) * Deprecated `redirect_to :back` in favor of `redirect_back`, which accepts a diff --git a/guides/source/active_job_basics.md b/guides/source/active_job_basics.md index a7ea17eee6c..eff7476eb12 100644 --- a/guides/source/active_job_basics.md +++ b/guides/source/active_job_basics.md @@ -453,7 +453,7 @@ class GuestsCleanupJob < ApplicationJob end ``` -If the exception is not rescued within the job, eg. as shown above, then the job is referred to as "failed". +If the exception is not rescued within the job, e.g. as shown above, then the job is referred to as "failed". ### Retrying or Discarding failed jobs diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 1cbb015266a..977325c7505 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -221,7 +221,7 @@ The full set of methods that can be used in this block are as follows: or not. Defaults to `true`. * `scaffold_controller` different from `resource_controller`, defines which generator to use for generating a _scaffolded_ controller when using `rails generate scaffold`. Defaults to `:scaffold_controller`. * `stylesheets` turns on the hook for stylesheets in generators. Used in Rails for when the `scaffold` generator is run, but this hook can be used in other generates as well. Defaults to `true`. -* `stylesheet_engine` configures the stylesheet engine (for eg. sass) to be used when generating assets. Defaults to `:css`. +* `stylesheet_engine` configures the stylesheet engine (for e.g. sass) to be used when generating assets. Defaults to `:css`. * `scaffold_stylesheet` creates `scaffold.css` when generating a scaffolded resource. Defaults to `true`. * `test_framework` defines which test framework to use. Defaults to `false` and will use minitest by default. * `template_engine` defines which template engine to use, such as ERB or Haml. Defaults to `:erb`. @@ -1200,7 +1200,7 @@ That environment is no different than the default ones, start a server with `rai ### 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. +(e.g. `/`). This section explains how to run your application inside a directory. Let's assume we want to deploy our application to "/app1". Rails needs to know this directory to generate the appropriate routes: diff --git a/guides/source/contributing_to_ruby_on_rails.md b/guides/source/contributing_to_ruby_on_rails.md index dd1d3da0ea2..9d1641c8e0b 100644 --- a/guides/source/contributing_to_ruby_on_rails.md +++ b/guides/source/contributing_to_ruby_on_rails.md @@ -153,7 +153,7 @@ We are happy to have people volunteer to translate the Rails guides. Just follow Note that translations are not submitted to the Rails repository. As detailed above, your work happens in a fork. This is so because in practice documentation maintenance via patches is only sustainable in English. -To generate the guides in HTML format cd into the *guides* directory then run (eg. for it-IT): +To generate the guides in HTML format cd into the *guides* directory then run (e.g. for it-IT): ```bash $ bundle install diff --git a/guides/source/form_helpers.md b/guides/source/form_helpers.md index 41cedbac17b..72f4876fd39 100644 --- a/guides/source/form_helpers.md +++ b/guides/source/form_helpers.md @@ -963,7 +963,7 @@ end ``` If the hash of attributes for an object contains the key `_destroy` with a value that -evaluates to `true` (eg. 1, '1', true, or 'true') then the object will be destroyed. +evaluates to `true` (e.g. 1, '1', true, or 'true') then the object will be destroyed. This form allows users to remove addresses: ```erb diff --git a/guides/source/routing.md b/guides/source/routing.md index 161984c9933..52e58d2db5f 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -955,7 +955,7 @@ resources :user_permissions, controller: 'admin/user_permissions' This will route to the `Admin::UserPermissions` controller. NOTE: Only the directory notation is supported. Specifying the -controller with Ruby constant notation (eg. `controller: 'Admin::UserPermissions'`) +controller with Ruby constant notation (e.g. `controller: 'Admin::UserPermissions'`) can lead to routing problems and results in a warning. diff --git a/guides/source/ruby_on_rails_guides_guidelines.md b/guides/source/ruby_on_rails_guides_guidelines.md index 79c99bc2e6c..6899de66f0d 100644 --- a/guides/source/ruby_on_rails_guides_guidelines.md +++ b/guides/source/ruby_on_rails_guides_guidelines.md @@ -139,7 +139,7 @@ By default, guides that have not been modified are not processed, so `ONLY` is r To force processing all the guides, pass `ALL=1`. -If you want to generate guides in a language other than English, you can keep them in a separate directory under `source` (eg. `source/es`) and use the `GUIDES_LANGUAGE` environment variable: +If you want to generate guides in a language other than English, you can keep them in a separate directory under `source` (e.g. `source/es`) and use the `GUIDES_LANGUAGE` environment variable: ``` bundle exec rake guides:generate GUIDES_LANGUAGE=es diff --git a/railties/lib/rails/generators/rails/controller/controller_generator.rb b/railties/lib/rails/generators/rails/controller/controller_generator.rb index 88729545f33..2ccc1c18c0e 100644 --- a/railties/lib/rails/generators/rails/controller/controller_generator.rb +++ b/railties/lib/rails/generators/rails/controller/controller_generator.rb @@ -34,7 +34,7 @@ module Rails end # This method creates nested route entry for namespaced resources. - # For eg. rails g controller foo/bar/baz index show + # For e.g. rails g controller foo/bar/baz index show # Will generate - # namespace :foo do # namespace :bar do