builderator 1.1.3 → 1.1.4

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: 959e5d53daa3199c9faa8c611acbaaf555fa8ee7
4
- data.tar.gz: be2c5322827d4c66fb575c1d371e69bda7bd88b7
3
+ metadata.gz: 6f7315691d21aa1ee458439e175fad832f333c84
4
+ data.tar.gz: beaad66836ca71ea55dab73885127771f87debec
5
5
  SHA512:
6
- metadata.gz: dc8d8b24dfaccb42b9dfc04ba51b7c18d8b44297d208021df9d7dac1c06e128844ef3e0a426a2d368aa1eb39a9a0b315cd2da61a942f9bfedf3777d39046df36
7
- data.tar.gz: 668e42a02bfc496e5c07c3aade77d05abc2e465cc9c67ce8a28acf3c0f843f378b4f8287ebfc9067b144c6f5a7687f974a51e6b2a783b1b0baaca402c3476e23
6
+ metadata.gz: 41feb503cf94efa12ef41452efa31b31d823bc1fd818afaf390e5bb8f93da4319c230c7565f70d4d0f2946f91fd7fc218d83416b12f138b439b6490a196d071d
7
+ data.tar.gz: 9adcbfa499715d19ede3eaaaf17cff16308fd281f7f5e30d6f7b827200054e5bebcab4c60ed32fe02e150b16a7d04d5699e213c5d80de9f9e33a52d4d7afc2b9
data/Gemfile.lock CHANGED
@@ -56,30 +56,31 @@ GEM
56
56
  celluloid-io (0.16.2)
57
57
  celluloid (>= 0.16.0)
58
58
  nio4r (>= 1.1.0)
59
- chef (12.5.1)
60
- chef-config (= 12.5.1)
61
- chef-zero (~> 4.2, >= 4.2.2)
59
+ chef (12.7.2)
60
+ chef-config (= 12.7.2)
61
+ chef-zero (~> 4.5)
62
62
  diff-lcs (~> 1.2, >= 1.2.4)
63
63
  erubis (~> 2.7)
64
64
  ffi-yajl (~> 2.2)
65
65
  highline (~> 1.6, >= 1.6.9)
66
- mixlib-authentication (~> 1.3)
66
+ mixlib-authentication (~> 1.4)
67
67
  mixlib-cli (~> 1.4)
68
68
  mixlib-log (~> 1.3)
69
69
  mixlib-shellout (~> 2.0)
70
- net-ssh (~> 2.6)
70
+ net-ssh (>= 2.9, < 4.0)
71
71
  net-ssh-multi (~> 1.1)
72
72
  ohai (>= 8.6.0.alpha.1, < 9)
73
73
  plist (~> 3.1.0)
74
- pry (~> 0.9)
75
- rspec-core (~> 3.2)
76
- rspec-expectations (~> 3.2)
77
- rspec-mocks (~> 3.2)
74
+ proxifier (~> 1.0)
75
+ rspec-core (~> 3.4)
76
+ rspec-expectations (~> 3.4)
77
+ rspec-mocks (~> 3.4)
78
78
  rspec_junit_formatter (~> 0.2.0)
79
79
  serverspec (~> 2.7)
80
80
  specinfra (~> 2.10)
81
81
  syslog-logger (~> 1.6)
82
- chef-config (12.5.1)
82
+ uuidtools (~> 2.1.5)
83
+ chef-config (12.7.2)
83
84
  mixlib-config (~> 2.0)
84
85
  mixlib-shellout (~> 2.0)
85
86
  chef-zero (4.6.1)
@@ -89,7 +90,6 @@ GEM
89
90
  rack
90
91
  uuidtools (~> 2.1)
91
92
  cleanroom (1.0.0)
92
- coderay (1.1.1)
93
93
  dep-selector-libgecode (1.2.0)
94
94
  dep_selector (1.0.3)
95
95
  dep-selector-libgecode (~> 1.0)
@@ -114,7 +114,6 @@ GEM
114
114
  json (1.8.3)
115
115
  json_pure (1.8.3)
116
116
  libyajl2 (1.2.0)
117
- method_source (0.8.2)
118
117
  minitar (0.5.4)
119
118
  mixlib-authentication (1.4.0)
120
119
  mixlib-log
@@ -130,7 +129,7 @@ GEM
130
129
  multipart-post (2.0.0)
131
130
  net-scp (1.2.1)
132
131
  net-ssh (>= 2.6.5)
133
- net-ssh (2.9.4)
132
+ net-ssh (3.1.1)
134
133
  net-ssh-gateway (1.2.0)
135
134
  net-ssh (>= 2.6.5)
136
135
  net-ssh-multi (1.2.1)
@@ -156,10 +155,7 @@ GEM
156
155
  ast (~> 2.2)
157
156
  plist (3.1.0)
158
157
  powerpack (0.1.1)
159
- pry (0.10.3)
160
- coderay (~> 1.1.0)
161
- method_source (~> 0.8.1)
162
- slop (~> 3.4)
158
+ proxifier (1.0.3)
163
159
  rack (1.6.4)
164
160
  rainbow (2.1.0)
165
161
  rake (10.5.0)
@@ -218,7 +214,6 @@ GEM
218
214
  rspec-its
219
215
  specinfra (~> 2.53)
220
216
  sfl (2.2)
221
- slop (3.6.0)
222
217
  solve (2.0.3)
223
218
  molinillo (~> 0.4.2)
224
219
  semverse (~> 1.1)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.3
1
+ 1.1.4
@@ -47,9 +47,27 @@ module Builderator
47
47
  layers.unshift(File.from_json(path)) if ::File.exist?(path)
48
48
  end
49
49
 
50
+ ##
51
+ # The compile method renders a single File instance from all of the configured
52
+ # input layers. It follows the following algorithm:
53
+ #
54
+ # => `DIRTY` is defined as the logical OR of the dirty state of each layer.
55
+ # Layers are responsible for detecting changes to their own properties
56
+ # while being compiled.
57
+ #
58
+ # => LOOP unitl not DIRTY plus 1 iteration
59
+ # 1. Call each layer's own compile method.
60
+ # 2. For each layer, merge it into the COMPILED output.
61
+ # FAIL if ITERATIONS > LIMIT
62
+ #
63
+ # => The additional iteration after DIRTY becomes false is to ensure that
64
+ # any changes to the compiled output during the final merge are passed
65
+ # back through each layer's compile.
66
+ ##
50
67
  def compile(max_iterations = 6)
51
68
  compiled.unseal
52
69
  compile_iterations = 0
70
+ break_break = false
53
71
 
54
72
  ## Inject GLOBAL_DEFAULTS before starting compile
55
73
  compiled.merge(GLOBAL_DEFAULTS.compile)
@@ -71,7 +89,9 @@ module Builderator
71
89
  compiled.merge(layer)
72
90
  end
73
91
 
74
- break unless dirty?
92
+ break if break_break && !dirty?
93
+
94
+ break_break = !dirty?
75
95
  compile_iterations += 1
76
96
  end
77
97
 
data/rvm.env CHANGED
@@ -1,14 +1,14 @@
1
- declare -x GEM_HOME="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-1"
2
- declare -x GEM_PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-1:/home/jenkins/.rvm/gems/ruby-2.1.5@global"
1
+ declare -x GEM_HOME="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-0"
2
+ declare -x GEM_PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-0:/home/jenkins/.rvm/gems/ruby-2.1.5@global"
3
3
  declare -x HOME="/home/jenkins"
4
- declare -x HUDSON_COOKIE="5eb0007d-a7b3-4701-8899-3e53ae13c262"
4
+ declare -x HUDSON_COOKIE="65158711-c2ba-4a30-9b80-ed21ba86750e"
5
5
  declare -x IRBRC="/home/jenkins/.rvm/rubies/ruby-2.1.5/.irbrc"
6
6
  declare -x LANG="en_US.UTF-8"
7
7
  declare -x LC_ALL="en_US.UTF-8"
8
8
  declare -x MY_RUBY_HOME="/home/jenkins/.rvm/rubies/ruby-2.1.5"
9
9
  declare -x NLSPATH="/usr/dt/lib/nls/msg/%L/%N.cat"
10
10
  declare -x OLDPWD
11
- declare -x PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-1/bin:/home/jenkins/.rvm/gems/ruby-2.1.5@global/bin:/home/jenkins/.rvm/rubies/ruby-2.1.5/bin:/home/jenkins/.rvm/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"
11
+ declare -x PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-0/bin:/home/jenkins/.rvm/gems/ruby-2.1.5@global/bin:/home/jenkins/.rvm/rubies/ruby-2.1.5/bin:/home/jenkins/.rvm/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"
12
12
  declare -x PWD="/home/jenkins/workspace/gem-public-builderator-master"
13
13
  declare -x RUBY_VERSION="ruby-2.1.5"
14
14
  declare -x SHLVL="1"
data/spec/config_spec.rb CHANGED
@@ -83,5 +83,20 @@ module Builderator
83
83
 
84
84
  expect { Config.compile }.not_to raise_error
85
85
  end
86
+
87
+ it 'compiles a change after an initial compilation' do
88
+ expect(Builderator::Config.layers).to be_empty
89
+
90
+ Builderator::Config.load(::File.expand_path('../resource/Buildfile-home-directory', __FILE__))
91
+ Builderator::Config.load(::File.expand_path('../resource/Buildfile-with-overrides2', __FILE__))
92
+ expect(Builderator::Config.all_layers.any?(&:dirty)).to be false
93
+ expect { Config.compile }.not_to raise_error
94
+
95
+ Builderator::Config.defaults.version '1.2.3'
96
+ Builderator::Config.defaults.build_number = '4'
97
+ expect { Config.compile }.not_to raise_error
98
+
99
+ expect(Builderator::Config.profile('default').tags['version']).to eq '1.2.3-4'
100
+ end
86
101
  end
87
102
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: builderator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Manero