openapply 1.0.3.5 → 1.0.3.7

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: e65a14e94091968d7732d1cf979e5639c02cf3dbb94cfc1cce49f79c92e05e12
4
- data.tar.gz: 406ceea772edfba7400f389ea45bbe2296eddceb679d98cce1b5699a7bc41473
3
+ metadata.gz: baeb574c2b8b4f3929b9e375f0a25781cfc85591787f1a07939c41e89d83bf36
4
+ data.tar.gz: 3b504d28b79caa20ed63db7d1918537e0720304356b551f1f81d4339e6dd8877
5
5
  SHA512:
6
- metadata.gz: 34423641c46581d44b19f391995f6e1689c4188e43c9129a3eeec5e4bee3d828de6bce81882ff5115fab5a2af642ccf160369950969a2ad1295efd9f224b242e
7
- data.tar.gz: d447c79d70e8b028bf55f9e386fbf250e24edbb17930e0d3958e13341ba8d4a14428e1369af3b04de2aa1e7666d30d78f79c1a5f5eced7c2889f0d4f2223c1da
6
+ metadata.gz: ff039ff3ec1a40da9cf2f50fd3cdfb0af5b8dfafe155d292c5b8ad585b5e2ab2565f3cabf8761da8e98d177a2537626d0c19a0e6101ba5dd5f1169e4dfdb7d17
7
+ data.tar.gz: 2803fde506d4b389b1c3316466b4449f4b74fb2121ea9f41e380f10ec1e9903753f036682c0b17fc4f1e7e0bb6870784e1c229a2dae83be04202f75b8471ec5b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openapply (1.0.3.5)
4
+ openapply (1.0.3.6)
5
5
  httparty (~> 0.20)
6
6
  json (~> 2.6)
7
7
  oauth2 (~> 2.0)
@@ -101,8 +101,18 @@ module Openapply
101
101
  raise TooManyRequestError if answer.too_many_requests?
102
102
 
103
103
  return answer
104
+ rescue TooManyRequestError
105
+ puts "TooManyRequestError"
106
+ sleep (answer.headers['X-RateLimit-Period'].to_i + 1)
107
+ retry
108
+ rescue *NET_EXCEPTIONS => error
109
+ if ENV['OA_DEBUG']
110
+ puts "ERROR:"
111
+ puts "error: #{error}"
112
+ puts "message: #{error.message}"
113
+ puts "###"
114
+ end
104
115
 
105
- rescue *NET_EXCEPTIONS
106
116
  if times_retried < max_retries
107
117
  times_retried += 1
108
118
  retry
@@ -149,9 +159,22 @@ module Openapply
149
159
  puts "###"
150
160
  end
151
161
 
162
+ raise TooManyRequestError if answer.too_many_requests?
163
+
152
164
  return answer
153
165
 
154
- rescue *NET_EXCEPTIONS
166
+ rescue TooManyRequestError
167
+ puts "TooManyRequestError"
168
+ sleep (answer.headers['X-RateLimit-Period'].to_i + 1)
169
+ retry
170
+ rescue *NET_EXCEPTIONS => error
171
+ if ENV['OA_DEBUG']
172
+ puts "ERROR:"
173
+ puts "error: #{error}"
174
+ puts "message: #{error.message}"
175
+ puts "###"
176
+ end
177
+
155
178
  if times_retried < max_retries
156
179
  times_retried += 1
157
180
  retry
@@ -1,5 +1,5 @@
1
1
  module Openapply
2
2
  module Version
3
- VERSION = "1.0.3.5"
3
+ VERSION = "1.0.3.7"
4
4
  end
5
5
  end
data/openapply.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "openapply"
8
8
  spec.version = Openapply::Version::VERSION
9
9
  spec.authors = ["Bill Tihen", "Elliott Hébert"]
10
- spec.email = ["btihen@gmail.com","btihen@las.ch","ell.heb@container4.ch","ehebert@las.ch"]
10
+ spec.email = ["btihen@gmail.com","btihen@las.ch","ehebert@las.ch"]
11
11
 
12
12
  spec.summary = %q{Access OpenApply's APIs with Ruby}
13
13
  spec.homepage = "https://github.com/las-it/openapply"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openapply
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3.5
4
+ version: 1.0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bill Tihen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-08-23 00:00:00.000000000 Z
12
+ date: 2022-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -141,7 +141,6 @@ description:
141
141
  email:
142
142
  - btihen@gmail.com
143
143
  - btihen@las.ch
144
- - ell.heb@container4.ch
145
144
  - ehebert@las.ch
146
145
  executables: []
147
146
  extensions: []
@@ -188,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
187
  - !ruby/object:Gem::Version
189
188
  version: '0'
190
189
  requirements: []
191
- rubygems_version: 3.2.22
190
+ rubygems_version: 3.3.20
192
191
  signing_key:
193
192
  specification_version: 4
194
193
  summary: Access OpenApply's APIs with Ruby