railties 6.0.3.7 → 6.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 825ef11e10456c48bb26ab284dceb86ba181a2fcc2cdab59425d4484c9308a75
4
- data.tar.gz: 5025c0181c18449220befa25a78ea393ea171b6017184b0a946032c6ce93f0c1
3
+ metadata.gz: d7bc2b017b91f2d6982e1b6d1d65f3c857b26de18b4c3f8e0da7c89abbba8cd6
4
+ data.tar.gz: 13915c7088039cf0060c81b65f7d8e42234514ba9fb6db36b05f980eda466028
5
5
  SHA512:
6
- metadata.gz: a436816ee97c5f0eda5eb9bad31a28437793975858bcb222dcfd1da04c58a7a9dbf59eaeb78f13407ba70396a4d7a5ae1744d3f1c9935443adad81a2c5938141
7
- data.tar.gz: 1ebc55b0503a812438a2d9c05ab77983ec5c9007fb9586ff21d55a9bc3a7ef224f6637c4a10927180d0fc9b19899011cb86ccb14051621e12195f01f6b94253d
6
+ metadata.gz: 622ca0f8a1bcb74791b73b632b3cd3ab9002016516b763075b14a17b5f4dbc788a3a2fe68a7c41584b0a39f6723063428dc70a3881f397bd182b6955fc5ae289
7
+ data.tar.gz: 9aab295636843b9c4dedebf7142f04994718a93341c07a0e12fe554e8b1fa47cfb2423324e67cb6dafb2d4cfeb3327fda340ff41b956304cbb1b758bebfd699d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## Rails 6.0.4 (June 15, 2021) ##
2
+
3
+ * Allow relative paths with trailing slashes to be passed to `rails test`.
4
+
5
+ *Eugene Kenny*
6
+
7
+ * Return a 405 Method Not Allowed response when a request uses an unknown HTTP method.
8
+
9
+ Fixes #38998.
10
+
11
+ *Loren Norman*
12
+
13
+
1
14
  ## Rails 6.0.3.7 (May 05, 2021) ##
2
15
 
3
16
  * No changes.
@@ -13,6 +26,7 @@
13
26
  * No changes.
14
27
 
15
28
 
29
+
16
30
  ## Rails 6.0.3.4 (October 07, 2020) ##
17
31
 
18
32
  * No changes.
data/README.rdoc CHANGED
@@ -17,7 +17,7 @@ The latest version of Railties can be installed with RubyGems:
17
17
 
18
18
  Source code can be downloaded as part of the Rails project on GitHub
19
19
 
20
- * https://github.com/rails/rails/tree/master/railties
20
+ * https://github.com/rails/rails/tree/main/railties
21
21
 
22
22
  == License
23
23
 
@@ -189,7 +189,7 @@ module Rails
189
189
 
190
190
  class EdgeTask < RepoTask
191
191
  def rails_version
192
- "master@#{`git rev-parse HEAD`[0, 7]}"
192
+ "main@#{`git rev-parse HEAD`[0, 7]}"
193
193
  end
194
194
  end
195
195
 
@@ -220,27 +220,27 @@ module Rails
220
220
  # config.middleware.use ExceptionNotifier, config_for(:exception_notification)
221
221
  # end
222
222
  def config_for(name, env: Rails.env)
223
- if name.is_a?(Pathname)
224
- yaml = name
225
- else
226
- yaml = Pathname.new("#{paths["config"].existent.first}/#{name}.yml")
227
- end
223
+ yaml = name.is_a?(Pathname) ? name : Pathname.new("#{paths["config"].existent.first}/#{name}.yml")
228
224
 
229
225
  if yaml.exist?
230
226
  require "erb"
231
- config = YAML.load(ERB.new(yaml.read).result) || {}
232
- config = (config["shared"] || {}).merge(config[env] || {})
227
+ all_configs = YAML.load(ERB.new(yaml.read).result) || {}
228
+ config, shared = all_configs[env], all_configs["shared"]
233
229
 
234
- ActiveSupport::OrderedOptions.new.tap do |options|
235
- options.update(NonSymbolAccessDeprecatedHash.new(config))
230
+ config ||= {} if shared.nil? || shared.is_a?(Hash)
231
+
232
+ if config.is_a?(Hash)
233
+ ActiveSupport::OrderedOptions.new.update(NonSymbolAccessDeprecatedHash.new(shared&.deep_merge(config) || config))
234
+ else
235
+ config || shared
236
236
  end
237
237
  else
238
238
  raise "Could not load configuration. No such file - #{yaml}"
239
239
  end
240
- rescue Psych::SyntaxError => e
240
+ rescue Psych::SyntaxError => error
241
241
  raise "YAML syntax error occurred while parsing #{yaml}. " \
242
242
  "Please note that YAML must be consistently indented using spaces. Tabs are not allowed. " \
243
- "Error: #{e.message}"
243
+ "Error: #{error.message}"
244
244
  end
245
245
 
246
246
  # Stores some of the Rails initial environment parameters which
@@ -5,7 +5,7 @@ require "rails/source_annotation_extractor"
5
5
  module Rails
6
6
  module Command
7
7
  class NotesCommand < Base # :nodoc:
8
- class_option :annotations, aliases: "-a", desc: "Filter by specific annotations, e.g. Foobar TODO", type: :array, default: Rails::SourceAnnotationExtractor::Annotation.tags
8
+ class_option :annotations, aliases: "-a", desc: "Filter by specific annotations, e.g. Foobar TODO", type: :array
9
9
 
10
10
  def perform(*)
11
11
  require_application_and_environment!
@@ -16,7 +16,7 @@ module Rails
16
16
 
17
17
  private
18
18
  def display_annotations
19
- annotations = options[:annotations]
19
+ annotations = options[:annotations] || Rails::SourceAnnotationExtractor::Annotation.tags
20
20
  tag = (annotations.length > 1)
21
21
 
22
22
  Rails::SourceAnnotationExtractor.enumerate annotations.join("|"), tag: tag, dirs: directories
@@ -9,8 +9,8 @@ module Rails
9
9
  module VERSION
10
10
  MAJOR = 6
11
11
  MINOR = 0
12
- TINY = 3
13
- PRE = "7"
12
+ TINY = 4
13
+ PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -286,7 +286,7 @@ module Rails
286
286
  else
287
287
  [GemfileEntry.version("rails",
288
288
  rails_version_specifier,
289
- "Bundle edge Rails instead: gem 'rails', github: 'rails/rails'")]
289
+ "Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'")]
290
290
  end
291
291
  end
292
292
 
@@ -47,7 +47,7 @@ module Rails
47
47
  # Started GET "/session/new" for 127.0.0.1 at 2012-09-26 14:51:42 -0700
48
48
  def started_request_message(request) # :doc:
49
49
  'Started %s "%s" for %s at %s' % [
50
- request.request_method,
50
+ request.raw_request_method,
51
51
  request.filtered_path,
52
52
  request.remote_ip,
53
53
  Time.now.to_default_s ]
data/lib/rails/railtie.rb CHANGED
@@ -192,6 +192,7 @@ module Rails
192
192
  super
193
193
  end
194
194
  end
195
+ ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)
195
196
 
196
197
  # receives an instance variable identifier, set the variable value if is
197
198
  # blank and append given block to value, which will be used later in
@@ -61,7 +61,7 @@ module Rails
61
61
  private
62
62
  def extract_filters(argv)
63
63
  # Extract absolute and relative paths but skip -n /.*/ regexp filters.
64
- argv.select { |arg| arg =~ %r%^/?\w+/% && !arg.end_with?("/") }.map do |path|
64
+ argv.select { |arg| path_argument?(arg) && !regexp_filter?(arg) }.map do |path|
65
65
  case
66
66
  when /(:\d+)+$/.match?(path)
67
67
  file, *lines = path.split(":")
@@ -75,6 +75,14 @@ module Rails
75
75
  end
76
76
  end
77
77
  end
78
+
79
+ def regexp_filter?(arg)
80
+ arg.start_with?("/") && arg.end_with?("/")
81
+ end
82
+
83
+ def path_argument?(arg)
84
+ %r%^/?\w+/%.match?(arg)
85
+ end
78
86
  end
79
87
  end
80
88
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railties
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.3.7
4
+ version: 6.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-05 00:00:00.000000000 Z
11
+ date: 2021-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 6.0.3.7
19
+ version: 6.0.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 6.0.3.7
26
+ version: 6.0.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 6.0.3.7
33
+ version: 6.0.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 6.0.3.7
40
+ version: 6.0.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - '='
94
94
  - !ruby/object:Gem::Version
95
- version: 6.0.3.7
95
+ version: 6.0.4
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - '='
101
101
  - !ruby/object:Gem::Version
102
- version: 6.0.3.7
102
+ version: 6.0.4
103
103
  description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
104
104
  email: david@loudthinking.com
105
105
  executables:
@@ -432,11 +432,11 @@ licenses:
432
432
  - MIT
433
433
  metadata:
434
434
  bug_tracker_uri: https://github.com/rails/rails/issues
435
- changelog_uri: https://github.com/rails/rails/blob/v6.0.3.7/railties/CHANGELOG.md
436
- documentation_uri: https://api.rubyonrails.org/v6.0.3.7/
435
+ changelog_uri: https://github.com/rails/rails/blob/v6.0.4/railties/CHANGELOG.md
436
+ documentation_uri: https://api.rubyonrails.org/v6.0.4/
437
437
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
438
- source_code_uri: https://github.com/rails/rails/tree/v6.0.3.7/railties
439
- post_install_message:
438
+ source_code_uri: https://github.com/rails/rails/tree/v6.0.4/railties
439
+ post_install_message:
440
440
  rdoc_options:
441
441
  - "--exclude"
442
442
  - "."
@@ -454,7 +454,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
454
454
  version: '0'
455
455
  requirements: []
456
456
  rubygems_version: 3.1.2
457
- signing_key:
457
+ signing_key:
458
458
  specification_version: 4
459
459
  summary: Tools for creating, working with, and running Rails applications.
460
460
  test_files: []