Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates r10k to 2.5.0 #40

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.1
2.2.5
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ script: bundle _${BUNDLER_VERSION}_ exec rspec --color --format documentation
notifications:
email: true
rvm:
- 2.0.0
- 2.2.5
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ group :development do
gem "vagrant", git: "https://github.com/mitchellh/vagrant.git", branch: 'master'
end
# pinned to branch for https://github.com/mitchellh/vagrant-spec/pull/16
gem 'vagrant-spec', :github => 'jantman/vagrant-spec', :ref => 'junit_and_env'
gem 'vagrant-spec', :git => 'https://github.com/jantman/vagrant-spec', :ref => 'junit_and_env'
gem 'simplecov', :require => false
gem 'codecov', :require => false
gem "rspec_junit_formatter", :require => false
Expand Down
145 changes: 81 additions & 64 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
GIT
remote: git://github.com/jantman/vagrant-spec.git
remote: https://github.com/jantman/rspec-matcher-num-times.git
revision: 03409dfc6a96bb8b3c7c60d8b28ccd20b02cc8c0
branch: rspec2
specs:
rspec-matcher-num-times (0.0.1)
rspec (>= 2.0)

GIT
remote: https://github.com/jantman/vagrant-spec
revision: d85c6fd2887358b7adc145cf89a4bfb420f7f714
ref: junit_and_env
specs:
Expand All @@ -9,42 +17,34 @@ GIT
rspec (~> 2.14)
thor (~> 0.18.1)

GIT
remote: https://github.com/jantman/rspec-matcher-num-times.git
revision: 03409dfc6a96bb8b3c7c60d8b28ccd20b02cc8c0
branch: rspec2
specs:
rspec-matcher-num-times (0.0.1)
rspec (>= 2.0)

GIT
remote: https://github.com/mitchellh/vagrant.git
revision: 78ea5e4a78ce644717ab16d8001ab77430168f0f
tag: v1.7.4
revision: a3b9d231ade60868219062ceae54443b6e0e1b5b
branch: master
specs:
vagrant (1.7.4)
bundler (>= 1.5.2, <= 1.10.5)
vagrant (1.9.2.dev)
childprocess (~> 0.5.0)
erubis (~> 2.7.0)
hashicorp-checkpoint (~> 0.1.1)
i18n (>= 0.6.0, <= 0.8.0)
listen (~> 3.0.2)
listen (~> 3.1.5)
log4r (~> 1.1.9, < 1.1.11)
net-scp (~> 1.1.0)
net-sftp (~> 2.1)
net-ssh (>= 2.6.6, < 2.10.0)
nokogiri (= 1.6.3.1)
net-ssh (~> 3.0.1)
nokogiri (= 1.6.7.1)
rb-kqueue (~> 0.2.0)
rest-client (>= 1.6.0, < 2.0)
rest-client (>= 1.6.0, < 3.0)
ruby_dep (<= 1.3.1)
wdm (~> 0.1.0)
winrm (~> 1.3)
winrm-fs (~> 0.2.0)
winrm (~> 1.6)
winrm-fs (~> 0.3.0)

PATH
remote: .
specs:
vagrant-r10k (0.4.1)
r10k (~> 1.5.0)
r10k (~> 2.5.0)

GEM
remote: https://rubygems.org/
Expand All @@ -61,69 +61,82 @@ GEM
colored (~> 1.2)
diff-lcs (1.2.5)
docile (1.1.5)
domain_name (0.5.25)
domain_name (0.5.20161129)
unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.9.2)
faraday (>= 0.7.4, < 0.10)
faraday_middleware-multi_json (0.0.6)
faraday_middleware
multi_json
faraday_middleware (0.10.1)
faraday (>= 0.7.4, < 1.0)
fast_gettext (1.1.0)
ffi (1.9.10)
gettext (3.2.2)
locale (>= 2.0.5)
text (>= 1.3.0)
gettext-setup (0.10)
fast_gettext (~> 1.1.0)
gettext (>= 3.0.2)
gssapi (1.2.0)
ffi (>= 1.0.1)
gyoku (1.3.1)
builder (>= 2.1.2)
hashicorp-checkpoint (0.1.4)
http-cookie (1.0.2)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.6.0.1)
httpclient (2.8.3)
i18n (0.7.0)
json (1.8.3)
json_pure (1.8.3)
listen (3.0.3)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
little-plugger (1.1.4)
locale (2.1.2)
log4r (1.1.10)
logging (1.8.2)
little-plugger (>= 1.1.3)
multi_json (>= 1.8.4)
mime-types (2.6.2)
mini_portile (0.6.0)
multi_json (1.11.2)
logging (2.1.0)
little-plugger (~> 1.1)
multi_json (~> 1.10)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.0.0)
minitar (0.5.4)
multi_json (1.12.1)
multipart-post (2.0.0)
net-scp (1.1.2)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (2.9.2)
netrc (0.10.3)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
net-ssh (3.0.2)
netrc (0.11.0)
nokogiri (1.6.7.1)
mini_portile2 (~> 2.0.0.rc2)
nori (2.6.0)
r10k (1.5.1)
puppet_forge (2.2.2)
faraday (~> 0.9.0)
faraday_middleware (>= 0.9.0, < 0.11.0)
gettext-setup (>= 0.3)
minitar
semantic_puppet (~> 0.1.0)
r10k (2.5.1)
colored (= 1.2)
cri (~> 2.6.1)
faraday (~> 0.9.0)
faraday_middleware (~> 0.9.0)
faraday_middleware-multi_json (~> 0.0.6)
json_pure (~> 1.8)
gettext-setup (~> 0.5)
log4r (= 1.1.10)
minitar
multi_json (~> 1.10)
puppet_forge (~> 2.2)
semantic_puppet (~> 0.1.0)
rake (10.4.2)
rb-fsevent (0.9.6)
rb-inotify (0.9.5)
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rb-kqueue (0.2.4)
ffi (>= 0.5.0)
rest-client (1.8.0)
rest-client (2.0.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rspec (2.99.0)
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
Expand All @@ -135,35 +148,36 @@ GEM
rspec_junit_formatter (0.2.3)
builder (< 4)
rspec-core (>= 2, < 4, != 2.12.0)
rubyntlm (0.4.0)
rubyzip (1.1.7)
semantic_puppet (0.1.1)
ruby_dep (1.3.1)
rubyntlm (0.6.1)
rubyzip (1.2.0)
semantic_puppet (0.1.4)
gettext-setup (>= 0.3)
simplecov (0.10.0)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
text (1.3.1)
thor (0.18.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
unf_ext (0.0.7.2)
url (0.3.2)
uuidtools (2.1.5)
wdm (0.1.1)
winrm (1.3.4)
winrm (1.8.1)
builder (>= 2.1.2)
gssapi (~> 1.2)
gyoku (~> 1.0)
httpclient (~> 2.2, >= 2.2.0.2)
logging (~> 1.6, >= 1.6.1)
logging (>= 1.6.1, < 3.0)
nori (~> 2.0)
rubyntlm (~> 0.4.0)
uuidtools (~> 2.1.2)
winrm-fs (0.2.2)
rubyntlm (~> 0.6.0)
winrm-fs (0.3.2)
erubis (~> 2.7)
logging (~> 1.6, >= 1.6.1)
logging (>= 1.6.1, < 3.0)
rubyzip (~> 1.1)
winrm (~> 1.3.0)
winrm (~> 1.5)

PLATFORMS
ruby
Expand All @@ -178,3 +192,6 @@ DEPENDENCIES
vagrant!
vagrant-r10k!
vagrant-spec!

BUNDLED WITH
1.13.6
12 changes: 8 additions & 4 deletions lib/vagrant-r10k/action/deploy.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
require_relative 'base'
require 'puppet_forge'
require 'vagrant-r10k/version'

module VagrantPlugins
module R10k
module Action
# run r10k deploy
class Deploy < Base

PuppetForge.user_agent = "vagrant-r10k/#{VagrantPlugins::R10k::VERSION}"

# determine if we should run, and get config
def call(env)
@logger.debug "vagrant::r10k::deploy called"
Expand Down Expand Up @@ -39,8 +43,8 @@ def call(env)
# run the actual r10k deploy
def deploy(env, config)
@logger.debug("vagrant::r10k::deploy.deploy called")
require 'r10k/task_runner'
require 'r10k/task/puppetfile'
require 'r10k/action/runner'
require 'r10k/action/puppetfile'

env[:ui].info "vagrant-r10k: Beginning r10k deploy of puppet modules into #{config[:module_path]} using #{config[:puppetfile_path]}"

Expand All @@ -58,8 +62,8 @@ def deploy(env, config)
runner = R10K::TaskRunner.new([])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class doesn't seem to exist anymore. It seems that, despite what the spec tests say, this code doesn't run at all.

I'm going to have to do some work on it, but it appears the internals of R10K have changed a lot more than we thought...

begin
puppetfile = get_puppetfile(config)
@logger.debug("vagrant-r10k: creating Puppetfile::Sync task")
task = R10K::Task::Puppetfile::Sync.new(puppetfile)
@logger.debug("vagrant-r10k: creating R10K::Action::Puppetfile::Install task")
task = R10K::Action::Puppetfile::Install(puppetfile)
@logger.debug("vagrant-r10k: appending task to runner queue")
runner.append_task task
@logger.debug("vagrant-r10k: running sync task")
Expand Down
14 changes: 7 additions & 7 deletions spec/unit/action_deploy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require_relative 'shared_expectations'
require 'vagrant-r10k/action/base'
require 'vagrant-r10k/action/deploy'
require 'r10k/task/puppetfile'
require 'r10k/action/puppetfile'
require 'r10k/git/errors'
require 'r10k/errors'

Expand Down Expand Up @@ -235,7 +235,7 @@
allow(runner_dbl).to receive(:succeeded?).and_return(true)
allow(sync_dbl).to receive(:new).with(puppetfile_dbl)
R10K::TaskRunner.stub(:new) { runner_dbl }
R10K::Task::Puppetfile::Sync.stub(:new) { sync_dbl }
R10K::Action::Puppetfile::Install.stub(:new) { sync_dbl }
# expectations
expect(R10K::Logging).to receive(:level=).with('info').twice
expect(ui).to receive(:info).with("vagrant-r10k: Beginning r10k deploy of puppet modules into module/path using puppetfile/path")
Expand Down Expand Up @@ -290,7 +290,7 @@
allow(runner_dbl).to receive(:succeeded?).and_return(true)
allow(sync_dbl).to receive(:new).with(puppetfile_dbl)
R10K::TaskRunner.stub(:new) { runner_dbl }
R10K::Task::Puppetfile::Sync.stub(:new) { sync_dbl }
R10K::Action::Puppetfile::Install.stub(:new) { sync_dbl }
# expectations
expect(R10K::Logging).to receive(:level=).with('debug').twice
expect(ui).to receive(:info).with("vagrant-r10k: Beginning r10k deploy of puppet modules into module/path using puppetfile/path")
Expand Down Expand Up @@ -344,7 +344,7 @@
allow(runner_dbl).to receive(:succeeded?).and_return(true)
allow(sync_dbl).to receive(:new).with(puppetfile_dbl)
R10K::TaskRunner.stub(:new) { runner_dbl }
R10K::Task::Puppetfile::Sync.stub(:new) { sync_dbl }
R10K::Action::Puppetfile::Install.stub(:new) { sync_dbl }
# expectations
expect(ui).to receive(:info).with("vagrant-r10k: Beginning r10k deploy of puppet modules into module/path using puppetfile/path")
logger = subject.instance_variable_get(:@logger)
Expand Down Expand Up @@ -404,7 +404,7 @@
]])
allow(sync_dbl).to receive(:new).with(puppetfile_dbl)
R10K::TaskRunner.stub(:new) { runner_dbl }
R10K::Task::Puppetfile::Sync.stub(:new) { sync_dbl }
R10K::Action::Puppetfile::Install.stub(:new) { sync_dbl }
# expectations
expect(R10K::Logging).to receive(:level=).with('info').twice
expect(ui).to receive(:info).with("vagrant-r10k: Beginning r10k deploy of puppet modules into module/path using puppetfile/path")
Expand Down Expand Up @@ -465,7 +465,7 @@
]])
allow(sync_dbl).to receive(:new).with(puppetfile_dbl)
R10K::TaskRunner.stub(:new) { runner_dbl }
R10K::Task::Puppetfile::Sync.stub(:new) { sync_dbl }
R10K::Action::Puppetfile::Install.stub(:new) { sync_dbl }
# expectations
expect(R10K::Logging).to receive(:level=).with('info').twice
expect(ui).to receive(:info).with("vagrant-r10k: Beginning r10k deploy of puppet modules into module/path using puppetfile/path")
Expand Down Expand Up @@ -525,7 +525,7 @@
allow(runner_dbl).to receive(:run).and_raise(ex)
allow(sync_dbl).to receive(:new).with(puppetfile_dbl)
R10K::TaskRunner.stub(:new) { runner_dbl }
R10K::Task::Puppetfile::Sync.stub(:new) { sync_dbl }
R10K::Action::Puppetfile::Install.stub(:new) { sync_dbl }
# expectations
expect(R10K::Logging).to receive(:level=).with('info').twice
expect(ui).to receive(:info).with("vagrant-r10k: Beginning r10k deploy of puppet modules into module/path using puppetfile/path")
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/shared_expectations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ def expect_ran_successfully(vars)
expect(vars[:ui]).to receive(:info).with(/Beginning r10k deploy/).once
R10K::Puppetfile.stub(:new)
expect(R10K::Puppetfile).to receive(:new).with(full_puppet_dir, full_module_path, full_puppetfile_path).once
R10K::Task::Puppetfile::Sync.stub(:new).and_call_original
expect(R10K::Task::Puppetfile::Sync).to receive(:new).once
R10K::Action::Puppetfile::Install.stub(:new).and_call_original
expect(R10K::Action::Puppetfile::Install).to receive(:new).once
runner = R10K::TaskRunner.new([])
R10K::TaskRunner.stub(:new).and_return(runner)
R10K::TaskRunner.stub(:append_task).and_call_original
Expand Down
2 changes: 1 addition & 1 deletion vagrant-r10k.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_runtime_dependency "r10k", "~> 1.5.0"
spec.add_runtime_dependency "r10k", "~> 2.5.0"

spec.add_development_dependency "bundler", "~> 1.5"
spec.add_development_dependency "rake"
Expand Down