cide 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/cide.gemspec +1 -1
- data/lib/cide.rb +16 -6
- 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: 4565163f16e3127705d8b80bb89951f9b89d7a44
|
4
|
+
data.tar.gz: 6a06b0516593a9bb00a6642a4d94b62886686e80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d88de7a551b448b488b4ced7a99f5966de2ee683c89b18c4cff8334cc4a1fc1c2e3b9db76d2ac4edd4acb8b8adaa90247168ad11b05eb7b146207da9f53ba917
|
7
|
+
data.tar.gz: b154703e9a8292425fed4f114d1c77d05ebed4046bb1a0c6b742dd0191ab88ac496f1f89dcd9686b3baf110e2cd8b4e7bb39f1b906ddf308e839663b6802c4ff
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/cide.gemspec
CHANGED
data/lib/cide.rb
CHANGED
@@ -44,6 +44,10 @@ module CIDE
|
|
44
44
|
alias_method :image=, :from=
|
45
45
|
alias_method :command=, :run=
|
46
46
|
|
47
|
+
def name=(str)
|
48
|
+
super CIDE.docker_id(str)
|
49
|
+
end
|
50
|
+
|
47
51
|
def to_dockerfile
|
48
52
|
ERB.new(TEMPLATE, nil, '<>-').result(binding)
|
49
53
|
end
|
@@ -59,7 +63,8 @@ module CIDE
|
|
59
63
|
|
60
64
|
def to_yaml
|
61
65
|
members.each_with_object({}) do |k, obj|
|
62
|
-
|
66
|
+
v = self[k]
|
67
|
+
obj[k.to_s] = v unless v.nil?
|
63
68
|
end.to_yaml
|
64
69
|
end
|
65
70
|
end
|
@@ -76,7 +81,7 @@ module CIDE
|
|
76
81
|
method_option 'name',
|
77
82
|
desc: 'Name of the build',
|
78
83
|
aliases: %w(n t),
|
79
|
-
default:
|
84
|
+
default: nil
|
80
85
|
|
81
86
|
method_option 'host_export_dir',
|
82
87
|
desc: 'Output directory on host to put build artefacts in',
|
@@ -86,19 +91,24 @@ module CIDE
|
|
86
91
|
method_option 'export',
|
87
92
|
desc: 'Are we expecting to export artifacts',
|
88
93
|
type: :boolean,
|
89
|
-
default:
|
94
|
+
default: nil
|
90
95
|
|
91
96
|
method_option 'run',
|
92
97
|
desc: 'The script to run',
|
93
98
|
aliases: ['r'],
|
94
|
-
default:
|
99
|
+
default: nil
|
95
100
|
|
96
101
|
def build
|
97
102
|
setup_docker
|
98
103
|
|
99
|
-
config = DefaultConfig.merge
|
104
|
+
config = DefaultConfig.merge YAML.load_file(CONFIG_FILE)
|
105
|
+
options.each_pair do |k, v|
|
106
|
+
config[k] = v unless v.nil?
|
107
|
+
end
|
108
|
+
config.name ||= File.basename(Dir.pwd)
|
100
109
|
config.host_export_dir ||= config.export_dir
|
101
|
-
|
110
|
+
|
111
|
+
tag = "cide/#{config.name}"
|
102
112
|
|
103
113
|
say_status :config, config.to_h
|
104
114
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zimbatm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|