ahora 0.2.1 → 0.2.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
  SHA1:
3
- metadata.gz: 0c7c04cb272fc8883a9acbdbb31e3cc2402f7095
4
- data.tar.gz: 1f42bd17798185dba77950774ae9d02c5d39442b
3
+ metadata.gz: 19769f613c37b2582591c1f4cbacfa2d8f96cdda
4
+ data.tar.gz: e12cf7d661cecf473ef47218d5d5960bacc6c0dc
5
5
  SHA512:
6
- metadata.gz: 539ade23c546324598f1252e4fea7eec722a183f2ac90393eb8a307d8a8d0b452c945eae30332acea4aa44b539fc3c49a8372b88194f0de5f9ca2149f7884305
7
- data.tar.gz: 63e895253a32aa8fd3f3b8849f4481a701cb6fb3459b7a9e7626c4be61064d1902fb94f3ec4317746068d4ce0ba900de2b1595992c840a2785f0140cd758a15b
6
+ metadata.gz: 45d49f0fae0006019cb5a3ce5e885e8c055abfd775027a459eae87cdd4f66772c15b80afa7ab25ef0b4d0cd9d19acc87169f31e05737b44a701e9ba76ec89d2e
7
+ data.tar.gz: 551b5f016142d80ebdec7b3124557eaaf4372bd37581a8bec7a188ff0314cdbc63368d615e593525621afd75715bc3090db9dafed59066a8efd3254d700369cf
@@ -1,5 +1,3 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - jruby-19mode # JRuby in 1.9 mode
5
- - rbx-19mode
3
+ - 2.4
@@ -98,7 +98,7 @@ module Ahora
98
98
 
99
99
  def handle_exception(e)
100
100
  case e
101
- when Faraday::Error::TimeoutError
101
+ when Faraday::Error::TimeoutError, Faraday::Error::ConnectionFailed
102
102
  e.extend Ahora::Error::TimeoutError
103
103
  else
104
104
  e.extend Ahora::Error::ClientError
@@ -1,3 +1,3 @@
1
1
  module Ahora
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -24,7 +24,7 @@ describe "boolean elements" do
24
24
  end
25
25
 
26
26
  it "parsing missing value adds the correct reader" do
27
- employee.fired.must_equal nil
27
+ employee.fired.must_be_nil
28
28
  end
29
29
 
30
30
  it "parsing 'true' adds the correct question mark reader" do
@@ -56,6 +56,6 @@ describe "string elements" do
56
56
  end
57
57
 
58
58
  it "returns nil for empty strings" do
59
- employee.last_name.must_equal nil
59
+ employee.last_name.must_be_nil
60
60
  end
61
- end
61
+ end
@@ -93,6 +93,13 @@ describe 'exception handling' do
93
93
  }.must_raise Ahora::Error::TimeoutError
94
94
  end
95
95
 
96
+ it 'should raise a TimeoutError in case of a Faraday connection failed' do
97
+ FakeWeb.register_uri http_method.to_sym, 'http://test.net/posts', :exception => Faraday::Error::ConnectionFailed
98
+ lambda {
99
+ @post.send(http_method, 'posts')
100
+ }.must_raise Ahora::Error::TimeoutError
101
+ end
102
+
96
103
  it 'should raise an ClientError in case of a Faraday error' do
97
104
  FakeWeb.register_uri http_method.to_sym, 'http://test.net/posts', :body => 'Forbidden', :status => [403, 'Forbidden']
98
105
  lambda {
@@ -128,7 +128,7 @@ describe "requesting a collection" do
128
128
  end
129
129
 
130
130
  it "returns nil for elements not in the resource" do
131
- subject.parent_id.must_equal nil
131
+ subject.parent_id.must_be_nil
132
132
  end
133
133
 
134
134
  it "must handle date conversion" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahora
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthijs Langenberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-22 00:00:00.000000000 Z
11
+ date: 2017-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nibbler
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  version: '0'
131
131
  requirements: []
132
132
  rubyforge_project:
133
- rubygems_version: 2.4.6
133
+ rubygems_version: 2.5.2.1
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Consume Java-ish XML HTTP Resources easily