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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a9f1a09d3f2d8cb45f24d0c825764a5b23631d1
|
4
|
+
data.tar.gz: e6f38c4ce94e70c4874dd961fe85fad85cb8ec91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
|
-
|
17
|
+
else
|
18
|
+
warn "Secrets file doesn't exist: #{sekrets_file_path}"
|
19
|
+
end
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
@@ -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
|
-
|
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.
|
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-
|
11
|
+
date: 2017-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sneakers
|