railties 3.0.5 → 3.0.6.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.
data/CHANGELOG CHANGED
@@ -1,3 +1,18 @@
1
+ *Rails 3.0.6 (unreleased)*
2
+
3
+ * No changes.
4
+
5
+
6
+ *Rails 3.0.5 (February 26, 2011)*
7
+
8
+ * No changes.
9
+
10
+
11
+ *Rails 3.0.4 (February 8, 2011)*
12
+
13
+ * No changes.
14
+
15
+
1
16
  *Rails 3.0.3 (November 16, 2010)*
2
17
 
3
18
  * No changes.
@@ -2810,6 +2810,8 @@ h5. +Date.current+
2810
2810
 
2811
2811
  Active Support defines +Date.current+ to be today in the current time zone. That's like +Date.today+, except that it honors the user time zone, if defined. It also defines +Date.yesterday+ and +Date.tomorrow+, and the instance predicates +past?+, +today?+, and +future?+, all of them relative to +Date.current+.
2812
2812
 
2813
+ When making Date comparisons using methods which honor the user time zone, make sure to use +Date.current+ and not +Date.today+. There are cases where the user time zone might be in the future compared to the system time zone, which +Date.today+ uses by default. This means +Date.today+ may equal +Date.yesterday+.
2814
+
2813
2815
  h5. Named dates
2814
2816
 
2815
2817
  h6. +prev_year+, +next_year+
@@ -3105,7 +3107,7 @@ h5. Named Datetimes
3105
3107
 
3106
3108
  h6. +DateTime.current+
3107
3109
 
3108
- Active Support defines +DateTime.current+ to be like +Time.now.to_datetime+, except that it honors the user time zone, if defined. It also defines instance predicates +past?+, and +future?+ relative to +DateTime.current+.
3110
+ Active Support defines +DateTime.current+ to be like +Time.now.to_datetime+, except that it honors the user time zone, if defined. It also defines +DateTime.yesterday+ and +DateTime.tomorrow+, and the instance predicates +past?+, and +future?+ relative to +DateTime.current+.
3109
3111
 
3110
3112
  h5. Other Extensions
3111
3113
 
@@ -3280,6 +3282,12 @@ t.advance(:seconds => 1)
3280
3282
 
3281
3283
  * If +since+ or +ago+ jump to a time that can't be expressed with +Time+ a +DateTime+ object is returned instead.
3282
3284
 
3285
+ h5. +Time.current+
3286
+
3287
+ Active Support defines +Time.current+ to be today in the current time zone. That's like +Time.now+, except that it honors the user time zone, if defined. It also defines +Time.yesterday+ and +Time.tomorrow+, and the instance predicates +past?+, +today?+, and +future?+, all of them relative to +Time.current+.
3288
+
3289
+ When making Time comparisons using methods which honor the user time zone, make sure to use +Time.current+ and not +Time.now+. There are cases where the user time zone might be in the future compared to the system time zone, which +Time.today+ uses by default. This means +Time.now+ may equal +Time.yesterday+.
3290
+
3283
3291
  h4. Time Constructors
3284
3292
 
3285
3293
  Active Support defines +Time.current+ to be +Time.zone.now+ if there's a user time zone defined, with fallback to +Time.now+:
@@ -554,6 +554,12 @@ match '*a/foo/*b' => 'test#index'
554
554
 
555
555
  would match +zoo/woo/foo/bar/baz+ with +params[:a]+ equals +"zoo/woo"+, and +params[:b]+ equals +"bar/baz"+.
556
556
 
557
+ NOTE: If the wildcard segment is the last segment of the route, the format segment will not be added to the path unless you explicitly specify it as a constraint.
558
+
559
+ <ruby>
560
+ match '/:path(.:format)', :to => 'pages#show', :constraints => { :path => /.+?/ }
561
+ </ruby>
562
+
557
563
  h4. Redirection
558
564
 
559
565
  You can redirect any path to another path using the +redirect+ helper in your router:
@@ -171,7 +171,8 @@ module Rails
171
171
  def env_defaults
172
172
  @env_defaults ||= {
173
173
  "action_dispatch.parameter_filter" => config.filter_parameters,
174
- "action_dispatch.secret_token" => config.secret_token
174
+ "action_dispatch.secret_token" => config.secret_token,
175
+ "action_dispatch.show_exceptions" => config.action_dispatch.show_exceptions
175
176
  }
176
177
  end
177
178
 
@@ -191,7 +192,7 @@ module Rails
191
192
  middleware.use ::Rack::Lock if !config.allow_concurrency
192
193
  middleware.use ::Rack::Runtime
193
194
  middleware.use ::Rails::Rack::Logger
194
- middleware.use ::ActionDispatch::ShowExceptions, config.consider_all_requests_local if config.action_dispatch.show_exceptions
195
+ middleware.use ::ActionDispatch::ShowExceptions, config.consider_all_requests_local
195
196
  middleware.use ::ActionDispatch::RemoteIp, config.action_dispatch.ip_spoofing_check, config.action_dispatch.trusted_proxies
196
197
  middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header
197
198
  middleware.use ::ActionDispatch::Callbacks, !config.cache_classes
@@ -289,17 +289,18 @@ module Rails
289
289
  # readme "README"
290
290
  #
291
291
  def readme(path)
292
- say File.read(find_in_source_paths(path))
292
+ log File.read(find_in_source_paths(path))
293
293
  end
294
294
 
295
295
  protected
296
296
 
297
297
  # Define log for backwards compatibility. If just one argument is sent,
298
- # invoke say, otherwise invoke say_status.
298
+ # invoke say, otherwise invoke say_status. Differently from say and
299
+ # similarly to say_status, this method respects the quiet? option given.
299
300
  #
300
301
  def log(*args)
301
302
  if args.size == 1
302
- say args.first.to_s
303
+ say args.first.to_s unless options.quiet?
303
304
  else
304
305
  args << (self.behavior == :invoke ? :green : :red)
305
306
  say_status *args
@@ -19,7 +19,7 @@ module Rails
19
19
 
20
20
  def before_dispatch(env)
21
21
  request = ActionDispatch::Request.new(env)
22
- path = request.fullpath
22
+ path = request.filtered_path
23
23
 
24
24
  info "\n\nStarted #{request.request_method} \"#{path}\" " \
25
25
  "for #{request.ip} at #{Time.now.to_default_s}"
@@ -2,8 +2,8 @@ module Rails
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 0
5
- TINY = 5
6
- PRE = nil
5
+ TINY = 6
6
+ PRE = "rc1"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railties
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
5
- prerelease:
4
+ hash: 15424071
5
+ prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 5
10
- version: 3.0.5
9
+ - 6
10
+ - rc
11
+ - 1
12
+ version: 3.0.6.rc1
11
13
  platform: ruby
12
14
  authors:
13
15
  - David Heinemeier Hansson
@@ -15,7 +17,7 @@ autorequire:
15
17
  bindir: bin
16
18
  cert_chain: []
17
19
 
18
- date: 2011-02-26 00:00:00 -08:00
20
+ date: 2011-03-29 00:00:00 -07:00
19
21
  default_executable:
20
22
  dependencies:
21
23
  - !ruby/object:Gem::Dependency
@@ -58,12 +60,14 @@ dependencies:
58
60
  requirements:
59
61
  - - "="
60
62
  - !ruby/object:Gem::Version
61
- hash: 13
63
+ hash: 15424071
62
64
  segments:
63
65
  - 3
64
66
  - 0
65
- - 5
66
- version: 3.0.5
67
+ - 6
68
+ - rc
69
+ - 1
70
+ version: 3.0.6.rc1
67
71
  type: :runtime
68
72
  version_requirements: *id003
69
73
  - !ruby/object:Gem::Dependency
@@ -74,12 +78,14 @@ dependencies:
74
78
  requirements:
75
79
  - - "="
76
80
  - !ruby/object:Gem::Version
77
- hash: 13
81
+ hash: 15424071
78
82
  segments:
79
83
  - 3
80
84
  - 0
81
- - 5
82
- version: 3.0.5
85
+ - 6
86
+ - rc
87
+ - 1
88
+ version: 3.0.6.rc1
83
89
  type: :runtime
84
90
  version_requirements: *id004
85
91
  description: "Rails internals: application bootup, plugins, generators, and rake tasks."
@@ -481,16 +487,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
481
487
  required_rubygems_version: !ruby/object:Gem::Requirement
482
488
  none: false
483
489
  requirements:
484
- - - ">="
490
+ - - ">"
485
491
  - !ruby/object:Gem::Version
486
- hash: 3
492
+ hash: 25
487
493
  segments:
488
- - 0
489
- version: "0"
494
+ - 1
495
+ - 3
496
+ - 1
497
+ version: 1.3.1
490
498
  requirements: []
491
499
 
492
500
  rubyforge_project: rails
493
- rubygems_version: 1.5.2
501
+ rubygems_version: 1.6.1
494
502
  signing_key:
495
503
  specification_version: 3
496
504
  summary: Tools for creating, working with, and running Rails applications.