railties 3.1.0.rc4 → 3.1.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -9
- data/bin/rails +2 -0
- data/guides/assets/images/rails_welcome.png +0 -0
- data/guides/rails_guides/generator.rb +1 -1
- data/guides/rails_guides/textile_extensions.rb +18 -17
- data/guides/source/3_0_release_notes.textile +21 -21
- data/guides/source/action_controller_overview.textile +1 -1
- data/guides/source/action_mailer_basics.textile +27 -6
- data/guides/source/action_view_overview.textile +6 -6
- data/guides/source/active_record_querying.textile +77 -7
- data/guides/source/active_record_validations_callbacks.textile +78 -81
- data/guides/source/active_support_core_extensions.textile +87 -31
- data/guides/source/ajax_on_rails.textile +1 -1
- data/guides/source/api_documentation_guidelines.textile +12 -8
- data/guides/source/asset_pipeline.textile +416 -0
- data/guides/source/association_basics.textile +2 -4
- data/guides/source/caching_with_rails.textile +7 -6
- data/guides/source/command_line.textile +78 -116
- data/guides/source/configuring.textile +34 -17
- data/guides/source/contribute.textile +1 -1
- data/guides/source/contributing_to_ruby_on_rails.textile +3 -3
- data/guides/source/debugging_rails_applications.textile +2 -2
- data/guides/source/form_helpers.textile +40 -51
- data/guides/source/getting_started.textile +641 -197
- data/guides/source/initialization.textile +4 -4
- data/guides/source/layouts_and_rendering.textile +2 -2
- data/guides/source/migrations.textile +114 -32
- data/guides/source/nested_model_forms.textile +6 -6
- data/guides/source/performance_testing.textile +6 -6
- data/guides/source/plugins.textile +23 -22
- data/guides/source/rails_application_templates.textile +8 -14
- data/guides/source/routing.textile +57 -51
- data/guides/source/ruby_on_rails_guides_guidelines.textile +3 -3
- data/guides/source/security.textile +10 -10
- data/guides/source/testing.textile +1 -1
- data/lib/rails.rb +27 -1
- data/lib/rails/all.rb +1 -0
- data/lib/rails/application.rb +4 -10
- data/lib/rails/application/configuration.rb +3 -12
- data/lib/rails/application/railties.rb +1 -1
- data/lib/rails/engine.rb +53 -42
- data/lib/rails/generators.rb +1 -1
- data/lib/rails/generators/app_base.rb +36 -15
- data/lib/rails/generators/generated_attribute.rb +1 -1
- data/lib/rails/generators/js/assets/assets_generator.rb +13 -0
- data/lib/rails/generators/js/assets/templates/javascript.js +2 -0
- data/lib/rails/generators/rails/app/app_generator.rb +3 -1
- data/lib/rails/generators/rails/app/templates/Gemfile +11 -7
- data/lib/rails/generators/rails/app/templates/config/application.rb +7 -3
- data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml +62 -0
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml +3 -3
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml +3 -12
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml +3 -3
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +0 -3
- data/lib/rails/generators/rails/assets/assets_generator.rb +2 -9
- data/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb +12 -10
- data/lib/rails/generators/rails/plugin_new/templates/%name%.gemspec +5 -2
- data/lib/rails/generators/rails/plugin_new/templates/Gemfile +6 -3
- data/lib/rails/generators/rails/plugin_new/templates/Rakefile +5 -1
- data/lib/rails/generators/rails/plugin_new/templates/app/views/layouts/application.html.erb.tt +14 -0
- data/lib/rails/generators/rails/plugin_new/templates/rails/application.rb +5 -3
- data/lib/rails/info.rb +4 -0
- data/lib/rails/paths.rb +5 -5
- data/lib/rails/railtie.rb +4 -4
- data/lib/rails/tasks.rb +0 -1
- data/lib/rails/tasks/documentation.rake +3 -3
- data/lib/rails/tasks/engine.rake +2 -0
- data/lib/rails/tasks/framework.rake +3 -3
- data/lib/rails/tasks/tmp.rake +1 -1
- data/lib/rails/test_unit/testing.rake +2 -2
- data/lib/rails/version.rb +1 -1
- metadata +19 -33
- data/lib/rails/generators/rails/assets/templates/javascript.js.coffee +0 -3
- data/lib/rails/tasks/assets.rake +0 -21
data/lib/rails/tasks/engine.rake
CHANGED
@@ -2,14 +2,14 @@ namespace :rails do
|
|
2
2
|
desc "Update configs and some other initially generated files (or use just update:configs, update:scripts, or update:application_controller)"
|
3
3
|
task :update => [ "update:configs", "update:scripts", "update:application_controller" ]
|
4
4
|
|
5
|
-
desc "Applies the template supplied by LOCATION
|
5
|
+
desc "Applies the template supplied by LOCATION=(/path/to/template) or URL"
|
6
6
|
task :template do
|
7
7
|
template = ENV["LOCATION"]
|
8
|
+
raise "No LOCATION value given. Please set LOCATION either as path to a file or a URL" if template.blank?
|
8
9
|
template = File.expand_path(template) if template !~ %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://}
|
9
|
-
|
10
10
|
require 'rails/generators'
|
11
11
|
require 'rails/generators/rails/app/app_generator'
|
12
|
-
generator = Rails::Generators::AppGenerator.new [
|
12
|
+
generator = Rails::Generators::AppGenerator.new [Rails.root], {}, :destination_root => Rails.root
|
13
13
|
generator.apply template, :verbose => false
|
14
14
|
end
|
15
15
|
|
data/lib/rails/tasks/tmp.rake
CHANGED
@@ -4,7 +4,7 @@ namespace :tmp do
|
|
4
4
|
|
5
5
|
desc "Creates tmp directories for sessions, cache, sockets, and pids"
|
6
6
|
task :create do
|
7
|
-
FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets tmp/pids ))
|
7
|
+
FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets tmp/pids tmp/cache/assets ))
|
8
8
|
end
|
9
9
|
|
10
10
|
namespace :sessions do
|
@@ -104,9 +104,9 @@ namespace :test do
|
|
104
104
|
Rake::TestTask.new(:uncommitted => "test:prepare") do |t|
|
105
105
|
def t.file_list
|
106
106
|
if File.directory?(".svn")
|
107
|
-
changed_since_checkin = silence_stderr { `svn status` }.map { |path| path.chomp[7 .. -1] }
|
107
|
+
changed_since_checkin = silence_stderr { `svn status` }.split.map { |path| path.chomp[7 .. -1] }
|
108
108
|
elsif File.directory?(".git")
|
109
|
-
changed_since_checkin = silence_stderr { `git ls-files --modified --others` }.map { |path| path.chomp }
|
109
|
+
changed_since_checkin = silence_stderr { `git ls-files --modified --others` }.split.map { |path| path.chomp }
|
110
110
|
else
|
111
111
|
abort "Not a Subversion or Git checkout."
|
112
112
|
end
|
data/lib/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railties
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease: 6
|
4
|
+
prerelease: true
|
6
5
|
segments:
|
7
6
|
- 3
|
8
7
|
- 1
|
9
8
|
- 0
|
10
|
-
-
|
11
|
-
|
12
|
-
version: 3.1.0.rc4
|
9
|
+
- rc5
|
10
|
+
version: 3.1.0.rc5
|
13
11
|
platform: ruby
|
14
12
|
authors:
|
15
13
|
- David Heinemeier Hansson
|
@@ -17,17 +15,16 @@ autorequire:
|
|
17
15
|
bindir: bin
|
18
16
|
cert_chain: []
|
19
17
|
|
20
|
-
date: 2011-
|
18
|
+
date: 2011-07-25 00:00:00 -07:00
|
19
|
+
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
22
|
name: rake
|
24
23
|
prerelease: false
|
25
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
25
|
requirements:
|
28
26
|
- - ">="
|
29
27
|
- !ruby/object:Gem::Version
|
30
|
-
hash: 49
|
31
28
|
segments:
|
32
29
|
- 0
|
33
30
|
- 8
|
@@ -39,11 +36,9 @@ dependencies:
|
|
39
36
|
name: thor
|
40
37
|
prerelease: false
|
41
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
39
|
requirements:
|
44
40
|
- - ~>
|
45
41
|
- !ruby/object:Gem::Version
|
46
|
-
hash: 43
|
47
42
|
segments:
|
48
43
|
- 0
|
49
44
|
- 14
|
@@ -55,11 +50,9 @@ dependencies:
|
|
55
50
|
name: rack-ssl
|
56
51
|
prerelease: false
|
57
52
|
requirement: &id003 !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
53
|
requirements:
|
60
54
|
- - ~>
|
61
55
|
- !ruby/object:Gem::Version
|
62
|
-
hash: 31
|
63
56
|
segments:
|
64
57
|
- 1
|
65
58
|
- 3
|
@@ -71,11 +64,9 @@ dependencies:
|
|
71
64
|
name: rdoc
|
72
65
|
prerelease: false
|
73
66
|
requirement: &id004 !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
67
|
requirements:
|
76
68
|
- - ~>
|
77
69
|
- !ruby/object:Gem::Version
|
78
|
-
hash: 15
|
79
70
|
segments:
|
80
71
|
- 3
|
81
72
|
- 4
|
@@ -86,42 +77,36 @@ dependencies:
|
|
86
77
|
name: activesupport
|
87
78
|
prerelease: false
|
88
79
|
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
80
|
requirements:
|
91
81
|
- - "="
|
92
82
|
- !ruby/object:Gem::Version
|
93
|
-
hash: 15424109
|
94
83
|
segments:
|
95
84
|
- 3
|
96
85
|
- 1
|
97
86
|
- 0
|
98
|
-
-
|
99
|
-
|
100
|
-
version: 3.1.0.rc4
|
87
|
+
- rc5
|
88
|
+
version: 3.1.0.rc5
|
101
89
|
type: :runtime
|
102
90
|
version_requirements: *id005
|
103
91
|
- !ruby/object:Gem::Dependency
|
104
92
|
name: actionpack
|
105
93
|
prerelease: false
|
106
94
|
requirement: &id006 !ruby/object:Gem::Requirement
|
107
|
-
none: false
|
108
95
|
requirements:
|
109
96
|
- - "="
|
110
97
|
- !ruby/object:Gem::Version
|
111
|
-
hash: 15424109
|
112
98
|
segments:
|
113
99
|
- 3
|
114
100
|
- 1
|
115
101
|
- 0
|
116
|
-
-
|
117
|
-
|
118
|
-
version: 3.1.0.rc4
|
102
|
+
- rc5
|
103
|
+
version: 3.1.0.rc5
|
119
104
|
type: :runtime
|
120
105
|
version_requirements: *id006
|
121
106
|
description: "Rails internals: application bootup, plugins, generators, and rake tasks."
|
122
107
|
email: david@loudthinking.com
|
123
|
-
executables:
|
124
|
-
|
108
|
+
executables:
|
109
|
+
- rails
|
125
110
|
extensions: []
|
126
111
|
|
127
112
|
extra_rdoc_files: []
|
@@ -129,6 +114,7 @@ extra_rdoc_files: []
|
|
129
114
|
files:
|
130
115
|
- CHANGELOG
|
131
116
|
- README.rdoc
|
117
|
+
- bin/rails
|
132
118
|
- guides/assets/images/belongs_to.png
|
133
119
|
- guides/assets/images/book_icon.gif
|
134
120
|
- guides/assets/images/bullet.gif
|
@@ -267,6 +253,7 @@ files:
|
|
267
253
|
- guides/source/active_support_core_extensions.textile
|
268
254
|
- guides/source/ajax_on_rails.textile
|
269
255
|
- guides/source/api_documentation_guidelines.textile
|
256
|
+
- guides/source/asset_pipeline.textile
|
270
257
|
- guides/source/association_basics.textile
|
271
258
|
- guides/source/caching_with_rails.textile
|
272
259
|
- guides/source/command_line.textile
|
@@ -342,6 +329,8 @@ files:
|
|
342
329
|
- lib/rails/generators/erb/scaffold/templates/show.html.erb
|
343
330
|
- lib/rails/generators/erb.rb
|
344
331
|
- lib/rails/generators/generated_attribute.rb
|
332
|
+
- lib/rails/generators/js/assets/assets_generator.rb
|
333
|
+
- lib/rails/generators/js/assets/templates/javascript.js
|
345
334
|
- lib/rails/generators/migration.rb
|
346
335
|
- lib/rails/generators/named_base.rb
|
347
336
|
- lib/rails/generators/rails/app/app_generator.rb
|
@@ -355,6 +344,7 @@ files:
|
|
355
344
|
- lib/rails/generators/rails/app/templates/config/boot.rb
|
356
345
|
- lib/rails/generators/rails/app/templates/config/databases/frontbase.yml
|
357
346
|
- lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml
|
347
|
+
- lib/rails/generators/rails/app/templates/config/databases/jdbc.yml
|
358
348
|
- lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml
|
359
349
|
- lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml
|
360
350
|
- lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml
|
@@ -393,7 +383,6 @@ files:
|
|
393
383
|
- lib/rails/generators/rails/app/USAGE
|
394
384
|
- lib/rails/generators/rails/assets/assets_generator.rb
|
395
385
|
- lib/rails/generators/rails/assets/templates/javascript.js
|
396
|
-
- lib/rails/generators/rails/assets/templates/javascript.js.coffee
|
397
386
|
- lib/rails/generators/rails/assets/templates/stylesheet.css
|
398
387
|
- lib/rails/generators/rails/assets/USAGE
|
399
388
|
- lib/rails/generators/rails/controller/controller_generator.rb
|
@@ -430,6 +419,7 @@ files:
|
|
430
419
|
- lib/rails/generators/rails/plugin_new/templates/%name%.gemspec
|
431
420
|
- lib/rails/generators/rails/plugin_new/templates/app/controllers/%name%/application_controller.rb.tt
|
432
421
|
- lib/rails/generators/rails/plugin_new/templates/app/helpers/%name%/application_helper.rb.tt
|
422
|
+
- lib/rails/generators/rails/plugin_new/templates/app/views/layouts/application.html.erb.tt
|
433
423
|
- lib/rails/generators/rails/plugin_new/templates/config/routes.rb
|
434
424
|
- lib/rails/generators/rails/plugin_new/templates/Gemfile
|
435
425
|
- lib/rails/generators/rails/plugin_new/templates/gitignore
|
@@ -500,7 +490,6 @@ files:
|
|
500
490
|
- lib/rails/script_rails_loader.rb
|
501
491
|
- lib/rails/source_annotation_extractor.rb
|
502
492
|
- lib/rails/tasks/annotations.rake
|
503
|
-
- lib/rails/tasks/assets.rake
|
504
493
|
- lib/rails/tasks/documentation.rake
|
505
494
|
- lib/rails/tasks/engine.rake
|
506
495
|
- lib/rails/tasks/framework.rake
|
@@ -525,6 +514,7 @@ files:
|
|
525
514
|
- lib/rails/generators/rails/app/templates/test/unit/.empty_directory
|
526
515
|
- lib/rails/generators/rails/generator/templates/templates/.empty_directory
|
527
516
|
- lib/rails/generators/rails/plugin_new/templates/app/models/.empty_directory
|
517
|
+
has_rdoc: true
|
528
518
|
homepage: http://www.rubyonrails.org
|
529
519
|
licenses: []
|
530
520
|
|
@@ -535,22 +525,18 @@ rdoc_options:
|
|
535
525
|
require_paths:
|
536
526
|
- lib
|
537
527
|
required_ruby_version: !ruby/object:Gem::Requirement
|
538
|
-
none: false
|
539
528
|
requirements:
|
540
529
|
- - ">="
|
541
530
|
- !ruby/object:Gem::Version
|
542
|
-
hash: 57
|
543
531
|
segments:
|
544
532
|
- 1
|
545
533
|
- 8
|
546
534
|
- 7
|
547
535
|
version: 1.8.7
|
548
536
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
549
|
-
none: false
|
550
537
|
requirements:
|
551
538
|
- - ">"
|
552
539
|
- !ruby/object:Gem::Version
|
553
|
-
hash: 25
|
554
540
|
segments:
|
555
541
|
- 1
|
556
542
|
- 3
|
@@ -559,7 +545,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
559
545
|
requirements: []
|
560
546
|
|
561
547
|
rubyforge_project:
|
562
|
-
rubygems_version: 1.
|
548
|
+
rubygems_version: 1.3.6
|
563
549
|
signing_key:
|
564
550
|
specification_version: 3
|
565
551
|
summary: Tools for creating, working with, and running Rails applications.
|
data/lib/rails/tasks/assets.rake
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
namespace :assets do
|
2
|
-
desc "Compile all the assets named in config.assets.precompile"
|
3
|
-
task :precompile => :environment do
|
4
|
-
# Give assets access to asset_path
|
5
|
-
Sprockets::Helpers::RailsHelper
|
6
|
-
|
7
|
-
assets = Rails.application.config.assets.precompile
|
8
|
-
Rails.application.assets.precompile(*assets)
|
9
|
-
end
|
10
|
-
|
11
|
-
desc "Remove compiled assets"
|
12
|
-
task :clean => :environment do
|
13
|
-
assets = Rails.application.config.assets
|
14
|
-
public_asset_path = Rails.public_path + assets.prefix
|
15
|
-
file_list = FileList.new("#{public_asset_path}/*.js", "#{public_asset_path}/*.css")
|
16
|
-
file_list.each do |file|
|
17
|
-
rm file
|
18
|
-
rm "#{file}.gz", :force => true
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|