activemodel 6.0.0.rc1 → 6.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 568be70e542afe10274d5303105f406cf708251e81eed6d1b6c626f79972ade7
4
- data.tar.gz: 2bf8cf35c9650a147cffd6641e95d87a320bc2f82fd221fad00ec33f7291aa44
3
+ metadata.gz: b62a3079c9aa82727030259ac3f47b1f1e8a4292f9b02d7dff3351c59bd7504c
4
+ data.tar.gz: a85c9b29228edce13de7f632a0275af7343869c3b77df89645fbd78554bd43cb
5
5
  SHA512:
6
- metadata.gz: 514523cd84d1ee84454eecbb76f6a1828c4c22a058608c64eeeaac97ceedb6661eefc99d8b7d21df8c276c249735077cd1645e3116970f594927792cbeaeb468
7
- data.tar.gz: ed916e256e54b75d96b57d576e853d63ec326da1e32cb751b410ffcac118bc77db9989d4519bbd75eb347bd29fcfbee4023a3f9a4bcb6572c44a389afcaaa210
6
+ metadata.gz: 3889c892dd0584c45062c6c802ad41b473076afe732f8958bf1014d3802a555acb80bb7cceb8209c1bf628a798b36d3ffbec2226adc39349b75174ede9115e3a
7
+ data.tar.gz: 5084f8019c592585e9ac1d739d100ae6c65f3cb6a003982cd9916d322f586a876bd2c1c9fe14c727b170dae8dc2df78a71547bf3695e7cdbe8753a07ebdffeb6
@@ -1,3 +1,8 @@
1
+ ## Rails 6.0.0.rc2 (July 22, 2019) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 6.0.0.rc1 (April 24, 2019) ##
2
7
 
3
8
  * Type cast falsy boolean symbols on boolean attribute as false.
@@ -10,7 +10,7 @@ module ActiveModel
10
10
  MAJOR = 6
11
11
  MINOR = 0
12
12
  TINY = 0
13
- PRE = "rc1"
13
+ PRE = "rc2"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -22,10 +22,17 @@ module ActiveModel
22
22
  end
23
23
 
24
24
  def apply_seconds_precision(value)
25
- return value unless precision && value.respond_to?(:usec)
26
- number_of_insignificant_digits = 6 - precision
25
+ return value unless precision && value.respond_to?(:nsec)
26
+
27
+ number_of_insignificant_digits = 9 - precision
27
28
  round_power = 10**number_of_insignificant_digits
28
- value.change(usec: value.usec - value.usec % round_power)
29
+ rounded_off_nsec = value.nsec % round_power
30
+
31
+ if rounded_off_nsec > 0
32
+ value.change(nsec: value.nsec - rounded_off_nsec)
33
+ else
34
+ value
35
+ end
29
36
  end
30
37
 
31
38
  def type_cast_for_schema(value)
@@ -18,6 +18,11 @@ module ActiveModel
18
18
  :integer
19
19
  end
20
20
 
21
+ def deserialize(value)
22
+ return if value.blank?
23
+ value.to_i
24
+ end
25
+
21
26
  def serialize(value)
22
27
  return if value.is_a?(::String) && non_numeric_string?(value)
23
28
  ensure_in_range(super)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.rc1
4
+ version: 6.0.0.rc2
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: 2019-04-24 00:00:00.000000000 Z
11
+ date: 2019-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 6.0.0.rc1
19
+ version: 6.0.0.rc2
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: 6.0.0.rc1
26
+ version: 6.0.0.rc2
27
27
  description: A toolkit for building modeling frameworks like Active Record. Rich support
28
28
  for attributes, callbacks, validations, serialization, internationalization, and
29
29
  testing.
@@ -101,8 +101,8 @@ homepage: https://rubyonrails.org
101
101
  licenses:
102
102
  - MIT
103
103
  metadata:
104
- source_code_uri: https://github.com/rails/rails/tree/v6.0.0.rc1/activemodel
105
- changelog_uri: https://github.com/rails/rails/blob/v6.0.0.rc1/activemodel/CHANGELOG.md
104
+ source_code_uri: https://github.com/rails/rails/tree/v6.0.0.rc2/activemodel
105
+ changelog_uri: https://github.com/rails/rails/blob/v6.0.0.rc2/activemodel/CHANGELOG.md
106
106
  post_install_message:
107
107
  rdoc_options: []
108
108
  require_paths: