vagrant-omnibus 1.3.1 → 1.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: 8be4ca912ba9d90fbbe4e72f2454a2c9fd0aad29
4
- data.tar.gz: fa884a44397422a2c1e67613f3caffd51a6f58c7
3
+ metadata.gz: 6339ef7c56ffa23086bb1c674794b06895f19b82
4
+ data.tar.gz: 81e5e0ddb782126e02dfb47882c2b79c49b39510
5
5
  SHA512:
6
- metadata.gz: 0ffbfba065f575bf06487a19fbb50571e396b1fae60291b1702ee6d527018d2b744de003152ffdf5035d4261243004406471becee1383538607bf6b79e91640f
7
- data.tar.gz: af63c21ef54359d67e5245992812dc15619f581cbd5b41bf53deacc3752698bce7649e016ddc3270ee3634b1657b5c8503c14ccf2c176ee42f9dbbc457e32698
6
+ metadata.gz: 70c581641b0fb84bcf7c4c91b6287db28988a041729c45937f05d4f1082adfb39564c84e99e0d19847b213fb5e65c58e7edc157667ceffd6f60fd97604509a97
7
+ data.tar.gz: 500f99fd96188356ed034b093665ccc1704d02e1d0140c18a402eb65f844a2d27974855ee08294796b208336b79a9e1a11bf5f7c494f844ab6628bf9d9ed73aa
@@ -1,8 +1,8 @@
1
- language: ruby
2
- bundler_args: --without=acceptance
3
1
  rvm:
4
- - 1.9.3
5
2
  - 2.0.0
6
3
  - 2.1.0
4
+
5
+ bundler_args: --jobs 7 --without=acceptance
6
+
7
7
  script:
8
- - rake travis:ci
8
+ - bundle exec rake travis:ci
@@ -1,122 +1,137 @@
1
- ## 1.3.1 (March 12, 2014)
1
+ Chef Sugar Changelog
2
+ ====================
3
+ This file is used to list changes made in each version of the vagrant-omnibus plugin.
2
4
 
3
- IMPROVEMENTS:
5
+ 1.4.0 (April 25, 2014)
6
+ -------------------------
7
+ ### New Features
4
8
 
5
- * PR [#66][]: Run install.sh with `sh` rather than `bash`. ([@tknerr][])
9
+ - PR [#73][]: Full caching of omnibus package downloads! Huge thanks to [@tknerr][] for all all his Herculean effort coordinating this fix in [vagrant-cachier/#13](https://github.com/fgrehm/vagrant-cachier/issues/13) and [opscode-omnitruck/#3](https://github.com/opscode/opscode-omnitruck/pull/33).
6
10
 
7
- BUG FIXES:
11
+ ### Bug Fixes
8
12
 
9
- * PR [#65][]: Make unlinking the install.sh reliably work on windows hosts. ([@tknerr][])
10
- * Issue [#69][]: Ensure all remote commands are executed with `sh`. ([@schisamo][])
13
+ - PR [#67][]: No-op validation if `config.omnibus.chef_version` is `nil`. ([@skv-headless][])
11
14
 
12
- ## 1.3.0 (February 24, 2014)
15
+ 1.3.1 (March 12, 2014)
16
+ ----------------------
17
+ ### Improvements
13
18
 
14
- FEATURES:
19
+ - PR [#66][]: Run install.sh with `sh` rather than `bash`. ([@tknerr][])
15
20
 
16
- * PR [#59][], PR [#60][]: Windows guest support! ([@jarig][])([@schisamo][])
21
+ ### Bug Fixes
17
22
 
18
- IMPROVEMENTS:
23
+ - PR [#65][]: Make unlinking the install.sh reliably work on windows hosts. ([@tknerr][])
24
+ - Issue [#69][]: Ensure all remote commands are executed with `sh`. ([@schisamo][])
19
25
 
20
- * PR [#61][]: Make detection of currently installed Chef version more robust. ([@ampedandwired][])
21
- * Create explicit tasks for supported provider acceptance tests. ([@schisamo][])
22
- * Add Ruby 2.1.0 to the Travis CI test matrix. ([@schisamo][])
26
+ 1.3.0 (February 24, 2014)
27
+ -------------------------
28
+ ### New Features
23
29
 
24
- BUG FIXES:
30
+ - PR [#59][], PR [#60][]: Windows guest support! ([@jarig][])([@schisamo][])
25
31
 
26
- * Issue [#13][]: Perform config validation at action execution time. ([@schisamo][])
32
+ ### Improvements
27
33
 
28
- ## 1.2.1 (December 17, 2013)
34
+ - PR [#61][]: Make detection of currently installed Chef version more robust. ([@ampedandwired][])
35
+ - Create explicit tasks for supported provider acceptance tests. ([@schisamo][])
36
+ - Add Ruby 2.1.0 to the Travis CI test matrix. ([@schisamo][])
29
37
 
30
- IMPROVEMENTS:
38
+ ### Bug Fixes
31
39
 
32
- * Acceptance test coverage that verifies Chef is not reinstalled into a system where the desired version of Chef already exists. ([@schisamo][])
40
+ - Issue [#13][]: Perform config validation at action execution time. ([@schisamo][])
33
41
 
34
- BUG FIXES:
42
+ 1.2.1 (December 17, 2013)
43
+ -------------------------
44
+ ### Improvements
35
45
 
36
- * PR [#57][]: Filter `stdin is not a tty` when querying installed Chef version. ([@scalp42][])
46
+ - Acceptance test coverage that verifies Chef is not reinstalled into a system where the desired version of Chef already exists. ([@schisamo][])
37
47
 
38
- ## 1.2.0 (December 17, 2013)
48
+ ### Bug Fixes
39
49
 
40
- FEATURES:
50
+ - PR [#57][]: Filter `stdin is not a tty` when querying installed Chef version. ([@scalp42][])
41
51
 
42
- * PR [#52][]: Change plugin name to correspond to gem name. ([@tmatilai][])
52
+ 1.2.0 (December 17, 2013)
53
+ -------------------------
54
+ ### New Features
43
55
 
44
- IMPROVEMENTS:
56
+ - PR [#52][]: Change plugin name to correspond to gem name. ([@tmatilai][])
45
57
 
46
- * PR [#48][]: Don't install Chef if `--no-provision` is specified. ([@tmatilai][])
47
- * PR [#50][]: Update README.md with vagrant-parallels compatibility. ([@wizonesolutions][])
48
- * PR [#56][]: Add Rubocop support and fix style errors. ([@schisamo][])
58
+ ### Improvements
49
59
 
50
- BUG FIXES:
60
+ - PR [#48][]: Don't install Chef if `--no-provision` is specified. ([@tmatilai][])
61
+ - PR [#50][]: Update README.md with vagrant-parallels compatibility. ([@wizonesolutions][])
62
+ - PR [#56][]: Add Rubocop support and fix style errors. ([@schisamo][])
51
63
 
52
- * Issue [#12][]: Ensure plugin is no-op on Windows guests. ([@schisamo][])
53
- * PR [#53][]: Ensure installed version check works on all platforms. ([@comutt][])
64
+ ### Bug Fixes
54
65
 
55
- ## 1.1.2 (October 17, 2013)
66
+ - Issue [#12][]: Ensure plugin is no-op on Windows guests. ([@schisamo][])
67
+ - PR [#53][]: Ensure installed version check works on all platforms. ([@comutt][])
56
68
 
57
- IMPROVEMENTS:
69
+ 1.1.2 (October 17, 2013)
70
+ ------------------------
71
+ ### Improvements
58
72
 
59
- * PR [#41][]: Add vagrant-digitalocean to the list of supported providers. ([@tmatilai][])
60
- * PR [#45][]: Compatibility with vagrant-aws v0.4.0 ([@tmatilai][])
61
- * Use Vagrant's built in `Vagrant::Util::Downloader` class; removes requirement of the
73
+ - PR [#41][]: Add vagrant-digitalocean to the list of supported providers. ([@tmatilai][])
74
+ - PR [#45][]: Compatibility with vagrant-aws v0.4.0 ([@tmatilai][])
75
+ - Use Vagrant's built in `Vagrant::Util::Downloader` class; removes requirement of the
62
76
  guest OS having `wget` or `curl` installed. ([@schisamo][])
63
77
 
64
- BUG FIXES:
78
+ ### Bug Fixes
65
79
 
66
- * PR [#43][]: Fix development dependencies and Travis tests. ([@tmatilai][])
67
- * Issue [#33][] Split fetching of `install.sh` from the actual execution ([@schisamo][])
80
+ - PR [#43][]: Fix development dependencies and Travis tests. ([@tmatilai][])
81
+ - Issue [#33][] Split fetching of `install.sh` from the actual execution ([@schisamo][])
68
82
 
69
- ## 1.1.1 (September 4, 2013)
83
+ 1.1.1 (September 4, 2013)
84
+ -------------------------
85
+ ### Bug Fixes
70
86
 
71
- BUG FIXES:
87
+ - PR [#28][]: Include OpenStack provider into the list of working providers. ([@srenatus][])
88
+ - PR [#32][], Issue [#31][]: No need to do sudo in sudo ([@matsu911][])
89
+ - PR [#32][], Issue [#32][]: Fix the curl line to install the requested Chef version ([@tmatilai][])
90
+ - PR [#37][]: Document that newer than v1.1.x Vagrant is fine, too. ([@tmatilai][])
91
+ - PR [#38][]: Drop unneeded ConfigValidate action call ([@tmatilai][])
92
+ - Issue [#27][]: Properly shell escape version strings ([@schisamo][])
72
93
 
73
- * PR [#28][]: Include OpenStack provider into the list of working providers. ([@srenatus][])
74
- * PR [#32][], Issue [#31][]: No need to do sudo in sudo ([@matsu911][])
75
- * PR [#32][], Issue [#32][]: Fix the curl line to install the requested Chef version ([@tmatilai][])
76
- * PR [#37][]: Document that newer than v1.1.x Vagrant is fine, too. ([@tmatilai][])
77
- * PR [#38][]: Drop unneeded ConfigValidate action call ([@tmatilai][])
78
- * Issue [#27][]: Properly shell escape version strings ([@schisamo][])
94
+ 1.1.0 (June 21, 2013)
95
+ ---------------------
96
+ ### New Features
79
97
 
80
- ## 1.1.0 (June 21, 2013)
98
+ - PR [#23][], Issue [#17][], Issue [#19][], Issue [#21][], Issue [#23][]: Support for all Vagrant providers that hook into `Vagrant::Action::Builtin::Provision` for provisioning. ([@smdahlen][], [@michfield][], [@rjocoleman][])
99
+ - Issue [#15][]: Multi-VM Vagrantfiles are now fully supported. A global `omnibus.chef_version` will install the same version of Chef on all VMs OR declare a separate Chef version in the config block for each individual VM! ([@smdahlen][], [@schisamo][])
100
+ - PR [#10][]: Optionally change the location of `install.sh` via the `OMNIBUS_INSTALL_URL` environment variable. Default is still https://www.opscode.com/chef/install.sh. , ([@petecheslock][])
81
101
 
82
- FEATURES:
102
+ 1.0.2 (April 20, 2013)
103
+ ----------------------
104
+ ### Improvements
83
105
 
84
- * PR [#23][], Issue [#17][], Issue [#19][], Issue [#21][], Issue [#23][]: Support for all Vagrant providers that hook into `Vagrant::Action::Builtin::Provision` for provisioning. ([@smdahlen][], [@michfield][], [@rjocoleman][])
85
- * Issue [#15][]: Multi-VM Vagrantfiles are now fully supported. A global `omnibus.chef_version` will install the same version of Chef on all VMs OR declare a separate Chef version in the config block for each individual VM! ([@smdahlen][], [@schisamo][])
86
- * PR [#10][]: Optionally change the location of `install.sh` via the `OMNIBUS_INSTALL_URL` environment variable. Default is still https://www.opscode.com/chef/install.sh. , ([@petecheslock][])
106
+ - Unit test coverage for `VagrantPlugins::Omnibus::Config` ([@schisamo][])
107
+ - Add Rackspace provider acceptance test. ([@schisamo][])
108
+ - Parameterize the acceptance test Rake task, this allows you test run acceptance tests against a single provider. ([@schisamo][])
87
109
 
88
- ## 1.0.2 (April 20, 2013)
110
+ ### Bug Fixes
89
111
 
90
- IMPROVEMENTS:
112
+ - Issue [#2][]: Convert `Gem::Version` returned by `#retrieve_latest_chef_version` to a string. ([@schisamo][])
113
+ - Issue [#6][]: RubyGems 2.0 compat: use #empty? to check for results. ([@schisamo][])
114
+ - Issue [#7][]: Ensure 'vagrant-rackspace/action' is loaded. ([@schisamo][])
115
+ - Issue [#8][]: Trigger plugin if machine state is `:active`. ([@schisamo][])
91
116
 
92
- * Unit test coverage for `VagrantPlugins::Omnibus::Config` ([@schisamo][])
93
- * Add Rackspace provider acceptance test. ([@schisamo][])
94
- * Parameterize the acceptance test Rake task, this allows you test run acceptance tests against a single provider. ([@schisamo][])
117
+ 1.0.1 (April 17, 2013)
118
+ ----------------------
119
+ ### Improvements
95
120
 
96
- BUG FIXES:
121
+ - Issue [#2][]: Resolve `latest` to a real Chef version. This ensures the plugin does not attempt to re-install Chef on subsequent provisions. ([@schisamo][])
122
+ - Issue [#4][]: Validate user provided value for omnibus.chef_version is in fact a real Chef version. ([@schisamo][])
123
+ - Retrieve omnibus.chef_version directly from global config. ([@schisamo][])
124
+ - Update development dependencies to vagrant (1.2.1) and vagrant-aws (0.2.1). ([@schisamo][])
97
125
 
98
- * Issue [#2][]: Convert `Gem::Version` returned by `#retrieve_latest_chef_version` to a string. ([@schisamo][])
99
- * Issue [#6][]: RubyGems 2.0 compat: use #empty? to check for results. ([@schisamo][])
100
- * Issue [#7][]: Ensure 'vagrant-rackspace/action' is loaded. ([@schisamo][])
101
- * Issue [#8][]: Trigger plugin if machine state is `:active`. ([@schisamo][])
126
+ ### Bug Fixes
102
127
 
103
- ## 1.0.1 (April 17, 2013)
128
+ - Issue [#3][]: Plugin now correctly operates in "no-op" node if now `omnibus.chef_version` is not present in the Vagrantfile. ([@schisamo][])
129
+ - Use Ubuntu 12.04 release AMI for acceptance testing. ([@schisamo][])
104
130
 
105
- IMPROVEMENTS:
131
+ 1.0.0 (April 1, 2013)
132
+ ---------------------
106
133
 
107
- * Issue [#2][]: Resolve `latest` to a real Chef version. This ensures the plugin does not attempt to re-install Chef on subsequent provisions. ([@schisamo][])
108
- * Issue [#4][]: Validate user provided value for omnibus.chef_version is in fact a real Chef version. ([@schisamo][])
109
- * Retrieve omnibus.chef_version directly from global config. ([@schisamo][])
110
- * Update development dependencies to vagrant (1.2.1) and vagrant-aws (0.2.1). ([@schisamo][])
111
-
112
- BUG FIXES:
113
-
114
- * Issue [#3][]: Plugin now correctly operates in "no-op" node if now `omnibus.chef_version` is not present in the Vagrantfile. ([@schisamo][])
115
- * Use Ubuntu 12.04 release AMI for acceptance testing. ([@schisamo][])
116
-
117
- ## 1.0.0 (April 1, 2013)
118
-
119
- * The initial release.
134
+ - The initial release.
120
135
 
121
136
  <!--- The following link definition list is generated by PimpMyChangelog --->
122
137
  [#2]: https://github.com/schisamo/vagrant-omnibus/issues/2
@@ -154,7 +169,9 @@ BUG FIXES:
154
169
  [#61]: https://github.com/schisamo/vagrant-omnibus/issues/61
155
170
  [#65]: https://github.com/schisamo/vagrant-omnibus/issues/65
156
171
  [#66]: https://github.com/schisamo/vagrant-omnibus/issues/66
172
+ [#67]: https://github.com/schisamo/vagrant-omnibus/issues/67
157
173
  [#69]: https://github.com/schisamo/vagrant-omnibus/issues/69
174
+ [#73]: https://github.com/schisamo/vagrant-omnibus/issues/73
158
175
  [@ampedandwired]: https://github.com/ampedandwired
159
176
  [@comutt]: https://github.com/comutt
160
177
  [@jarig]: https://github.com/jarig
@@ -164,8 +181,9 @@ BUG FIXES:
164
181
  [@rjocoleman]: https://github.com/rjocoleman
165
182
  [@scalp42]: https://github.com/scalp42
166
183
  [@schisamo]: https://github.com/schisamo
184
+ [@skv-headless]: https://github.com/skv-headless
167
185
  [@smdahlen]: https://github.com/smdahlen
168
186
  [@srenatus]: https://github.com/srenatus
169
187
  [@tknerr]: https://github.com/tknerr
170
188
  [@tmatilai]: https://github.com/tmatilai
171
- [@wizonesolutions]: https://github.com/wizonesolutions
189
+ [@wizonesolutions]: https://github.com/wizonesolutions
data/Gemfile CHANGED
@@ -6,8 +6,8 @@ group :development do
6
6
  # We depend on Vagrant for development, but we don't add it as a
7
7
  # gem dependency because we expect to be installed within the
8
8
  # Vagrant environment itself using `vagrant plugin`.
9
- gem 'vagrant', git: 'git://github.com/mitchellh/vagrant.git', tag: 'v1.5.0'
10
- gem 'vagrant-windows', '~> 1.5'
9
+ gem 'vagrant', git: 'git://github.com/mitchellh/vagrant.git', tag: 'v1.5.4'
10
+ gem 'vagrant-windows', '~> 1.6.0'
11
11
  end
12
12
 
13
13
  group :acceptance do
data/README.md CHANGED
@@ -66,6 +66,34 @@ Vagrant.configure("2") do |config|
66
66
  end
67
67
  ```
68
68
 
69
+ Specify a custom install script:
70
+
71
+ ```ruby
72
+ Vagrant.configure("2") do |config|
73
+
74
+ config.omnibus.install_url = 'http://acme.com/install.sh'
75
+ # config.omnibus.install_url = 'http://acme.com/install.msi'
76
+ # config.omnibus.install_url = '/some/path/on/the/host'
77
+
78
+ ...
79
+
80
+ end
81
+ ```
82
+
83
+ If [vagrant-cachier](https://github.com/fgrehm/vagrant-cachier) is present
84
+ and `config.cache.auto_detect` enabled the downloaded omnibus packages will
85
+ be cached by vagrant-cachier. In case you want to turn caching off:
86
+
87
+ ```ruby
88
+ Vagrant.configure("2") do |config|
89
+
90
+ config.omnibus.cache_packages = false
91
+
92
+ ...
93
+
94
+ end
95
+ ```
96
+
69
97
  This plugin is also multi-vm aware so it would possible to say install a
70
98
  different version of Chef on each VM:
71
99
 
data/Rakefile CHANGED
@@ -54,6 +54,7 @@ namespace :test do
54
54
  unless system("vagrant box list | grep 'digital_ocean' &>/dev/null")
55
55
  system('vagrant box add digital_ocean https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box')
56
56
  end
57
+ run_acceptance_tests('digital_ocean')
57
58
  end
58
59
 
59
60
  desc 'Run acceptance tests with Rackspace provider'
@@ -61,7 +62,7 @@ namespace :test do
61
62
  unless system("vagrant box list | grep 'dummy\s*(rackspace)' &>/dev/null")
62
63
  system('vagrant box add dummy https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box')
63
64
  end
64
- run_acceptance_tests('aws')
65
+ run_acceptance_tests('rackspace')
65
66
  end
66
67
 
67
68
  desc 'Run acceptance tests with VirtualBox provider'
@@ -63,18 +63,51 @@ module VagrantPlugins
63
63
 
64
64
  private
65
65
 
66
- # Determines what flavor of install script should be used to
67
- # install Omnibus Chef package.
66
+ # Determines which install script should be used to install the
67
+ # Omnibus Chef package. Order of precedence:
68
+ # 1. from config
69
+ # 2. from env var
70
+ # 3. default
68
71
  def find_install_script
69
- if !ENV['OMNIBUS_INSTALL_URL'].nil?
70
- ENV['OMNIBUS_INSTALL_URL']
71
- elsif windows_guest?
72
+ config_install_url || env_install_url || default_install_url
73
+ end
74
+
75
+ def default_install_url
76
+ if windows_guest?
72
77
  'http://www.getchef.com/chef/install.msi'
73
78
  else
74
79
  'https://www.getchef.com/chef/install.sh'
75
80
  end
76
81
  end
77
82
 
83
+ def config_install_url
84
+ @machine.config.omnibus.install_url
85
+ end
86
+
87
+ def env_install_url
88
+ ENV['OMNIBUS_INSTALL_URL']
89
+ end
90
+
91
+ def cached_omnibus_download_dir
92
+ '/tmp/vagrant-cache/vagrant_omnibus'
93
+ end
94
+
95
+ def cache_packages?
96
+ @machine.config.omnibus.cache_packages
97
+ end
98
+
99
+ def cachier_present?
100
+ defined?(VagrantPlugins::Cachier::Plugin)
101
+ end
102
+
103
+ def cachier_autodetect_enabled?
104
+ @machine.config.cache.auto_detect
105
+ end
106
+
107
+ def download_to_cached_dir?
108
+ cache_packages? && cachier_present? && cachier_autodetect_enabled?
109
+ end
110
+
78
111
  def install_script_name
79
112
  if windows_guest?
80
113
  'install.bat'
@@ -129,8 +162,12 @@ module VagrantPlugins
129
162
  if windows_guest?
130
163
  install_cmd = "cmd.exe /c #{install_script_name} #{version}"
131
164
  else
132
- install_cmd =
133
- "sh #{install_script_name} -v #{shell_escaped_version} 2>&1"
165
+ install_cmd = "sh #{install_script_name}"
166
+ install_cmd << " -v #{shell_escaped_version}"
167
+ if download_to_cached_dir?
168
+ install_cmd << " -d #{cached_omnibus_download_dir}"
169
+ end
170
+ install_cmd << ' 2>&1'
134
171
  end
135
172
  comm.sudo(install_cmd, communication_opts) do |type, data|
136
173
  if [:stderr, :stdout].include?(type)
@@ -27,10 +27,12 @@ module VagrantPlugins
27
27
  class Config < Vagrant.plugin('2', :config)
28
28
  # @return [String]
29
29
  # The version of Chef to install.
30
- attr_accessor :chef_version
30
+ attr_accessor :chef_version, :install_url, :cache_packages
31
31
 
32
32
  def initialize
33
33
  @chef_version = UNSET_VALUE
34
+ @install_url = UNSET_VALUE
35
+ @cache_packages = UNSET_VALUE
34
36
  @logger = Log4r::Logger.new('vagrantplugins::omnibus::config')
35
37
  end
36
38
 
@@ -41,6 +43,10 @@ module VagrantPlugins
41
43
  # resolve `latest` to a real version
42
44
  @chef_version = retrieve_latest_chef_version
43
45
  end
46
+ # enable caching by default
47
+ @cache_packages = true if @cache_packages == UNSET_VALUE
48
+ # nil means default install.sh|msi
49
+ @install_url = nil if @install_url == UNSET_VALUE
44
50
  end
45
51
 
46
52
  #
@@ -54,7 +60,7 @@ module VagrantPlugins
54
60
  finalize!
55
61
  errors = []
56
62
 
57
- unless valid_chef_version?(chef_version)
63
+ if !chef_version.nil? && !valid_chef_version?(chef_version)
58
64
  msg = <<-EOH
59
65
  '#{ chef_version }' is not a valid version of Chef.
60
66
 
@@ -17,6 +17,6 @@
17
17
  module VagrantPlugins
18
18
  #
19
19
  module Omnibus
20
- VERSION = '1.3.1'
20
+ VERSION = '1.4.0'
21
21
  end
22
22
  end
@@ -15,12 +15,16 @@ describe VagrantPlugins::Omnibus::Config do
15
15
  subject(:config) do
16
16
  instance.tap do |o|
17
17
  o.chef_version = chef_version if defined?(chef_version)
18
+ o.install_url = install_url if defined?(install_url)
19
+ o.cache_packages = cache_packages if defined?(cache_packages)
18
20
  o.finalize!
19
21
  end
20
22
  end
21
23
 
22
24
  describe 'defaults' do
23
25
  its(:chef_version) { should be_nil }
26
+ its(:install_url) { should be_nil }
27
+ its(:cache_packages) { should be_true }
24
28
  end
25
29
 
26
30
  describe 'resolving `:latest` to a real Chef version' do
@@ -29,6 +33,26 @@ describe VagrantPlugins::Omnibus::Config do
29
33
  its(:chef_version) { should match(/\d*\.\d*\.\d*/) }
30
34
  end
31
35
 
36
+ describe 'setting a custom `install_url`' do
37
+ let(:install_url) { 'http://some_path.com/install.sh' }
38
+ its(:install_url) { should eq('http://some_path.com/install.sh') }
39
+ end
40
+
41
+ describe 'the `cache_packages` config option behaves truthy' do
42
+ [true, 'something', :cachier].each do |obj|
43
+ describe "when `#{obj}` (#{obj.class})" do
44
+ let(:cache_packages) { obj }
45
+ its(:cache_packages) { should be_true }
46
+ end
47
+ end
48
+ [nil, false].each do |obj|
49
+ describe "when `#{obj}` (#{obj.class})" do
50
+ let(:cache_packages) { obj }
51
+ its(:cache_packages) { should be_false }
52
+ end
53
+ end
54
+ end
55
+
32
56
  describe 'validate' do
33
57
  it 'should be no-op' do
34
58
  expect(subject.validate(machine)).to eq('VagrantPlugins::Omnibus::Config' => [])
@@ -65,6 +89,13 @@ describe VagrantPlugins::Omnibus::Config do
65
89
  end
66
90
  end
67
91
  end # describe chef_version
68
- end # describe #validate
69
92
 
93
+ describe 'not specified chef_version validation' do
94
+ it 'passes' do
95
+ Gem::DependencyInstaller.any_instance.stub(:find_gems_with_sources).and_return([])
96
+ expect { subject.validate!(machine) }.to_not raise_error
97
+ end
98
+ end # describe not specified chef_version validation
99
+
100
+ end # describe #validate
70
101
  end
@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency 'bundler', '~> 1.3'
24
24
  spec.add_development_dependency 'rake'
25
25
  spec.add_development_dependency 'rspec'
26
- spec.add_development_dependency 'rubocop'
26
+ spec.add_development_dependency 'rubocop', '0.18.1'
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-omnibus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Chisamore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-12 00:00:00.000000000 Z
11
+ date: 2014-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.18.1
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 0.18.1
69
69
  description: A Vagrant plugin that ensures the desired version of Chef is installed
70
70
  via the platform-specific Omnibus packages.
71
71
  email: