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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfa3fd9edd1de4e2d5213bd44acec770c6b5c04a
4
- data.tar.gz: 9394b3b76f77e7fd161ce5f2d937de7eeb096ace
3
+ metadata.gz: 8298b6adec2f37a8c4f5dd4687b4227c68950799
4
+ data.tar.gz: 849df15fc23f490217ae6ad66bc7e48f49cd89d0
5
5
  SHA512:
6
- metadata.gz: ec906b338fad8a6290cc4364fd92aa4e2d6d2b3aaa065bb0a2e90b6be3e52fec6545922912d9b78139c909d168e72575bd67e564c0770c8102bdeaf074a005cc
7
- data.tar.gz: e807771762aaa699e87ee0b2a07900c1718465739e26be016dd9bfbb129671f1ea2157d2f8491e1276bb6cdb4899ffd4da786ff9b3b7f3720ac68f5089c9c809
6
+ metadata.gz: 69ba71aa0147164135e14362facdc42a4dbac92e4fe8a441cd62d4566e21cc869764098f85e52a139525970cf79d14595c547c148dae02e886fdb2b05985c936
7
+ data.tar.gz: 768ebd0266975c1b7e12cf95e37b711c5f1cdd5df15f856de1f8ec03680baa01c0a2169dbcd64d00dfe441f5714ef65d4035088321b1a6762189329e11103ddd
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- refocus (0.1.7)
4
+ refocus (0.1.8)
5
5
  clamp (~> 1.1)
6
6
  excon (~> 0.60)
7
7
 
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 = {name: "my-subject.child-subject|my-aspect", value: '100', messageCode: '100%', messageBody: "Great Results!", relatedLinks: [{name:'example_1', url:'https://www.example_1.com'}]}
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", messageCode: '100%')
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Refocus
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
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.7
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-17 00:00:00.000000000 Z
11
+ date: 2018-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler