hekate 0.1.0.pre22 → 0.2.0.pre1
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 +4 -4
- data/.rubocop.yml +15 -11
- data/Gemfile.lock +35 -35
- data/bin/hekate +1 -1
- data/hekate.gemspec +3 -4
- data/lib/hekate.rb +4 -4
- data/lib/hekate/aws.rb +20 -24
- data/lib/hekate/engine.rb +18 -27
- data/lib/hekate/version.rb +1 -1
- metadata +17 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 91c81ae8aa707334a461738f2cf0498065f49da1
|
|
4
|
+
data.tar.gz: dadc2fb0e8a743479a099b9004cf20db0b1fb73b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 577f385bc491bb128f2d2b2ec3dfb5492addbcab7e71c351a9b6afa82f5a72ab5675faee7fef294021783e2ed3e4d5e4e3f68f929098844e3994632a64d8a8a4
|
|
7
|
+
data.tar.gz: adddbd587dce7b72c4b985089df08df6ac54ad2e6c8e2ac328f8fe5b5b457fc7aee77fae512050edc46c72a07d10519f9efd6b2dcda2234ca39249a90a6d717b
|
data/.rubocop.yml
CHANGED
|
@@ -28,7 +28,7 @@ Layout/DotPosition:
|
|
|
28
28
|
SupportedStyles:
|
|
29
29
|
- leading
|
|
30
30
|
- trailing
|
|
31
|
-
|
|
31
|
+
Naming/FileName:
|
|
32
32
|
Description: Use snake_case for source file names.
|
|
33
33
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
|
34
34
|
Enabled: true
|
|
@@ -38,15 +38,10 @@ Style/GuardClause:
|
|
|
38
38
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
|
39
39
|
Enabled: true
|
|
40
40
|
MinBodyLength: 1
|
|
41
|
-
Style/IfUnlessModifier:
|
|
42
|
-
Description: Favor modifier if/unless usage when you have a single-line body.
|
|
43
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
|
44
|
-
Enabled: false
|
|
45
|
-
MaxLineLength: 80
|
|
46
41
|
Style/OptionHash:
|
|
47
42
|
Description: Don't use option hashes when you can use keyword arguments.
|
|
48
43
|
Enabled: false
|
|
49
|
-
|
|
44
|
+
Naming/PredicateName:
|
|
50
45
|
Description: Check the names of predicate methods.
|
|
51
46
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
|
52
47
|
Enabled: true
|
|
@@ -114,7 +109,16 @@ Style/TrailingCommaInArguments:
|
|
|
114
109
|
- comma
|
|
115
110
|
- consistent_comma
|
|
116
111
|
- no_comma
|
|
117
|
-
Style/
|
|
112
|
+
Style/TrailingCommaInArrayLiteral:
|
|
113
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
|
114
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
|
115
|
+
Enabled: true
|
|
116
|
+
EnforcedStyleForMultiline: no_comma
|
|
117
|
+
SupportedStylesForMultiline:
|
|
118
|
+
- comma
|
|
119
|
+
- consistent_comma
|
|
120
|
+
- no_comma
|
|
121
|
+
Style/TrailingCommaInHashLiteral:
|
|
118
122
|
Description: 'Checks for trailing comma in array and hash literals.'
|
|
119
123
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
|
120
124
|
Enabled: true
|
|
@@ -172,7 +176,7 @@ Layout/AlignParameters:
|
|
|
172
176
|
Style/InlineComment:
|
|
173
177
|
Description: Avoid inline comments.
|
|
174
178
|
Enabled: false
|
|
175
|
-
|
|
179
|
+
Naming/AccessorMethodName:
|
|
176
180
|
Description: Check the naming of accessor methods for get_/set_.
|
|
177
181
|
Enabled: false
|
|
178
182
|
Style/Alias:
|
|
@@ -244,11 +248,11 @@ RedundantBlockCall:
|
|
|
244
248
|
Enabled: false
|
|
245
249
|
Style/EmptyMethod:
|
|
246
250
|
Enabled: false
|
|
247
|
-
|
|
251
|
+
Naming/VariableNumber:
|
|
248
252
|
EnforcedStyle: snake_case
|
|
249
253
|
|
|
250
254
|
# checks whether the end keywords are aligned properly for `do` `end` blocks.
|
|
251
|
-
|
|
255
|
+
Layout/BlockAlignment:
|
|
252
256
|
# The value `start_of_block` means that the `end` should be aligned with line
|
|
253
257
|
# where the `do` keyword appears.
|
|
254
258
|
# The value `start_of_line` means it should be aligned with the whole
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
hekate (0.1.0.
|
|
4
|
+
hekate (0.1.0.pre24)
|
|
5
5
|
aws-sdk-core (~> 3.6.0, >= 3.6.0)
|
|
6
6
|
aws-sdk-kms (~> 1.2.0, >= 1.2.0)
|
|
7
7
|
aws-sdk-ssm (~> 1.3.0, >= 1.3.0)
|
|
@@ -48,10 +48,10 @@ GEM
|
|
|
48
48
|
minitest (~> 5.1)
|
|
49
49
|
thread_safe (~> 0.3, >= 0.3.4)
|
|
50
50
|
tzinfo (~> 1.1)
|
|
51
|
-
addressable (2.5.
|
|
52
|
-
public_suffix (
|
|
51
|
+
addressable (2.5.2)
|
|
52
|
+
public_suffix (>= 2.0.2, < 4.0)
|
|
53
53
|
arel (6.0.4)
|
|
54
|
-
aws-partitions (1.
|
|
54
|
+
aws-partitions (1.96.0)
|
|
55
55
|
aws-sdk-core (3.6.1)
|
|
56
56
|
aws-partitions (~> 1.0)
|
|
57
57
|
aws-sigv4 (~> 1.0)
|
|
@@ -62,43 +62,43 @@ GEM
|
|
|
62
62
|
aws-sdk-ssm (1.3.0)
|
|
63
63
|
aws-sdk-core (~> 3)
|
|
64
64
|
aws-sigv4 (~> 1.0)
|
|
65
|
-
aws-sigv4 (1.0.
|
|
65
|
+
aws-sigv4 (1.0.3)
|
|
66
66
|
builder (3.2.3)
|
|
67
67
|
codecov (0.1.10)
|
|
68
68
|
json
|
|
69
69
|
simplecov
|
|
70
70
|
url
|
|
71
|
-
commander (4.4.
|
|
71
|
+
commander (4.4.5)
|
|
72
72
|
highline (~> 1.7.2)
|
|
73
73
|
concurrent-ruby (1.0.5)
|
|
74
74
|
crack (0.4.3)
|
|
75
75
|
safe_yaml (~> 1.0.0)
|
|
76
|
-
crass (1.0.
|
|
76
|
+
crass (1.0.4)
|
|
77
77
|
diff-lcs (1.3)
|
|
78
|
-
docile (1.1
|
|
79
|
-
dotenv (2.
|
|
78
|
+
docile (1.3.1)
|
|
79
|
+
dotenv (2.5.0)
|
|
80
80
|
ec2-metadata (0.2.2)
|
|
81
81
|
erubis (2.7.0)
|
|
82
82
|
globalid (0.4.1)
|
|
83
83
|
activesupport (>= 4.2.0)
|
|
84
|
-
hashdiff (0.3.
|
|
84
|
+
hashdiff (0.3.7)
|
|
85
85
|
highline (1.7.10)
|
|
86
|
-
i18n (0.9.
|
|
86
|
+
i18n (0.9.5)
|
|
87
87
|
concurrent-ruby (~> 1.0)
|
|
88
|
-
jmespath (1.
|
|
88
|
+
jmespath (1.4.0)
|
|
89
89
|
json (2.1.0)
|
|
90
|
-
loofah (2.
|
|
90
|
+
loofah (2.2.2)
|
|
91
91
|
crass (~> 1.0.2)
|
|
92
92
|
nokogiri (>= 1.5.9)
|
|
93
93
|
mail (2.7.0)
|
|
94
94
|
mini_mime (>= 0.1.1)
|
|
95
95
|
mini_mime (1.0.0)
|
|
96
96
|
mini_portile2 (2.3.0)
|
|
97
|
-
minitest (5.11.
|
|
98
|
-
nokogiri (1.8.
|
|
97
|
+
minitest (5.11.3)
|
|
98
|
+
nokogiri (1.8.4)
|
|
99
99
|
mini_portile2 (~> 2.3.0)
|
|
100
|
-
public_suffix (
|
|
101
|
-
rack (1.6.
|
|
100
|
+
public_suffix (3.0.2)
|
|
101
|
+
rack (1.6.10)
|
|
102
102
|
rack-test (0.6.3)
|
|
103
103
|
rack (>= 1.0)
|
|
104
104
|
rails (4.2.10)
|
|
@@ -118,36 +118,36 @@ GEM
|
|
|
118
118
|
activesupport (>= 4.2.0, < 5.0)
|
|
119
119
|
nokogiri (~> 1.6)
|
|
120
120
|
rails-deprecated_sanitizer (>= 1.0.1)
|
|
121
|
-
rails-html-sanitizer (1.0.
|
|
122
|
-
loofah (~> 2.
|
|
121
|
+
rails-html-sanitizer (1.0.4)
|
|
122
|
+
loofah (~> 2.2, >= 2.2.2)
|
|
123
123
|
railties (4.2.10)
|
|
124
124
|
actionpack (= 4.2.10)
|
|
125
125
|
activesupport (= 4.2.10)
|
|
126
126
|
rake (>= 0.8.7)
|
|
127
127
|
thor (>= 0.18.1, < 2.0)
|
|
128
128
|
rake (10.5.0)
|
|
129
|
-
rspec (3.
|
|
130
|
-
rspec-core (~> 3.
|
|
131
|
-
rspec-expectations (~> 3.
|
|
132
|
-
rspec-mocks (~> 3.
|
|
133
|
-
rspec-core (3.
|
|
134
|
-
rspec-support (~> 3.
|
|
135
|
-
rspec-expectations (3.
|
|
129
|
+
rspec (3.7.0)
|
|
130
|
+
rspec-core (~> 3.7.0)
|
|
131
|
+
rspec-expectations (~> 3.7.0)
|
|
132
|
+
rspec-mocks (~> 3.7.0)
|
|
133
|
+
rspec-core (3.7.1)
|
|
134
|
+
rspec-support (~> 3.7.0)
|
|
135
|
+
rspec-expectations (3.7.0)
|
|
136
136
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
137
|
-
rspec-support (~> 3.
|
|
138
|
-
rspec-mocks (3.
|
|
137
|
+
rspec-support (~> 3.7.0)
|
|
138
|
+
rspec-mocks (3.7.0)
|
|
139
139
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
140
|
-
rspec-support (~> 3.
|
|
141
|
-
rspec-support (3.
|
|
140
|
+
rspec-support (~> 3.7.0)
|
|
141
|
+
rspec-support (3.7.1)
|
|
142
142
|
rspec_junit_formatter (0.3.0)
|
|
143
143
|
rspec-core (>= 2, < 4, != 2.12.0)
|
|
144
144
|
safe_yaml (1.0.4)
|
|
145
|
-
simplecov (0.
|
|
146
|
-
docile (~> 1.1
|
|
145
|
+
simplecov (0.16.1)
|
|
146
|
+
docile (~> 1.1)
|
|
147
147
|
json (>= 1.8, < 3)
|
|
148
148
|
simplecov-html (~> 0.10.0)
|
|
149
149
|
simplecov-html (0.10.2)
|
|
150
|
-
sprockets (3.7.
|
|
150
|
+
sprockets (3.7.2)
|
|
151
151
|
concurrent-ruby (~> 1.0)
|
|
152
152
|
rack (> 1, < 3)
|
|
153
153
|
sprockets-rails (3.2.1)
|
|
@@ -156,7 +156,7 @@ GEM
|
|
|
156
156
|
sprockets (>= 3.0.0)
|
|
157
157
|
thor (0.20.0)
|
|
158
158
|
thread_safe (0.3.6)
|
|
159
|
-
tzinfo (1.2.
|
|
159
|
+
tzinfo (1.2.5)
|
|
160
160
|
thread_safe (~> 0.1)
|
|
161
161
|
url (0.3.2)
|
|
162
162
|
webmock (3.0.1)
|
|
@@ -177,4 +177,4 @@ DEPENDENCIES
|
|
|
177
177
|
webmock (~> 3.0.0, ~> 3.0)
|
|
178
178
|
|
|
179
179
|
BUNDLED WITH
|
|
180
|
-
1.
|
|
180
|
+
1.16.1
|
data/bin/hekate
CHANGED
data/hekate.gemspec
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
1
|
# frozen_string_literal: true
|
|
3
2
|
|
|
4
|
-
lib = File.expand_path("
|
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
|
5
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
6
5
|
require "hekate/version"
|
|
7
6
|
|
|
@@ -26,10 +25,10 @@ Gem::Specification.new do |spec|
|
|
|
26
25
|
spec.add_runtime_dependency "aws-sdk-kms", "~>1.2.0", ">= 1.2.0"
|
|
27
26
|
spec.add_runtime_dependency "aws-sdk-ssm", "~>1.3.0", ">= 1.3.0"
|
|
28
27
|
spec.add_runtime_dependency "commander", "~> 4.4", ">= 4.4.0"
|
|
28
|
+
spec.add_runtime_dependency "dotenv", "~> 2.2", ">= 2.2.1"
|
|
29
29
|
spec.add_runtime_dependency "ec2-metadata", "~> 0.2", ">= 0.2.0"
|
|
30
|
-
spec.add_runtime_dependency "railties", "~> 4.2", ">= 4.2.0"
|
|
31
30
|
spec.add_runtime_dependency "rails", "~> 4"
|
|
32
|
-
spec.add_runtime_dependency "
|
|
31
|
+
spec.add_runtime_dependency "railties", "~> 4.2", ">= 4.2.0"
|
|
33
32
|
|
|
34
33
|
spec.add_development_dependency "bundler", "~> 1.15"
|
|
35
34
|
spec.add_development_dependency "codecov", "~> 0.1", "~> 0.1.0"
|
data/lib/hekate.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "rails"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
require_relative "hekate/aws"
|
|
5
|
+
require_relative "hekate/version"
|
|
6
|
+
require_relative "hekate/railtie"
|
|
7
|
+
require_relative "hekate/engine"
|
data/lib/hekate/aws.rb
CHANGED
|
@@ -23,19 +23,12 @@ module Hekate
|
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def get_parameters(names)
|
|
31
|
-
result = []
|
|
32
|
-
names.each_slice(10) do |slice|
|
|
33
|
-
result.concat(ssm.get_parameters(
|
|
34
|
-
names: slice,
|
|
35
|
-
with_decryption: true
|
|
36
|
-
).parameters)
|
|
26
|
+
def get_parameters(environments = [])
|
|
27
|
+
parameters = []
|
|
28
|
+
environments.each do |environment|
|
|
29
|
+
parameters += get_env_parameters(environment)
|
|
37
30
|
end
|
|
38
|
-
|
|
31
|
+
parameters
|
|
39
32
|
end
|
|
40
33
|
|
|
41
34
|
def put_parameter(name, value, environment)
|
|
@@ -53,11 +46,17 @@ module Hekate
|
|
|
53
46
|
private
|
|
54
47
|
|
|
55
48
|
def kms
|
|
56
|
-
@kms ||= ::Aws::KMS::Client.new(
|
|
49
|
+
@kms ||= ::Aws::KMS::Client.new(
|
|
50
|
+
region: @region,
|
|
51
|
+
retry_limit: 5,
|
|
52
|
+
retry_backoff: proc { |attempts| sleep(2**attempts) }
|
|
53
|
+
)
|
|
57
54
|
end
|
|
58
55
|
|
|
59
56
|
def ssm
|
|
60
|
-
@ssm ||= ::Aws::SSM::Client.new(region: @region
|
|
57
|
+
@ssm ||= ::Aws::SSM::Client.new(region: @region,
|
|
58
|
+
retry_limit: 5,
|
|
59
|
+
retry_backoff: proc { |attempts| sleep(2**attempts) })
|
|
61
60
|
end
|
|
62
61
|
|
|
63
62
|
def kms_key(environment)
|
|
@@ -87,22 +86,19 @@ module Hekate
|
|
|
87
86
|
aliases.include? kms_alias
|
|
88
87
|
end
|
|
89
88
|
|
|
90
|
-
def
|
|
89
|
+
def get_env_parameters(environment, parameters = [], next_token = nil)
|
|
91
90
|
query = {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
max_results: 50
|
|
91
|
+
path: "/#{Hekate::Engine.application}/#{environment}",
|
|
92
|
+
recursive: false,
|
|
93
|
+
with_decryption: true,
|
|
94
|
+
max_results: 10
|
|
99
95
|
}
|
|
100
96
|
query[:next_token] = next_token if next_token
|
|
101
|
-
response = ssm.
|
|
97
|
+
response = ssm.get_parameters_by_path(query)
|
|
102
98
|
|
|
103
99
|
parameters += response.parameters
|
|
104
100
|
|
|
105
|
-
parameters =
|
|
101
|
+
parameters = get_env_parameters(environment, parameters, response.next_token) if response.next_token
|
|
106
102
|
|
|
107
103
|
parameters
|
|
108
104
|
end
|
data/lib/hekate/engine.rb
CHANGED
|
@@ -11,7 +11,7 @@ module Hekate
|
|
|
11
11
|
attr_accessor :application
|
|
12
12
|
|
|
13
13
|
def get_region
|
|
14
|
-
if ec2?
|
|
14
|
+
if !%w[development test].include?(Rails.env.to_s) && ec2?
|
|
15
15
|
Ec2Metadata[:placement]["availability-zone"][0...-1]
|
|
16
16
|
else
|
|
17
17
|
ENV["AWS_REGION"] || "us-east-1"
|
|
@@ -21,7 +21,7 @@ module Hekate
|
|
|
21
21
|
def ec2?
|
|
22
22
|
Ec2Metadata[:instance_id]
|
|
23
23
|
true
|
|
24
|
-
rescue
|
|
24
|
+
rescue StandardError
|
|
25
25
|
false
|
|
26
26
|
end
|
|
27
27
|
|
|
@@ -81,7 +81,7 @@ module Hekate
|
|
|
81
81
|
rescue Errno::EISCONN
|
|
82
82
|
# Good news everybody, the socket is connected!
|
|
83
83
|
result = true
|
|
84
|
-
rescue
|
|
84
|
+
rescue StandardError
|
|
85
85
|
# An unexpected exception was raised - the connection is no good.
|
|
86
86
|
socket.close
|
|
87
87
|
result = false
|
|
@@ -93,7 +93,7 @@ module Hekate
|
|
|
93
93
|
socket.close
|
|
94
94
|
result = false
|
|
95
95
|
end
|
|
96
|
-
rescue
|
|
96
|
+
rescue StandardError
|
|
97
97
|
result = false
|
|
98
98
|
end
|
|
99
99
|
end
|
|
@@ -114,17 +114,14 @@ module Hekate
|
|
|
114
114
|
|
|
115
115
|
def load_environment
|
|
116
116
|
if Hekate::Engine.online?
|
|
117
|
-
application =
|
|
117
|
+
application = Hekate::Engine.application
|
|
118
118
|
environments = ["root", @environment].compact
|
|
119
119
|
|
|
120
|
-
parameters = awsclient.
|
|
121
|
-
parameters = parameters.map(&:name)
|
|
122
|
-
|
|
123
|
-
result = awsclient.get_parameters(parameters)
|
|
120
|
+
parameters = awsclient.get_parameters(environments)
|
|
124
121
|
|
|
125
122
|
environments.each do |env|
|
|
126
|
-
|
|
127
|
-
parameter_name = parameter.name.gsub(
|
|
123
|
+
parameters.select { |r| r.name.start_with?("/#{application}/#{env}/") }.each do |parameter|
|
|
124
|
+
parameter_name = parameter.name.gsub("/#{application}/#{env}/", "")
|
|
128
125
|
ENV[parameter_name] = parameter.value
|
|
129
126
|
end
|
|
130
127
|
end
|
|
@@ -146,8 +143,8 @@ module Hekate
|
|
|
146
143
|
next if line.start_with? "#"
|
|
147
144
|
|
|
148
145
|
key, value = line.split("=")
|
|
149
|
-
|
|
150
146
|
next if value.nil?
|
|
147
|
+
|
|
151
148
|
value = value.delete('"').delete("'").delete("\n")
|
|
152
149
|
next if value.empty?
|
|
153
150
|
|
|
@@ -156,17 +153,17 @@ module Hekate
|
|
|
156
153
|
end
|
|
157
154
|
|
|
158
155
|
def put(key, value)
|
|
159
|
-
parameter_key = "
|
|
156
|
+
parameter_key = "/#{Hekate::Engine.application}/#{@environment}/#{key}"
|
|
160
157
|
awsclient.put_parameter(parameter_key, value, @environment)
|
|
161
158
|
end
|
|
162
159
|
|
|
163
160
|
def get(key)
|
|
164
|
-
parameter_key = "
|
|
161
|
+
parameter_key = "/#{Hekate::Engine.application}/#{@environment}/#{key}"
|
|
165
162
|
awsclient.get_parameter(parameter_key)
|
|
166
163
|
end
|
|
167
164
|
|
|
168
165
|
def delete_all
|
|
169
|
-
parameters = awsclient.
|
|
166
|
+
parameters = awsclient.get_parameters([@environment]).map(&:name)
|
|
170
167
|
progress = Commander::UI::ProgressBar.new(parameters.length)
|
|
171
168
|
parameters.each do |parameter|
|
|
172
169
|
progress.increment
|
|
@@ -175,25 +172,19 @@ module Hekate
|
|
|
175
172
|
end
|
|
176
173
|
|
|
177
174
|
def delete(key)
|
|
178
|
-
parameter_key = "
|
|
175
|
+
parameter_key = "/#{Hekate::Engine.application}/#{@environment}/#{key}"
|
|
179
176
|
awsclient.delete_parameter(parameter_key)
|
|
180
177
|
end
|
|
181
178
|
|
|
182
179
|
def export(env_file)
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
parameters = awsclient.list_parameters([@environment]).map(&:name)
|
|
180
|
+
parameters = awsclient.get_parameters([@environment])
|
|
186
181
|
|
|
187
182
|
progress = Commander::UI::ProgressBar.new(parameters.length)
|
|
188
183
|
open(env_file, "w") do |file|
|
|
189
|
-
parameters.
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
progress.increment
|
|
194
|
-
parameter_name = parameter.name.gsub(parameter_key, "")
|
|
195
|
-
file.puts "#{parameter_name}=#{parameter.value}"
|
|
196
|
-
end
|
|
184
|
+
parameters.each do |parameter|
|
|
185
|
+
progress.increment
|
|
186
|
+
parameter_name = parameter.name.gsub("/#{Hekate::Engine.application}/#{@environment}/", "")
|
|
187
|
+
file.puts "#{parameter_name}=#{parameter.value}"
|
|
197
188
|
end
|
|
198
189
|
end
|
|
199
190
|
end
|
data/lib/hekate/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hekate
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0.pre1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jasonrisch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-07-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-core
|
|
@@ -91,45 +91,45 @@ dependencies:
|
|
|
91
91
|
- !ruby/object:Gem::Version
|
|
92
92
|
version: 4.4.0
|
|
93
93
|
- !ruby/object:Gem::Dependency
|
|
94
|
-
name:
|
|
94
|
+
name: dotenv
|
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
|
96
96
|
requirements:
|
|
97
97
|
- - "~>"
|
|
98
98
|
- !ruby/object:Gem::Version
|
|
99
|
-
version: '
|
|
99
|
+
version: '2.2'
|
|
100
100
|
- - ">="
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version:
|
|
102
|
+
version: 2.2.1
|
|
103
103
|
type: :runtime
|
|
104
104
|
prerelease: false
|
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
106
|
requirements:
|
|
107
107
|
- - "~>"
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: '
|
|
109
|
+
version: '2.2'
|
|
110
110
|
- - ">="
|
|
111
111
|
- !ruby/object:Gem::Version
|
|
112
|
-
version:
|
|
112
|
+
version: 2.2.1
|
|
113
113
|
- !ruby/object:Gem::Dependency
|
|
114
|
-
name:
|
|
114
|
+
name: ec2-metadata
|
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
|
116
116
|
requirements:
|
|
117
117
|
- - "~>"
|
|
118
118
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: '
|
|
119
|
+
version: '0.2'
|
|
120
120
|
- - ">="
|
|
121
121
|
- !ruby/object:Gem::Version
|
|
122
|
-
version:
|
|
122
|
+
version: 0.2.0
|
|
123
123
|
type: :runtime
|
|
124
124
|
prerelease: false
|
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
|
126
126
|
requirements:
|
|
127
127
|
- - "~>"
|
|
128
128
|
- !ruby/object:Gem::Version
|
|
129
|
-
version: '
|
|
129
|
+
version: '0.2'
|
|
130
130
|
- - ">="
|
|
131
131
|
- !ruby/object:Gem::Version
|
|
132
|
-
version:
|
|
132
|
+
version: 0.2.0
|
|
133
133
|
- !ruby/object:Gem::Dependency
|
|
134
134
|
name: rails
|
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -145,25 +145,25 @@ dependencies:
|
|
|
145
145
|
- !ruby/object:Gem::Version
|
|
146
146
|
version: '4'
|
|
147
147
|
- !ruby/object:Gem::Dependency
|
|
148
|
-
name:
|
|
148
|
+
name: railties
|
|
149
149
|
requirement: !ruby/object:Gem::Requirement
|
|
150
150
|
requirements:
|
|
151
151
|
- - "~>"
|
|
152
152
|
- !ruby/object:Gem::Version
|
|
153
|
-
version: '
|
|
153
|
+
version: '4.2'
|
|
154
154
|
- - ">="
|
|
155
155
|
- !ruby/object:Gem::Version
|
|
156
|
-
version:
|
|
156
|
+
version: 4.2.0
|
|
157
157
|
type: :runtime
|
|
158
158
|
prerelease: false
|
|
159
159
|
version_requirements: !ruby/object:Gem::Requirement
|
|
160
160
|
requirements:
|
|
161
161
|
- - "~>"
|
|
162
162
|
- !ruby/object:Gem::Version
|
|
163
|
-
version: '
|
|
163
|
+
version: '4.2'
|
|
164
164
|
- - ">="
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
|
-
version:
|
|
166
|
+
version: 4.2.0
|
|
167
167
|
- !ruby/object:Gem::Dependency
|
|
168
168
|
name: bundler
|
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|