active_remote 3.1.2.pre → 3.1.2

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: 39944a221275cad858e3e27fe66c5036683d97a2eb2cefe23090d2891f5f9774
4
- data.tar.gz: 24c7e515d381a239743a226a810395f5670e1d76373c715c3944d941d0f4f17c
3
+ metadata.gz: aa840dfee31ef2b90f80566a274c0048d8129bebac6265b05725d5757df92d6b
4
+ data.tar.gz: faa1e605ec1a9b1920bd75ade889b9e267dccd0318db499372d2345fb2a0afab
5
5
  SHA512:
6
- metadata.gz: 16633c569df3b15168fe01521f22e4d35dcb54326350d9e195163c223484e954652a725cb7731d441f20466d61ec4ac3ed0d8d2c5dfd6b17723e9e591d8c3679
7
- data.tar.gz: d8e5ae3f58f4e8f025199b07b63d65749c7e2f844d638c80fb1d1c5b21f6df47be11d4232f774e2e27e2bbcca3007741ec7172b7e0178d9b90f0a11a68a473f7
6
+ metadata.gz: 98cf8a9614b13049b79f52b6f72f34affd0a858d7f9430b9d01ee8bcf58974fdc3260c4c4ed60683fbf136717c1599cecf35e6600be861308e85d63b3c7e04b3
7
+ data.tar.gz: 6eb6aa728b6a016d4319c5a3935f4969cf5e6ccdec8bb48bac89020ccdd6da35a833c66f1e6944fceb43869805d12232babe0f86a2fb37aba14af12cbccda4bc
@@ -3,6 +3,7 @@ module ActiveRemote
3
3
  class DateTimeTypecaster
4
4
  def self.call(value)
5
5
  value.to_datetime if value.respond_to?(:to_datetime)
6
+ rescue NoMethodError, ArgumentError
6
7
  end
7
8
  end
8
9
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveRemote
2
- VERSION = "3.1.2.pre"
2
+ VERSION = "3.1.2"
3
3
  end
@@ -14,6 +14,13 @@ describe ::ActiveRemote::Typecasting do
14
14
  record = test_class.new(:birthday => "2016-01-01")
15
15
  expect(record.birthday).to eq(DateTime.parse("2016-01-01"))
16
16
  end
17
+
18
+ context "invalid date" do
19
+ it "sets attribute to nil" do
20
+ record = test_class.new(:birthday => "23451234")
21
+ expect(record.birthday).to be_nil
22
+ end
23
+ end
17
24
  end
18
25
 
19
26
  describe "float" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2.pre
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Hutchison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-26 00:00:00.000000000 Z
11
+ date: 2018-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -257,12 +257,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
257
257
  version: '0'
258
258
  required_rubygems_version: !ruby/object:Gem::Requirement
259
259
  requirements:
260
- - - ">"
260
+ - - ">="
261
261
  - !ruby/object:Gem::Version
262
- version: 1.3.1
262
+ version: '0'
263
263
  requirements: []
264
264
  rubyforge_project:
265
- rubygems_version: 2.7.4
265
+ rubygems_version: 2.7.3
266
266
  signing_key:
267
267
  specification_version: 4
268
268
  summary: Active Record for your platform