larva 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/larva/configurator.rb +4 -2
- data/lib/larva/version.rb +1 -1
- data/test/configurator_test.rb +13 -0
- data/test/test_helper.rb +1 -0
- 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: 61a53fd82ceaa915f5c0be118a0bfcb2abfe521f
|
4
|
+
data.tar.gz: f458f5b9646991ccc9c861305ebc750cb9d9fe93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07ebf500a6f3f6a2eeb5246ef117cd8614d13f214c81b5ed226b6677d382163cfe00d20828b39cc260542246da0dd6ec54143813a841dbe2116fb2563440498e
|
7
|
+
data.tar.gz: 38e06ee79938a33773eab8461bce10a68ab0513e893561b12869165c92e12c67f9411b3784646df0c959d5d20f6ee8502ab3af638a7e953d0d92b51a536e03ad
|
data/CHANGELOG.md
CHANGED
data/lib/larva/configurator.rb
CHANGED
@@ -21,8 +21,10 @@ module Larva
|
|
21
21
|
if meducation_sdk_config = parse_config_file('meducation-sdk.yml')
|
22
22
|
MeducationSDK.config do |config|
|
23
23
|
config.access_id = meducation_sdk_config[:access_id]
|
24
|
-
|
25
|
-
|
24
|
+
|
25
|
+
# Don't use fetch for these as nil values might be deliberately passed it
|
26
|
+
config.secret_key = @options[:meducation_sdk_secret_key] || meducation_sdk_config[:secret_key]
|
27
|
+
config.endpoint = @options[:meducation_sdk_endpoint ] || "http://localhost:3000/system" if @env == 'development'
|
26
28
|
config.logger = Filum.logger
|
27
29
|
end
|
28
30
|
end
|
data/lib/larva/version.rb
CHANGED
data/test/configurator_test.rb
CHANGED
@@ -27,6 +27,19 @@ module Larva
|
|
27
27
|
assert_equal logfile, Filum.logger.logfile
|
28
28
|
end
|
29
29
|
|
30
|
+
def test_sdk_secret_key_can_be_overriden
|
31
|
+
sdk_yaml_path = File.expand_path('../../template/config/meducation-sdk.yml', __FILE__)
|
32
|
+
begin
|
33
|
+
optional_sdk_yaml_path = "#{sdk_yaml_path}.optional"
|
34
|
+
`cp #{optional_sdk_yaml_path} #{sdk_yaml_path}`
|
35
|
+
secret_key = "Foobar!"
|
36
|
+
Configurator.configure(logfile: logfile, config_dir: config_dir, meducation_sdk_secret_key: secret_key)
|
37
|
+
assert_equal secret_key, MeducationSDK.config.secret_key
|
38
|
+
ensure
|
39
|
+
`rm #{sdk_yaml_path}`
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
30
43
|
def test_meducation_sdk_gets_config_in_dev
|
31
44
|
sdk_yaml_path = File.expand_path('../../template/config/meducation-sdk.yml', __FILE__)
|
32
45
|
begin
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: larva
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iHiD
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: propono
|