totter 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/totter/client.rb +1 -0
- data/lib/totter/client/async.rb +16 -0
- data/lib/totter/version.rb +1 -1
- data/test/totter/client/async_test.rb +9 -0
- metadata +18 -6
- checksums.yaml +0 -7
data/lib/totter/client.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
module Totter
|
2
|
+
class Client
|
3
|
+
# Client methods for working with async results in the application.
|
4
|
+
module Async
|
5
|
+
# Returns an async result dataset
|
6
|
+
#
|
7
|
+
# @param id [String] The async id
|
8
|
+
# @return [Hashie::Mash]
|
9
|
+
# @example
|
10
|
+
# Totter.activity(1)
|
11
|
+
def async_result(id)
|
12
|
+
get("async/#{id}").body
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/totter/version.rb
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class AsyncTest < Totter::TestCase
|
4
|
+
def test_activity
|
5
|
+
stub_request(:get, 'http://localhost:5000/v1/async/1234').to_return(:status => 200, :body => "{}")
|
6
|
+
result = local_client.async_result('1234')
|
7
|
+
assert_equal Hashie::Mash.new, result
|
8
|
+
end
|
9
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: totter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Sam Soffes
|
@@ -15,6 +16,7 @@ dependencies:
|
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: multi_json
|
17
18
|
requirement: !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
18
20
|
requirements:
|
19
21
|
- - ~>
|
20
22
|
- !ruby/object:Gem::Version
|
@@ -22,6 +24,7 @@ dependencies:
|
|
22
24
|
type: :runtime
|
23
25
|
prerelease: false
|
24
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
25
28
|
requirements:
|
26
29
|
- - ~>
|
27
30
|
- !ruby/object:Gem::Version
|
@@ -29,6 +32,7 @@ dependencies:
|
|
29
32
|
- !ruby/object:Gem::Dependency
|
30
33
|
name: hashie
|
31
34
|
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
32
36
|
requirements:
|
33
37
|
- - ~>
|
34
38
|
- !ruby/object:Gem::Version
|
@@ -36,6 +40,7 @@ dependencies:
|
|
36
40
|
type: :runtime
|
37
41
|
prerelease: false
|
38
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
39
44
|
requirements:
|
40
45
|
- - ~>
|
41
46
|
- !ruby/object:Gem::Version
|
@@ -59,6 +64,7 @@ files:
|
|
59
64
|
- lib/totter.rb
|
60
65
|
- lib/totter/client.rb
|
61
66
|
- lib/totter/client/activities.rb
|
67
|
+
- lib/totter/client/async.rb
|
62
68
|
- lib/totter/client/avatars.rb
|
63
69
|
- lib/totter/client/choices.rb
|
64
70
|
- lib/totter/client/comments.rb
|
@@ -118,6 +124,7 @@ files:
|
|
118
124
|
- test/support/client_macros.rb
|
119
125
|
- test/test_helper.rb
|
120
126
|
- test/totter/client/activities_test.rb
|
127
|
+
- test/totter/client/async_test.rb
|
121
128
|
- test/totter/client/avatars_test.rb
|
122
129
|
- test/totter/client/choices_test.rb
|
123
130
|
- test/totter/client/comments_test.rb
|
@@ -135,26 +142,30 @@ files:
|
|
135
142
|
homepage: https://github.com/seesawco/totter-rb
|
136
143
|
licenses:
|
137
144
|
- MIT
|
138
|
-
metadata: {}
|
139
145
|
post_install_message:
|
140
146
|
rdoc_options: []
|
141
147
|
require_paths:
|
142
148
|
- lib
|
143
149
|
required_ruby_version: !ruby/object:Gem::Requirement
|
150
|
+
none: false
|
144
151
|
requirements:
|
145
|
-
- - '>='
|
152
|
+
- - ! '>='
|
146
153
|
- !ruby/object:Gem::Version
|
147
154
|
version: 1.8.7
|
148
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
|
+
none: false
|
149
157
|
requirements:
|
150
|
-
- - '>='
|
158
|
+
- - ! '>='
|
151
159
|
- !ruby/object:Gem::Version
|
152
160
|
version: '0'
|
161
|
+
segments:
|
162
|
+
- 0
|
163
|
+
hash: 246984406257281814
|
153
164
|
requirements: []
|
154
165
|
rubyforge_project:
|
155
|
-
rubygems_version:
|
166
|
+
rubygems_version: 1.8.23
|
156
167
|
signing_key:
|
157
|
-
specification_version:
|
168
|
+
specification_version: 3
|
158
169
|
summary: Ruby gem for working with the Seesaw API.
|
159
170
|
test_files:
|
160
171
|
- test/cassettes/avatars/create.yml
|
@@ -201,6 +212,7 @@ test_files:
|
|
201
212
|
- test/support/client_macros.rb
|
202
213
|
- test/test_helper.rb
|
203
214
|
- test/totter/client/activities_test.rb
|
215
|
+
- test/totter/client/async_test.rb
|
204
216
|
- test/totter/client/avatars_test.rb
|
205
217
|
- test/totter/client/choices_test.rb
|
206
218
|
- test/totter/client/comments_test.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: c79f1d13ebf748ec4278c88c99dfc1977120ea8a
|
4
|
-
data.tar.gz: 3be1bb08e5691ab79a0b0dbc7638f6b26292206b
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 6f15f1f5be6b0526eda586e812a0d382be1f01f79158f870b5495070d063acc394a3591dd8dd7a10ac2fdb71b211db5ac663fc74aaf5b63b3871758747a1c7cd
|
7
|
-
data.tar.gz: e8eb49e5a830b6f440c6b6c11f9c567460a79cb58a8ad0bbfa10da8413f9249591846d718b0091c9d7d529729cd61debcfc2e7da8b3620612424445b4e219ded
|