Skip to content

Commit a465562

Browse files
committed
Fix some typographical errors
1 parent 96ea772 commit a465562

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

actionview/lib/action_view/helpers/cache_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class UncacheableFragmentError < StandardError; end
9898
# render "maintenance_tasks/runs/info/#{run.status}"
9999
#
100100
# Because the value passed to render ends in interpolation, Action View
101-
# will mark all partials within the "maintenace_tasks/runs/info" folder as
101+
# will mark all partials within the "maintenance_tasks/runs/info" folder as
102102
# dependencies.
103103
#
104104
# === Explicit dependencies

actionview/test/template/date_helper_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def test_select_day_with_two_digit_numbers
238238
assert_dom_equal expected, select_day(2, use_two_digit_numbers: true)
239239
end
240240

241-
def test_select_day_with_day_fomat
241+
def test_select_day_with_day_format
242242
expected = +%(<select id="date_day" name="date[day]">\n)
243243
expected << %(<option value="1">1st</option>\n<option selected="selected" value="2">2nd</option>\n<option value="3">3rd</option>\n<option value="4">4th</option>\n<option value="5">5th</option>\n<option value="6">6th</option>\n<option value="7">7th</option>\n<option value="8">8th</option>\n<option value="9">9th</option>\n<option value="10">10th</option>\n<option value="11">11th</option>\n<option value="12">12th</option>\n<option value="13">13th</option>\n<option value="14">14th</option>\n<option value="15">15th</option>\n<option value="16">16th</option>\n<option value="17">17th</option>\n<option value="18">18th</option>\n<option value="19">19th</option>\n<option value="20">20th</option>\n<option value="21">21st</option>\n<option value="22">22nd</option>\n<option value="23">23rd</option>\n<option value="24">24th</option>\n<option value="25">25th</option>\n<option value="26">26th</option>\n<option value="27">27th</option>\n<option value="28">28th</option>\n<option value="29">29th</option>\n<option value="30">30th</option>\n<option value="31">31st</option>\n)
244244
expected << "</select>\n"

activemodel/lib/active_model/attribute_methods.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ def define_attribute_method_pattern(pattern, attr_name, owner:, as:, override: f
321321
canonical_method_name = pattern.method_name(attr_name)
322322
public_method_name = pattern.method_name(as)
323323

324-
# If defining a regular attribute method, we don't override methods that are explictly
325-
# defined in parrent classes.
324+
# If defining a regular attribute method, we don't override methods that are explicitly
325+
# defined in parent classes.
326326
if instance_method_already_implemented?(public_method_name)
327327
# However, for `alias_attribute`, we always define the method.
328328
# We check for override second because `instance_method_already_implemented?`

activemodel/lib/active_model/secure_password.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module ClassMethods
4141
#
4242
# Finally, a password reset token that's valid for 15 minutes after issue
4343
# is automatically configured when +reset_token+ is set to true (which it is by default)
44-
# and the object reponds to +generates_token_for+ (which Active Records do).
44+
# and the object responds to +generates_token_for+ (which Active Records do).
4545
#
4646
# To use +has_secure_password+, add bcrypt (~> 3.1.7) to your Gemfile:
4747
#

activesupport/lib/active_support/cache.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def mute
419419
# t1.join
420420
#
421421
# p val_1 # => "new value 1"
422-
# p val_2 # => "oritinal value"
422+
# p val_2 # => "original value"
423423
# p cache.fetch("foo") # => "new value 1"
424424
#
425425
# # The entry requires 3 seconds to expire (expires_in + race_condition_ttl)

activesupport/lib/active_support/testing/assertions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def _callable_to_source_string(callable)
324324
source.delete_prefix!("{")
325325
source.strip!
326326
# It won't read nice if the callable contains multiple
327-
# lines, and it should be a rare occurence anyway.
327+
# lines, and it should be a rare occurrence anyway.
328328
# Same if it takes arguments.
329329
if !source.include?("\n") && !source.start_with?("|")
330330
return source

activesupport/test/cache/behaviors/cache_increment_decrement_behavior.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_ttl_isnt_updated
3838
assert_equal 2, @cache.increment(key, 1, expires_in: 5000)
3939

4040
# having to sleep two seconds in a test is bad, but we're testing
41-
# a wide range of backends with different TTL mecanisms, most without
41+
# a wide range of backends with different TTL mechanisms, most without
4242
# subsecond granularity, so this is the only reliable way.
4343
sleep 2
4444

railties/lib/rails/generators/actions.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,9 @@ def match_file(path, pattern)
516516

517517
def route_namespace_pattern(namespace)
518518
namespace.each_with_index.reverse_each.reduce(nil) do |pattern, (name, i)|
519-
cummulative_margin = "\\#{i + 1}[ ]{2}"
520-
blank_or_indented_line = "^[ ]*\n|^#{cummulative_margin}.*\n"
521-
"(?:(?:#{blank_or_indented_line})*?^(#{cummulative_margin})namespace :#{name} do\n#{pattern})?"
519+
cumulative_margin = "\\#{i + 1}[ ]{2}"
520+
blank_or_indented_line = "^[ ]*\n|^#{cumulative_margin}.*\n"
521+
"(?:(?:#{blank_or_indented_line})*?^(#{cumulative_margin})namespace :#{name} do\n#{pattern})?"
522522
end.then do |pattern|
523523
/^([ ]*).+\.routes\.draw do[ ]*\n#{pattern}/
524524
end

railties/test/generators/app_generator_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ def test_esbuild_option
848848
assert_node_files
849849
end
850850

851-
def test_esbuild_option_with_javacript_argument
851+
def test_esbuild_option_with_javascript_argument
852852
run_generator [destination_root, "--javascript", "esbuild"]
853853
assert_gem "jsbundling-rails"
854854
end
@@ -872,7 +872,7 @@ def test_bun_option
872872
assert_gem "jsbundling-rails"
873873
end
874874

875-
def test_bun_option_with_javacript_argument
875+
def test_bun_option_with_javascript_argument
876876
run_generator [destination_root, "--javascript", "bun"]
877877
assert_gem "jsbundling-rails"
878878
end
@@ -1287,12 +1287,12 @@ def test_devcontainer
12871287

12881288
assert_equal expected_rails_app_config, compose_config["services"]["rails-app"]
12891289

1290-
expected_selenium_conifg = {
1290+
expected_selenium_config = {
12911291
"image" => "selenium/standalone-chromium",
12921292
"restart" => "unless-stopped",
12931293
}
12941294

1295-
assert_equal expected_selenium_conifg, compose_config["services"]["selenium"]
1295+
assert_equal expected_selenium_config, compose_config["services"]["selenium"]
12961296
end
12971297
end
12981298

railties/test/generators/plugin_generator_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def test_create_mountable_application_with_mountable_option
395395
assert_no_file "bin/test"
396396
end
397397

398-
def test_create_mountable_application_with_mountable_option_and_hypenated_name
398+
def test_create_mountable_application_with_mountable_option_and_hyphenated_name
399399
run_generator [File.join(destination_root, "hyphenated-name"), "--mountable"]
400400
assert_no_file "hyphenated-name/app/assets/javascripts/hyphenated/name"
401401
assert_file "hyphenated-name/app/assets/stylesheets/hyphenated/name"
@@ -417,7 +417,7 @@ def test_create_mountable_application_with_mountable_option_and_hypenated_name
417417
end
418418
end
419419

420-
def test_create_mountable_application_with_mountable_option_and_hypenated_and_underscored_name
420+
def test_create_mountable_application_with_mountable_option_and_hyphenated_and_underscored_name
421421
run_generator [File.join(destination_root, "my_hyphenated-name"), "--mountable"]
422422
assert_no_file "my_hyphenated-name/app/assets/javascripts/my_hyphenated/name"
423423
assert_file "my_hyphenated-name/app/assets/stylesheets/my_hyphenated/name"
@@ -439,7 +439,7 @@ def test_create_mountable_application_with_mountable_option_and_hypenated_and_un
439439
end
440440
end
441441

442-
def test_create_mountable_application_with_mountable_option_and_multiple_hypenates_in_name
442+
def test_create_mountable_application_with_mountable_option_and_multiple_hyphenates_in_name
443443
run_generator [File.join(destination_root, "deep-hyphenated-name"), "--mountable"]
444444
assert_no_file "deep-hyphenated-name/app/assets/javascripts/deep/hyphenated/name"
445445
assert_file "deep-hyphenated-name/app/assets/stylesheets/deep/hyphenated/name"

0 commit comments

Comments
 (0)