acfs 0.34.0.1.b287 → 0.34.0.1.b288

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTA0YWNiNjAxMDkzZGNhNjRhYzAyMGM5MGI2NGYwNjMzMDY2OTY0Mg==
4
+ YzQ3NDVkYWNjOWI2YWM5MTI2MmM4ZWU5OWRlMGJhYTc2NWI4Nzg1Yw==
5
5
  data.tar.gz: !binary |-
6
- OWIwMTgxYjg5NDc5NjMyZDY5YTc2MzVkY2JiMmRiOGYwZDZkZWMwNQ==
6
+ NjM1OTM1ZTBiZjE2NWY1NTI4MWE0NjU3NGFkYjIyYmUwYzQyODQ1NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzUwM2JjOWI3OTU0ZGZlZDJhOGYyMTY4N2UxNDA3MTU1Zjg3M2MyMjE3YTc5
10
- ZTVjYzJlY2U0N2VmODU4MjQ0YzRiOGQ4ZmVmZmY0OWVjMTA1N2I0MjIzNDgz
11
- OTRjMmM1MTA2OGMwMTY4YTNjZjNkMjU1NjgxZWU0YzBlMWI1MGQ=
9
+ ZTQ1YzYyOWNlZjI5MzMyZWRiZTkzNjE1MGMyODI2ZWZiODgzYjQwMGYwMDkw
10
+ ZTZjOTMwYzI1ODEwZGI3ODJhMmQzYWU5NTEzZjY2Y2IyYmMyNjBkNjhlMmY3
11
+ MWUxYzJiOTUyZDRjNjY0YTUyMzQwMTk5ZGNlYTk2YjgzN2NiM2Q=
12
12
  data.tar.gz: !binary |-
13
- ODQyY2FhMDMzMjZiODdiZTgwYTEyNjhmZjlkMjRhNGI4MGU5M2ZjYzU1MzAw
14
- NWU2N2Q1MWZjOWE3N2NiMTUxOWRjMWZiZTE2YmYzZTA4MmE2NWQwMTg4NGEw
15
- NGMyMDUxYjE3MzI2YTM3ZTcxY2MwNmE2N2NmYzhmMGZhYmNmYTI=
13
+ YTEyYzA2ZGM1NDliNDQzNzg1ODg5Y2VjZjFhYjhhMWNlY2IyYjUxOGMxYTc3
14
+ MzZhOTdjMGZjYzE1Y2Q1NGYzZDc4YjQ4MjI2YmJhMTE2NTA0NTk4YTFjYTZk
15
+ ZmRiYTZhMWM5NzUyYWEyZjRjNzJhYTY3MWYzNzlkZWQwZWJmMmQ=
@@ -9,6 +9,9 @@ module Acfs
9
9
 
10
10
  def start
11
11
  hydra.run
12
+ rescue
13
+ @hydra = nil
14
+ raise
12
15
  end
13
16
 
14
17
  def abort
data/lib/acfs/runner.rb CHANGED
@@ -55,6 +55,10 @@ module Acfs
55
55
 
56
56
  @running = true
57
57
  adapter.start
58
+ rescue
59
+ queue.clear
60
+ raise
61
+ ensure
58
62
  @running = false
59
63
  end
60
64
 
@@ -0,0 +1,24 @@
1
+ require 'spec_helper'
2
+
3
+ describe Acfs::Adapter::Typhoeus do
4
+ let(:adapter) { described_class.new }
5
+ before { WebMock.allow_net_connect! }
6
+
7
+ it 'raises an error' do
8
+ request1 = Acfs::Request.new 'http://altimos.de/404.1' do |rsp|
9
+ raise '404-1'
10
+ end
11
+ request2 = Acfs::Request.new 'http://altimos.de/404.2' do |rsp|
12
+ raise '404-2'
13
+ end
14
+ adapter.queue request1
15
+ adapter.queue request2
16
+
17
+ expect{ adapter.start }.to raise_error /404\-[12]/
18
+ expect{ adapter.start }.to_not raise_error
19
+ end
20
+
21
+ it 'should clear queue on error' do
22
+
23
+ end
24
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.0.1.b287
4
+ version: 0.34.0.1.b288
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-13 00:00:00.000000000 Z
11
+ date: 2014-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -171,6 +171,7 @@ files:
171
171
  - lib/acfs/util.rb
172
172
  - lib/acfs/version.rb
173
173
  - lib/acfs/yard.rb
174
+ - spec/acfs/adapter/typhoeus_spec.rb
174
175
  - spec/acfs/collection_spec.rb
175
176
  - spec/acfs/configuration_spec.rb
176
177
  - spec/acfs/middleware/json_decoder_spec.rb
@@ -227,6 +228,7 @@ signing_key:
227
228
  specification_version: 4
228
229
  summary: An abstract API base client for service oriented application.
229
230
  test_files:
231
+ - spec/acfs/adapter/typhoeus_spec.rb
230
232
  - spec/acfs/collection_spec.rb
231
233
  - spec/acfs/configuration_spec.rb
232
234
  - spec/acfs/middleware/json_decoder_spec.rb