activesupport 3.0.5 → 3.0.6.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activesupport might be problematic. Click here for more details.

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.
@@ -1,3 +1,4 @@
1
+ require 'thread'
1
2
  require 'active_support/core_ext/class/attribute_accessors'
2
3
 
3
4
  module ActiveSupport
@@ -1,3 +1,4 @@
1
+ require 'active_support/concern'
1
2
  require 'active_support/descendants_tracker'
2
3
  require 'active_support/core_ext/array/wrap'
3
4
  require 'active_support/core_ext/class/inheritable_attributes'
@@ -34,9 +34,9 @@ class Date
34
34
  ::Date.current.tomorrow
35
35
  end
36
36
 
37
- # Returns Time.zone.today when config.time_zone is set, otherwise just returns Date.today.
37
+ # Returns Time.zone.today when <tt>Time.zone</tt> or <tt>config.time_zone</tt> are set, otherwise just returns Date.today.
38
38
  def current
39
- ::Time.zone_default ? ::Time.zone.today : ::Date.today
39
+ ::Time.zone ? ::Time.zone.today : ::Date.today
40
40
  end
41
41
  end
42
42
 
@@ -2,10 +2,10 @@ require 'date'
2
2
  require 'active_support/core_ext/time/zones'
3
3
 
4
4
  class Date
5
- # Converts Date to a TimeWithZone in the current zone if Time.zone_default is set,
6
- # otherwise converts Date to a Time via Date#to_time
5
+ # Converts Date to a TimeWithZone in the current zone if Time.zone or Time.zone_default
6
+ # is set, otherwise converts Date to a Time via Date#to_time
7
7
  def to_time_in_current_zone
8
- if ::Time.zone_default
8
+ if ::Time.zone
9
9
  ::Time.zone.local(year, month, day)
10
10
  else
11
11
  to_time
@@ -9,8 +9,9 @@ class DateTime
9
9
  ::Time.local(2007).utc_offset.to_r / 86400
10
10
  end
11
11
 
12
+ # Returns <tt>Time.zone.now.to_datetime</tt> when <tt>Time.zone</tt> or <tt>config.time_zone</tt> are set, otherwise returns <tt>Time.now.to_datetime</tt>.
12
13
  def current
13
- ::Time.zone_default ? ::Time.zone.now.to_datetime : ::Time.now.to_datetime
14
+ ::Time.zone ? ::Time.zone.now.to_datetime : ::Time.now.to_datetime
14
15
  end
15
16
  end
16
17
 
@@ -1,3 +1,5 @@
1
+ require 'active_support/deprecation'
2
+
1
3
  class Module
2
4
  # Declare that a method has been deprecated.
3
5
  # deprecate :foo
@@ -41,9 +41,9 @@ class Time
41
41
  time_with_datetime_fallback(:local, *args)
42
42
  end
43
43
 
44
- # Returns <tt>Time.zone.now</tt> when <tt>config.time_zone</tt> is set, otherwise just returns <tt>Time.now</tt>.
44
+ # Returns <tt>Time.zone.now</tt> when <tt>Time.zone</tt> or <tt>config.time_zone</tt> are set, otherwise just returns <tt>Time.now</tt>.
45
45
  def current
46
- ::Time.zone_default ? ::Time.zone.now : ::Time.now
46
+ ::Time.zone ? ::Time.zone.now : ::Time.now
47
47
  end
48
48
  end
49
49
 
@@ -2,8 +2,8 @@ module ActiveSupport
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
@@ -37,7 +37,7 @@ class NilClass
37
37
 
38
38
  # Raises a RuntimeError when you attempt to call +id+ on +nil+.
39
39
  def id
40
- raise RuntimeError, "Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id", caller
40
+ raise RuntimeError, "Called id for nil, which would mistakenly be #{object_id} -- if you really wanted the id of nil, use object_id", caller
41
41
  end
42
42
 
43
43
  private
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
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
 
@@ -260,16 +262,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
260
262
  required_rubygems_version: !ruby/object:Gem::Requirement
261
263
  none: false
262
264
  requirements:
263
- - - ">="
265
+ - - ">"
264
266
  - !ruby/object:Gem::Version
265
- hash: 3
267
+ hash: 25
266
268
  segments:
267
- - 0
268
- version: "0"
269
+ - 1
270
+ - 3
271
+ - 1
272
+ version: 1.3.1
269
273
  requirements: []
270
274
 
271
275
  rubyforge_project: activesupport
272
- rubygems_version: 1.5.2
276
+ rubygems_version: 1.6.1
273
277
  signing_key:
274
278
  specification_version: 3
275
279
  summary: A toolkit of support libraries and Ruby core extensions extracted from the Rails framework.