async-rest 0.7.3 → 0.8.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
  SHA256:
3
- metadata.gz: 18152adb0c139c842d91c9e31114c2ec7c8f33408a0233276cb2acdc09d7f84d
4
- data.tar.gz: b7159ec4f05af395a710b7d1d81fe5477f7e5e38f51e20dbc0a1464ede4c86cb
3
+ metadata.gz: a3ccf5222149954ba21b9e57ec80f14752fdaa126e7c53ba152666557812dcbc
4
+ data.tar.gz: a26d1cf50daa97e4ebc05b606b83273879dfd92e39d50190f3868153192e87ff
5
5
  SHA512:
6
- metadata.gz: 105602f5f11a4de0871ef6c0240b20391b748be9924a55b615f8fa15e9d8ea460be4c47368dbfc8979ab07defabd5cf76f0693cf919569a52bd25f03b584522d
7
- data.tar.gz: 8a288f1c725899e267bff0f6b403d56289ab64582264199bd194e26f59507044dfea74838fa90adcfdb9497b8db208eb9e6abac88791a4ca89cf3f681c528992
6
+ metadata.gz: dd34a5f9ca74d4992f272b788322785af7bb2dd7ebc33bf20cd80a1d1b39179325a121b5e658cea74cab8e90f03cc7e428d5f34e5e9be65cf7c7b2fe7300306b
7
+ data.tar.gz: 4ae3d9d692e6e8136aacd801a0356e8181322ac66a6fe7110089eca61578c19ee74cae2ae60544ff0f3223795fc2307d0937839afe1487cd8b6720df7a9a4d5c
@@ -16,8 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.add_dependency "async-http", "~> 0.37"
20
- spec.add_dependency "http-protocol", "~> 0.14"
19
+ spec.add_dependency "async-http", "~> 0.39"
21
20
 
22
21
  spec.add_development_dependency "async-rspec", "~> 1.1"
23
22
 
@@ -26,7 +26,7 @@ Async::REST::Resource.for(URL) do |resource|
26
26
  messages = representation.value[:messages]
27
27
  matches = messages[:matches]
28
28
 
29
- puts "Found #{matches.count} messages on page #{page}..."
29
+ puts "Found #{matches.count} messages on page #{page} out of #{messages[:total]}..."
30
30
 
31
31
  break if matches.empty?
32
32
 
@@ -35,17 +35,17 @@ Async::REST::Resource.for(URL) do |resource|
35
35
  channel_id = message[:channel][:id]
36
36
  channel_name = message[:channel][:name]
37
37
  timestamp = message[:ts]
38
-
38
+
39
39
  pp [timestamp, channel_name, text]
40
-
40
+
41
41
  message_delete = Async::REST::Representation.new(
42
42
  delete.with(parameters: {channel: channel_id, ts: timestamp})
43
43
  )
44
-
44
+
45
45
  response = message_delete.post
46
46
  if rate_limited?(response.read)
47
47
  puts "Rate limiting..."
48
- Async::Task.current.sleep 2
48
+ Async::Task.current.sleep 10
49
49
  end
50
50
  end
51
51
 
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module REST
23
- VERSION = "0.7.3"
23
+ VERSION = "0.8.0"
24
24
  end
25
25
  end
@@ -46,7 +46,7 @@ module Async
46
46
  headers['content-type'] = @content_type
47
47
 
48
48
  HTTP::Body::Buffered.new([
49
- ::HTTP::Protocol::URL.encode(payload)
49
+ ::Protocol::HTTP::URL.encode(payload)
50
50
  ])
51
51
  end
52
52
  end
@@ -67,7 +67,7 @@ module Async
67
67
 
68
68
  class Parser < HTTP::Body::Wrapper
69
69
  def join
70
- ::HTTP::Protocol::URL.decode(super, symbolize_keys: true)
70
+ ::Protocol::HTTP::URL.decode(super, symbolize_keys: true)
71
71
  end
72
72
  end
73
73
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-21 00:00:00.000000000 Z
11
+ date: 2019-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http
@@ -16,28 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.37'
19
+ version: '0.39'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.37'
27
- - !ruby/object:Gem::Dependency
28
- name: http-protocol
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '0.14'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0.14'
26
+ version: '0.39'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: async-rspec
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -148,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
134
  - !ruby/object:Gem::Version
149
135
  version: '0'
150
136
  requirements: []
151
- rubygems_version: 3.0.2
137
+ rubygems_version: 3.0.3
152
138
  signing_key:
153
139
  specification_version: 4
154
140
  summary: A library for RESTful clients (and hopefully servers).