activesupport 3.2.6 → 3.2.7.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.md +8 -0
- data/lib/active_support/core_ext/time/calculations.rb +2 -0
- data/lib/active_support/core_ext/time/zones.rb +0 -1
- data/lib/active_support/deprecation.rb +2 -2
- data/lib/active_support/hash_with_indifferent_access.rb +11 -1
- data/lib/active_support/inflections.rb +2 -0
- data/lib/active_support/inflector/inflections.rb +2 -0
- data/lib/active_support/inflector/methods.rb +1 -0
- data/lib/active_support/version.rb +2 -2
- metadata +13 -9
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## Rails 3.2.7 (unreleased)
|
2
|
+
|
3
|
+
* Hash#fetch(fetch) is not the same as doing hash[key]
|
4
|
+
* adds a missing require [fixes #6896]
|
5
|
+
* make sure the inflection rules are loaded when cherry-picking active_support/core_ext/string/inflections.rb [fixes #6884]
|
6
|
+
* Merge pull request #6857 from rsutphin/as_core_ext_time_missing_require
|
7
|
+
* bump AS deprecation_horizon to 4.0
|
8
|
+
|
1
9
|
## Rails 3.2.6 (Jun 12, 2012)
|
2
10
|
|
3
11
|
* No changes.
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'active_support/duration'
|
2
2
|
require 'active_support/core_ext/time/conversions'
|
3
|
+
require 'active_support/time_with_zone'
|
4
|
+
require 'active_support/core_ext/time/zones'
|
3
5
|
|
4
6
|
class Time
|
5
7
|
COMMON_YEAR_DAYS_IN_MONTH = [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
@@ -9,10 +9,10 @@ module ActiveSupport
|
|
9
9
|
# The version the deprecated behavior will be removed, by default.
|
10
10
|
attr_accessor :deprecation_horizon
|
11
11
|
end
|
12
|
-
self.deprecation_horizon = '
|
12
|
+
self.deprecation_horizon = '4.0'
|
13
13
|
|
14
14
|
# By default, warnings are not silenced and debugging is off.
|
15
15
|
self.silenced = false
|
16
16
|
self.debug = false
|
17
17
|
end
|
18
|
-
end
|
18
|
+
end
|
@@ -93,7 +93,17 @@ module ActiveSupport
|
|
93
93
|
alias_method :has_key?, :key?
|
94
94
|
alias_method :member?, :key?
|
95
95
|
|
96
|
-
#
|
96
|
+
# Same as <tt>Hash#fetch</tt> where the key passed as argument can be
|
97
|
+
# either a string or a symbol:
|
98
|
+
#
|
99
|
+
# counters = HashWithIndifferentAccess.new
|
100
|
+
# counters[:foo] = 1
|
101
|
+
#
|
102
|
+
# counters.fetch("foo") # => 1
|
103
|
+
# counters.fetch(:bar, 0) # => 0
|
104
|
+
# counters.fetch(:bar) {|key| 0} # => 0
|
105
|
+
# counters.fetch(:zoo) # => KeyError: key not found: "zoo"
|
106
|
+
#
|
97
107
|
def fetch(key, *extras)
|
98
108
|
super(convert_key(key), *extras)
|
99
109
|
end
|
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 3118045377
|
5
|
+
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
|
9
|
+
- 7
|
10
|
+
- rc
|
11
|
+
- 1
|
12
|
+
version: 3.2.7.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: 2012-
|
20
|
+
date: 2012-07-23 00:00:00 Z
|
19
21
|
dependencies:
|
20
22
|
- !ruby/object:Gem::Dependency
|
21
23
|
name: i18n
|
@@ -292,12 +294,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
292
294
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
293
295
|
none: false
|
294
296
|
requirements:
|
295
|
-
- - "
|
297
|
+
- - ">"
|
296
298
|
- !ruby/object:Gem::Version
|
297
|
-
hash:
|
299
|
+
hash: 25
|
298
300
|
segments:
|
299
|
-
-
|
300
|
-
|
301
|
+
- 1
|
302
|
+
- 3
|
303
|
+
- 1
|
304
|
+
version: 1.3.1
|
301
305
|
requirements: []
|
302
306
|
|
303
307
|
rubyforge_project:
|