cellect-client 0.1.1 → 0.1.2.pre.jruby
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cellect/client/connection.rb +5 -5
- data/lib/cellect/client.rb +4 -0
- data/lib/cellect/version.rb +1 -1
- data/spec/client/connection_spec.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eea093d17be3eebba1d2b29b3a5c9d9ff33e038e
|
4
|
+
data.tar.gz: c87b7b0da90ecd9a5accffdd2e00d1d72938fd5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e9e50dc964123b980addcb75466ec540991f20088ea17dc79ebcbab6ee6db871e6fe6c5bf3351e3eb4075655707df439f6eeab6ac9897d1ab03eca1724d180b
|
7
|
+
data.tar.gz: 0057919d2051be938038745d26e6e5503c65aeca1b57db6c341e5416101398edeb8f516d498323a16c44b3a0ec2e29277789419eef578b0179aa3c2c68ea6eac
|
@@ -16,23 +16,23 @@ module Cellect
|
|
16
16
|
broadcast :delete, "/workflows/#{ id }"
|
17
17
|
end
|
18
18
|
|
19
|
-
def add_subject(id, workflow_id
|
19
|
+
def add_subject(id, workflow_id: workflow_id, group_id: nil, priority: nil)
|
20
20
|
broadcast :put, "/workflows/#{ workflow_id }/add", querystring(subject_id: id, group_id: group_id, priority: priority)
|
21
21
|
end
|
22
22
|
|
23
|
-
def remove_subject(id, workflow_id
|
23
|
+
def remove_subject(id, workflow_id: workflow_id, group_id: nil)
|
24
24
|
broadcast :put, "/workflows/#{ workflow_id }/remove", querystring(subject_id: id, group_id: group_id)
|
25
25
|
end
|
26
26
|
|
27
|
-
def load_user(user_id
|
27
|
+
def load_user(user_id: user_id, host: host, workflow_id: workflow_id)
|
28
28
|
send_http host, :post, "/workflows/#{ workflow_id }/users/#{ user_id }/load"
|
29
29
|
end
|
30
30
|
|
31
|
-
def add_seen(subject_id
|
31
|
+
def add_seen(subject_id: subject_id, user_id: user_id, host: host, workflow_id: workflow_id)
|
32
32
|
send_http host, :put, "/workflows/#{ workflow_id }/users/#{ user_id }/add_seen", querystring(subject_id: subject_id)
|
33
33
|
end
|
34
34
|
|
35
|
-
def get_subjects(user_id
|
35
|
+
def get_subjects(user_id: user_id, host: host, workflow_id: workflow_id, limit: limit, group_id: group_id)
|
36
36
|
response = send_http host, :get, "/workflows/#{ workflow_id }", querystring(user_id: user_id, group_id: group_id, limit: limit)
|
37
37
|
ensure_valid_response response
|
38
38
|
MultiJson.load response.body
|
data/lib/cellect/client.rb
CHANGED
data/lib/cellect/version.rb
CHANGED
@@ -8,11 +8,11 @@ module Cellect::Client
|
|
8
8
|
allow(Cellect::Client.node_set).to receive(:nodes).and_return 'a' => '1', 'b' => '2'
|
9
9
|
end
|
10
10
|
|
11
|
-
def should_send(action
|
11
|
+
def should_send(action: action, url: url, to: to)
|
12
12
|
expect(HTTP).to receive(:send).with(action, "http://#{ to }/#{ url }", socket_class: Celluloid::IO::TCPSocket).and_return(HTTP::Response.new(200, nil, nil, "{ \"this response\": \"intentionally blank\" }"))
|
13
13
|
end
|
14
14
|
|
15
|
-
def should_broadcast(action
|
15
|
+
def should_broadcast(action: action, url: url)
|
16
16
|
[1, 2].each{ |i| should_send action: action, url: url, to: i }
|
17
17
|
end
|
18
18
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cellect-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2.pre.jruby
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Parrish
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -226,9 +226,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
226
226
|
version: '0'
|
227
227
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
228
228
|
requirements:
|
229
|
-
- - "
|
229
|
+
- - ">"
|
230
230
|
- !ruby/object:Gem::Version
|
231
|
-
version:
|
231
|
+
version: 1.3.1
|
232
232
|
requirements: []
|
233
233
|
rubyforge_project:
|
234
234
|
rubygems_version: 2.4.2
|