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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18da16129a84f961ea93066787140bdf7c89defc
4
- data.tar.gz: 8df1aaded524d1a2df47628b982cdda2f5d28041
3
+ metadata.gz: 4565163f16e3127705d8b80bb89951f9b89d7a44
4
+ data.tar.gz: 6a06b0516593a9bb00a6642a4d94b62886686e80
5
5
  SHA512:
6
- metadata.gz: cfa7429e67824465b72ba271a135d68449e2296dd21d3f1ec7af45007d9fb62438774f9ea23a7007382cfa2af30ef499daf2fdbd0f438897f7b972941ab26f17
7
- data.tar.gz: 970631b86f66bb4ca3afa07428a260bee93b3ae42788cd4f9bd5f29c75d5af29347c303520e7953e9f3b4f052c7932a92aa0a94c4ece1c08eae0f0a4166a0820
6
+ metadata.gz: d88de7a551b448b488b4ced7a99f5966de2ee683c89b18c4cff8334cc4a1fc1c2e3b9db76d2ac4edd4acb8b8adaa90247168ad11b05eb7b146207da9f53ba917
7
+ data.tar.gz: b154703e9a8292425fed4f114d1c77d05ebed4046bb1a0c6b742dd0191ab88ac496f1f89dcd9686b3baf110e2cd8b4e7bb39f1b906ddf308e839663b6802c4ff
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ 0.0.6 / 2014-10-08
3
+ ==================
4
+
5
+ * Fixes parameter precedence issue in the builds
6
+
2
7
  0.0.5 / 2014-10-03
3
8
  ==================
4
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cide (0.0.4)
4
+ cide (0.0.6)
5
5
  thor
6
6
 
7
7
  GEM
data/cide.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'cide'
5
- s.version = '0.0.5'
5
+ s.version = '0.0.6'
6
6
  s.authors = ['zimbatm']
7
7
  s.email = ['zimbatm@zimbatm.com']
8
8
  s.summary = 'CI docker runner'
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
- obj[k.to_s] = self[k]
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: CIDE.docker_id(File.basename(Dir.pwd))
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: false
94
+ default: nil
90
95
 
91
96
  method_option 'run',
92
97
  desc: 'The script to run',
93
98
  aliases: ['r'],
94
- default: DefaultConfig.run
99
+ default: nil
95
100
 
96
101
  def build
97
102
  setup_docker
98
103
 
99
- config = DefaultConfig.merge(YAML.load_file(CONFIG_FILE)).merge(options)
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
- tag = "cide/#{docker_id(options[:name])}"
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.5
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-03 00:00:00.000000000 Z
11
+ date: 2014-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor