railties 4.1.0.rc1 → 4.1.0.rc2

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: 9ce4536fa348e7d6d6750a17491f11d5c23a3bd6
4
- data.tar.gz: 8c6d2d1f10c3e1778a864c263d97a28d7aa50840
3
+ metadata.gz: 1be2beeae0c3f636877ae764c0bf1743c168737f
4
+ data.tar.gz: 60de602bb82cfc7bfe3c9356d09eae6b65a068e3
5
5
  SHA512:
6
- metadata.gz: b972003890b7eb3341beb81b9afbc2eba44cef4eb36364100dfe676e64c3a5ad94902e442959f4eccabd19b8d371a4e1a0e87eee63cc829d5191c854a9c184bd
7
- data.tar.gz: c5cdda3a97d9aa9871503c3043b8f22dec1052c34dfd5e7624d9d24a6658b0601e6c846facb2151d0a899090b8b6f06024fca535152dd23cdd95dc15f3656390
6
+ metadata.gz: a63d45e26628f9c094af8c5a615eca427c2279f6dee97a18cefb0e2bb629f6d7544500c6ad66af536d4b565238d204312087f6ab0c715192ff4eb2a10ef1679e
7
+ data.tar.gz: 100f2a2475917f2185eb61ecea773e2a1139e5e72396de461f16a02f1df3a3af95d04483f9bc729bc394e10c954dc3b7267697112b4e1d86b8163aa840bec3d7
@@ -1,3 +1,18 @@
1
+ * Introduce `Rails.gem_version` as a convenience method to return
2
+ `Gem::Version.new(Rails.version)`, suggesting a more reliable way to perform
3
+ version comparison.
4
+
5
+ Example:
6
+
7
+ Rails.version #=> "4.1.2"
8
+ Rails.gem_version #=> #<Gem::Version "4.1.2">
9
+
10
+ Rails.version > "4.1.10" #=> false
11
+ Rails.gem_version > Gem::Version.new("4.1.10") #=> true
12
+ Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true
13
+
14
+ *Prem Sichanugrist*
15
+
1
16
  * Do not crash when `config/secrets.yml` is empty.
2
17
 
3
18
  *Yves Senn*
@@ -25,13 +40,6 @@
25
40
 
26
41
  *Cristian Mircea Messel*, *Chulki Lee*
27
42
 
28
- * Only lookup `config.log_level` for stdlib `::Logger` instances.
29
- Assign it as is for third party loggers like `Log4r::Logger`.
30
-
31
- Fixes #13421.
32
-
33
- *Yves Senn*
34
-
35
43
  * The `Gemfile` of new applications depends on SDoc ~> 0.4.0.
36
44
 
37
45
  *Xavier Noria*
@@ -117,6 +125,7 @@
117
125
  *Jon Leighton*
118
126
 
119
127
  * Uses .railsrc while creating new plugin if it is available.
128
+
120
129
  Fixes #10700.
121
130
 
122
131
  *Prathamesh Sonpatki*
@@ -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/4-1-stable/railties
21
21
 
22
22
  == License
23
23
 
@@ -80,10 +80,6 @@ module Rails
80
80
  groups
81
81
  end
82
82
 
83
- def version
84
- VERSION::STRING
85
- end
86
-
87
83
  def public_path
88
84
  application && Pathname.new(application.paths["public"].first)
89
85
  end
@@ -53,11 +53,7 @@ INFO
53
53
  logger
54
54
  end
55
55
 
56
- if ::Logger === Rails.logger
57
- Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase)
58
- else
59
- Rails.logger.level = config.log_level
60
- end
56
+ Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase)
61
57
  end
62
58
 
63
59
  # Initialize cache early in the stack so railties can make use of it.
@@ -28,7 +28,7 @@ In addition to those, there are:
28
28
  All commands can be run with -h (or --help) for more information.
29
29
  EOT
30
30
 
31
- COMMAND_WHITELIST = %(plugin generate destroy console server dbconsole application runner new version help)
31
+ COMMAND_WHITELIST = %w(plugin generate destroy console server dbconsole application runner new version help)
32
32
 
33
33
  def initialize(argv)
34
34
  @argv = argv
@@ -0,0 +1,15 @@
1
+ module Rails
2
+ # Returns the version of the currently loaded Rails as a <tt>Gem::Version</tt>
3
+ def self.gem_version
4
+ Gem::Version.new VERSION::STRING
5
+ end
6
+
7
+ module VERSION
8
+ MAJOR = 4
9
+ MINOR = 1
10
+ TINY = 0
11
+ PRE = "rc2"
12
+
13
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
+ end
15
+ end
@@ -1,4 +1,4 @@
1
- require 'thor/actions/create_file'
1
+ require 'thor/actions'
2
2
 
3
3
  module Rails
4
4
  module Generators
@@ -111,7 +111,6 @@ module Rails
111
111
  javascript_gemfile_entry,
112
112
  jbuilder_gemfile_entry,
113
113
  sdoc_gemfile_entry,
114
- platform_dependent_gemfile_entry,
115
114
  spring_gemfile_entry,
116
115
  @extra_entries].flatten.find_all(&@gem_filter)
117
116
  end
@@ -178,8 +177,12 @@ module Rails
178
177
  super
179
178
  end
180
179
 
181
- def self.github(name, github, comment = nil)
182
- new(name, nil, comment, github: github)
180
+ def self.github(name, github, branch = nil, comment = nil)
181
+ if branch
182
+ new(name, nil, comment, github: github, branch: branch)
183
+ else
184
+ new(name, nil, comment, github: github)
185
+ end
183
186
  end
184
187
 
185
188
  def self.version(name, version, comment = nil)
@@ -198,10 +201,10 @@ module Rails
198
201
  def rails_gemfile_entry
199
202
  if options.dev?
200
203
  [GemfileEntry.path('rails', Rails::Generators::RAILS_DEV_PATH),
201
- GemfileEntry.github('arel', 'rails/arel')]
204
+ GemfileEntry.github('arel', 'rails/arel', '5-0-stable')]
202
205
  elsif options.edge?
203
- [GemfileEntry.github('rails', 'rails/rails'),
204
- GemfileEntry.github('arel', 'rails/arel')]
206
+ [GemfileEntry.github('rails', 'rails/rails', '4-1-stable'),
207
+ GemfileEntry.github('arel', 'rails/arel', '5-0-stable')]
205
208
  else
206
209
  [GemfileEntry.version('rails',
207
210
  Rails::VERSION::STRING,
@@ -241,13 +244,13 @@ module Rails
241
244
 
242
245
  gems = []
243
246
  if options.dev? || options.edge?
244
- gems << GemfileEntry.github('sprockets-rails', 'rails/sprockets-rails',
247
+ gems << GemfileEntry.github('sprockets-rails', 'rails/sprockets-rails', nil,
245
248
  'Use edge version of sprockets-rails')
246
- gems << GemfileEntry.github('sass-rails', 'rails/sass-rails',
249
+ gems << GemfileEntry.github('sass-rails', 'rails/sass-rails', nil,
247
250
  'Use SCSS for stylesheets')
248
251
  else
249
252
  gems << GemfileEntry.version('sass-rails',
250
- '~> 4.0.1',
253
+ '~> 4.0.2',
251
254
  'Use SCSS for stylesheets')
252
255
  end
253
256
 
@@ -258,14 +261,6 @@ module Rails
258
261
  gems
259
262
  end
260
263
 
261
- def platform_dependent_gemfile_entry
262
- gems = []
263
- if RUBY_ENGINE == 'rbx'
264
- gems << GemfileEntry.version('rubysl', nil)
265
- end
266
- gems
267
- end
268
-
269
264
  def jbuilder_gemfile_entry
270
265
  comment = 'Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder'
271
266
  GemfileEntry.version('jbuilder', '~> 2.0', comment)
@@ -279,7 +274,7 @@ module Rails
279
274
  def coffee_gemfile_entry
280
275
  comment = 'Use CoffeeScript for .js.coffee assets and views'
281
276
  if options.dev? || options.edge?
282
- GemfileEntry.github 'coffee-rails', 'rails/coffee-rails', comment
277
+ GemfileEntry.github 'coffee-rails', 'rails/coffee-rails', nil, comment
283
278
  else
284
279
  GemfileEntry.version 'coffee-rails', '~> 4.0.0', comment
285
280
  end
@@ -6,7 +6,7 @@ module Erb # :nodoc:
6
6
  protected
7
7
 
8
8
  def formats
9
- format
9
+ [format]
10
10
  end
11
11
 
12
12
  def format
@@ -17,7 +17,7 @@ module Erb # :nodoc:
17
17
  :erb
18
18
  end
19
19
 
20
- def filename_with_extensions(name, format)
20
+ def filename_with_extensions(name, format = self.format)
21
21
  [name, format, handler].compact.join(".")
22
22
  end
23
23
  end
@@ -11,7 +11,7 @@ module Erb # :nodoc:
11
11
 
12
12
  actions.each do |action|
13
13
  @action = action
14
- Array(formats).each do |format|
14
+ formats.each do |format|
15
15
  @path = File.join(base_path, filename_with_extensions(action, format))
16
16
  template filename_with_extensions(:view, format), @path
17
17
  end
@@ -14,7 +14,7 @@ module Erb # :nodoc:
14
14
 
15
15
  def copy_view_files
16
16
  available_views.each do |view|
17
- Array(formats).each do |format|
17
+ formats.each do |format|
18
18
  filename = filename_with_extensions(view, format)
19
19
  template filename, File.join("app/views", controller_file_path, filename)
20
20
  end
@@ -14,7 +14,7 @@ source 'https://rubygems.org'
14
14
  <% end -%>
15
15
 
16
16
  # Use ActiveModel has_secure_password
17
- # gem 'bcrypt-ruby', '~> 3.1.2'
17
+ # gem 'bcrypt', '~> 3.1.7'
18
18
 
19
19
  # Use unicorn as the app server
20
20
  # gem 'unicorn'
@@ -1,10 +1,8 @@
1
- module Rails
2
- module VERSION
3
- MAJOR = 4
4
- MINOR = 1
5
- TINY = 0
6
- PRE = "rc1"
1
+ require_relative 'gem_version'
7
2
 
8
- STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
3
+ module Rails
4
+ # Returns the version of the currently loaded Rails as a string.
5
+ def self.version
6
+ VERSION::STRING
9
7
  end
10
8
  end
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.1.0.rc1
4
+ version: 4.1.0.rc2
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: 2014-02-18 00:00:00.000000000 Z
11
+ date: 2014-03-25 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.1.0.rc1
19
+ version: 4.1.0.rc2
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.1.0.rc1
26
+ version: 4.1.0.rc2
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.1.0.rc1
33
+ version: 4.1.0.rc2
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.1.0.rc1
40
+ version: 4.1.0.rc2
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.1.0.rc1
81
+ version: 4.1.0.rc2
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.1.0.rc1
88
+ version: 4.1.0.rc2
89
89
  description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
90
90
  email: david@loudthinking.com
91
91
  executables:
@@ -131,6 +131,7 @@ files:
131
131
  - lib/rails/engine/commands.rb
132
132
  - lib/rails/engine/configuration.rb
133
133
  - lib/rails/engine/railties.rb
134
+ - lib/rails/gem_version.rb
134
135
  - lib/rails/generators.rb
135
136
  - lib/rails/generators/actions.rb
136
137
  - lib/rails/generators/actions/create_migration.rb