vagrant-omnibus 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8be4ca912ba9d90fbbe4e72f2454a2c9fd0aad29
4
+ data.tar.gz: fa884a44397422a2c1e67613f3caffd51a6f58c7
5
+ SHA512:
6
+ metadata.gz: 0ffbfba065f575bf06487a19fbb50571e396b1fae60291b1702ee6d527018d2b744de003152ffdf5035d4261243004406471becee1383538607bf6b79e91640f
7
+ data.tar.gz: af63c21ef54359d67e5245992812dc15619f581cbd5b41bf53deacc3752698bce7649e016ddc3270ee3634b1657b5c8503c14ccf2c176ee42f9dbbc457e32698
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.0.0-p353
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## 1.3.1 (March 12, 2014)
2
+
3
+ IMPROVEMENTS:
4
+
5
+ * PR [#66][]: Run install.sh with `sh` rather than `bash`. ([@tknerr][])
6
+
7
+ BUG FIXES:
8
+
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][])
11
+
1
12
  ## 1.3.0 (February 24, 2014)
2
13
 
3
14
  FEATURES:
@@ -141,6 +152,9 @@ BUG FIXES:
141
152
  [#59]: https://github.com/schisamo/vagrant-omnibus/issues/59
142
153
  [#60]: https://github.com/schisamo/vagrant-omnibus/issues/60
143
154
  [#61]: https://github.com/schisamo/vagrant-omnibus/issues/61
155
+ [#65]: https://github.com/schisamo/vagrant-omnibus/issues/65
156
+ [#66]: https://github.com/schisamo/vagrant-omnibus/issues/66
157
+ [#69]: https://github.com/schisamo/vagrant-omnibus/issues/69
144
158
  [@ampedandwired]: https://github.com/ampedandwired
145
159
  [@comutt]: https://github.com/comutt
146
160
  [@jarig]: https://github.com/jarig
@@ -152,5 +166,6 @@ BUG FIXES:
152
166
  [@schisamo]: https://github.com/schisamo
153
167
  [@smdahlen]: https://github.com/smdahlen
154
168
  [@srenatus]: https://github.com/srenatus
169
+ [@tknerr]: https://github.com/tknerr
155
170
  [@tmatilai]: https://github.com/tmatilai
156
171
  [@wizonesolutions]: https://github.com/wizonesolutions
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ 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.4.3'
9
+ gem 'vagrant', git: 'git://github.com/mitchellh/vagrant.git', tag: 'v1.5.0'
10
10
  gem 'vagrant-windows', '~> 1.5'
11
11
  end
12
12
 
@@ -91,12 +91,20 @@ module VagrantPlugins
91
91
  env.fetch(:provision_enabled, true)
92
92
  end
93
93
 
94
+ def communication_opts
95
+ if windows_guest?
96
+ { shell: 'cmd' }
97
+ else
98
+ { shell: 'sh' }
99
+ end
100
+ end
101
+
94
102
  def installed_version
95
103
  version = nil
96
- opts = nil
104
+ opts = communication_opts
97
105
  if windows_guest?
98
106
  command = 'cmd.exe /c chef-solo -v 2>&0'
99
- opts = { shell: :cmd, error_check: false }
107
+ opts[:error_check] = false
100
108
  else
101
109
  command = 'echo $(chef-solo -v)'
102
110
  end
@@ -121,11 +129,10 @@ module VagrantPlugins
121
129
  if windows_guest?
122
130
  install_cmd = "cmd.exe /c #{install_script_name} #{version}"
123
131
  else
124
- # TODO: Execute with `sh` once install.sh removes it's bash-isms.
125
132
  install_cmd =
126
- "bash #{install_script_name} -v #{shell_escaped_version} 2>&1"
133
+ "sh #{install_script_name} -v #{shell_escaped_version} 2>&1"
127
134
  end
128
- comm.sudo(install_cmd) do |type, data|
135
+ comm.sudo(install_cmd, communication_opts) do |type, data|
129
136
  if [:stderr, :stdout].include?(type)
130
137
  next if data =~ /stdin: is not a tty/
131
138
  env[:ui].info(data)
@@ -194,7 +201,18 @@ module VagrantPlugins
194
201
 
195
202
  def recover(env)
196
203
  if @script_tmp_path && File.exist?(@script_tmp_path)
197
- File.unlink(@script_tmp_path)
204
+ # Try extra hard to unlink the file so that it reliably works
205
+ # on Windows hosts as well, see:
206
+ # http://alx.github.io/2009/01/27/ruby-wundows-unlink.html
207
+ file_deleted = false
208
+ until file_deleted
209
+ begin
210
+ File.unlink(@script_tmp_path)
211
+ file_deleted = true
212
+ rescue Errno::EACCES
213
+ @logger.debug("failed to unlink #{@script_tmp_path}. retry...")
214
+ end
215
+ end
198
216
  end
199
217
  end
200
218
  end
@@ -17,6 +17,6 @@
17
17
  module VagrantPlugins
18
18
  #
19
19
  module Omnibus
20
- VERSION = '1.3.0'
20
+ VERSION = '1.3.1'
21
21
  end
22
22
  end
@@ -63,4 +63,33 @@ Vagrant.configure('2') do |config|
63
63
  chef.add_recipe 'chef-inator'
64
64
  end
65
65
  end
66
+
67
+ config.vm.define :no_bash_no_chef_run do |c|
68
+ c.vm.box = 'opscode-freebsd-9.2'
69
+ c.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_freebsd-9.2_chef-provisionerless.box'
70
+ c.omnibus.chef_version = :latest
71
+
72
+ c.vm.network 'private_network', ip: '44.44.44.10'
73
+ c.vm.synced_folder '.', '/vagrant', nfs: true, id: 'vagrant-root'
74
+ end
75
+
76
+ config.vm.define :no_bash do |c|
77
+ c.vm.box = 'opscode-freebsd-9.2'
78
+ c.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_freebsd-9.2_chef-provisionerless.box'
79
+ c.omnibus.chef_version = :latest
80
+
81
+ c.vm.network 'private_network', ip: '44.44.44.10'
82
+ c.vm.synced_folder '.', '/vagrant', nfs: true, id: 'vagrant-root'
83
+
84
+ # This forces all remote commands to execute under `sh`. If we don't
85
+ # add this config then all `chef` related commands will execute
86
+ # with `bash`.
87
+ c.ssh.shell = 'sh'
88
+
89
+ c.vm.provision :chef_solo do |chef|
90
+ chef.synced_folder_type = 'nfs'
91
+ chef.cookbooks_path = File.expand_path('../../../support/cookbooks', __FILE__)
92
+ chef.add_recipe 'chef-inator'
93
+ end
94
+ end
66
95
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-omnibus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
5
- prerelease:
4
+ version: 1.3.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Seth Chisamore
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-02-24 00:00:00.000000000 Z
11
+ date: 2014-03-12 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,49 +27,43 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rubocop
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  description: A Vagrant plugin that ensures the desired version of Chef is installed
@@ -86,6 +77,7 @@ files:
86
77
  - .gitignore
87
78
  - .rspec
88
79
  - .rubocop.yml
80
+ - .ruby-version
89
81
  - .travis.yml
90
82
  - .yardopts
91
83
  - CHANGELOG.md
@@ -113,33 +105,26 @@ files:
113
105
  homepage: https://github.com/schisamo/vagrant-omnibus
114
106
  licenses:
115
107
  - Apache 2.0
108
+ metadata: {}
116
109
  post_install_message:
117
110
  rdoc_options: []
118
111
  require_paths:
119
112
  - lib
120
113
  required_ruby_version: !ruby/object:Gem::Requirement
121
- none: false
122
114
  requirements:
123
- - - ! '>='
115
+ - - '>='
124
116
  - !ruby/object:Gem::Version
125
117
  version: '0'
126
- segments:
127
- - 0
128
- hash: 128509343253395990
129
118
  required_rubygems_version: !ruby/object:Gem::Requirement
130
- none: false
131
119
  requirements:
132
- - - ! '>='
120
+ - - '>='
133
121
  - !ruby/object:Gem::Version
134
122
  version: '0'
135
- segments:
136
- - 0
137
- hash: 128509343253395990
138
123
  requirements: []
139
124
  rubyforge_project:
140
- rubygems_version: 1.8.23
125
+ rubygems_version: 2.0.14
141
126
  signing_key:
142
- specification_version: 3
127
+ specification_version: 4
143
128
  summary: A Vagrant plugin that ensures the desired version of Chef is installed via
144
129
  the platform-specific Omnibus packages.
145
130
  test_files: