nsidc-config_injector_client 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nsidc/config_injector_client.rb +8 -5
- metadata +9 -7
- checksums.yaml +0 -7
@@ -1,5 +1,4 @@
|
|
1
|
-
require '
|
2
|
-
require 'uri'
|
1
|
+
require 'rest_client'
|
3
2
|
require 'json'
|
4
3
|
|
5
4
|
module Nsidc
|
@@ -7,10 +6,14 @@ module Nsidc
|
|
7
6
|
|
8
7
|
def initialize service_endpoint
|
9
8
|
@service_endpoint = service_endpoint
|
9
|
+
end
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
# Server returns json response of key value pair, value is null if not found.
|
12
|
+
def get config_key
|
13
|
+
config_route = RestClient::Resource.new('').concat_urls @service_endpoint, config_key
|
14
|
+
response = RestClient.get config_route, { :accept => 'application/json' }
|
15
|
+
JSON.parse(response)[config_key]
|
16
|
+
end
|
14
17
|
|
15
18
|
end
|
16
19
|
end
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
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.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Chris Chalstrom
|
@@ -10,7 +11,7 @@ bindir: bin
|
|
10
11
|
cert_chain: []
|
11
12
|
date: 2014-08-03 00:00:00.000000000 Z
|
12
13
|
dependencies: []
|
13
|
-
description:
|
14
|
+
description: .
|
14
15
|
email: ''
|
15
16
|
executables: []
|
16
17
|
extensions: []
|
@@ -20,25 +21,26 @@ files:
|
|
20
21
|
homepage: http://rubygems.org/gems/nsidc-config_injector_client
|
21
22
|
licenses:
|
22
23
|
- MIT
|
23
|
-
metadata: {}
|
24
24
|
post_install_message:
|
25
25
|
rdoc_options: []
|
26
26
|
require_paths:
|
27
27
|
- lib
|
28
28
|
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - ! '>='
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
34
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
34
36
|
requirements:
|
35
|
-
- -
|
37
|
+
- - ! '>='
|
36
38
|
- !ruby/object:Gem::Version
|
37
39
|
version: '0'
|
38
40
|
requirements: []
|
39
41
|
rubyforge_project:
|
40
|
-
rubygems_version:
|
42
|
+
rubygems_version: 1.8.25
|
41
43
|
signing_key:
|
42
|
-
specification_version:
|
44
|
+
specification_version: 3
|
43
45
|
summary: Ruby client for the NSIDC config injector service
|
44
46
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 3722a16f1849df9dabd7a2e90351c1d3ba47f20f
|
4
|
-
data.tar.gz: 83755bfad96cc1461bc1d736091883668c6aeacc
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 1ed743a96f6961ee17482152225a8d44e3b8fb8f944ec5f8dad8c7c3f0c62a6fbf611e772c0f4f31cc3e568b5777a964b61203ce8918b07e83bcea9fedf67dda
|
7
|
-
data.tar.gz: aee29e6db509b05011b7cf37990755dcdfb8b1c41d83dbe4d52bba45d037089043f7de9c003304b6d62a2eb4b90011a4e775e2465d8b2a78ef49446ba1670bd1
|