activesupport 5.0.0.rc2 → 5.0.0

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f3c6d59a6e4308dab74700a6dda2698d36dc434
4
- data.tar.gz: 1aa6d12354a195b9d5a7d087d516b1747c64e032
3
+ metadata.gz: 77b587046346e792c9c3604725f667742b25a421
4
+ data.tar.gz: 214ec92ec4d454ad395ea0a644f2885751a8e166
5
5
  SHA512:
6
- metadata.gz: c35c9b59e15764243d8a9ab178785a291c65bc45c32440bfe5c94b68038d218f6bbe4f465403c8a0b6c73ba94b79a9d56db2fec8f47dbea68058d490cbbcc246
7
- data.tar.gz: 7513136a18f2d448899d598fc4a26179ea13e497448ae25345e5fdf01bbdb6e44068273f6d8f31746650e1f592a3380b05044a01d82648b7d9c339f334f90cbf
6
+ metadata.gz: 48a8b177309feca68dfe6bdfcba347ff59b0a04f3b1bc36075fb96f86b0bc78f1dc1bc841bed110f3f5837abf6e0d60da90624d9afe28a0d8b287c50073ad6a2
7
+ data.tar.gz: 06094421d9af6f7e3b2d1894a7323522a8cd697be90b1490a806b3956921846dc4c0e82f53ca9fbc172a51a844e938db86c69d7a6c1f853f9c8223b039464bfb
@@ -1,4 +1,13 @@
1
- ## Rails 5.0.0.rc2 (June 22, 2016) ##
1
+ ## Rails 5.0.0 (June 30, 2016) ##
2
+
3
+ * Support parsing JSON time in ISO8601 local time strings in
4
+ `ActiveSupport::JSON.decode` when `parse_json_times` is enabled.
5
+ Strings in the format of `YYYY-MM-DD hh:mm:ss` (without a `Z` at
6
+ the end) will be parsed in the local timezone (`Time.zone`). In
7
+ addition, date strings (`YYYY-MM-DD`) are now parsed into `Date`
8
+ objects.
9
+
10
+ *Grzegorz Witek*
2
11
 
3
12
  * `Date.to_s` doesn't produce too many spaces. For example, `to_s(:short)`
4
13
  will now produce `01 Feb` instead of ` 1 Feb`.
@@ -12,9 +21,6 @@
12
21
 
13
22
  *Jeremy Daer*
14
23
 
15
-
16
- ## Rails 5.0.0.rc1 (May 06, 2016) ##
17
-
18
24
  * `ActiveSupport::Duration` supports weeks and hours.
19
25
 
20
26
  [1.hour.inspect, 1.hour.value, 1.hour.parts]
@@ -35,9 +41,6 @@
35
41
 
36
42
  *Andrey Novikov*
37
43
 
38
-
39
- ## Rails 5.0.0.beta4 (April 27, 2016) ##
40
-
41
44
  * Time zones: Ensure that the UTC offset reflects DST changes that occurred
42
45
  since the app started. Removes UTC offset caching, reducing performance,
43
46
  but this is still relatively quick and isn't in any hot paths.
@@ -200,9 +203,6 @@
200
203
 
201
204
  *Matthew Draper*
202
205
 
203
-
204
- ## Rails 5.0.0.beta3 (February 24, 2016) ##
205
-
206
206
  * Deprecate arguments on `assert_nothing_raised`.
207
207
 
208
208
  `assert_nothing_raised` does not assert the arguments that have been passed
@@ -231,9 +231,6 @@
231
231
 
232
232
  *Jon Moss*
233
233
 
234
-
235
- ## Rails 5.0.0.beta2 (February 01, 2016) ##
236
-
237
234
  * Change `number_to_currency` behavior for checking negativity.
238
235
 
239
236
  Used `to_f.negative` instead of using `to_f.phase` for checking negativity
@@ -269,9 +266,6 @@
269
266
 
270
267
  *Akshay Vishnoi*
271
268
 
272
-
273
- ## Rails 5.0.0.beta1 (December 18, 2015) ##
274
-
275
269
  * Add thread_m/cattr_accessor/reader/writer suite of methods for declaring class and module variables that live per-thread.
276
270
  This makes it easy to declare per-thread globals that are encapsulated. Note: This is a sharp edge. A wild proliferation
277
271
  of globals is A Bad Thing. But like other sharp tools, when it's right, it's right.
@@ -8,7 +8,7 @@ module ActiveSupport
8
8
  MAJOR = 5
9
9
  MINOR = 0
10
10
  TINY = 0
11
- PRE = "rc2"
11
+ PRE = nil
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -8,7 +8,8 @@ module ActiveSupport
8
8
 
9
9
  module JSON
10
10
  # matches YAML-formatted dates
11
- DATE_REGEX = /^(?:\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[T \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?))$/
11
+ DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/
12
+ DATETIME_REGEX = /^(?:\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[T \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?)?)$/
12
13
 
13
14
  class << self
14
15
  # Parses a JSON string (JavaScript Object Notation) into a hash.
@@ -48,7 +49,13 @@ module ActiveSupport
48
49
  nil
49
50
  when DATE_REGEX
50
51
  begin
51
- DateTime.parse(data)
52
+ Date.parse(data)
53
+ rescue ArgumentError
54
+ data
55
+ end
56
+ when DATETIME_REGEX
57
+ begin
58
+ Time.zone.parse(data)
52
59
  rescue ArgumentError
53
60
  data
54
61
  end
@@ -31,11 +31,9 @@ module ActiveSupport
31
31
  @cache_keys = Concurrent::Map.new
32
32
  end
33
33
 
34
- # Returns a derived key suitable for use. The default key_size is chosen
35
- # to be compatible with the default settings of ActiveSupport::MessageVerifier.
36
- # i.e. OpenSSL::Digest::SHA1#block_length
37
- def generate_key(salt, key_size=64)
38
- @cache_keys["#{salt}#{key_size}"] ||= @key_generator.generate_key(salt, key_size)
34
+ # Returns a derived key suitable for use.
35
+ def generate_key(*args)
36
+ @cache_keys[args.join] ||= @key_generator.generate_key(*args)
39
37
  end
40
38
  end
41
39
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.rc2
4
+ version: 5.0.0
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: 2016-06-22 00:00:00.000000000 Z
11
+ date: 2016-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -331,9 +331,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
331
331
  version: 2.2.2
332
332
  required_rubygems_version: !ruby/object:Gem::Requirement
333
333
  requirements:
334
- - - ">"
334
+ - - ">="
335
335
  - !ruby/object:Gem::Version
336
- version: 1.3.1
336
+ version: '0'
337
337
  requirements: []
338
338
  rubyforge_project:
339
339
  rubygems_version: 2.6.4