harmony-service 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e107d50e1667dc5edf67a2dd0e12d3d9cb3e673
4
- data.tar.gz: b367659d3f4ea55564fab35d34136d11470a163f
3
+ metadata.gz: 7a9f1a09d3f2d8cb45f24d0c825764a5b23631d1
4
+ data.tar.gz: e6f38c4ce94e70c4874dd961fe85fad85cb8ec91
5
5
  SHA512:
6
- metadata.gz: 74b42d8e8956611397503ed3915d9e59966d7a39d2375fc2e547daafc8e2f245debb3d97d3af2c719c280e268844ac4339d1b1ee446f13a2966d02f30dc09e9e
7
- data.tar.gz: 6d9ae2765ae5999a72c6976e9ea311a227486df6f74290ecac999eebc715e885cfcec857cf4d6ce3e85018bb40b2e711ad1cb9db7d1d2426a804aecab4c22c1d
6
+ metadata.gz: 9c941268679edb75fdc3df9bccd1dd1b40c41422d723766239c3492f228860e0e0c42f6e0cc9497bbdfc5961c3bf0ab75137d746f107c9dfbe2983adf64d92e5
7
+ data.tar.gz: 68c485584262f239749bf187a8468a7a8cdbd2809cefe42ce3fde4b3235edb7e06f5373e264ef57b3e241952efcf3af3a89358912cf1494c1f9eacdd5d6440f3
@@ -5,16 +5,18 @@ module Harmony
5
5
  module Utils
6
6
  class Secrets
7
7
 
8
- def self.load
9
- sekrets_file_path = './config/settings.yml.enc'
8
+ def self.load
9
+ env = ENV['HARMONY_ENV']
10
+ abort "ENV['HARMONY_ENV'] must be set." unless env
11
+
12
+ sekrets_file_path = "./config/#{env}.yml.enc"
10
13
  if File.exist?(sekrets_file_path)
11
- env = ENV['HARMONY_ENV']
12
- abort "ENV['HARMONY_ENV'] must be set." unless env
13
-
14
- puts "Reading secrets from #{sekrets_file_path}"
14
+ puts "Reading secrets from file: #{sekrets_file_path}"
15
15
  secrets = Sekrets.settings_for(sekrets_file_path)[env]
16
16
  secrets.each_pair{|k,v| ENV[k] = v.to_s }
17
- end
17
+ else
18
+ warn "Secrets file doesn't exist: #{sekrets_file_path}"
19
+ end
18
20
  end
19
21
  end
20
22
  end
@@ -1,6 +1,6 @@
1
1
  module Harmony
2
2
  module Service
3
- VERSION = "0.6.0"
3
+ VERSION = "0.7.0"
4
4
  end
5
5
  end
6
6
 
@@ -37,7 +37,7 @@ describe Harmony::Service::RpcService do
37
37
  let(:request) { Harmony::Service::ActionList::ItemRequest.new(harmony_user_email: "matt@futureworkshops.com", id: 1) }
38
38
  let(:response) { {id: 1, title: "Carrots", subtitle: "Bag of Carrots", detail_html: "<html><body>Carrots</body></html>"} }
39
39
 
40
- it { expect(subject).to have_received(:send_response_json).with("{\":id\":1,\":title\":\"Carrots\",\":subtitle\":\"Bag of Carrots\",\":detail_html\":\"<html><body>Carrots</body></html>\"}", "harmony.trello", "abc123") }
40
+ it { expect(subject).to have_received(:send_response_json).with("{\":id\":1,\":title\":\"Carrots\",\":subtitle\":\"Bag of Carrots\",\":detail_html\":\"<html><body>Carrots</body></html>\"}", "harmony.trello", "abc123") }
41
41
  it { expect(subject).to have_received(:ack!) }
42
42
  end
43
43
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harmony-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-20 00:00:00.000000000 Z
11
+ date: 2017-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sneakers