railties 3.2.0.rc1 → 3.2.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/guides/assets/images/rails_guides_kindle_cover.jpg +0 -0
- data/guides/assets/stylesheets/kindle.css +11 -0
- data/guides/assets/stylesheets/main.css +8 -0
- data/guides/rails_guides/generator.rb +87 -20
- data/guides/rails_guides/helpers.rb +16 -0
- data/guides/source/3_2_release_notes.textile +452 -0
- data/guides/source/_license.html.erb +2 -0
- data/guides/source/_welcome.html.erb +19 -0
- data/guides/source/active_record_querying.textile +1 -1
- data/guides/source/active_support_core_extensions.textile +0 -10
- data/guides/source/asset_pipeline.textile +69 -67
- data/guides/source/caching_with_rails.textile +22 -0
- data/guides/source/documents.yaml +153 -0
- data/guides/source/getting_started.textile +2 -4
- data/guides/source/index.html.erb +14 -175
- data/guides/source/kindle/KINDLE.md +26 -0
- data/guides/source/kindle/copyright.html.erb +1 -0
- data/guides/source/kindle/layout.html.erb +27 -0
- data/guides/source/kindle/rails_guides.opf.erb +52 -0
- data/guides/source/kindle/toc.html.erb +24 -0
- data/guides/source/kindle/toc.ncx.erb +64 -0
- data/guides/source/kindle/welcome.html.erb +5 -0
- data/guides/source/layout.html.erb +11 -47
- data/guides/source/migrations.textile +1 -1
- data/lib/rails/application/bootstrap.rb +1 -1
- data/lib/rails/application/route_inspector.rb +10 -1
- data/lib/rails/generators/app_base.rb +3 -3
- data/lib/rails/generators/base.rb +3 -3
- data/lib/rails/generators/generated_attribute.rb +57 -3
- data/lib/rails/generators/named_base.rb +2 -3
- data/lib/rails/generators/rails/migration/migration_generator.rb +1 -1
- data/lib/rails/generators/rails/model/model_generator.rb +1 -1
- data/lib/rails/generators/rails/scaffold/USAGE +15 -9
- data/lib/rails/generators/test_case.rb +2 -2
- data/lib/rails/plugin.rb +1 -0
- data/lib/rails/tasks/documentation.rake +1 -1
- data/lib/rails/test_unit/sub_test_task.rb +36 -0
- data/lib/rails/test_unit/testing.rake +10 -50
- data/lib/rails/version.rb +1 -1
- metadata +132 -64
@@ -218,8 +218,8 @@ module Rails
|
|
218
218
|
#
|
219
219
|
# create_generated_attribute(:string, 'name')
|
220
220
|
#
|
221
|
-
def create_generated_attribute(attribute_type, name = 'test')
|
222
|
-
Rails::Generators::GeneratedAttribute.
|
221
|
+
def create_generated_attribute(attribute_type, name = 'test', index = nil)
|
222
|
+
Rails::Generators::GeneratedAttribute.parse([name, attribute_type, index].compact.join(':'))
|
223
223
|
end
|
224
224
|
|
225
225
|
protected
|
data/lib/rails/plugin.rb
CHANGED
@@ -53,6 +53,7 @@ module Rails
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def initialize(root)
|
56
|
+
ActiveSupport::Deprecation.warn "You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released"
|
56
57
|
@name = File.basename(root).to_sym
|
57
58
|
config.root = root
|
58
59
|
end
|
@@ -63,7 +63,7 @@ namespace :doc do
|
|
63
63
|
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
|
64
64
|
rdoc.title = "Rails Framework Documentation"
|
65
65
|
rdoc.options << '--line-numbers'
|
66
|
-
rdoc.rdoc_files.include('README')
|
66
|
+
rdoc.rdoc_files.include('README.rdoc')
|
67
67
|
|
68
68
|
gem_path('actionmailer') do |actionmailer|
|
69
69
|
%w(README.rdoc CHANGELOG.md MIT-LICENSE lib/action_mailer/base.rb).each do |file|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Rails
|
2
|
+
# Don't abort when tests fail; move on the next test task.
|
3
|
+
# Silence the default description to cut down on `rake -T` noise.
|
4
|
+
class SubTestTask < Rake::TestTask
|
5
|
+
# Create the tasks defined by this task lib.
|
6
|
+
def define
|
7
|
+
lib_path = @libs.join(File::PATH_SEPARATOR)
|
8
|
+
task @name do
|
9
|
+
run_code = ''
|
10
|
+
RakeFileUtils.verbose(@verbose) do
|
11
|
+
run_code =
|
12
|
+
case @loader
|
13
|
+
when :direct
|
14
|
+
"-e 'ARGV.each{|f| load f}'"
|
15
|
+
when :testrb
|
16
|
+
"-S testrb #{fix}"
|
17
|
+
when :rake
|
18
|
+
rake_loader
|
19
|
+
end
|
20
|
+
@ruby_opts.unshift( "-I\"#{lib_path}\"" )
|
21
|
+
@ruby_opts.unshift( "-w" ) if @warning
|
22
|
+
|
23
|
+
begin
|
24
|
+
ruby @ruby_opts.join(" ") +
|
25
|
+
" \"#{run_code}\" " +
|
26
|
+
file_list.collect { |fn| "\"#{fn}\"" }.join(' ') +
|
27
|
+
" #{option_list}"
|
28
|
+
rescue => error
|
29
|
+
warn "Error running #{name}: #{error.inspect}"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
self
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -1,35 +1,6 @@
|
|
1
1
|
require 'rbconfig'
|
2
2
|
require 'rake/testtask'
|
3
|
-
|
4
|
-
# Monkey-patch to silence the description from Rake::TestTask to cut down on rake -T noise
|
5
|
-
class TestTaskWithoutDescription < Rake::TestTask
|
6
|
-
# Create the tasks defined by this task lib.
|
7
|
-
def define
|
8
|
-
lib_path = @libs.join(File::PATH_SEPARATOR)
|
9
|
-
task @name do
|
10
|
-
run_code = ''
|
11
|
-
RakeFileUtils.verbose(@verbose) do
|
12
|
-
run_code =
|
13
|
-
case @loader
|
14
|
-
when :direct
|
15
|
-
"-e 'ARGV.each{|f| load f}'"
|
16
|
-
when :testrb
|
17
|
-
"-S testrb #{fix}"
|
18
|
-
when :rake
|
19
|
-
rake_loader
|
20
|
-
end
|
21
|
-
@ruby_opts.unshift( "-I\"#{lib_path}\"" )
|
22
|
-
@ruby_opts.unshift( "-w" ) if @warning
|
23
|
-
ruby @ruby_opts.join(" ") +
|
24
|
-
" \"#{run_code}\" " +
|
25
|
-
file_list.collect { |fn| "\"#{fn}\"" }.join(' ') +
|
26
|
-
" #{option_list}"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
self
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
3
|
+
require 'rails/test_unit/sub_test_task'
|
33
4
|
|
34
5
|
TEST_CHANGES_SINCE = Time.now - 600
|
35
6
|
|
@@ -76,20 +47,7 @@ task :default => :test
|
|
76
47
|
|
77
48
|
desc 'Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profile, test:plugins)'
|
78
49
|
task :test do
|
79
|
-
|
80
|
-
errors = tests_to_run.collect do |task|
|
81
|
-
begin
|
82
|
-
Rake::Task[task].invoke
|
83
|
-
nil
|
84
|
-
rescue => e
|
85
|
-
{ :task => task, :exception => e }
|
86
|
-
end
|
87
|
-
end.compact
|
88
|
-
|
89
|
-
if errors.any?
|
90
|
-
puts errors.map { |e| "Errors running #{e[:task]}! #{e[:exception].inspect}" }.join("\n")
|
91
|
-
abort
|
92
|
-
end
|
50
|
+
Rake::Task[ENV['TEST'] ? 'test:single' : 'test:run'].invoke
|
93
51
|
end
|
94
52
|
|
95
53
|
namespace :test do
|
@@ -97,6 +55,8 @@ namespace :test do
|
|
97
55
|
# Placeholder task for other Railtie and plugins to enhance. See Active Record for an example.
|
98
56
|
end
|
99
57
|
|
58
|
+
task :run => %w(test:units test:functionals test:integration)
|
59
|
+
|
100
60
|
Rake::TestTask.new(:recent => "test:prepare") do |t|
|
101
61
|
since = TEST_CHANGES_SINCE
|
102
62
|
touched = FileList['test/**/*_test.rb'].select { |path| File.mtime(path) > since } +
|
@@ -134,33 +94,33 @@ namespace :test do
|
|
134
94
|
t.libs << "test"
|
135
95
|
end
|
136
96
|
|
137
|
-
|
97
|
+
Rails::SubTestTask.new(:units => "test:prepare") do |t|
|
138
98
|
t.libs << "test"
|
139
99
|
t.pattern = 'test/unit/**/*_test.rb'
|
140
100
|
end
|
141
101
|
|
142
|
-
|
102
|
+
Rails::SubTestTask.new(:functionals => "test:prepare") do |t|
|
143
103
|
t.libs << "test"
|
144
104
|
t.pattern = 'test/functional/**/*_test.rb'
|
145
105
|
end
|
146
106
|
|
147
|
-
|
107
|
+
Rails::SubTestTask.new(:integration => "test:prepare") do |t|
|
148
108
|
t.libs << "test"
|
149
109
|
t.pattern = 'test/integration/**/*_test.rb'
|
150
110
|
end
|
151
111
|
|
152
|
-
|
112
|
+
Rails::SubTestTask.new(:benchmark => 'test:prepare') do |t|
|
153
113
|
t.libs << 'test'
|
154
114
|
t.pattern = 'test/performance/**/*_test.rb'
|
155
115
|
t.options = '-- --benchmark'
|
156
116
|
end
|
157
117
|
|
158
|
-
|
118
|
+
Rails::SubTestTask.new(:profile => 'test:prepare') do |t|
|
159
119
|
t.libs << 'test'
|
160
120
|
t.pattern = 'test/performance/**/*_test.rb'
|
161
121
|
end
|
162
122
|
|
163
|
-
|
123
|
+
Rails::SubTestTask.new(:plugins => :environment) do |t|
|
164
124
|
t.libs << "test"
|
165
125
|
|
166
126
|
if ENV['PLUGIN']
|
data/lib/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,90 +1,130 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: railties
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 977940591
|
5
|
+
prerelease: true
|
6
|
+
segments:
|
7
|
+
- 3
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
- rc2
|
11
|
+
version: 3.2.0.rc2
|
6
12
|
platform: ruby
|
7
|
-
authors:
|
13
|
+
authors:
|
8
14
|
- David Heinemeier Hansson
|
9
15
|
autorequire:
|
10
16
|
bindir: bin
|
11
17
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
18
|
+
|
19
|
+
date: 2012-01-04 00:00:00 -02:00
|
20
|
+
default_executable:
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
15
23
|
name: rake
|
16
|
-
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
26
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 49
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
- 8
|
34
|
+
- 7
|
21
35
|
version: 0.8.7
|
22
36
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
37
|
+
version_requirements: *id001
|
38
|
+
- !ruby/object:Gem::Dependency
|
26
39
|
name: thor
|
27
|
-
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
42
|
none: false
|
29
|
-
requirements:
|
43
|
+
requirements:
|
30
44
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
hash: 43
|
47
|
+
segments:
|
48
|
+
- 0
|
49
|
+
- 14
|
50
|
+
- 6
|
32
51
|
version: 0.14.6
|
33
52
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
53
|
+
version_requirements: *id002
|
54
|
+
- !ruby/object:Gem::Dependency
|
37
55
|
name: rack-ssl
|
38
|
-
|
56
|
+
prerelease: false
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
58
|
none: false
|
40
|
-
requirements:
|
59
|
+
requirements:
|
41
60
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
hash: 31
|
63
|
+
segments:
|
64
|
+
- 1
|
65
|
+
- 3
|
66
|
+
- 2
|
43
67
|
version: 1.3.2
|
44
68
|
type: :runtime
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
69
|
+
version_requirements: *id003
|
70
|
+
- !ruby/object:Gem::Dependency
|
48
71
|
name: rdoc
|
49
|
-
|
72
|
+
prerelease: false
|
73
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
74
|
none: false
|
51
|
-
requirements:
|
75
|
+
requirements:
|
52
76
|
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
hash: 15
|
79
|
+
segments:
|
80
|
+
- 3
|
81
|
+
- 4
|
82
|
+
version: "3.4"
|
55
83
|
type: :runtime
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
84
|
+
version_requirements: *id004
|
85
|
+
- !ruby/object:Gem::Dependency
|
59
86
|
name: activesupport
|
60
|
-
|
87
|
+
prerelease: false
|
88
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
89
|
none: false
|
62
|
-
requirements:
|
63
|
-
- - =
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
90
|
+
requirements:
|
91
|
+
- - "="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
hash: 977940591
|
94
|
+
segments:
|
95
|
+
- 3
|
96
|
+
- 2
|
97
|
+
- 0
|
98
|
+
- rc2
|
99
|
+
version: 3.2.0.rc2
|
66
100
|
type: :runtime
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
101
|
+
version_requirements: *id005
|
102
|
+
- !ruby/object:Gem::Dependency
|
70
103
|
name: actionpack
|
71
|
-
|
104
|
+
prerelease: false
|
105
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
106
|
none: false
|
73
|
-
requirements:
|
74
|
-
- - =
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
107
|
+
requirements:
|
108
|
+
- - "="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
hash: 977940591
|
111
|
+
segments:
|
112
|
+
- 3
|
113
|
+
- 2
|
114
|
+
- 0
|
115
|
+
- rc2
|
116
|
+
version: 3.2.0.rc2
|
77
117
|
type: :runtime
|
78
|
-
|
79
|
-
|
80
|
-
description: ! 'Rails internals: application bootup, plugins, generators, and rake
|
81
|
-
tasks.'
|
118
|
+
version_requirements: *id006
|
119
|
+
description: "Rails internals: application bootup, plugins, generators, and rake tasks."
|
82
120
|
email: david@loudthinking.com
|
83
|
-
executables:
|
121
|
+
executables:
|
84
122
|
- rails
|
85
123
|
extensions: []
|
124
|
+
|
86
125
|
extra_rdoc_files: []
|
87
|
-
|
126
|
+
|
127
|
+
files:
|
88
128
|
- CHANGELOG.md
|
89
129
|
- README.rdoc
|
90
130
|
- bin/rails
|
@@ -147,6 +187,7 @@ files:
|
|
147
187
|
- guides/assets/images/polymorphic.png
|
148
188
|
- guides/assets/images/posts_index.png
|
149
189
|
- guides/assets/images/radar.png
|
190
|
+
- guides/assets/images/rails_guides_kindle_cover.jpg
|
150
191
|
- guides/assets/images/rails_guides_logo.gif
|
151
192
|
- guides/assets/images/rails_logo_remix.gif
|
152
193
|
- guides/assets/images/rails_welcome.png
|
@@ -187,6 +228,7 @@ files:
|
|
187
228
|
- guides/assets/javascripts/syntaxhighlighter/shBrushXml.js
|
188
229
|
- guides/assets/javascripts/syntaxhighlighter/shCore.js
|
189
230
|
- guides/assets/stylesheets/fixes.css
|
231
|
+
- guides/assets/stylesheets/kindle.css
|
190
232
|
- guides/assets/stylesheets/main.css
|
191
233
|
- guides/assets/stylesheets/print.css
|
192
234
|
- guides/assets/stylesheets/reset.css
|
@@ -295,6 +337,9 @@ files:
|
|
295
337
|
- guides/source/2_3_release_notes.textile
|
296
338
|
- guides/source/3_0_release_notes.textile
|
297
339
|
- guides/source/3_1_release_notes.textile
|
340
|
+
- guides/source/3_2_release_notes.textile
|
341
|
+
- guides/source/_license.html.erb
|
342
|
+
- guides/source/_welcome.html.erb
|
298
343
|
- guides/source/action_controller_overview.textile
|
299
344
|
- guides/source/action_mailer_basics.textile
|
300
345
|
- guides/source/action_view_overview.textile
|
@@ -314,6 +359,7 @@ files:
|
|
314
359
|
- guides/source/contributing_to_ruby_on_rails.textile
|
315
360
|
- guides/source/credits.html.erb
|
316
361
|
- guides/source/debugging_rails_applications.textile
|
362
|
+
- guides/source/documents.yaml
|
317
363
|
- guides/source/engines.textile
|
318
364
|
- guides/source/form_helpers.textile
|
319
365
|
- guides/source/generators.textile
|
@@ -321,6 +367,13 @@ files:
|
|
321
367
|
- guides/source/i18n.textile
|
322
368
|
- guides/source/index.html.erb
|
323
369
|
- guides/source/initialization.textile
|
370
|
+
- guides/source/kindle/copyright.html.erb
|
371
|
+
- guides/source/kindle/KINDLE.md
|
372
|
+
- guides/source/kindle/layout.html.erb
|
373
|
+
- guides/source/kindle/rails_guides.opf.erb
|
374
|
+
- guides/source/kindle/toc.html.erb
|
375
|
+
- guides/source/kindle/toc.ncx.erb
|
376
|
+
- guides/source/kindle/welcome.html.erb
|
324
377
|
- guides/source/layout.html.erb
|
325
378
|
- guides/source/layouts_and_rendering.textile
|
326
379
|
- guides/source/migrations.textile
|
@@ -550,6 +603,7 @@ files:
|
|
550
603
|
- lib/rails/tasks.rb
|
551
604
|
- lib/rails/test_help.rb
|
552
605
|
- lib/rails/test_unit/railtie.rb
|
606
|
+
- lib/rails/test_unit/sub_test_task.rb
|
553
607
|
- lib/rails/test_unit/testing.rake
|
554
608
|
- lib/rails/version.rb
|
555
609
|
- lib/rails.rb
|
@@ -563,30 +617,44 @@ files:
|
|
563
617
|
- lib/rails/generators/rails/generator/templates/templates/.empty_directory
|
564
618
|
- lib/rails/generators/rails/plugin_new/templates/app/mailers/.empty_directory
|
565
619
|
- lib/rails/generators/rails/plugin_new/templates/app/models/.empty_directory
|
620
|
+
has_rdoc: true
|
566
621
|
homepage: http://www.rubyonrails.org
|
567
622
|
licenses: []
|
623
|
+
|
568
624
|
post_install_message:
|
569
|
-
rdoc_options:
|
625
|
+
rdoc_options:
|
570
626
|
- --exclude
|
571
627
|
- .
|
572
|
-
require_paths:
|
628
|
+
require_paths:
|
573
629
|
- lib
|
574
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
630
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
575
631
|
none: false
|
576
|
-
requirements:
|
577
|
-
- -
|
578
|
-
- !ruby/object:Gem::Version
|
632
|
+
requirements:
|
633
|
+
- - ">="
|
634
|
+
- !ruby/object:Gem::Version
|
635
|
+
hash: 57
|
636
|
+
segments:
|
637
|
+
- 1
|
638
|
+
- 8
|
639
|
+
- 7
|
579
640
|
version: 1.8.7
|
580
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
641
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
581
642
|
none: false
|
582
|
-
requirements:
|
583
|
-
- -
|
584
|
-
- !ruby/object:Gem::Version
|
643
|
+
requirements:
|
644
|
+
- - ">"
|
645
|
+
- !ruby/object:Gem::Version
|
646
|
+
hash: 25
|
647
|
+
segments:
|
648
|
+
- 1
|
649
|
+
- 3
|
650
|
+
- 1
|
585
651
|
version: 1.3.1
|
586
652
|
requirements: []
|
653
|
+
|
587
654
|
rubyforge_project:
|
588
|
-
rubygems_version: 1.
|
655
|
+
rubygems_version: 1.3.7
|
589
656
|
signing_key:
|
590
657
|
specification_version: 3
|
591
658
|
summary: Tools for creating, working with, and running Rails applications.
|
592
659
|
test_files: []
|
660
|
+
|