indico 0.9.2 → 0.9.3
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/indico/version.rb +1 -1
- data/lib/indico.rb +6 -2
- data/spec/settings_spec.rb +20 -0
- metadata +23 -11
- checksums.yaml +0 -7
data/lib/indico/version.rb
CHANGED
data/lib/indico.rb
CHANGED
@@ -199,8 +199,12 @@ module Indico
|
|
199
199
|
end
|
200
200
|
end
|
201
201
|
|
202
|
-
def info(
|
203
|
-
|
202
|
+
def info(config = nil)
|
203
|
+
if config.nil?
|
204
|
+
config = Hash.new()
|
205
|
+
end
|
206
|
+
config[:collection] = @collection
|
207
|
+
Indico.api_handler(nil, 'custom', config, 'info')
|
204
208
|
end
|
205
209
|
|
206
210
|
def predict(data, config = nil)
|
data/spec/settings_spec.rb
CHANGED
@@ -25,6 +25,10 @@ describe Indico do
|
|
25
25
|
it 'should read in variables from the user\'s environment' do
|
26
26
|
api_key = 'testapikey'
|
27
27
|
cloud = 'cloud'
|
28
|
+
|
29
|
+
saved_api_key = ENV['INDICO_API_KEY']
|
30
|
+
saved_private_cloud = ENV['INDICO_CLOUD']
|
31
|
+
|
28
32
|
ENV['INDICO_API_KEY'] = api_key
|
29
33
|
ENV['INDICO_CLOUD'] = cloud
|
30
34
|
|
@@ -37,11 +41,18 @@ describe Indico do
|
|
37
41
|
|
38
42
|
expect(config['auth']).to eql(expected_auth)
|
39
43
|
expect(config['private_cloud']).to eql(expected_cloud)
|
44
|
+
|
45
|
+
ENV['INDICO_API_KEY'] = saved_api_key
|
46
|
+
ENV['INDICO_CLOUD'] = saved_private_cloud
|
40
47
|
end
|
41
48
|
|
42
49
|
it 'should combine file and env variable configuration' do
|
43
50
|
api_key = 'testapikey'
|
44
51
|
cloud = 'cloud'
|
52
|
+
|
53
|
+
saved_api_key = ENV['INDICO_API_KEY']
|
54
|
+
saved_private_cloud = ENV['INDICO_CLOUD']
|
55
|
+
|
45
56
|
ENV['INDICO_API_KEY'] = api_key
|
46
57
|
ENV['INDICO_CLOUD'] = cloud
|
47
58
|
|
@@ -51,6 +62,9 @@ describe Indico do
|
|
51
62
|
|
52
63
|
config = Indico.load_config()
|
53
64
|
expect(config).to eql(expected)
|
65
|
+
|
66
|
+
ENV['INDICO_API_KEY'] = saved_api_key
|
67
|
+
ENV['INDICO_CLOUD'] = saved_private_cloud
|
54
68
|
end
|
55
69
|
|
56
70
|
it 'should merge configurations properly' do
|
@@ -65,6 +79,9 @@ describe Indico do
|
|
65
79
|
|
66
80
|
env_api_key = 'env-api-key'
|
67
81
|
env_cloud = 'env-cloud'
|
82
|
+
saved_api_key = ENV['INDICO_API_KEY']
|
83
|
+
saved_private_cloud = ENV['INDICO_CLOUD']
|
84
|
+
|
68
85
|
ENV['INDICO_API_KEY'] = env_api_key
|
69
86
|
ENV['INDICO_CLOUD'] = env_cloud
|
70
87
|
|
@@ -72,6 +89,9 @@ describe Indico do
|
|
72
89
|
merged = Indico.merge_config(file_config, env_config)
|
73
90
|
expect(merged['auth']['api_key']).to eql(env_api_key)
|
74
91
|
expect(merged['private_cloud']['cloud']).to eql(env_cloud)
|
92
|
+
|
93
|
+
ENV['INDICO_API_KEY'] = saved_api_key
|
94
|
+
ENV['INDICO_CLOUD'] = saved_private_cloud
|
75
95
|
end
|
76
96
|
|
77
97
|
it 'should set api key with a call to set_api_key' do
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: indico
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Slater Victoroff
|
@@ -11,11 +12,12 @@ authors:
|
|
11
12
|
autorequire:
|
12
13
|
bindir: bin
|
13
14
|
cert_chain: []
|
14
|
-
date: 2016-04-
|
15
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
15
16
|
dependencies:
|
16
17
|
- !ruby/object:Gem::Dependency
|
17
18
|
name: inifile
|
18
19
|
requirement: !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
19
21
|
requirements:
|
20
22
|
- - ~>
|
21
23
|
- !ruby/object:Gem::Version
|
@@ -23,6 +25,7 @@ dependencies:
|
|
23
25
|
type: :runtime
|
24
26
|
prerelease: false
|
25
27
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
26
29
|
requirements:
|
27
30
|
- - ~>
|
28
31
|
- !ruby/object:Gem::Version
|
@@ -30,6 +33,7 @@ dependencies:
|
|
30
33
|
- !ruby/object:Gem::Dependency
|
31
34
|
name: oily_png
|
32
35
|
requirement: !ruby/object:Gem::Requirement
|
36
|
+
none: false
|
33
37
|
requirements:
|
34
38
|
- - ~>
|
35
39
|
- !ruby/object:Gem::Version
|
@@ -37,6 +41,7 @@ dependencies:
|
|
37
41
|
type: :runtime
|
38
42
|
prerelease: false
|
39
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
40
45
|
requirements:
|
41
46
|
- - ~>
|
42
47
|
- !ruby/object:Gem::Version
|
@@ -44,6 +49,7 @@ dependencies:
|
|
44
49
|
- !ruby/object:Gem::Dependency
|
45
50
|
name: bundler
|
46
51
|
requirement: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
47
53
|
requirements:
|
48
54
|
- - ~>
|
49
55
|
- !ruby/object:Gem::Version
|
@@ -51,6 +57,7 @@ dependencies:
|
|
51
57
|
type: :development
|
52
58
|
prerelease: false
|
53
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
54
61
|
requirements:
|
55
62
|
- - ~>
|
56
63
|
- !ruby/object:Gem::Version
|
@@ -58,29 +65,33 @@ dependencies:
|
|
58
65
|
- !ruby/object:Gem::Dependency
|
59
66
|
name: rake
|
60
67
|
requirement: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
61
69
|
requirements:
|
62
|
-
- - '>='
|
70
|
+
- - ! '>='
|
63
71
|
- !ruby/object:Gem::Version
|
64
72
|
version: '0'
|
65
73
|
type: :development
|
66
74
|
prerelease: false
|
67
75
|
version_requirements: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
68
77
|
requirements:
|
69
|
-
- - '>='
|
78
|
+
- - ! '>='
|
70
79
|
- !ruby/object:Gem::Version
|
71
80
|
version: '0'
|
72
81
|
- !ruby/object:Gem::Dependency
|
73
82
|
name: rspec
|
74
83
|
requirement: !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
75
85
|
requirements:
|
76
|
-
- - '>='
|
86
|
+
- - ! '>='
|
77
87
|
- !ruby/object:Gem::Version
|
78
88
|
version: '0'
|
79
89
|
type: :development
|
80
90
|
prerelease: false
|
81
91
|
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
none: false
|
82
93
|
requirements:
|
83
|
-
- - '>='
|
94
|
+
- - ! '>='
|
84
95
|
- !ruby/object:Gem::Version
|
85
96
|
version: '0'
|
86
97
|
description: A simple Ruby Wrapper for the indico set of APIs.
|
@@ -123,25 +134,26 @@ files:
|
|
123
134
|
homepage: https://github.com/IndicoDataSolutions/IndicoIo-ruby
|
124
135
|
licenses:
|
125
136
|
- MIT
|
126
|
-
metadata: {}
|
127
137
|
post_install_message:
|
128
138
|
rdoc_options: []
|
129
139
|
require_paths:
|
130
140
|
- lib
|
131
141
|
required_ruby_version: !ruby/object:Gem::Requirement
|
142
|
+
none: false
|
132
143
|
requirements:
|
133
|
-
- - '>='
|
144
|
+
- - ! '>='
|
134
145
|
- !ruby/object:Gem::Version
|
135
146
|
version: '0'
|
136
147
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
+
none: false
|
137
149
|
requirements:
|
138
|
-
- - '>='
|
150
|
+
- - ! '>='
|
139
151
|
- !ruby/object:Gem::Version
|
140
152
|
version: '0'
|
141
153
|
requirements: []
|
142
154
|
rubyforge_project:
|
143
|
-
rubygems_version:
|
155
|
+
rubygems_version: 1.8.23
|
144
156
|
signing_key:
|
145
|
-
specification_version:
|
157
|
+
specification_version: 3
|
146
158
|
summary: A simple Ruby Wrapper for the indico set of APIs.
|
147
159
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 5deba72f58d3125e5cc3121962f53538994b9dff
|
4
|
-
data.tar.gz: 9dc545cd928076063d378c6c1a16e89c18b5183f
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: ba035911ac06ef0e524706f7f9a0019a1b7531884db7c81d764c6bffbb484398bd55699a5b65fa29929d95c27f63c2752a9a78f3cedc8b72f959b83ed543bed9
|
7
|
-
data.tar.gz: e86e99df08319454e2c36ad880e7667916ae389de6801358f34b5d0b386d80612b5cfed90fda804dcf19ca0165c291866ae7f3ebf30ff8315be7d940b8c24483
|