railties 4.0.0 → 4.0.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 +28 -0
- data/RDOC_MAIN.rdoc +3 -3
- data/README.rdoc +1 -1
- data/lib/rails/api/task.rb +8 -0
- data/lib/rails/application.rb +3 -4
- data/lib/rails/application/bootstrap.rb +2 -1
- data/lib/rails/commands.rb +8 -10
- data/lib/rails/engine.rb +1 -1
- data/lib/rails/generators/erb/scaffold/templates/_form.html.erb +5 -0
- data/lib/rails/generators/rails/app/app_generator.rb +1 -1
- data/lib/rails/generators/rails/app/templates/Gemfile +1 -1
- data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +5 -0
- data/lib/rails/generators/rails/app/templates/config/routes.rb +1 -1
- data/lib/rails/generators/rails/app/templates/gitignore +1 -1
- data/lib/rails/generators/rails/scaffold/scaffold_generator.rb +2 -0
- data/lib/rails/generators/test_unit/model/templates/fixtures.yml +1 -1
- data/lib/rails/rack/logger.rb +4 -3
- data/lib/rails/tasks.rb +1 -1
- data/lib/rails/tasks/documentation.rake +2 -2
- data/lib/rails/templates/rails/welcome/index.html.erb +2 -2
- data/lib/rails/version.rb +2 -2
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86d0f16927c9e7a714ba971266e5c423bd0e919e
|
4
|
+
data.tar.gz: f9df72a0f2e53d92ec4c9b9368cd5feff21e8308
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbd734689c07ffeb0b2959e4dfa107a2cd372e62f0e3627c5a722aa41faeaec3b8aa7bf5aa2c20b165f7f0de20332f458b60337914029ec12a173c12e24542cf
|
7
|
+
data.tar.gz: e5b7cf09a00ed90aa19b581df4902a45634c07a24c8cd162ae94e5a5329e294cf641efe022e3cd75ad1012c2d3f1e1135f931c63b9aa006a20eff18bbb0ce60c
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,37 @@
|
|
1
|
+
## Rails 4.0.1.rc1 (October 17, 2013) ##
|
2
|
+
|
3
|
+
* Fix the event name of action_dispatch requests.
|
4
|
+
|
5
|
+
*Rafael Mendonça França*
|
6
|
+
|
7
|
+
* Make `config.log_level` work with custom loggers.
|
8
|
+
|
9
|
+
*Max Shytikov*
|
10
|
+
|
11
|
+
* Fix `rake environment` to do not eager load modules
|
12
|
+
|
13
|
+
*Paul Nikitochkin*
|
14
|
+
|
15
|
+
* Fix `rails plugin --help` command.
|
16
|
+
|
17
|
+
*Richard Schneeman*
|
18
|
+
|
19
|
+
* Omit turbolinks configuration completely on skip_javascript generator option.
|
20
|
+
|
21
|
+
*Nikita Fedyashev*
|
22
|
+
|
23
|
+
|
1
24
|
## Rails 4.0.0 (June 25, 2013) ##
|
2
25
|
|
3
26
|
* Clearing autoloaded constants triggers routes reloading [Fixes #10685].
|
4
27
|
|
5
28
|
*Xavier Noria*
|
6
29
|
|
30
|
+
* Fixes bug with scaffold generator with `--assets=false --resource-route=false`.
|
31
|
+
Fixes #9525.
|
32
|
+
|
33
|
+
*Arun Agrawal*
|
34
|
+
|
7
35
|
* Move rails.png into a data-uri. One less file to get generated into a new
|
8
36
|
application. This is also consistent with the removal of index.html.
|
9
37
|
|
data/RDOC_MAIN.rdoc
CHANGED
@@ -18,7 +18,7 @@ you to present the data from database rows as objects and embellish these data o
|
|
18
18
|
with business logic methods. Although most \Rails models are backed by a database, models
|
19
19
|
can also be ordinary Ruby classes, or Ruby classes that implement a set of interfaces as
|
20
20
|
provided by the ActiveModel module. You can read more about Active Record in its
|
21
|
-
{README}[link
|
21
|
+
{README}[link:files/activerecord/README_rdoc.html].
|
22
22
|
|
23
23
|
The Controller layer is responsible for handling incoming HTTP requests and providing a
|
24
24
|
suitable response. Usually this means returning \HTML, but \Rails controllers can also
|
@@ -29,7 +29,7 @@ In \Rails, the Controller and View layers are handled together by Action Pack.
|
|
29
29
|
These two layers are bundled in a single package due to their heavy interdependence.
|
30
30
|
This is unlike the relationship between Active Record and Action Pack, which are
|
31
31
|
independent. Each of these packages can be used independently outside of \Rails. You
|
32
|
-
can read more about Action Pack in its {README}[link
|
32
|
+
can read more about Action Pack in its {README}[link:files/actionpack/README_rdoc.html].
|
33
33
|
|
34
34
|
== Getting Started
|
35
35
|
|
@@ -55,7 +55,7 @@ can read more about Action Pack in its {README}[link:/actionpack/README.rdoc].
|
|
55
55
|
|
56
56
|
5. Follow the guidelines to start developing your application. You may find the following resources handy:
|
57
57
|
|
58
|
-
* The README file created within your application.
|
58
|
+
* The \README file created within your application.
|
59
59
|
* {Getting Started with \Rails}[http://guides.rubyonrails.org/getting_started.html].
|
60
60
|
* {Ruby on \Rails Tutorial}[http://ruby.railstutorial.org/ruby-on-rails-tutorial-book].
|
61
61
|
* {Ruby on \Rails Guides}[http://guides.rubyonrails.org].
|
data/README.rdoc
CHANGED
@@ -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/
|
20
|
+
* https://github.com/rails/rails/tree/4-0-stable/railties
|
21
21
|
|
22
22
|
== License
|
23
23
|
|
data/lib/rails/api/task.rb
CHANGED
@@ -135,12 +135,20 @@ module Rails
|
|
135
135
|
def api_dir
|
136
136
|
'doc/rdoc'
|
137
137
|
end
|
138
|
+
end
|
138
139
|
|
140
|
+
class EdgeTask < RepoTask
|
139
141
|
def rails_version
|
140
142
|
"master@#{`git rev-parse HEAD`[0, 7]}"
|
141
143
|
end
|
142
144
|
end
|
143
145
|
|
146
|
+
class StableTask < RepoTask
|
147
|
+
def rails_version
|
148
|
+
File.read('RAILS_VERSION').strip
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
144
152
|
class AppTask < Task
|
145
153
|
def component_root_dir(gem_name)
|
146
154
|
$:.grep(%r{#{gem_name}[\w.-]*/lib\z}).first[0..-5]
|
data/lib/rails/application.rb
CHANGED
@@ -245,7 +245,8 @@ module Rails
|
|
245
245
|
require "rails/tasks"
|
246
246
|
config = self.config
|
247
247
|
task :environment do
|
248
|
-
config.eager_load = false
|
248
|
+
ActiveSupport.on_load(:before_initialize) { config.eager_load = false }
|
249
|
+
|
249
250
|
require_environment!
|
250
251
|
end
|
251
252
|
end
|
@@ -317,9 +318,7 @@ module Rails
|
|
317
318
|
middleware.use ::ActionDispatch::SSL, config.ssl_options
|
318
319
|
end
|
319
320
|
|
320
|
-
|
321
|
-
middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header
|
322
|
-
end
|
321
|
+
middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header
|
323
322
|
|
324
323
|
if config.serve_static_assets
|
325
324
|
middleware.use ::ActionDispatch::Static, paths["public"].first, config.static_cache_control
|
@@ -42,7 +42,6 @@ INFO
|
|
42
42
|
logger = ActiveSupport::Logger.new f
|
43
43
|
logger.formatter = config.log_formatter
|
44
44
|
logger = ActiveSupport::TaggedLogging.new(logger)
|
45
|
-
logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase)
|
46
45
|
logger
|
47
46
|
rescue StandardError
|
48
47
|
logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDERR))
|
@@ -53,6 +52,8 @@ INFO
|
|
53
52
|
)
|
54
53
|
logger
|
55
54
|
end
|
55
|
+
|
56
|
+
Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase)
|
56
57
|
end
|
57
58
|
|
58
59
|
# Initialize cache early in the stack so railties can make use of it.
|
data/lib/rails/commands.rb
CHANGED
@@ -35,19 +35,17 @@ command = ARGV.shift
|
|
35
35
|
command = aliases[command] || command
|
36
36
|
|
37
37
|
case command
|
38
|
-
when '
|
38
|
+
when 'plugin'
|
39
|
+
require "rails/commands/plugin_new"
|
40
|
+
when 'generate', 'destroy'
|
39
41
|
require 'rails/generators'
|
40
42
|
|
41
|
-
|
42
|
-
|
43
|
-
else
|
44
|
-
require APP_PATH
|
45
|
-
Rails.application.require_environment!
|
43
|
+
require APP_PATH
|
44
|
+
Rails.application.require_environment!
|
46
45
|
|
47
|
-
|
46
|
+
Rails.application.load_generators
|
48
47
|
|
49
|
-
|
50
|
-
end
|
48
|
+
require "rails/commands/#{command}"
|
51
49
|
|
52
50
|
when 'console'
|
53
51
|
require 'rails/commands/console'
|
@@ -64,7 +62,7 @@ when 'console'
|
|
64
62
|
Rails::Console.start(Rails.application, options)
|
65
63
|
|
66
64
|
when 'server'
|
67
|
-
# Change to the application's path if there is no config.ru file in current
|
65
|
+
# Change to the application's path if there is no config.ru file in current directory.
|
68
66
|
# This allows us to run `rails server` from other directories, but still get
|
69
67
|
# the main config.ru and properly set the tmp directory.
|
70
68
|
Dir.chdir(File.expand_path('../../', APP_PATH)) unless File.exists?(File.expand_path("config.ru"))
|
data/lib/rails/engine.rb
CHANGED
@@ -102,7 +102,7 @@ module Rails
|
|
102
102
|
# paths["config"] # => ["config"]
|
103
103
|
# paths["config/initializers"] # => ["config/initializers"]
|
104
104
|
# paths["config/locales"] # => ["config/locales"]
|
105
|
-
# paths["config/routes"]
|
105
|
+
# paths["config/routes.rb"] # => ["config/routes.rb"]
|
106
106
|
# end
|
107
107
|
#
|
108
108
|
# The <tt>Application</tt> class adds a couple more paths to this set. And as in your
|
@@ -21,8 +21,13 @@
|
|
21
21
|
<%%= f.label :password_confirmation %><br>
|
22
22
|
<%%= f.password_field :password_confirmation %>
|
23
23
|
<% else -%>
|
24
|
+
<%- if attribute.reference? -%>
|
25
|
+
<%%= f.label :<%= attribute.column_name %> %><br>
|
26
|
+
<%%= f.<%= attribute.field_type %> :<%= attribute.column_name %> %>
|
27
|
+
<%- else -%>
|
24
28
|
<%%= f.label :<%= attribute.name %> %><br>
|
25
29
|
<%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
|
30
|
+
<%- end -%>
|
26
31
|
<% end -%>
|
27
32
|
</div>
|
28
33
|
<% end -%>
|
@@ -2,8 +2,13 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title><%= camelized %></title>
|
5
|
+
<%- if options[:skip_javascript] -%>
|
6
|
+
<%%= stylesheet_link_tag "application", media: "all" %>
|
7
|
+
<%%= javascript_include_tag "application" %>
|
8
|
+
<%- else -%>
|
5
9
|
<%%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
6
10
|
<%%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
11
|
+
<%- end -%>
|
7
12
|
<%%= csrf_meta_tags %>
|
8
13
|
</head>
|
9
14
|
<body>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# See
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
2
|
#
|
3
3
|
# If you find yourself ignoring temporary files generated by your text editor
|
4
4
|
# or operating system, you probably want to add a global ignore instead:
|
@@ -8,6 +8,8 @@ module Rails
|
|
8
8
|
|
9
9
|
class_option :stylesheets, type: :boolean, desc: "Generate Stylesheets"
|
10
10
|
class_option :stylesheet_engine, desc: "Engine for Stylesheets"
|
11
|
+
class_option :assets, type: :boolean
|
12
|
+
class_option :resource_route, type: :boolean
|
11
13
|
|
12
14
|
def handle_skip
|
13
15
|
@options = @options.merge(stylesheets: false) unless options[:assets]
|
data/lib/rails/rack/logger.rb
CHANGED
@@ -11,7 +11,6 @@ module Rails
|
|
11
11
|
def initialize(app, taggers = nil)
|
12
12
|
@app = app
|
13
13
|
@taggers = taggers || []
|
14
|
-
@instrumenter = ActiveSupport::Notifications.instrumenter
|
15
14
|
end
|
16
15
|
|
17
16
|
def call(env)
|
@@ -33,7 +32,8 @@ module Rails
|
|
33
32
|
logger.debug ''
|
34
33
|
end
|
35
34
|
|
36
|
-
|
35
|
+
instrumenter = ActiveSupport::Notifications.instrumenter
|
36
|
+
instrumenter.start 'request.action_dispatch', request: request
|
37
37
|
logger.info started_request_message(request)
|
38
38
|
resp = @app.call(env)
|
39
39
|
resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) }
|
@@ -70,7 +70,8 @@ module Rails
|
|
70
70
|
private
|
71
71
|
|
72
72
|
def finish(request)
|
73
|
-
|
73
|
+
instrumenter = ActiveSupport::Notifications.instrumenter
|
74
|
+
instrumenter.finish 'request.action_dispatch', request: request
|
74
75
|
end
|
75
76
|
|
76
77
|
def development?
|
data/lib/rails/tasks.rb
CHANGED
@@ -68,8 +68,8 @@ end
|
|
68
68
|
|
69
69
|
namespace :doc do
|
70
70
|
task :guides do
|
71
|
-
|
72
|
-
require File.expand_path(
|
71
|
+
rails_gem_dir = Gem::Specification.find_by_name("rails").gem_dir
|
72
|
+
require File.expand_path(File.join(rails_gem_dir, "/guides/rails_guides"))
|
73
73
|
RailsGuides::Generator.new(Rails.root.join("doc/guides")).generate
|
74
74
|
end
|
75
75
|
end
|
@@ -232,8 +232,8 @@
|
|
232
232
|
</li>
|
233
233
|
|
234
234
|
<li>
|
235
|
-
<h2>
|
236
|
-
<p>
|
235
|
+
<h2>Configure your database</h2>
|
236
|
+
<p>If you're not using SQLite (the default), edit <span class="filename">config/database.yml</span> with your username and password.</p>
|
237
237
|
</li>
|
238
238
|
</ol>
|
239
239
|
</div>
|
data/lib/rails/version.rb
CHANGED
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.0.
|
4
|
+
version: 4.0.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: 2013-
|
11
|
+
date: 2013-10-17 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.0.
|
19
|
+
version: 4.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: 4.0.
|
26
|
+
version: 4.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: 4.0.
|
33
|
+
version: 4.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: 4.0.
|
40
|
+
version: 4.0.1.rc1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -320,12 +320,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
320
320
|
version: 1.9.3
|
321
321
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
322
322
|
requirements:
|
323
|
-
- - '
|
323
|
+
- - '>'
|
324
324
|
- !ruby/object:Gem::Version
|
325
|
-
version:
|
325
|
+
version: 1.3.1
|
326
326
|
requirements: []
|
327
327
|
rubyforge_project:
|
328
|
-
rubygems_version: 2.0.
|
328
|
+
rubygems_version: 2.0.6
|
329
329
|
signing_key:
|
330
330
|
specification_version: 4
|
331
331
|
summary: Tools for creating, working with, and running Rails applications.
|