kite 1.1.1 → 1.1.3

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
2
  SHA256:
3
- metadata.gz: 4316889b3af724fb89854fb09d9364d9277dc0f89019349c102e4c4a48e026ac
4
- data.tar.gz: 2ae90c0b44278e9cfe22e5b8b44cf85ff2a0df04f2aa8c04b6aaefd7988c9949
3
+ metadata.gz: d2b68a454d1819a62cf4485584e512f022e9f5a3c6f67994c41ccb991b2014a8
4
+ data.tar.gz: 6dbd778bf35cbe790ba6d6da0ec31ec9953365b07dd177f7234a4480056491ae
5
5
  SHA512:
6
- metadata.gz: 588c4228e6ee3fa02fd8800b3d202aa21ca64c97aa4f72a5f0fb932fa015b72d10f7ddef41869d70049ca64c498bb6730c0b42af097f90df2fe1b23c3dfdcb7b
7
- data.tar.gz: dfc062783a611b3bad533912483975fdbc2f3a19dbcc319b12cc09e2eb2c3bbc5a2cbedde7a317514c513b00a918b00c50a2e4393df7cb9b23f158b8cf9fd437
6
+ metadata.gz: f2ea924514d9ba3c3e6add04b6c47ec02856bfa89200c9b550b066bc791cd8c5eda1f8454d4dba977032a8f961579a4b448bef3987ebd663c88849082852e46e
7
+ data.tar.gz: dc1fad1056cd84f88d8999216e927265bf68e71e1319fe62c642c4a0660f869f258445097a3d6e476aa760888635c1e20a906e909be4a231c033e6e320a56e4e
data/Dockerfile CHANGED
@@ -1,12 +1,12 @@
1
- FROM ruby:2.4-stretch
1
+ FROM ruby:2.5-stretch
2
2
 
3
3
  RUN apt-get update && \
4
4
  apt-get upgrade -qqy && \
5
5
  apt-get install -y zip curl wget vim
6
6
 
7
- ARG TERRAFORM_VERSION=0.11.6
7
+ ARG TERRAFORM_VERSION=0.11.7
8
8
  ARG BOSH_VERSION=2.0.48
9
- ARG GCLOUD_VERSION=196.0.0
9
+ ARG GCLOUD_VERSION=202.0.0
10
10
 
11
11
  # Install Terraform
12
12
  RUN curl -Ls https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -o terraform.zip \
@@ -5,8 +5,17 @@ module Kite
5
5
  method_option :env, type: :string, desc: "Environment", required: true, default: ENV['KITE_ENV']
6
6
  method_option :version, type: :string, desc: "Version", aliases: '-v', required: false
7
7
  method_option :method, type: :string, desc: "Module import method", enum: %w{copy submodule}, default: "submodule"
8
- desc 'init https://github.com/foo/bar-module', 'Initialize a kite module and render its vars.module.yml'
8
+ desc 'init https://github.com/foo/bar-module', '[DEPRECATED] Use kite module fetch and kite module vars instead'
9
9
  def init(path)
10
+ say "Kite module init is deprecated. Use kite module fetch and kite module vars instead", :yellow
11
+ end
12
+
13
+
14
+ method_option :env, type: :string, desc: "Environment", required: true, default: ENV['KITE_ENV']
15
+ method_option :version, type: :string, desc: "Version", required: false
16
+ method_option :method, type: :string, desc: "Module import method", enum: %w{copy submodule}, default: "submodule"
17
+ desc 'fetch https://github.com/foo/bar-module', 'Fetch a kite module'
18
+ def fetch(path)
10
19
  @env = options[:env]
11
20
  @module_name = path.gsub(/(.*:|.git)/, '').split('/').last
12
21
  @module_path = "modules/#{ @module_name }"
@@ -15,7 +24,8 @@ module Kite
15
24
  overwrite = ask "#{ @module_path } already exists! Overwrite? (y/N)"
16
25
  if overwrite.downcase == 'y'
17
26
  say "Remove existing files"
18
- remove_dir(@module_path)
27
+ run! "git rm -f #{ @module_path }"
28
+ remove_dir(".git/modules/#{ @module_path }")
19
29
  else
20
30
  say "Skipping module init"
21
31
  return
@@ -23,14 +33,22 @@ module Kite
23
33
  end
24
34
 
25
35
  case options[:method]
26
- when"submodule"
27
- clone_module(path, @module_path, options[:version])
28
- when "copy"
29
- FileUtils.mkdir_p("modules")
30
- FileUtils.cp_r(path, @module_path)
31
- else
32
- raise "Unsupported method #{ method }"
36
+ when"submodule"
37
+ clone_module(path, @module_path, options[:version])
38
+ when "copy"
39
+ FileUtils.mkdir_p("modules")
40
+ FileUtils.cp_r(path, @module_path)
41
+ else
42
+ raise "Unsupported method #{ method }"
33
43
  end
44
+ end
45
+
46
+ method_option :env, type: :string, desc: "Environment", required: true, default: ENV['KITE_ENV']
47
+ desc 'vars modules/bar-module', 'Render initial vars.*module*.yml'
48
+ def vars(path)
49
+ @env = options[:env]
50
+ @module_name = path.gsub(/(.*:|.git)/, '').split('/').last
51
+ @module_path = "modules/#{ @module_name }"
34
52
 
35
53
  @cloud = parse_cloud_config(@env)
36
54
  vars_output = render_vars(@module_name, @module_path)
@@ -1,3 +1,3 @@
1
1
  module Kite
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis Bellet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-23 00:00:00.000000000 Z
11
+ date: 2018-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  requirements: []
220
220
  rubyforge_project:
221
- rubygems_version: 2.7.6
221
+ rubygems_version: 2.7.7
222
222
  signing_key:
223
223
  specification_version: 4
224
224
  summary: Command line tool for devops scaffolding.