refocus 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/refocus/samples.rb +1 -1
- data/lib/refocus/samples/collector.rb +2 -2
- data/lib/refocus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8298b6adec2f37a8c4f5dd4687b4227c68950799
|
4
|
+
data.tar.gz: 849df15fc23f490217ae6ad66bc7e48f49cd89d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69ba71aa0147164135e14362facdc42a4dbac92e4fe8a441cd62d4566e21cc869764098f85e52a139525970cf79d14595c547c148dae02e886fdb2b05985c936
|
7
|
+
data.tar.gz: 768ebd0266975c1b7e12cf95e37b711c5f1cdd5df15f856de1f8ec03680baa01c0a2169dbcd64d00dfe441f5714ef65d4035088321b1a6762189329e11103ddd
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -95,7 +95,7 @@ samples_client = refocus.samples
|
|
95
95
|
samples_client.upsert(name: "my-subject.child-subject", aspect: "my-aspect", value: '100')
|
96
96
|
|
97
97
|
# Create or update a sample with a custom request body
|
98
|
-
request_body =
|
98
|
+
request_body = {name: "my-subject.child-subject|my-aspect", value: '100', messageCode: '100%', messageBody: "Great Results!", relatedLinks: [{name:'example_1', url:'https://www.example_1.com'}]}
|
99
99
|
samples_client.upsert_custom_body(request_body)
|
100
100
|
|
101
101
|
# Describe a sample:
|
@@ -107,7 +107,7 @@ samples_client.list(limit: 50)
|
|
107
107
|
# Create or update samples in bulk:
|
108
108
|
samples_collector = samples_client.collector
|
109
109
|
samples_collector.add(name: "my-subject.child-subject", aspect: "my-aspect-1", value: '100')
|
110
|
-
samples_collector.add(name: "my-subject.child-subject", aspect: "my-aspect-2",
|
110
|
+
samples_collector.add(name: "my-subject.child-subject", aspect: "my-aspect-2", message_code: '100%')
|
111
111
|
samples_collector.upsert_bulk
|
112
112
|
```
|
113
113
|
|
data/lib/refocus/samples.rb
CHANGED
@@ -17,7 +17,7 @@ module Refocus
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def upsert(name:, aspect:, value:nil, message_body:nil, message_code:nil, related_links:nil)
|
20
|
-
sample = format_sample(name:name, aspect: aspect, value: value, message_body: message_body,
|
20
|
+
sample = Collector.format_sample(name:name, aspect: aspect, value: value, message_body: message_body,
|
21
21
|
message_code: message_code, related_links: related_links)
|
22
22
|
json(http.post("upsert", body: sample, expects: 200))
|
23
23
|
end
|
@@ -13,7 +13,7 @@ module Refocus
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def add(name:, aspect:, value:nil, message_body:nil, message_code:nil, related_links:nil)
|
16
|
-
samples << format_sample(name:name, aspect: aspect, value: value, message_body: message_body,
|
16
|
+
samples << self.class.format_sample(name:name, aspect: aspect, value: value, message_body: message_body,
|
17
17
|
message_code: message_code, related_links: related_links)
|
18
18
|
end
|
19
19
|
|
@@ -24,7 +24,7 @@ module Refocus
|
|
24
24
|
end
|
25
25
|
alias_method :submit, :upsert_bulk
|
26
26
|
|
27
|
-
def format_sample(name:, aspect:, value:nil, message_body:nil, message_code:nil, related_links:nil)
|
27
|
+
def self.format_sample(name:, aspect:, value:nil, message_body:nil, message_code:nil, related_links:nil)
|
28
28
|
sample = {name: "#{name}|#{aspect}"}
|
29
29
|
sample[:value] = value.to_s if value
|
30
30
|
sample[:messageBody] = message_body.to_s if message_body
|
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.8
|
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-05-
|
11
|
+
date: 2018-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|