larva 0.7.0 → 0.7.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2cc04eb147c0c63389af5c4e6504f8ec954bc0a
4
- data.tar.gz: 7c76b2b988cab34763f1693328d900e903c51ffb
3
+ metadata.gz: 61a53fd82ceaa915f5c0be118a0bfcb2abfe521f
4
+ data.tar.gz: f458f5b9646991ccc9c861305ebc750cb9d9fe93
5
5
  SHA512:
6
- metadata.gz: 40a291096f12284eaa82b3568ae9c5fb289dbf7911755be11df92e152e6c847806a926f81827ed921aeacc26d25fe07b605413d3e99300e553fdfb946c39d10c
7
- data.tar.gz: f13153f42a05167c9b10235c5c7704a5f1b17d42267d8895a2bbf522b6a879fd1d9451c1f39b1c75cc99a47580585bfe109cedee8ce910285a0cd1af45c9a160
6
+ metadata.gz: 07ebf500a6f3f6a2eeb5246ef117cd8614d13f214c81b5ed226b6677d382163cfe00d20828b39cc260542246da0dd6ec54143813a841dbe2116fb2563440498e
7
+ data.tar.gz: 38e06ee79938a33773eab8461bce10a68ab0513e893561b12869165c92e12c67f9411b3784646df0c959d5d20f6ee8502ab3af638a7e953d0d92b51a536e03ad
@@ -1,3 +1,6 @@
1
+ # 0.7.1 / 2014-02-26
2
+ * [BUGFIX] Fix issue with SDK secret being incorrectly set to nil.
3
+
1
4
  # 0.7.0 / 2014-02-24
2
5
  * [FEATURE] Add configurator
3
6
 
@@ -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
- config.secret_key = @options.fetch(:meducation_sdk_secret_key, meducation_sdk_config[:secret_key])
25
- config.endpoint = @options.fetch(:meducation_sdk_endpoint, "http://localhost:3000/system") if @env == 'development'
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
@@ -1,3 +1,3 @@
1
1
  module Larva
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
@@ -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
@@ -25,6 +25,7 @@ class Minitest::Test
25
25
  def setup
26
26
  Fog.mock!
27
27
  Filum.setup('log/test.log')
28
+ MeducationSDK.instance_variable_set(:@config, nil)
28
29
  Propono.config do |config|
29
30
  config.access_key = "test-access-key"
30
31
  config.secret_key = "test-secret-key"
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.0
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-24 00:00:00.000000000 Z
11
+ date: 2014-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: propono