railties 5.0.0.1 → 5.0.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 358272652a217b7d43a70124f1be3fe2a03eef04
4
- data.tar.gz: a1afafcddcaff8c0a76aa499a894f997caa087b5
3
+ metadata.gz: 6edf286e176a24574ff22a2390cdcaf3637eef0d
4
+ data.tar.gz: e701083b735cfef4fa45c0fd88e3d53cfca06364
5
5
  SHA512:
6
- metadata.gz: 1b0fa8a15f55dd436e6dacc46145f36ea17708b64d0d6bf199cb9c459f38df8036f946c447e6576b3b4147940197643a5984f7e2dd331698bc149127adf08439
7
- data.tar.gz: f47df33e1c89811d2f730bab11aaf56bb362179d7f67de62a464a544728bb945c1e570798c3bf289539b43886a3b28c4d96b5606cb7329b36bbf7db5fbe53cac
6
+ metadata.gz: fb90a3f1073ba45327faaf0cc41285124d90f1c8ca55fa83cd6b587c88c9f16782f8fc62a400e281b5f1b725f01f6cca01d82c991e0efbac2b146d96ec9f4ab4
7
+ data.tar.gz: '0979cc1eca996b870fd0c71a2bb0ea28ce1639bffc283b54c33e725df75e2fc5c26a948d0d7cd271e825500454edfcf73cff48a8f0280b7d05d64988cfd617c5'
@@ -1,5 +1,45 @@
1
+ ## Rails 5.0.1.rc1 (December 01, 2016) ##
2
+
3
+ * Reset a new session directly after its creation in ActionDispatch::IntegrationTest#open_session
4
+
5
+ Fixes Issue #22742
6
+
7
+ *Tawan Sierek*
8
+
9
+ * Add `:skip_sprockets` to `Rails::PluginBuilder::PASSTHROUGH_OPTIONS`
10
+
11
+ *Tsukuru Tanimichi*
12
+
13
+ * Run `Minitest.after_run` hooks when running `rails test`.
14
+
15
+ *Michael Grosser*
16
+
17
+ * Run `before_configuration` callbacks as soon as application constant
18
+ inherits from `Rails::Application`.
19
+
20
+ Fixes #19880.
21
+
22
+ *Yuji Yaginuma*
23
+
24
+ * Do not run `bundle install` when generating a new plugin.
25
+
26
+ Since bundler 1.12.0, the gemspec is validated so the `bundle install`
27
+ command will fail just after the gem is created causing confusion to the
28
+ users. This change was a bug fix to correctly validate gemspecs.
29
+
30
+ *Rafael Mendonça França*
31
+
32
+ * Ensure `/rails/info` routes match in development for apps with a catch-all globbing route.
33
+
34
+ *Nicholas Firth-McCoy*
35
+
36
+
1
37
  ## Rails 5.0.0 (June 30, 2016) ##
2
38
 
39
+ * Ensure `/rails/info` routes match in development for apps with a catch-all globbing route.
40
+
41
+ *Nicholas Firth-McCoy*
42
+
3
43
  * Ensure `/rails/info` routes match in development for apps with a catch-all globbing route.
4
44
 
5
45
  *Nicholas Firth-McCoy*
@@ -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/5-0-stable/railties
21
21
 
22
22
  == License
23
23
 
@@ -87,6 +87,7 @@ module Rails
87
87
  super
88
88
  Rails.app_class = base
89
89
  add_lib_to_load_path!(find_root(base.called_from))
90
+ ActiveSupport.run_load_hooks(:before_configuration, base)
90
91
  end
91
92
 
92
93
  def instance
@@ -146,7 +147,6 @@ module Rails
146
147
  def run_load_hooks! # :nodoc:
147
148
  return self if @ran_load_hooks
148
149
  @ran_load_hooks = true
149
- ActiveSupport.run_load_hooks(:before_configuration, self)
150
150
 
151
151
  @initial_variable_values.each do |variable_name, value|
152
152
  if INITIAL_VARIABLES.include?(variable_name)
@@ -206,6 +206,10 @@ module Rails
206
206
  }
207
207
  end
208
208
  end
209
+
210
+ def respond_to_missing?(symbol, *)
211
+ true
212
+ end
209
213
  end
210
214
  end
211
215
  end
@@ -1,10 +1,11 @@
1
- require 'rake'
2
1
  require 'active_support'
3
2
 
4
3
  module Rails
5
4
  module RakeProxy #:nodoc:
6
5
  private
7
6
  def run_rake_task(command)
7
+ require_rake
8
+
8
9
  ARGV.unshift(command) # Prepend the command, so Rake knows how to run it.
9
10
 
10
11
  Rake.application.standard_exception_handling do
@@ -15,6 +16,8 @@ module Rails
15
16
  end
16
17
 
17
18
  def rake_tasks
19
+ require_rake
20
+
18
21
  return @rake_tasks if defined?(@rake_tasks)
19
22
 
20
23
  ActiveSupport::Deprecation.silence do
@@ -30,5 +33,9 @@ module Rails
30
33
  def formatted_rake_tasks
31
34
  rake_tasks.map { |t| [ t.name_with_args, t.comment ] }
32
35
  end
36
+
37
+ def require_rake
38
+ require "rake" # Defer booting Rake until we know it's needed.
39
+ end
33
40
  end
34
41
  end
@@ -61,9 +61,11 @@ elsif File.exist?(code_or_file)
61
61
  else
62
62
  begin
63
63
  eval(code_or_file, binding, __FILE__, __LINE__)
64
- rescue SyntaxError, NameError
64
+ rescue SyntaxError, NameError => e
65
65
  $stderr.puts "Please specify a valid ruby command or the path of a script to run."
66
66
  $stderr.puts "Run '#{command} -h' for help."
67
+ $stderr.puts
68
+ $stderr.puts e
67
69
  exit 1
68
70
  end
69
71
  end
@@ -1,9 +1,11 @@
1
1
  require "rails/test_unit/minitest_plugin"
2
2
 
3
3
  if defined?(ENGINE_ROOT)
4
- $: << File.expand_path('test', ENGINE_ROOT)
4
+ $LOAD_PATH << File.expand_path("test", ENGINE_ROOT)
5
5
  else
6
- $: << File.expand_path('../../test', APP_PATH)
6
+ $LOAD_PATH << File.expand_path("../../test", APP_PATH)
7
7
  end
8
8
 
9
- exit Minitest.run(ARGV)
9
+ Minitest.run_via[:rails] = true
10
+
11
+ require "active_support/testing/autorun"
@@ -103,6 +103,8 @@ In addition to those commands, there are:
103
103
  end
104
104
 
105
105
  def rake_tasks
106
+ require_rake
107
+
106
108
  return @rake_tasks if defined?(@rake_tasks)
107
109
 
108
110
  load_generators
@@ -7,8 +7,8 @@ module Rails
7
7
  module VERSION
8
8
  MAJOR = 5
9
9
  MINOR = 0
10
- TINY = 0
11
- PRE = "1"
10
+ TINY = 1
11
+ PRE = "rc1"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -277,7 +277,9 @@ module Rails
277
277
 
278
278
  protected
279
279
 
280
- # This code is based directly on the Text gem implementation
280
+ # This code is based directly on the Text gem implementation.
281
+ # Copyright (c) 2006-2013 Paul Battley, Michael Neumann, Tim Fletcher.
282
+ #
281
283
  # Returns a value representing the "cost" of transforming str1 into str2
282
284
  def self.levenshtein_distance str1, str2
283
285
  s = str1
@@ -242,7 +242,7 @@ module Rails
242
242
  ] + dev_edge_common
243
243
  elsif options.edge?
244
244
  [
245
- GemfileEntry.github('rails', 'rails/rails')
245
+ GemfileEntry.github('rails', 'rails/rails', '5-0-stable')
246
246
  ] + dev_edge_common
247
247
  else
248
248
  [GemfileEntry.version('rails',
@@ -9,6 +9,13 @@ module Erb # :nodoc:
9
9
  view_base_path = File.join("app/views", class_path, file_name + '_mailer')
10
10
  empty_directory view_base_path
11
11
 
12
+ if self.behavior == :invoke
13
+ formats.each do |format|
14
+ layout_path = File.join('app/views/layouts', class_path, filename_with_extensions('mailer', format))
15
+ template filename_with_extensions(:layout, format), layout_path
16
+ end
17
+ end
18
+
12
19
  actions.each do |action|
13
20
  @action = action
14
21
 
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%%= yield %>
12
+ </body>
13
+ </html>
@@ -226,6 +226,11 @@ module Rails
226
226
  end
227
227
  remove_task :update_config_files
228
228
 
229
+ def display_upgrade_guide_info
230
+ say "\nAfter this, check Rails upgrade guide at http://guides.rubyonrails.org/upgrading_ruby_on_rails.html for more details about upgrading your app."
231
+ end
232
+ remove_task :display_upgrade_guide_info
233
+
229
234
  def create_boot_file
230
235
  template "config/boot.rb"
231
236
  end
@@ -316,9 +321,11 @@ module Rails
316
321
 
317
322
  def delete_action_mailer_files_skipping_action_mailer
318
323
  if options[:skip_action_mailer]
319
- remove_file 'app/mailers/application_mailer.rb'
320
- remove_file 'app/views/layouts/mailer.html.erb'
321
- remove_file 'app/views/layouts/mailer.text.erb'
324
+ remove_file "app/mailers/application_mailer.rb"
325
+ remove_file "app/views/layouts/mailer.html.erb"
326
+ remove_file "app/views/layouts/mailer.text.erb"
327
+ remove_dir "app/mailers"
328
+ remove_dir "test/mailers"
322
329
  end
323
330
  end
324
331
 
@@ -1,5 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ git_source(:github) do |repo_name|
4
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5
+ "https://github.com/#{repo_name}.git"
6
+ end
7
+
3
8
  <% gemfile_entries.each do |gem| -%>
4
9
  <% if gem.comment -%>
5
10
 
@@ -35,7 +40,7 @@ group :development do
35
40
  <%- if options.dev? || options.edge? -%>
36
41
  gem 'web-console', github: 'rails/web-console'
37
42
  <%- else -%>
38
- gem 'web-console'
43
+ gem 'web-console', '>= 3.3.0'
39
44
  <%- end -%>
40
45
  <%- end -%>
41
46
  <% if depend_on_listen? -%>
@@ -6,7 +6,7 @@
6
6
  # Once upgraded flip defaults one by one to migrate to the new default.
7
7
  #
8
8
  <%- end -%>
9
- # Read the Rails 5.0 release notes for more info on each option.
9
+ # Read the Guide for Upgrading Ruby on Rails for more info on each option.
10
10
  <%- unless options[:api] -%>
11
11
 
12
12
  # Enable per-form CSRF tokens. Previous versions had false.
@@ -81,7 +81,7 @@ task default: :test
81
81
  end
82
82
 
83
83
  PASSTHROUGH_OPTIONS = [
84
- :skip_active_record, :skip_action_mailer, :skip_javascript, :database,
84
+ :skip_active_record, :skip_action_mailer, :skip_javascript, :skip_sprockets, :database,
85
85
  :javascript, :quiet, :pretend, :force, :skip
86
86
  ]
87
87
 
@@ -258,7 +258,7 @@ task default: :test
258
258
  build(:leftovers)
259
259
  end
260
260
 
261
- public_task :apply_rails_template, :run_bundle
261
+ public_task :apply_rails_template
262
262
 
263
263
  def run_after_bundle_callbacks
264
264
  @after_bundle_callbacks.each do |callback|
@@ -5,4 +5,6 @@ require 'rails/test_unit/minitest_plugin'
5
5
 
6
6
  Rails::TestUnitReporter.executable = 'bin/test'
7
7
 
8
- exit Minitest.run(ARGV)
8
+ Minitest.run_via[:rails] = true
9
+
10
+ require "active_support/testing/autorun"
@@ -2,7 +2,7 @@ require 'active_support/deprecation'
2
2
 
3
3
  namespace :app do
4
4
  desc "Update configs and some other initially generated files (or use just update:configs or update:bin)"
5
- task update: [ "update:configs", "update:bin" ]
5
+ task update: [ "update:configs", "update:bin", "update:upgrade_guide_info" ]
6
6
 
7
7
  desc "Applies the template supplied by LOCATION=(/path/to/template) or URL"
8
8
  task template: :environment do
@@ -67,6 +67,10 @@ namespace :app do
67
67
  task :bin do
68
68
  RailsUpdate.invoke_from_app_generator :create_bin_files
69
69
  end
70
+
71
+ task :upgrade_guide_info do
72
+ RailsUpdate.invoke_from_app_generator :display_upgrade_guide_info
73
+ end
70
74
  end
71
75
  end
72
76
 
@@ -61,19 +61,30 @@ module Minitest
61
61
  # as the patterns would also contain the other Rake tasks.
62
62
  def self.rake_run(patterns) # :nodoc:
63
63
  @rake_patterns = patterns
64
- passed = run(Shellwords.split(ENV['TESTOPTS'] || ''))
65
- exit passed unless passed
66
- passed
64
+ autorun
67
65
  end
68
66
 
67
+ module RunRespectingRakeTestopts
68
+ def run(args = [])
69
+ if defined?(@rake_patterns)
70
+ args = Shellwords.split(ENV["TESTOPTS"] || "")
71
+ end
72
+
73
+ super
74
+ end
75
+ end
76
+
77
+ singleton_class.prepend RunRespectingRakeTestopts
78
+
69
79
  # Owes great inspiration to test runner trailblazers like RSpec,
70
80
  # minitest-reporters, maxitest and others.
71
81
  def self.plugin_rails_init(options)
72
- self.run_with_rails_extension = true
73
-
74
82
  ENV["RAILS_ENV"] = options[:environment] || "test"
75
83
 
76
- ::Rails::TestRequirer.require_files(options[:patterns]) unless run_with_autorun
84
+ # If run via `ruby` we've been passed the files to run directly.
85
+ unless run_via[:ruby]
86
+ ::Rails::TestRequirer.require_files(options[:patterns])
87
+ end
77
88
 
78
89
  unless options[:full_backtrace] || ENV["BACKTRACE"]
79
90
  # Plugin can run without Rails loaded, check before filtering.
@@ -86,8 +97,7 @@ module Minitest
86
97
  reporter << ::Rails::TestUnitReporter.new(options[:io], options)
87
98
  end
88
99
 
89
- mattr_accessor(:run_with_autorun) { false }
90
- mattr_accessor(:run_with_rails_extension) { false }
100
+ mattr_accessor(:run_via) { Hash.new }
91
101
  end
92
102
 
93
103
  # Put Rails as the first plugin minitest initializes so other plugins
@@ -1,4 +1,4 @@
1
- require 'rails/test_unit/line_filtering'
1
+ require "rails/test_unit/line_filtering"
2
2
 
3
3
  if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any?
4
4
  ENV['RAILS_ENV'] ||= 'test'
@@ -14,7 +14,9 @@ module Rails
14
14
  end
15
15
 
16
16
  initializer "test_unit.line_filtering" do
17
- ActiveSupport::TestCase.extend Rails::LineFiltering
17
+ ActiveSupport.on_load(:active_support_test_case) {
18
+ ActiveSupport::TestCase.extend Rails::LineFiltering
19
+ }
18
20
  end
19
21
 
20
22
  rake_tasks do
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: 5.0.0.1
4
+ version: 5.0.1.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-10 00:00:00.000000000 Z
11
+ date: 2016-11-30 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: 5.0.0.1
19
+ version: 5.0.1.rc1
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: 5.0.0.1
26
+ version: 5.0.1.rc1
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: 5.0.0.1
33
+ version: 5.0.1.rc1
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: 5.0.0.1
40
+ version: 5.0.1.rc1
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: 5.0.0.1
95
+ version: 5.0.1.rc1
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: 5.0.0.1
102
+ version: 5.0.1.rc1
103
103
  description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
104
104
  email: david@loudthinking.com
105
105
  executables:
@@ -163,6 +163,8 @@ files:
163
163
  - lib/rails/generators/erb/controller/controller_generator.rb
164
164
  - lib/rails/generators/erb/controller/templates/view.html.erb
165
165
  - lib/rails/generators/erb/mailer/mailer_generator.rb
166
+ - lib/rails/generators/erb/mailer/templates/layout.html.erb.tt
167
+ - lib/rails/generators/erb/mailer/templates/layout.text.erb.tt
166
168
  - lib/rails/generators/erb/mailer/templates/view.html.erb
167
169
  - lib/rails/generators/erb/mailer/templates/view.text.erb
168
170
  - lib/rails/generators/erb/scaffold/scaffold_generator.rb
@@ -397,14 +399,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
397
399
  version: 2.2.2
398
400
  required_rubygems_version: !ruby/object:Gem::Requirement
399
401
  requirements:
400
- - - ">="
402
+ - - ">"
401
403
  - !ruby/object:Gem::Version
402
- version: '0'
404
+ version: 1.3.1
403
405
  requirements: []
404
406
  rubyforge_project:
405
- rubygems_version: 2.6.6
407
+ rubygems_version: 2.5.2
406
408
  signing_key:
407
409
  specification_version: 4
408
410
  summary: Tools for creating, working with, and running Rails applications.
409
411
  test_files: []
410
- has_rdoc: