refocus 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +6 -1
- data/lib/refocus/client.rb +4 -4
- data/lib/refocus/samples/collector.rb +5 -0
- data/lib/refocus/version.rb +1 -1
- metadata +2 -3
- data/Gemfile.lock +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 946379185b21f476c5246b9a1bb7bd7537c6e4af
|
4
|
+
data.tar.gz: ebdd0acfc99ba03e1a40d8c597009a9690684d87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ada1ffb35b8dac42d6f77af4493b7fb6ce6e3a94525dd48dada525e5fdacdd029d984ba0bd4a67b16f95e7da5542be8f245fb96c537ae6d3a2a47efb87224fcb
|
7
|
+
data.tar.gz: 9b5d1e67849c18cd504bae7e2eddab5f5cad0915a7858fe217e45d6b1108af634c91f58285417501c2616cac15b5bdd059d82f94dfc9e7584e1c3e88623525c6
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -108,7 +108,12 @@ samples_client.list(limit: 50)
|
|
108
108
|
samples_collector = samples_client.collector
|
109
109
|
samples_collector.add(name: "my-subject.child-subject", aspect: "my-aspect-1", value: '100')
|
110
110
|
samples_collector.add(name: "my-subject.child-subject", aspect: "my-aspect-2", message_code: '100%')
|
111
|
-
samples_collector.upsert_bulk
|
111
|
+
upsert_bulk_response = samples_collector.upsert_bulk
|
112
|
+
|
113
|
+
# Check the status of the previous upsert_bulk call
|
114
|
+
# job_id needs to be parsed from the initial bulk upsert response. e.g.,
|
115
|
+
job_id = upsert_bulk_response["jobId"]
|
116
|
+
upsert_bulk_status = samples_collector.check_status(job_id)
|
112
117
|
```
|
113
118
|
|
114
119
|
#### Lenses
|
data/lib/refocus/client.rb
CHANGED
@@ -19,19 +19,19 @@ module Refocus
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def subjects
|
22
|
-
Refocus::Subjects.new(url: "#{url}/v1/subjects", token: token)
|
22
|
+
@subjects ||= Refocus::Subjects.new(url: "#{url}/v1/subjects", token: token)
|
23
23
|
end
|
24
24
|
|
25
25
|
def aspects
|
26
|
-
Refocus::Aspects.new(url: "#{url}/v1/aspects", token: token)
|
26
|
+
@aspects ||= Refocus::Aspects.new(url: "#{url}/v1/aspects", token: token)
|
27
27
|
end
|
28
28
|
|
29
29
|
def samples
|
30
|
-
Refocus::Samples.new(url: "#{url}/v1/samples", token: token)
|
30
|
+
@samples ||= Refocus::Samples.new(url: "#{url}/v1/samples", token: token)
|
31
31
|
end
|
32
32
|
|
33
33
|
def perspectives
|
34
|
-
Refocus::Perspectives.new(url: "#{url}/v1/perspectives", token: token)
|
34
|
+
@perspectives ||= Refocus::Perspectives.new(url: "#{url}/v1/perspectives", token: token)
|
35
35
|
end
|
36
36
|
|
37
37
|
end
|
@@ -24,6 +24,11 @@ module Refocus
|
|
24
24
|
end
|
25
25
|
alias_method :submit, :upsert_bulk
|
26
26
|
|
27
|
+
def check_status(job_id)
|
28
|
+
(raise ArgumentError, "job_id cannot be nil.") unless job_id
|
29
|
+
json(http.get("upsert/bulk/#{job_id}/status"))
|
30
|
+
end
|
31
|
+
|
27
32
|
def self.format_sample(name:, aspect:, value:nil, message_body:nil, message_code:nil, related_links:nil)
|
28
33
|
sample = {name: "#{name}|#{aspect}"}
|
29
34
|
sample[:value] = value.to_s if value
|
data/lib/refocus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refocus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Shea
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -107,7 +107,6 @@ files:
|
|
107
107
|
- ".rspec"
|
108
108
|
- ".travis.yml"
|
109
109
|
- Gemfile
|
110
|
-
- Gemfile.lock
|
111
110
|
- README.md
|
112
111
|
- Rakefile
|
113
112
|
- bin/console
|
data/Gemfile.lock
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
refocus (0.1.8)
|
5
|
-
clamp (~> 1.1)
|
6
|
-
excon (~> 0.60)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
clamp (1.2.1)
|
12
|
-
coderay (1.1.2)
|
13
|
-
diff-lcs (1.3)
|
14
|
-
excon (0.60.0)
|
15
|
-
method_source (0.9.0)
|
16
|
-
pry (0.11.3)
|
17
|
-
coderay (~> 1.1.0)
|
18
|
-
method_source (~> 0.9.0)
|
19
|
-
rake (10.5.0)
|
20
|
-
rspec (3.7.0)
|
21
|
-
rspec-core (~> 3.7.0)
|
22
|
-
rspec-expectations (~> 3.7.0)
|
23
|
-
rspec-mocks (~> 3.7.0)
|
24
|
-
rspec-core (3.7.1)
|
25
|
-
rspec-support (~> 3.7.0)
|
26
|
-
rspec-expectations (3.7.0)
|
27
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
-
rspec-support (~> 3.7.0)
|
29
|
-
rspec-mocks (3.7.0)
|
30
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
-
rspec-support (~> 3.7.0)
|
32
|
-
rspec-support (3.7.0)
|
33
|
-
|
34
|
-
PLATFORMS
|
35
|
-
ruby
|
36
|
-
|
37
|
-
DEPENDENCIES
|
38
|
-
bundler (~> 1.16)
|
39
|
-
pry (~> 0.11)
|
40
|
-
rake (~> 10.0)
|
41
|
-
refocus!
|
42
|
-
rspec (~> 3.0)
|
43
|
-
|
44
|
-
BUNDLED WITH
|
45
|
-
1.16.2
|