vagrant-r10k 0.3.0 → 0.4.0

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: 8d10d813ebfeaaab6624535df85adf644ef33920
4
- data.tar.gz: 18b0c7240ad342c182695b215b2eedd83a399437
3
+ metadata.gz: e3d2d735115ce34477747ee81985151eeaad23f0
4
+ data.tar.gz: a673da8597c69b15d10e65cfbd2cbba4b20c1725
5
5
  SHA512:
6
- metadata.gz: 8a590b625431419a985732cb0950339d3ac217dc6294a30696396685f61963bd62291b2ef81905414763f7f6fe1b39d15ab694d57d03e93936c15584d628867e
7
- data.tar.gz: d57a257ed713e38dd6dcb6e722746197b7829e578a5a9c1f70757353dda7d2e262252077d6e86a769ef309c67ec5c77f2391dda80b9265c85c638cbfe840465c
6
+ metadata.gz: c7473d327c17ebc033f09f288b6c98dc4d5a6b188de8083b6b930ddc036c11c9bfbf3f235d6f5dd1b63b3623effdc885909821359e7dbba69871197792ef2894
7
+ data.tar.gz: 6075b961160b141b890b4f46ca7aabe2f35cfb03459b223338e3124c0b5aa886dfab0b9d7e7f9a5f27d783552f1d7493380d740026ccd6551138a31572603f18
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.0.0
1
+ 2.1.0
data/CHANGES.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.4.0 2015-10-29 Jason Antman <jason@jasonantman.com>
6
+
7
+ * [#13]() / [PR #34/35](https://github.com/jantman/vagrant-r10k/pull/35) - Upgrade r10k dependency to 1.5.1 (thanks to [@cdenneen](https://github.com/cdenneen) for the work).
8
+
5
9
  ## 0.3.0 2015-09-04 Jason Antman <jason@jasonantman.com>
6
10
 
7
11
  * [#9](https://github.com/jantman/vagrant-r10k/issues/9) major refactor to separate config validation and provisioning, and prevent multiple provisioning runs
data/Gemfile.lock CHANGED
@@ -11,7 +11,7 @@ GIT
11
11
 
12
12
  GIT
13
13
  remote: https://github.com/jantman/rspec-matcher-num-times.git
14
- revision: a34cf9b95ff94512d4c515056ef25a73dbf8d544
14
+ revision: 03409dfc6a96bb8b3c7c60d8b28ccd20b02cc8c0
15
15
  branch: rspec2
16
16
  specs:
17
17
  rspec-matcher-num-times (0.0.1)
@@ -19,8 +19,8 @@ GIT
19
19
 
20
20
  GIT
21
21
  remote: https://github.com/mitchellh/vagrant.git
22
- revision: cd25b820c4425c77b833550e1f1d90f9a7c8be14
23
- branch: master
22
+ revision: 78ea5e4a78ce644717ab16d8001ab77430168f0f
23
+ tag: v1.7.4
24
24
  specs:
25
25
  vagrant (1.7.4)
26
26
  bundler (>= 1.5.2, <= 1.10.5)
@@ -43,30 +43,30 @@ GIT
43
43
  PATH
44
44
  remote: .
45
45
  specs:
46
- vagrant-r10k (0.3.0)
47
- r10k (~> 1.2.1)
46
+ vagrant-r10k (0.4.0)
47
+ r10k (~> 1.5.0)
48
48
 
49
49
  GEM
50
50
  remote: https://rubygems.org/
51
51
  specs:
52
52
  builder (3.2.2)
53
- childprocess (0.5.6)
53
+ childprocess (0.5.7)
54
54
  ffi (~> 1.0, >= 1.0.11)
55
- codecov (0.0.4)
55
+ codecov (0.1.1)
56
56
  json
57
57
  simplecov
58
58
  url
59
59
  colored (1.2)
60
- cri (2.5.0)
60
+ cri (2.6.1)
61
61
  colored (~> 1.2)
62
62
  diff-lcs (1.2.5)
63
63
  docile (1.1.5)
64
- domain_name (0.5.24)
64
+ domain_name (0.5.25)
65
65
  unf (>= 0.0.5, < 1.0.0)
66
66
  erubis (2.7.0)
67
- faraday (0.8.9)
68
- multipart-post (~> 1.2.0)
69
- faraday_middleware (0.9.1)
67
+ faraday (0.9.2)
68
+ multipart-post (>= 1.2, < 3)
69
+ faraday_middleware (0.9.2)
70
70
  faraday (>= 0.7.4, < 0.10)
71
71
  faraday_middleware-multi_json (0.0.6)
72
72
  faraday_middleware
@@ -81,20 +81,20 @@ GEM
81
81
  domain_name (~> 0.5)
82
82
  httpclient (2.6.0.1)
83
83
  i18n (0.7.0)
84
- json (1.8.2)
85
- json_pure (1.8.1)
84
+ json (1.8.3)
85
+ json_pure (1.8.3)
86
86
  listen (3.0.3)
87
87
  rb-fsevent (>= 0.9.3)
88
88
  rb-inotify (>= 0.9)
89
- little-plugger (1.1.3)
89
+ little-plugger (1.1.4)
90
90
  log4r (1.1.10)
91
91
  logging (1.8.2)
92
92
  little-plugger (>= 1.1.3)
93
93
  multi_json (>= 1.8.4)
94
- mime-types (2.6.1)
94
+ mime-types (2.6.2)
95
95
  mini_portile (0.6.0)
96
- multi_json (1.8.4)
97
- multipart-post (1.2.0)
96
+ multi_json (1.11.2)
97
+ multipart-post (2.0.0)
98
98
  net-scp (1.1.2)
99
99
  net-ssh (>= 2.6.5)
100
100
  net-sftp (2.1.2)
@@ -104,18 +104,18 @@ GEM
104
104
  nokogiri (1.6.3.1)
105
105
  mini_portile (= 0.6.0)
106
106
  nori (2.6.0)
107
- r10k (1.2.1)
108
- colored (>= 1.2)
109
- cri (~> 2.5.0)
110
- faraday (~> 0.8.8)
107
+ r10k (1.5.1)
108
+ colored (= 1.2)
109
+ cri (~> 2.6.1)
110
+ faraday (~> 0.9.0)
111
111
  faraday_middleware (~> 0.9.0)
112
- faraday_middleware-multi_json (~> 0.0.5)
113
- json_pure (~> 1.8.1)
114
- log4r (>= 1.1.10)
115
- multi_json (~> 1.8.2)
116
- systemu (~> 2.5.2)
112
+ faraday_middleware-multi_json (~> 0.0.6)
113
+ json_pure (~> 1.8)
114
+ log4r (= 1.1.10)
115
+ multi_json (~> 1.10)
116
+ semantic_puppet (~> 0.1.0)
117
117
  rake (10.4.2)
118
- rb-fsevent (0.9.5)
118
+ rb-fsevent (0.9.6)
119
119
  rb-inotify (0.9.5)
120
120
  ffi (>= 0.5.0)
121
121
  rb-kqueue (0.2.4)
@@ -131,19 +131,18 @@ GEM
131
131
  rspec-core (2.99.2)
132
132
  rspec-expectations (2.99.2)
133
133
  diff-lcs (>= 1.1.3, < 2.0)
134
- rspec-mocks (2.99.2)
135
- rspec_junit_formatter (0.2.0)
134
+ rspec-mocks (2.99.4)
135
+ rspec_junit_formatter (0.2.3)
136
136
  builder (< 4)
137
- rspec (>= 2, < 4)
138
- rspec-core (!= 2.12.0)
137
+ rspec-core (>= 2, < 4, != 2.12.0)
139
138
  rubyntlm (0.4.0)
140
139
  rubyzip (1.1.7)
141
- simplecov (0.9.2)
140
+ semantic_puppet (0.1.1)
141
+ simplecov (0.10.0)
142
142
  docile (~> 1.1.0)
143
- multi_json (~> 1.0)
144
- simplecov-html (~> 0.9.0)
145
- simplecov-html (0.9.0)
146
- systemu (2.5.2)
143
+ json (~> 1.8)
144
+ simplecov-html (~> 0.10.0)
145
+ simplecov-html (0.10.0)
147
146
  thor (0.18.1)
148
147
  unf (0.1.4)
149
148
  unf_ext
@@ -151,7 +150,7 @@ GEM
151
150
  url (0.3.2)
152
151
  uuidtools (2.1.5)
153
152
  wdm (0.1.1)
154
- winrm (1.3.3)
153
+ winrm (1.3.4)
155
154
  builder (>= 2.1.2)
156
155
  gssapi (~> 1.2)
157
156
  gyoku (~> 1.0)
@@ -32,10 +32,10 @@ module VagrantPlugins
32
32
  klass = self.class.name.downcase.split('::').last
33
33
  @logger = Log4r::Logger.new("vagrant::r10k::#{klass}")
34
34
  if ENV["VAGRANT_LOG"] == "debug"
35
- R10K::Logging.level = 0
35
+ R10K::Logging.level = "debug"
36
36
  @logger.level = 0
37
37
  else
38
- R10K::Logging.level = 3
38
+ R10K::Logging.level = "info"
39
39
  end
40
40
  end
41
41
  end
@@ -47,9 +47,9 @@ module VagrantPlugins
47
47
  env[:ui].info "vagrant-r10k: Beginning r10k deploy of puppet modules into #{config[:module_path]} using #{config[:puppetfile_path]}"
48
48
 
49
49
  if ENV["VAGRANT_LOG"] == "debug"
50
- R10K::Logging.level = 0
50
+ R10K::Logging.level = 'debug'
51
51
  else
52
- R10K::Logging.level = 3
52
+ R10K::Logging.level = 'info'
53
53
  end
54
54
 
55
55
  unless File.file?(config[:puppetfile_path])
@@ -69,7 +69,7 @@ module VagrantPlugins
69
69
  @logger.debug("vagrant-r10k: sync task complete")
70
70
  rescue Exception => ex
71
71
  @env[:ui].error "Invalid syntax in Puppetfile at #{config[:puppetfile_path]}"
72
- raise ErrorWrapper.new(ex)
72
+ raise ErrorWrapper.new(ex.original)
73
73
  end
74
74
  unless runner.succeeded?
75
75
  runner.get_errors().each do |error|
@@ -34,7 +34,7 @@ module VagrantPlugins
34
34
  puppetfile.load
35
35
  rescue Exception => ex
36
36
  @env[:ui].error "Invalid syntax in Puppetfile at #{config[:puppetfile_path]}"
37
- raise ErrorWrapper.new(ex)
37
+ raise ErrorWrapper.new(ex.original)
38
38
  end
39
39
 
40
40
  @app.call(env)
@@ -1,6 +1,6 @@
1
1
  module VagrantPlugins
2
2
  # hold version number constant
3
3
  module R10k
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
6
6
  end
@@ -177,7 +177,7 @@ shared_examples 'provider/vagrant-r10k' do |provider, options|
177
177
  status("Test: vagrant up")
178
178
  up_result = execute('vagrant', 'up', "--provider=#{provider}", '--debug')
179
179
  expect(up_result).to exit_with(1)
180
- expect(up_result.stderr).to match(%r"RuntimeError: Couldn't update git cache for https://invalidhost\.jasonantman\.com/jantman/puppet-reviewboard\.git: \"fatal: unable to access 'https://invalidhost\.jasonantman\.com/jantman/puppet-reviewboard\.git/': Could not resolve host: invalidhost\.jasonantman\.com\"\n\nIf you don't have connectivity to the host, running 'vagrant up --no-provision' will skip r10k deploy and all provisioning")
180
+ expect(up_result.stderr).to match(%r"fatal: unable to access 'https://invalidhost\.jasonantman\.com/jantman/puppet-reviewboard\.git/': Could not resolve host: invalidhost\.jasonantman\.com\nExit code: 128\n\nIf you don't have connectivity to the host, running 'vagrant up --no-provision' will skip r10k deploy and all provisioning")
181
181
  ensure_puppet_didnt_run(up_result)
182
182
  end
183
183
  end
@@ -193,7 +193,7 @@ shared_examples 'provider/vagrant-r10k' do |provider, options|
193
193
  def ensure_successful_run(up_result, workdir)
194
194
  expect(up_result).to exit_with(0)
195
195
  # version checks
196
- expect(up_result.stderr).to include('global: - r10k = 1.2.1')
196
+ expect(up_result.stderr).to include('global: - r10k = 1.5.1')
197
197
  expect(up_result.stderr).to include("global: - vagrant-r10k = #{VagrantPlugins::R10k::VERSION}")
198
198
  expect(up_result.stderr).to include('Registered plugin: vagrant-r10k')
199
199
  expect(up_result.stderr).to include('vagrant::r10k::validate called')
@@ -21,16 +21,16 @@ describe VagrantPlugins::R10k::Action::Base do
21
21
  expect(x.instance_variable_get(:@logger).fullname).to eq('vagrant::r10k::base')
22
22
  end
23
23
 
24
- it 'sets logging levels to 3 when not running in debug mode' do
24
+ it 'sets logging levels to 2 when not running in debug mode' do
25
25
  allow(ENV).to receive(:[]).with("VAGRANT_LOG").and_return('no')
26
26
  x = described_class.new(:app, :env)
27
- expect(R10K::Logging.level).to eq(3)
27
+ expect(R10K::Logging.level).to eq(2)
28
28
  end
29
29
 
30
- it 'sets logging levels to 0 when running in debug mode' do
30
+ it 'sets logging levels to 1 when running in debug mode' do
31
31
  allow(ENV).to receive(:[]).with("VAGRANT_LOG").and_return('debug')
32
32
  x = described_class.new(:app, :env)
33
- expect(R10K::Logging.level).to eq(0)
33
+ expect(R10K::Logging.level).to eq(1)
34
34
  expect(x.instance_variable_get(:@logger).level).to eq(0)
35
35
  end
36
36
  end
@@ -5,6 +5,7 @@ require 'vagrant-r10k/action/base'
5
5
  require 'vagrant-r10k/action/deploy'
6
6
  require 'r10k/task/puppetfile'
7
7
  require 'r10k/git/errors'
8
+ require 'r10k/errors'
8
9
 
9
10
  include SharedExpectations
10
11
 
@@ -239,7 +240,7 @@ EOF
239
240
  R10K::TaskRunner.stub(:new) { runner_dbl }
240
241
  R10K::Task::Puppetfile::Sync.stub(:new) { sync_dbl }
241
242
  # expectations
242
- expect(R10K::Logging).to receive(:level=).with(3).twice
243
+ expect(R10K::Logging).to receive(:level=).with('info').twice
243
244
  expect(ui).to receive(:info).with("vagrant-r10k: Beginning r10k deploy of puppet modules into module/path using puppetfile/path")
244
245
  logger = subject.instance_variable_get(:@logger)
245
246
  expect(logger).to receive(:debug).once.ordered.with("vagrant::r10k::deploy.deploy called")
@@ -294,7 +295,7 @@ EOF
294
295
  R10K::TaskRunner.stub(:new) { runner_dbl }
295
296
  R10K::Task::Puppetfile::Sync.stub(:new) { sync_dbl }
296
297
  # expectations
297
- expect(R10K::Logging).to receive(:level=).with(0).twice
298
+ expect(R10K::Logging).to receive(:level=).with('debug').twice
298
299
  expect(ui).to receive(:info).with("vagrant-r10k: Beginning r10k deploy of puppet modules into module/path using puppetfile/path")
299
300
  logger = subject.instance_variable_get(:@logger)
300
301
  expect(logger).to receive(:debug).once.ordered.with("vagrant::r10k::deploy.deploy called")
@@ -408,7 +409,7 @@ EOF
408
409
  R10K::TaskRunner.stub(:new) { runner_dbl }
409
410
  R10K::Task::Puppetfile::Sync.stub(:new) { sync_dbl }
410
411
  # expectations
411
- expect(R10K::Logging).to receive(:level=).with(3).twice
412
+ expect(R10K::Logging).to receive(:level=).with('info').twice
412
413
  expect(ui).to receive(:info).with("vagrant-r10k: Beginning r10k deploy of puppet modules into module/path using puppetfile/path")
413
414
  logger = subject.instance_variable_get(:@logger)
414
415
  expect(logger).to receive(:debug).once.ordered.with("vagrant::r10k::deploy.deploy called")
@@ -469,7 +470,7 @@ EOF
469
470
  R10K::TaskRunner.stub(:new) { runner_dbl }
470
471
  R10K::Task::Puppetfile::Sync.stub(:new) { sync_dbl }
471
472
  # expectations
472
- expect(R10K::Logging).to receive(:level=).with(3).twice
473
+ expect(R10K::Logging).to receive(:level=).with('info').twice
473
474
  expect(ui).to receive(:info).with("vagrant-r10k: Beginning r10k deploy of puppet modules into module/path using puppetfile/path")
474
475
  logger = subject.instance_variable_get(:@logger)
475
476
  expect(logger).to receive(:debug).once.ordered.with("vagrant::r10k::deploy.deploy called")
@@ -522,12 +523,14 @@ EOF
522
523
  sync_dbl = double
523
524
  allow(runner_dbl).to receive(:append_task).with(sync_dbl)
524
525
  allow(runner_dbl).to receive(:succeeded?).and_return(false)
525
- allow(runner_dbl).to receive(:run).and_raise(SyntaxError.new("some syntax error"))
526
+ orig = SyntaxError.new("some syntax error")
527
+ ex = R10K::Error.wrap(orig, 'message')
528
+ allow(runner_dbl).to receive(:run).and_raise(ex)
526
529
  allow(sync_dbl).to receive(:new).with(puppetfile_dbl)
527
530
  R10K::TaskRunner.stub(:new) { runner_dbl }
528
531
  R10K::Task::Puppetfile::Sync.stub(:new) { sync_dbl }
529
532
  # expectations
530
- expect(R10K::Logging).to receive(:level=).with(3).twice
533
+ expect(R10K::Logging).to receive(:level=).with('info').twice
531
534
  expect(ui).to receive(:info).with("vagrant-r10k: Beginning r10k deploy of puppet modules into module/path using puppetfile/path")
532
535
  logger = subject.instance_variable_get(:@logger)
533
536
  expect(logger).to receive(:debug).once.ordered.with("vagrant::r10k::deploy.deploy called")
@@ -3,6 +3,7 @@ require_relative 'sharedcontext'
3
3
  require_relative 'shared_expectations'
4
4
  require 'vagrant-r10k/action/base'
5
5
  require 'vagrant-r10k/action/validate'
6
+ require 'r10k/errors'
6
7
 
7
8
  include SharedExpectations
8
9
 
@@ -222,7 +223,9 @@ EOF
222
223
  end
223
224
  it 'should call app.call' do
224
225
  # positive assertions
225
- allow(pf_dbl).to receive(:load).and_raise(RuntimeError)
226
+ orig = RuntimeError.new("foo")
227
+ ex = R10K::Error.wrap(orig, 'message')
228
+ allow(pf_dbl).to receive(:load).and_raise(ex)
226
229
  expect_any_instance_of(VagrantPlugins::R10k::Helpers).to receive(:r10k_enabled?).with(env).once
227
230
  expect_any_instance_of(VagrantPlugins::R10k::Helpers).to receive(:provision_enabled?).with(env).once
228
231
  expect_any_instance_of(VagrantPlugins::R10k::Helpers).to receive(:r10k_config).with(env).once
data/vagrant-r10k.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_runtime_dependency "r10k", "~> 1.2.1"
22
+ spec.add_runtime_dependency "r10k", "~> 1.5.0"
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.5"
25
25
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-r10k
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Antman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-04 00:00:00.000000000 Z
11
+ date: 2015-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: r10k
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.1
19
+ version: 1.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2.1
26
+ version: 1.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement