nsidc-config_injector_client 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/nsidc/config_injector_client.rb +12 -2
- metadata +21 -8
@@ -19,10 +19,20 @@ module Nsidc
|
|
19
19
|
|
20
20
|
# Server returns json response of key value pair, value is null if not found.
|
21
21
|
def get config_key
|
22
|
-
|
23
|
-
response = RestClient.get config_route, { :accept => 'application/json' }
|
22
|
+
response = RestClient.get config_route(config_key), { :accept => 'application/json' }
|
24
23
|
JSON.parse(response)[config_key]
|
25
24
|
end
|
26
25
|
|
26
|
+
def put config_key, new_val
|
27
|
+
RestClient.put config_route(config_key),
|
28
|
+
{ :val => new_val },
|
29
|
+
{ :accept => 'application/json' }
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
def config_route config_key
|
34
|
+
RestClient::Resource.new('').concat_urls @service_endpoint, config_key
|
35
|
+
end
|
36
|
+
|
27
37
|
end
|
28
38
|
end
|
metadata
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nsidc-config_injector_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Chris Chalstrom
|
9
|
+
- Michael Brandt
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2014-08-
|
13
|
+
date: 2014-08-28 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: rest-client
|
16
|
-
requirement:
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
17
18
|
none: false
|
18
19
|
requirements:
|
19
20
|
- - ! '>='
|
@@ -21,10 +22,15 @@ dependencies:
|
|
21
22
|
version: '0'
|
22
23
|
type: :runtime
|
23
24
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
25
31
|
- !ruby/object:Gem::Dependency
|
26
32
|
name: rspec
|
27
|
-
requirement:
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
28
34
|
none: false
|
29
35
|
requirements:
|
30
36
|
- - ! '>='
|
@@ -32,8 +38,14 @@ dependencies:
|
|
32
38
|
version: '0'
|
33
39
|
type: :development
|
34
40
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
-
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
description: Simple interface for accessing and updating configuration data in NSIDC
|
48
|
+
key value store service
|
37
49
|
email: ''
|
38
50
|
executables: []
|
39
51
|
extensions: []
|
@@ -61,8 +73,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
73
|
version: '0'
|
62
74
|
requirements: []
|
63
75
|
rubyforge_project:
|
64
|
-
rubygems_version: 1.8.
|
76
|
+
rubygems_version: 1.8.25
|
65
77
|
signing_key:
|
66
78
|
specification_version: 3
|
67
79
|
summary: Ruby client for the NSIDC config injector service
|
68
80
|
test_files: []
|
81
|
+
has_rdoc:
|