aldagai 0.1.1 → 0.1.2

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
- SHA256:
3
- metadata.gz: fb870504be79756afb9a198fb22d7a3f70159c6b7c748a94f159c534689e0b1e
4
- data.tar.gz: 8e834230479e131361e3f502c667d4c00f203d4b438df9a9731a326d71500bbf
2
+ SHA1:
3
+ metadata.gz: 6228018368904424fbfebaef6bf74d66d92cf91e
4
+ data.tar.gz: 7825f80cc78fe4a543600390ec9a68833f5b3c80
5
5
  SHA512:
6
- metadata.gz: 536b96db6c9b648697cf3a1854600fd452f3bcad36b712525f3e0bb1074158f57e65db6fbf180da7a16d00740683f33fc8d588dfea873d92db4cfc4894961a32
7
- data.tar.gz: bea9d7b28248de1e0c4d31c9775c398cb5e6ffed4a302121728e2fec92e02060c90bd798afc2dc9f2d5f402eb506b98c83a25363c75b88ef84c0e685d6afeb44
6
+ metadata.gz: 24a01faecec16bef59b317c4024528f4ccde932d49238f7944fef73a9cb8309506bcff1c7e4977ab0c512bd94dd6d7bf50ffe4010b9c659126b34550a0295fba
7
+ data.tar.gz: a1fb2f81ede2323709f7e03691a3ba5c55ce9633aa1184896584d097f44f821b1baa13f4ed7ff2cd40f117549854c6c5f8f714aa35f061d055148e660099dbe6
@@ -8,13 +8,11 @@ module Aldagai
8
8
  private
9
9
 
10
10
  def read_secret_from_file
11
- path = File.expand_path('./.aldagai.secret')
11
+ IO.binread(key_path).strip if File.exists?(key_path)
12
+ end
12
13
 
13
- if File.exists?(path)
14
- File.read(path)
15
- else
16
- nil
17
- end
14
+ def key_path
15
+ File.expand_path('./.aldagai.secret')
18
16
  end
19
17
 
20
18
  end
@@ -93,7 +93,7 @@ module Aldagai
93
93
  lines = lines_for_environment(ENV['ALDAGAI_PIPELINE_ENV'])
94
94
 
95
95
  if lines.empty?
96
- log_no_variables_promoted(environment)
96
+ log_no_variables_promoted(ENV['ALDAGAI_PIPELINE_ENV'])
97
97
  else
98
98
  variables = {}
99
99
 
@@ -172,7 +172,7 @@ module Aldagai
172
172
  end
173
173
 
174
174
  def decrypt_line_proc
175
- proc { |line| (decrypt_line(line)) }
175
+ proc { |line| @encryptor.decrypt(line.gsub("\n", '')) }
176
176
  end
177
177
 
178
178
  def match_line_proc(name)
@@ -187,10 +187,6 @@ module Aldagai
187
187
  File.expand_path("./.#{environment}")
188
188
  end
189
189
 
190
- def decrypt_line(line)
191
- @encryptor.decrypt(line.gsub("\n", ''))
192
- end
193
-
194
190
  def value_presence(value)
195
191
  value && value.strip != '' ? value : nil
196
192
  end
@@ -1,3 +1,3 @@
1
1
  module Aldagai
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aldagai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Ifran
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-04 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: platform-api
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.7.3
138
+ rubygems_version: 2.4.5.1
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: Promote environment variables on heroku