kite 1.1.1 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile +3 -3
- data/lib/kite/module.rb +27 -9
- data/lib/kite/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2b68a454d1819a62cf4485584e512f022e9f5a3c6f67994c41ccb991b2014a8
|
4
|
+
data.tar.gz: 6dbd778bf35cbe790ba6d6da0ec31ec9953365b07dd177f7234a4480056491ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2ea924514d9ba3c3e6add04b6c47ec02856bfa89200c9b550b066bc791cd8c5eda1f8454d4dba977032a8f961579a4b448bef3987ebd663c88849082852e46e
|
7
|
+
data.tar.gz: dc1fad1056cd84f88d8999216e927265bf68e71e1319fe62c642c4a0660f869f258445097a3d6e476aa760888635c1e20a906e909be4a231c033e6e320a56e4e
|
data/Dockerfile
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
FROM ruby:2.
|
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.
|
7
|
+
ARG TERRAFORM_VERSION=0.11.7
|
8
8
|
ARG BOSH_VERSION=2.0.48
|
9
|
-
ARG GCLOUD_VERSION=
|
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 \
|
data/lib/kite/module.rb
CHANGED
@@ -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', '
|
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
|
-
|
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
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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)
|
data/lib/kite/version.rb
CHANGED
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.
|
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-
|
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.
|
221
|
+
rubygems_version: 2.7.7
|
222
222
|
signing_key:
|
223
223
|
specification_version: 4
|
224
224
|
summary: Command line tool for devops scaffolding.
|