archdown 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gemspec
3
+ gemspec
@@ -1,4 +1,5 @@
1
1
  require 'archivist/client'
2
+ require 'retriable'
2
3
 
3
4
  require 'archdown/librarian'
4
5
  require 'archdown/library'
@@ -15,7 +16,13 @@ module Archdown
15
16
 
16
17
  def go!(&each_book)
17
18
  page = 1
18
- while not (books = @client.search(@search_terms.merge(:page => page))).empty?
19
+ loop do
20
+ books = ::Retriable.retriable :on => Faraday::Error::TimeoutError do
21
+ @client.search(@search_terms.merge(:page => page))
22
+ end
23
+
24
+ break if books.empty?
25
+
19
26
  books.each do |book|
20
27
  Librarian.new(@library, book).store_book(&each_book)
21
28
  end
@@ -1,3 +1,3 @@
1
1
  module Archdown
2
- VERSION = '0.3'
2
+ VERSION = '0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: archdown
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '0.4'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: retriable
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: bundler
32
48
  requirement: !ruby/object:Gem::Requirement
@@ -132,7 +148,6 @@ extensions: []
132
148
  extra_rdoc_files: []
133
149
  files:
134
150
  - Gemfile
135
- - Gemfile.lock
136
151
  - Guardfile
137
152
  - LICENSE
138
153
  - README.md
data/Gemfile.lock DELETED
@@ -1,107 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- archdown (0.3)
5
- archivist-client
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- archivist-client (0.1.6)
11
- faraday
12
- faraday_middleware
13
- representable
14
- virtus (~> 1.0.0)
15
- axiom-types (0.1.1)
16
- descendants_tracker (~> 0.0.4)
17
- ice_nine (~> 0.11.0)
18
- thread_safe (~> 0.3, >= 0.3.1)
19
- celluloid (0.15.2)
20
- timers (~> 1.1.0)
21
- coderay (1.1.0)
22
- coercible (1.0.0)
23
- descendants_tracker (~> 0.0.1)
24
- columnize (0.8.9)
25
- debugger (1.6.8)
26
- columnize (>= 0.3.1)
27
- debugger-linecache (~> 1.2.0)
28
- debugger-ruby_core_source (~> 1.3.5)
29
- debugger-linecache (1.2.0)
30
- debugger-ruby_core_source (1.3.5)
31
- descendants_tracker (0.0.4)
32
- thread_safe (~> 0.3, >= 0.3.1)
33
- diff-lcs (1.2.5)
34
- equalizer (0.0.9)
35
- faraday (0.9.0)
36
- multipart-post (>= 1.2, < 3)
37
- faraday_middleware (0.9.1)
38
- faraday (>= 0.7.4, < 0.10)
39
- ffi (1.9.3)
40
- formatador (0.2.5)
41
- guard (2.6.1)
42
- formatador (>= 0.2.4)
43
- listen (~> 2.7)
44
- lumberjack (~> 1.0)
45
- pry (>= 0.9.12)
46
- thor (>= 0.18.1)
47
- guard-rspec (4.2.10)
48
- guard (~> 2.1)
49
- rspec (>= 2.14, < 4.0)
50
- ice_nine (0.11.0)
51
- listen (2.7.9)
52
- celluloid (>= 0.15.2)
53
- rb-fsevent (>= 0.9.3)
54
- rb-inotify (>= 0.9)
55
- lumberjack (1.0.9)
56
- method_source (0.8.2)
57
- mini_portile (0.6.0)
58
- multi_json (1.10.1)
59
- multipart-post (2.0.0)
60
- nokogiri (1.6.2.1)
61
- mini_portile (= 0.6.0)
62
- pry (0.10.0)
63
- coderay (~> 1.1.0)
64
- method_source (~> 0.8.1)
65
- slop (~> 3.4)
66
- rake (10.3.2)
67
- rb-fsevent (0.9.4)
68
- rb-inotify (0.9.5)
69
- ffi (>= 0.5.0)
70
- representable (1.8.5)
71
- multi_json
72
- nokogiri
73
- uber
74
- rspec (3.0.0)
75
- rspec-core (~> 3.0.0)
76
- rspec-expectations (~> 3.0.0)
77
- rspec-mocks (~> 3.0.0)
78
- rspec-core (3.0.2)
79
- rspec-support (~> 3.0.0)
80
- rspec-expectations (3.0.2)
81
- diff-lcs (>= 1.2.0, < 2.0)
82
- rspec-support (~> 3.0.0)
83
- rspec-mocks (3.0.2)
84
- rspec-support (~> 3.0.0)
85
- rspec-support (3.0.2)
86
- slop (3.5.0)
87
- thor (0.19.1)
88
- thread_safe (0.3.4)
89
- timers (1.1.0)
90
- uber (0.0.7)
91
- virtus (1.0.2)
92
- axiom-types (~> 0.1)
93
- coercible (~> 1.0)
94
- descendants_tracker (~> 0.0.3)
95
- equalizer (~> 0.0.9)
96
-
97
- PLATFORMS
98
- ruby
99
-
100
- DEPENDENCIES
101
- archdown!
102
- bundler (~> 1.3)
103
- debugger
104
- guard
105
- guard-rspec
106
- rake
107
- rspec