minke 1.13.0 → 1.13.1
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/.travis.yml +2 -2
- data/bin/minke +74 -81
- data/docker/Gemfile +1 -1
- data/lib/minke/scripts/minke +1 -1
- data/lib/minke/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1269e53e6dd27dd353fea28c6685abfdc5c587ef
|
4
|
+
data.tar.gz: 4712f2d2267f4304948ae9c9df9c414a27cc41df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 947f7c63f787d7ecf89ae5fbb3d7f8caee3c0a50879dee58654257824d2ce14e70bca21b5c209f79e67ac248b2cfe50bd8f898c04aae1b6c046ba27d10c938e9
|
7
|
+
data.tar.gz: a0747a16ad9a200a9ec9888371cc5ed684199b7fa715a0a2430dd7997f51b72523ef76d26f49c06f200cabdaa99665d2ea38260a719e8e1a2d48176ae4a52049
|
data/.travis.yml
CHANGED
@@ -30,7 +30,7 @@ after_deploy:
|
|
30
30
|
docker build -t nicholasjackson/minke --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` .;
|
31
31
|
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
|
32
32
|
docker push nicholasjackson/minke:latest;
|
33
|
-
docker tag nicholasjackson/minke nicholasjackson/minke:1.13.
|
34
|
-
docker push nicholasjackson/minke:1.13.
|
33
|
+
docker tag nicholasjackson/minke nicholasjackson/minke:1.13.1;
|
34
|
+
docker push nicholasjackson/minke:1.13.1;
|
35
35
|
curl https://hooks.microbadger.com/images/nicholasjackson/minke/tkpohfdrYPE0B0TL5NzLcOap4k0=;
|
36
36
|
fi
|
data/bin/minke
CHANGED
@@ -38,6 +38,7 @@ Commonly used command are:
|
|
38
38
|
run : start the application
|
39
39
|
build_image : build a docker image
|
40
40
|
push : push built image to the registry
|
41
|
+
encrypt : encrypt secrets with a private key
|
41
42
|
See 'minke COMMAND --help' for more information on a specific command.
|
42
43
|
HELP
|
43
44
|
|
@@ -50,7 +51,12 @@ end
|
|
50
51
|
|
51
52
|
subcommands = {
|
52
53
|
'generate' => OptionParser.new do |opts|
|
53
|
-
|
54
|
+
opts.banner = "Usage: minke [options] generate [options]"
|
55
|
+
|
56
|
+
opts.on('-g', '--generator GENERATOR', 'Generator plugin to use') { |v| options[:generator] = v }
|
57
|
+
opts.on('-o', '--output OUTPUT', 'Output folder') { |v| options[:output] = v }
|
58
|
+
opts.on('-a', '--application_name NAME', 'Application name') { |v| options[:name] = v }
|
59
|
+
opts.on('-n', '--namespace NAMESPACE', 'Application namespace') { |v| options[:namespace] = v }
|
54
60
|
end,
|
55
61
|
|
56
62
|
'build' => OptionParser.new do |opts|
|
@@ -58,100 +64,70 @@ subcommands = {
|
|
58
64
|
end,
|
59
65
|
|
60
66
|
'test' => OptionParser.new do |opts|
|
61
|
-
opts.banner = "Usage: minke test [options]"
|
67
|
+
opts.banner = "Usage: minke [options] test [options]"
|
62
68
|
|
63
69
|
opts.on("-c", "--config", "Load config file at given path") { |c| options[:config] = c }
|
64
|
-
end
|
70
|
+
end,
|
71
|
+
|
72
|
+
'encrypt' => OptionParser.new do |opts|
|
73
|
+
opts.banner = "Usage: minke [options] encrypt [options]"
|
74
|
+
|
75
|
+
opts.on('-e', '--encrypt STRING', 'Encrypt a string') { |v| options[:encrypt] = v }
|
76
|
+
opts.on('-k', '--key STRING', 'Private key to use for encryption') { |v| options[:key] = v }
|
77
|
+
end
|
65
78
|
}
|
66
79
|
|
67
80
|
global.order!
|
68
81
|
command = ARGV.shift
|
69
|
-
subcommands[command].order!
|
82
|
+
subcommands[command].order! unless command == ''
|
70
83
|
|
71
|
-
def load_config
|
72
|
-
reader = Minke::Config::Reader.new Minke::Logging.create_logger(
|
73
|
-
config = reader.read
|
84
|
+
def load_config config_file, verbose
|
85
|
+
reader = Minke::Config::Reader.new Minke::Logging.create_logger(verbose)
|
86
|
+
config = reader.read config_file
|
74
87
|
variables = Minke::Generators::ConfigVariables.new.tap do |v|
|
75
88
|
v.application_name = config.application_name
|
76
89
|
v.namespace = config.namespace
|
77
90
|
v.src_root = File.expand_path('../')
|
78
91
|
end
|
79
|
-
processor = Minke::Generators::Processor.new variables, nil, Minke::Logging.create_logger(
|
92
|
+
processor = Minke::Generators::Processor.new variables, nil, Minke::Logging.create_logger(verbose)
|
80
93
|
generator_config = processor.get_generator config.generator_name
|
81
94
|
return config, generator_config
|
82
95
|
end
|
83
96
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
when "test"
|
88
|
-
Minke::Command.new(
|
89
|
-
config,
|
90
|
-
generator_config,
|
91
|
-
options[:verbose]
|
92
|
-
).test
|
93
|
-
when "build"
|
94
|
-
Minke::Command.new(
|
95
|
-
config,
|
96
|
-
generator_config,
|
97
|
-
options[:verbose]
|
98
|
-
).build
|
99
|
-
when "fetch"
|
100
|
-
Minke::Command.new(
|
101
|
-
config,
|
102
|
-
generator_config,
|
103
|
-
options[:verbose]
|
104
|
-
).fetch
|
105
|
-
when "cucumber"
|
106
|
-
Minke::Command.new(
|
107
|
-
config,
|
108
|
-
generator_config,
|
109
|
-
options[:verbose]
|
110
|
-
).cucumber
|
111
|
-
when "build_image"
|
112
|
-
Minke::Command.new(
|
113
|
-
config,
|
114
|
-
generator_config,
|
115
|
-
options[:verbose]
|
116
|
-
).build_image
|
117
|
-
when "run"
|
118
|
-
Minke::Command.new(
|
119
|
-
config,
|
120
|
-
generator_config,
|
121
|
-
options[:verbose]
|
122
|
-
).run
|
123
|
-
when "push"
|
124
|
-
Minke::Command.new(
|
97
|
+
def doCommand(command, verbose, config_file = nil)
|
98
|
+
config, generator_config = load_config(config_file, verbose) unless config_file == nil
|
99
|
+
c = Minke::Command.new(
|
125
100
|
config,
|
126
|
-
generator_config,
|
127
|
-
|
128
|
-
)
|
129
|
-
end
|
130
|
-
|
131
|
-
exit 0
|
132
|
-
|
133
|
-
OptionParser.new do |opts|
|
134
|
-
opts.banner = "Usage: minke [options]"
|
101
|
+
generator_config,
|
102
|
+
verbose
|
103
|
+
)
|
135
104
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
opts.on('-o', '--output OUTPUT', 'Output folder') { |v| options[:output] = v }
|
140
|
-
opts.on('-a', '--application_name NAME', 'Application name') { |v| options[:name] = v }
|
141
|
-
opts.on('-n', '--namespace NAMESPACE', 'Application namespace') { |v| options[:namespace] = v }
|
142
|
-
|
143
|
-
end.parse!
|
105
|
+
puts c
|
106
|
+
c.public_send(command)
|
107
|
+
end
|
144
108
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
109
|
+
def doGenerate(options)
|
110
|
+
# load the installed generators
|
111
|
+
variables = Minke::Generators::ConfigVariables.new.tap do |v|
|
112
|
+
v.application_name = options[:name]
|
113
|
+
v.namespace = options[:namespace]
|
114
|
+
v.src_root = File.expand_path(options[:output]) unless options[:output] == nil
|
115
|
+
end
|
116
|
+
logger = Minke::Logging.create_logger(options[:verbose])
|
117
|
+
processor = Minke::Generators::Processor.new(
|
118
|
+
variables,
|
119
|
+
Minke::Docker::DockerRunner.new(logger),
|
120
|
+
logger
|
121
|
+
)
|
122
|
+
|
123
|
+
processor.process options[:generator], options[:output]
|
150
124
|
end
|
151
|
-
processor = Minke::Generators::Processor.new variables, Minke::Docker::DockerRunner.new
|
152
125
|
|
153
|
-
|
154
|
-
|
126
|
+
def doEncrypt(options)
|
127
|
+
if options[:key] == nil
|
128
|
+
puts "Please specify a key to use for encryption using -k [path to file]"
|
129
|
+
exit 1
|
130
|
+
end
|
155
131
|
|
156
132
|
encrypt = Minke::Encryption::Encryption.new options[:key]
|
157
133
|
|
@@ -161,13 +137,30 @@ if options[:encrypt] != nil
|
|
161
137
|
puts " fingerprint: #{encrypt.fingerprint}"
|
162
138
|
puts ' value: >'
|
163
139
|
encrypt.encrypt_string(options[:encrypt]).split("\n").each { |l| puts " #{l}"}
|
164
|
-
|
165
|
-
exit 0
|
166
140
|
end
|
167
141
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
142
|
+
case command
|
143
|
+
when "test"
|
144
|
+
doCommand(:test, options[:verbose], options[:config])
|
145
|
+
when "build"
|
146
|
+
doCommand(:build, options[:verbose], options[:config])
|
147
|
+
when "fetch"
|
148
|
+
doCommand(:fetch, options[:verbose], options[:config])
|
149
|
+
when "cucumber"
|
150
|
+
doCommand(:cucumber, options[:verbose], options[:config])
|
151
|
+
when "build_image"
|
152
|
+
doCommand(:build_image, options[:verbose], options[:config])
|
153
|
+
when "run"
|
154
|
+
doCommand(:run, options[:verbose], options[:config])
|
155
|
+
when "push"
|
156
|
+
doCommand(:push, options[:verbose], options[:config])
|
157
|
+
when "generate"
|
158
|
+
if options[:generator] == nil || options[:output] == nil || options[:name] == nil || options[:namespace] == nil
|
159
|
+
puts "Please specify options use: minke generate --help for help on command line options"
|
160
|
+
exit 0
|
161
|
+
end
|
172
162
|
|
173
|
-
|
163
|
+
doGenerate(options)
|
164
|
+
when "encrypt"
|
165
|
+
doEncrypt(options)
|
166
|
+
end
|
data/docker/Gemfile
CHANGED
data/lib/minke/scripts/minke
CHANGED
data/lib/minke/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.13.
|
4
|
+
version: 1.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nic Jackson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|