cellect-client 0.0.9 → 0.1.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: c9cafd8c669fba1198403565fb16b7a14590f8c5
4
- data.tar.gz: 8352c59cfc6ca51a16a09de11c87cce26ded6ebc
3
+ metadata.gz: dd7ccc9dadde4698cc1ece04f0dabfe0473a7637
4
+ data.tar.gz: d095442be297fe31ae2508fccb21d388c84e8117
5
5
  SHA512:
6
- metadata.gz: e81be487b09d74b5d27a8e7eb61991af8da2af833ea1f9387f180c2117a5fbc7cb40be0ecd3bc6ba460a79256ee2e42a7efc07391c8f60e13b8b8bb68a8c8343
7
- data.tar.gz: 7557432ffdfdffe6e58d1719bbeffa5ed37f409b0d4a366673ad019acdc69ecdee15bc2b067e7397575d52dccd6f53a7571cdcd00ddf8196134709d459bebd23
6
+ metadata.gz: 693737c2f07639a1c923bcaf0d4234df7d695b39cad2f68e9709e777241b7e42fde5b5c3c60adbbc0acba60937ad92860a589d04015ac1b7c73338df7acc1588
7
+ data.tar.gz: 72905c65b04ebd994af1a7016de1e2d5bde8cbd6efdecfef8b58090b98d6db8d99107f00ed02c153cad5041d113586bdc288401211e8d634c112a39493e23e07
@@ -28,8 +28,8 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency 'rack-test'
29
29
  spec.add_development_dependency 'pry'
30
30
 
31
- spec.add_runtime_dependency 'celluloid', '0.16.0.pre'
32
- spec.add_runtime_dependency 'celluloid-io', '0.16.0.pre'
31
+ spec.add_runtime_dependency 'celluloid', '0.16.0'
32
+ spec.add_runtime_dependency 'celluloid-io', '0.16.0'
33
33
  spec.add_runtime_dependency 'http', '~> 0.6'
34
34
  spec.add_runtime_dependency 'zk', '~> 1.9'
35
35
  spec.add_runtime_dependency 'multi_json', '~> 1.10.1'
@@ -16,23 +16,23 @@ module Cellect
16
16
  broadcast :delete, "/workflows/#{ id }"
17
17
  end
18
18
 
19
- def add_subject(id, workflow_id: workflow_id, group_id: nil, priority: nil)
19
+ def add_subject(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: workflow_id, group_id: nil)
23
+ def remove_subject(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: user_id, host: host, workflow_id: workflow_id)
27
+ def load_user(user_id:, host:, 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: subject_id, user_id: user_id, host: host, workflow_id: workflow_id)
31
+ def add_seen(subject_id:, user_id:, host:, 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: user_id, host: host, workflow_id: workflow_id, limit: limit, group_id: group_id)
35
+ def get_subjects(user_id:, host:, workflow_id:, limit: nil, group_id: nil)
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
@@ -1,3 +1,3 @@
1
1
  module Cellect
2
- VERSION = '0.0.9'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -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: action, url: url, to: to)
11
+ def should_send(action:, url:, 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: action, url: url)
15
+ def should_broadcast(action:, url:)
16
16
  [1, 2].each{ |i| should_send action: action, url: url, to: i }
17
17
  end
18
18
 
@@ -1,7 +1,7 @@
1
1
  require 'timeout'
2
2
 
3
3
  module CellectHelper
4
- def pass_until(obj, is: is)
4
+ def pass_until(obj, is:)
5
5
  Timeout::timeout(1) do
6
6
  Thread.pass until obj.state == is
7
7
  end
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.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Parrish
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-09 00:00:00.000000000 Z
11
+ date: 2015-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 0.16.0.pre
103
+ version: 0.16.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 0.16.0.pre
110
+ version: 0.16.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: celluloid-io
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 0.16.0.pre
117
+ version: 0.16.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 0.16.0.pre
124
+ version: 0.16.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: http
127
127
  requirement: !ruby/object:Gem::Requirement