aylien_text_api 0.6.1 → 0.7.0

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: af0bce44b8c09c10bc8f7745dbf0ec29235b6838
4
- data.tar.gz: 1af948f7d4ff48f51c2c3f49d3b94adc608ae98c
3
+ metadata.gz: 09993e8546c5922ae46dd06032296cecf47f37b7
4
+ data.tar.gz: 898af691bf87d6db20eb28fd0dfea314b63de681
5
5
  SHA512:
6
- metadata.gz: 37e174a7b2d242951af8be9c85ff2807b25a29048ac8e035db8b01b6dd7d10f75143c5b3718fe61abe39ee913809487625f36d1858b868ce3ff09268c0b64059
7
- data.tar.gz: 0f350f583b068884a56178c0e206aadb06b6b0019e1afc549e4841fc57578bea2386a8a5ac5b73b3b0c303f6a07f4fa24874ee50c2c8d6c5a6d3225a7f527e26
6
+ metadata.gz: f4621c72ee93f2170b6f3852b6db64ac31c8ec5a05319774d97847e3bee607d275b7b1d4d67a5cc55c30702093596e5ebc038111a8b6fcc86226a7c38fc37455
7
+ data.tar.gz: a0be785b22f55687fb1e33c15ee639dd5abf02e2948e66fa5bfc1a5d5297be3269f9e584abbb69c569cc76cd17ac548c8953a50513ecd7adb0595bd79e59a463
@@ -43,10 +43,14 @@ module AylienTextApi
43
43
  Net::HTTP.start(@uri.host, @uri.port, use_ssl: (@uri.scheme == 'https')) do |http|
44
44
  response = http.request(@request)
45
45
 
46
+ limit = response["X-RateLimit-Limit"]
47
+ remaining = response["X-RateLimit-Remaining"]
48
+ reset = response["X-RateLimit-Reset"]
49
+
46
50
  @rate_limits = {
47
- limit: response["X-RateLimit-Limit"],
48
- remaining: response["X-RateLimit-Remaining"],
49
- reset: response["X-RateLimit-Reset"]
51
+ limit: limit ? limit.to_i : nil,
52
+ remaining: remaining ? remaining.to_i : nil,
53
+ reset: reset ? reset.to_i : nil
50
54
  }
51
55
 
52
56
  if response.kind_of?(Net::HTTPSuccess)
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module AylienTextApi
16
- VERSION = "0.6.1" unless defined? AylienTextApi::VERSION
16
+ VERSION = "0.7.0" unless defined? AylienTextApi::VERSION
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aylien_text_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aylien Inc.
@@ -79,7 +79,6 @@ extra_rdoc_files: []
79
79
  files:
80
80
  - ".gitignore"
81
81
  - Gemfile
82
- - Gemfile.lock
83
82
  - LICENSE
84
83
  - README.md
85
84
  - Rakefile