ky 0.3.0beta1 → 0.3.0
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/examples/.ky.yml +8 -0
- data/lib/ky.rb +3 -2
- data/lib/ky/deploy_generation.rb +7 -2
- data/lib/ky/manipulation.rb +1 -1
- data/lib/ky/version.rb +1 -1
- data/spec/ky_bin_spec.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3a1450afbdf79d14f2d16fde12d7776a3f902c88
|
|
4
|
+
data.tar.gz: 0251fb3c63c8ec51aad1a5e3dd0d793344a204d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa0d08b5c026b6a20f41220fa9967a1e7230b01e40b0eb43fb25926444de55df527574bfded3c0249040d857f7fb4ef79613ac64472de36effc1dc5e49ef8d68
|
|
7
|
+
data.tar.gz: 2067a16f3f92c53091db6346de4e7b41eb10b4c9e8a66a8a6d6b90995f4878faacf19f6944f5395dca598e8a4fe82a32f9cad77bc2ba4537155a3ceedf706ff6
|
data/examples/.ky.yml
CHANGED
data/lib/ky.rb
CHANGED
|
@@ -67,8 +67,9 @@ module KY
|
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
-
def
|
|
71
|
-
|
|
70
|
+
def deploy_merge(id)
|
|
71
|
+
return {} unless configuration["merge"]
|
|
72
|
+
configuration["merge"][id].to_h
|
|
72
73
|
end
|
|
73
74
|
|
|
74
75
|
def current_environment_hash(partial_config=nil)
|
data/lib/ky/deploy_generation.rb
CHANGED
|
@@ -19,7 +19,7 @@ module KY
|
|
|
19
19
|
|
|
20
20
|
def to_h
|
|
21
21
|
proc_commands.map do |id, command_array|
|
|
22
|
-
["#{full_output_dir}/#{id}.yml", template_hash(id, command_array)]
|
|
22
|
+
["#{full_output_dir}/#{id}-deployment.yml", template_hash(id, command_array)]
|
|
23
23
|
end.to_h
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -41,7 +41,12 @@ module KY
|
|
|
41
41
|
def template_hash(id, command_array)
|
|
42
42
|
app_name = KY.configuration['app_name'] || "#{project_name}-#{id}"
|
|
43
43
|
template_context = Template.context(app_name: app_name, id: id, command_array: command_array)
|
|
44
|
-
|
|
44
|
+
Manipulation.merge_hash(
|
|
45
|
+
YAML.load(
|
|
46
|
+
ERB.new(deployment_yaml).result(template_context)
|
|
47
|
+
),
|
|
48
|
+
KY.deploy_merge(id)
|
|
49
|
+
)
|
|
45
50
|
end
|
|
46
51
|
end
|
|
47
52
|
end
|
data/lib/ky/manipulation.rb
CHANGED
|
@@ -52,7 +52,7 @@ module KY
|
|
|
52
52
|
else
|
|
53
53
|
File.write("#{output_path}/secret.yml", code_yaml(StringIO.new(secret_hsh.to_yaml), :encode))
|
|
54
54
|
end
|
|
55
|
-
File.write("#{output_path}/
|
|
55
|
+
File.write("#{output_path}/configmap.yml", config_hsh.to_yaml)
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
end
|
data/lib/ky/version.rb
CHANGED
data/spec/ky_bin_spec.rb
CHANGED
|
@@ -68,9 +68,9 @@ describe "cli commands" do
|
|
|
68
68
|
let(:tmpdir) { 'spec/support/tmpdir' }
|
|
69
69
|
it "to directory" do
|
|
70
70
|
KY::Cli.new.compile('spec/support/Procfile', 'spec/support/config.yml', 'spec/support/decoded.yml', tmpdir)
|
|
71
|
-
expect(File.exists?("#{tmpdir}/web.yml")).to be true
|
|
72
|
-
expect(File.exists?("#{tmpdir}/worker.yml")).to be true
|
|
73
|
-
expect(File.exists?("#{tmpdir}/jobs.yml")).to be true
|
|
71
|
+
expect(File.exists?("#{tmpdir}/web-deployment.yml")).to be true
|
|
72
|
+
expect(File.exists?("#{tmpdir}/worker-deployment.yml")).to be true
|
|
73
|
+
expect(File.exists?("#{tmpdir}/jobs-deployment.yml")).to be true
|
|
74
74
|
`rm -r #{tmpdir}`
|
|
75
75
|
end
|
|
76
76
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ky
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brian Glusman
|
|
@@ -119,9 +119,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
119
119
|
version: '0'
|
|
120
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
|
-
- - "
|
|
122
|
+
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version:
|
|
124
|
+
version: '0'
|
|
125
125
|
requirements: []
|
|
126
126
|
rubyforge_project: ky
|
|
127
127
|
rubygems_version: 2.5.1
|