ky 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ky/cli.rb +2 -0
  3. data/lib/ky/version.rb +1 -1
  4. data/lib/ky.rb +3 -2
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a1450afbdf79d14f2d16fde12d7776a3f902c88
4
- data.tar.gz: 0251fb3c63c8ec51aad1a5e3dd0d793344a204d7
3
+ metadata.gz: df487ad250e2395a8c8bc222c91eb6589b45061e
4
+ data.tar.gz: ac2af6afe971f9109f0a08055e7c8a59e12e1eac
5
5
  SHA512:
6
- metadata.gz: aa0d08b5c026b6a20f41220fa9967a1e7230b01e40b0eb43fb25926444de55df527574bfded3c0249040d857f7fb4ef79613ac64472de36effc1dc5e49ef8d68
7
- data.tar.gz: 2067a16f3f92c53091db6346de4e7b41eb10b4c9e8a66a8a6d6b90995f4878faacf19f6944f5395dca598e8a4fe82a32f9cad77bc2ba4537155a3ceedf706ff6
6
+ metadata.gz: 01c9c765ac943de2bc7bcbd2812e2dd1423d6a498f1e890ffc0832ee68f2991ab0419359f760471a2c4f859802c68859a26a4310cad8a9ca17f572f1752ee147
7
+ data.tar.gz: ae3f3802b3f6fba297206ea322b60de7c70e62f362b7de9ecee2c625954ee0c0cf1eb16074509d9f261733426f1b2622a25321d7e87dfc9dd6fe5df516f16544
data/lib/ky/cli.rb CHANGED
@@ -41,8 +41,10 @@ module KY
41
41
  DOC
42
42
  method_option :namespace, type: :string, aliases: "-n"
43
43
  method_option :environment, type: :string, aliases: "-e"
44
+ method_option :image_tag, type: :string, aliases: "-t"
44
45
  def compile(procfile_path=nil, config_or_secrets_path=nil, secrets_or_config_path=nil, output_dir=nil)
45
46
  KY.environment = options[:environment]
47
+ KY.image_tag = options[:image_tag]
46
48
  procfile_path ||= KY.configuration['procfile_path']
47
49
  config_or_secrets_path ||= KY.configuration['config_path'] || KY.configuration['secret_path']
48
50
  secrets_or_config_path ||= KY.configuration['secret_path'] || KY.configuration['config_path']
data/lib/ky/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module KY
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/ky.rb CHANGED
@@ -26,7 +26,7 @@ module KY
26
26
  }
27
27
 
28
28
  module_function
29
- cattr_accessor :environment
29
+ cattr_accessor :environment, :image_tag
30
30
 
31
31
  def decode(output, input)
32
32
  output << Manipulation.code_yaml(input, :decode)
@@ -73,7 +73,8 @@ module KY
73
73
  end
74
74
 
75
75
  def current_environment_hash(partial_config=nil)
76
- YAML.load(File.read(KY.environment_files(partial_config).find {|file| file.match(KY.environment) })) rescue {}
76
+ hsh = YAML.load(File.read(KY.environment_files(partial_config).find {|file| file.match(KY.environment) })) rescue {} # ugh, this find is accident waiting to happen, REFACTOR/RETHINK!
77
+ image_tag ? hsh.merge("configuration" => {"image_tag" => image_tag}) : hsh
77
78
  end
78
79
 
79
80
  def environment_files(partial_config=nil)
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.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Glusman