railties 4.2.0 → 4.2.1.rc1
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 +4 -4
- data/CHANGELOG.md +17 -0
- data/lib/rails/application.rb +15 -1
- data/lib/rails/engine.rb +3 -3
- data/lib/rails/gem_version.rb +2 -2
- data/lib/rails/generators/actions.rb +2 -2
- data/lib/rails/generators/generated_attribute.rb +4 -0
- data/lib/rails/generators/rails/app/app_generator.rb +1 -1
- data/lib/rails/generators/rails/app/templates/config/application.rb +1 -0
- data/lib/rails/generators/rails/model/USAGE +1 -1
- data/lib/rails/generators/rails/plugin/templates/Gemfile +4 -0
- data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb +1 -0
- data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +1 -0
- data/lib/rails/railtie.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10dc40c7374d5bd5c36a87aa0806a13753b3c3f4
|
4
|
+
data.tar.gz: 7c7988dab5d9a5bb70e610328baa573a78bf75dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a72ac84fbaf55ebe47be46ee77f4967358ffefd92ccb78607b0aba8f1b6bcfc3e43e6fc4fcbbf3fee20e222a132abeebe328c235bfa195dd180d808656630f5
|
7
|
+
data.tar.gz: 330732b41a529befb7c41f1f1e7458d7e250aeb1028fb099e6601ae9f460d0c1360d18035b416582616a9f43020211576cd899b3bf3a97141bfa15857c4612d8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
* Force generated routes to be inserted into routes.rb
|
2
|
+
|
3
|
+
*Andrew White*
|
4
|
+
|
5
|
+
* Don't remove all line endings from routes.rb when revoking scaffold.
|
6
|
+
|
7
|
+
Fixes #15913.
|
8
|
+
|
9
|
+
*Andrew White*
|
10
|
+
|
11
|
+
* Fix scaffold generator with `--helper=false` option.
|
12
|
+
|
13
|
+
*Rafael Mendonça França*
|
14
|
+
|
15
|
+
|
16
|
+
## Rails 4.2.0 (December 20, 2014) ##
|
17
|
+
|
1
18
|
* Deprecate `config.serve_static_assets` in favor of `config.serve_static_files`
|
2
19
|
to clarify that the option is unrelated to the asset pipeline.
|
3
20
|
|
data/lib/rails/application.rb
CHANGED
@@ -368,7 +368,21 @@ module Rails
|
|
368
368
|
@config = configuration
|
369
369
|
end
|
370
370
|
|
371
|
-
|
371
|
+
# Returns secrets added to config/secrets.yml.
|
372
|
+
#
|
373
|
+
# Example:
|
374
|
+
#
|
375
|
+
# development:
|
376
|
+
# secret_key_base: 836fa3665997a860728bcb9e9a1e704d427cfc920e79d847d79c8a9a907b9e965defa4154b2b86bdec6930adbe33f21364523a6f6ce363865724549fdfc08553
|
377
|
+
# test:
|
378
|
+
# secret_key_base: 5a37811464e7d378488b0f073e2193b093682e4e21f5d6f3ae0a4e1781e61a351fdc878a843424e81c73fb484a40d23f92c8dafac4870e74ede6e5e174423010
|
379
|
+
# production:
|
380
|
+
# secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
381
|
+
# namespace: my_app_production
|
382
|
+
#
|
383
|
+
# +Rails.application.secrets.namespace+ returns +my_app_production+ in the
|
384
|
+
# production environment.
|
385
|
+
def secrets
|
372
386
|
@secrets ||= begin
|
373
387
|
secrets = ActiveSupport::OrderedOptions.new
|
374
388
|
yaml = config.paths["config/secrets"].first
|
data/lib/rails/engine.rb
CHANGED
@@ -571,10 +571,10 @@ module Rails
|
|
571
571
|
end
|
572
572
|
|
573
573
|
initializer :add_routing_paths do |app|
|
574
|
-
|
574
|
+
routing_paths = self.paths["config/routes.rb"].existent
|
575
575
|
|
576
|
-
if routes? ||
|
577
|
-
app.routes_reloader.paths.unshift(*
|
576
|
+
if routes? || routing_paths.any?
|
577
|
+
app.routes_reloader.paths.unshift(*routing_paths)
|
578
578
|
app.routes_reloader.route_sets << routes
|
579
579
|
end
|
580
580
|
end
|
data/lib/rails/gem_version.rb
CHANGED
@@ -219,10 +219,10 @@ module Rails
|
|
219
219
|
# route "root 'welcome#index'"
|
220
220
|
def route(routing_code)
|
221
221
|
log :route, routing_code
|
222
|
-
sentinel = /\.routes\.draw do\s
|
222
|
+
sentinel = /\.routes\.draw do\s*\n/m
|
223
223
|
|
224
224
|
in_root do
|
225
|
-
inject_into_file 'config/routes.rb', "
|
225
|
+
inject_into_file 'config/routes.rb', " #{routing_code}", { after: sentinel, verbose: false, force: true }
|
226
226
|
end
|
227
227
|
end
|
228
228
|
|
@@ -340,7 +340,7 @@ module Rails
|
|
340
340
|
#
|
341
341
|
# This class should be called before the AppGenerator is required and started
|
342
342
|
# since it configures and mutates ARGV correctly.
|
343
|
-
class ARGVScrubber # :nodoc
|
343
|
+
class ARGVScrubber # :nodoc:
|
344
344
|
def initialize(argv = ARGV)
|
345
345
|
@argv = argv
|
346
346
|
end
|
@@ -22,7 +22,7 @@ Description:
|
|
22
22
|
|
23
23
|
If you pass a namespaced model name (e.g. admin/account or Admin::Account)
|
24
24
|
then the generator will create a module with a table_name_prefix method
|
25
|
-
to prefix the model's table name with the module name (e.g.
|
25
|
+
to prefix the model's table name with the module name (e.g. admin_accounts)
|
26
26
|
|
27
27
|
Available field types:
|
28
28
|
|
@@ -20,4 +20,5 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
|
20
20
|
# Load fixtures from the engine
|
21
21
|
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
22
22
|
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
23
|
+
ActiveSupport::TestCase.fixtures :all
|
23
24
|
end
|
data/lib/rails/railtie.rb
CHANGED
@@ -93,7 +93,7 @@ module Rails
|
|
93
93
|
# end
|
94
94
|
# end
|
95
95
|
#
|
96
|
-
# By default, Rails
|
96
|
+
# By default, Rails loads generators from your load path. However, if you want to place
|
97
97
|
# your generators at a different location, you can specify in your Railtie a block which
|
98
98
|
# will load them during normal generators lookup:
|
99
99
|
#
|
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: 4.2.
|
4
|
+
version: 4.2.1.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-20 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: 4.2.
|
19
|
+
version: 4.2.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: 4.2.
|
26
|
+
version: 4.2.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: 4.2.
|
33
|
+
version: 4.2.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: 4.2.
|
40
|
+
version: 4.2.1.rc1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,14 +78,14 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - '='
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 4.2.
|
81
|
+
version: 4.2.1.rc1
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - '='
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 4.2.
|
88
|
+
version: 4.2.1.rc1
|
89
89
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
90
90
|
email: david@loudthinking.com
|
91
91
|
executables:
|
@@ -352,12 +352,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
352
352
|
version: 1.9.3
|
353
353
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
354
354
|
requirements:
|
355
|
-
- - "
|
355
|
+
- - ">"
|
356
356
|
- !ruby/object:Gem::Version
|
357
|
-
version:
|
357
|
+
version: 1.3.1
|
358
358
|
requirements: []
|
359
359
|
rubyforge_project:
|
360
|
-
rubygems_version: 2.
|
360
|
+
rubygems_version: 2.4.5
|
361
361
|
signing_key:
|
362
362
|
specification_version: 4
|
363
363
|
summary: Tools for creating, working with, and running Rails applications.
|