active_attr 0.10.3 → 0.11.0

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72c6101cf2d5d4d83c48bab895c2c830cac179cc
4
- data.tar.gz: ddaf7bbec71d6646741962ead851baf2dee3327b
3
+ metadata.gz: f072a053dc7854c420523d4dcea77f3c06181021
4
+ data.tar.gz: 5ea51b5d4fd81a140484c1d725a12c16ed8adbd8
5
5
  SHA512:
6
- metadata.gz: 92408021ac84ebd43e17a7e739436f49484728b69a31ac2817361ce51c85974f7591cca7a46bbfa165a62b4fbfbc85da2771de05f0cb433a0f6fec725fbe6276
7
- data.tar.gz: '08a3954471c06c250bb7fbdbe7049b3974628c58f5bbb4c6fbd338b8dc4b22f34ea8ebf739e85934d2af8beaa8321de8ce08394e563fde1891330f55c786cf0d'
6
+ metadata.gz: 19f0b7b8289d633be65d8f7f6a519d3769d34b6812f6483de5d485274496dae7b1f27aed5199829d9113b44fd11fbbc3a8030d2e884f28b2ea4d795a0f287455
7
+ data.tar.gz: 526b81fa479ee21f79d5df4e4bb9fafec8413aef334a75daa3c2ea4baee4dce732eaeecb4d03355c2dadae9b7166e1258a5ae30e4ddcc9b9bb78d3f9954f57f9
@@ -1,3 +1,8 @@
1
+ # ActiveAttr 0.11.0 (May 29, 2018) #
2
+
3
+ * #166 Changed Typecasting::DateTimeTypecaster to not raise on invalid
4
+ Strings (Omoto Kenji)
5
+
1
6
  # ActiveAttr 0.10.3 (February 16, 2018) #
2
7
 
3
8
  * ActiveAttr now supports Rails 5.2
data/README.md CHANGED
@@ -18,7 +18,7 @@ ActiveAttr is distributed as a rubygem [on rubygems.org][rubygems].
18
18
  * [Contributors][contributors]
19
19
 
20
20
  [api]: http://rubydoc.info/gems/active_attr
21
- [codeclimate badge]: https://codeclimate.com/github/cgriego/active_attr.png
21
+ [codeclimate badge]: https://codeclimate.com/github/cgriego/active_attr.svg
22
22
  [codeclimate]: https://codeclimate.com/github/cgriego/active_attr
23
23
  [contributors]: https://github.com/cgriego/active_attr/contributors
24
24
  [railscast poster]: http://railscasts.com/static/episodes/stills/326-activeattr.png
@@ -28,7 +28,7 @@ ActiveAttr is distributed as a rubygem [on rubygems.org][rubygems].
28
28
  [strong_parameters]: https://github.com/rails/strong_parameters
29
29
  [speakerdeck slide]: https://speakerd.s3.amazonaws.com/presentations/4f31f1dec583b4001f008ec3/thumb_slide_0.jpg
30
30
  [speakerdeck]: https://speakerdeck.com/u/cgriego/p/models-models-every-where
31
- [travis badge]: https://secure.travis-ci.org/cgriego/active_attr.png?branch=master
31
+ [travis badge]: https://secure.travis-ci.org/cgriego/active_attr.svg?branch=master
32
32
  [travis]: http://travis-ci.org/cgriego/active_attr
33
33
 
34
34
  ## Modules ##
@@ -25,6 +25,7 @@ module ActiveAttr
25
25
  # @since 0.5.0
26
26
  def call(value)
27
27
  value.to_datetime if value.respond_to? :to_datetime
28
+ rescue ArgumentError
28
29
  end
29
30
  end
30
31
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveAttr
2
2
  # Complete version string
3
3
  # @since 0.1.0
4
- VERSION = "0.10.3"
4
+ VERSION = "0.11.0"
5
5
  end
@@ -16,6 +16,10 @@ module ActiveAttr
16
16
  typecaster.call(nil).should equal nil
17
17
  end
18
18
 
19
+ it "returns nil for an invalid String" do
20
+ typecaster.call("x").should equal nil
21
+ end
22
+
19
23
  it "casts a Date to a DateTime at the beginning of the day with no offset" do
20
24
  result = typecaster.call(Date.new(2012, 1, 1))
21
25
  result.should eql DateTime.new(2012, 1, 1)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_attr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Griego
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-02-16 00:00:00.000000000 Z
12
+ date: 2018-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel