mixlib-install 3.3.0 → 3.3.1

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: 3b1656c932888d4fe4b9ab8018dc030cc981cf55
4
- data.tar.gz: 62607468ef95716b1e60b226bf210b11140704fa
3
+ metadata.gz: 9fc991d852b256ce4a6a95d7d7263fb6189bde37
4
+ data.tar.gz: 40951a053a87cbc27c3a1dbdd9aeb5cdd99ed1db
5
5
  SHA512:
6
- metadata.gz: 1948e2bb80f13534f45976eac8b0ad4fd348fdd1376585ef9ea2558ad9fd4521062429519844fa72c0404313bb9578eebd4e1aafd340ad0ff1e8c486ec399741
7
- data.tar.gz: cbb02b511bfc708c7d2302835b522163d8243a18a0c2c81f47914fb071ef6dbd49028c308741e95f46f3cb3388e65aa3d9138fee19af802fa57ef382c395288c
6
+ metadata.gz: cca181d4b9a1049457ca73f1a7104d5a341918fc1540ab7b0f0cbe8bd2f9089331021813095747fe2fc6067517419d2eac5acb66140d44fe2f9d51b22bea38ea
7
+ data.tar.gz: a68d2666633af91189bc34e943b210601382c7104430a77c73044fab65c9ced6643027d9a0cf3d18f77d7a05baa7255b2f0e8ca0668a060736388fbafb609ecb
@@ -0,0 +1,2 @@
1
+ AllCops:
2
+ TargetRubyVersion: 1.9
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  sudo: false
3
- dist: trusty # https://github.com/travis-ci/travis-ci/issues/7131
3
+ dist: precise
4
+ cache: bundler
4
5
 
5
6
  addons:
6
7
  apt:
@@ -12,8 +13,24 @@ addons:
12
13
  - unzip
13
14
  - ssh
14
15
 
16
+ before_install:
17
+ - gem install bundler
18
+ - bundle --version
19
+ - gem update --system
20
+ - gem --version
21
+
22
+ branches:
23
+ only:
24
+ - master
25
+
15
26
  matrix:
16
27
  include:
28
+ # WE SUPPORT UPGRADES OF CHEF 11.x on RUBY 1.9.3 VIA chef_client_updater COOKBOOK
29
+ - rvm: 1.9.3
30
+ bundler_args: --without chefstyle functional --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
31
+ script:
32
+ - bundle exec rake unit
33
+ - bundle exec rake functional
17
34
  - rvm: 2.0
18
35
  - rvm: 2.2
19
36
  - rvm: 2.3
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## [3.3.1]
4
+ - Add download_url_override and checksum options for powershell version of installer script
5
+ - Update powershell execution due to policy changes in Windows 8, Windows Server 2012, and Windows 8.1
6
+
3
7
  ## [3.3.0]
4
8
  - `available_versions` now returns a sorted list of versions (per mixlib-versioning)
5
9
 
data/Gemfile CHANGED
@@ -1,3 +1,25 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
+
5
+ group :test, :development do
6
+ gem "rake"
7
+ gem "rspec"
8
+ gem "vcr"
9
+ gem "webmock", "~> 2.3.2" # ruby 1.9.3
10
+ gem "addressable", "~> 2.4.0" # ruby 1.9.3
11
+ gem "aruba", "~> 0.14"
12
+ gem "cucumber", "~> 1.3.20"
13
+ end
14
+
15
+ if RUBY_VERSION =~ /^2/
16
+ group :chefstyle do
17
+ gem "chefstyle"
18
+ end
19
+ end
20
+
21
+ instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"]
22
+
23
+ # If you want to load debugging tools into the bundle exec sandbox,
24
+ # add these additional dependencies into Gemfile.local
25
+ eval(IO.read(__FILE__ + ".local"), binding) if File.exist?(__FILE__ + ".local")
data/README.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  # Mixlib::Install
4
4
 
5
+ ## Supports
6
+
7
+ - Ruby 1.9.3+
8
+ - Chef 11.6.2+ chef-client upgrades
9
+
5
10
  ## Command Line Usage
6
11
  ```
7
12
  $ gem install mixlib-install
data/Rakefile CHANGED
@@ -11,10 +11,14 @@ require "rspec/core/rake_task"
11
11
  end
12
12
  end
13
13
 
14
- require "chefstyle"
15
- require "rubocop/rake_task"
16
- RuboCop::RakeTask.new(:chefstyle) do |task|
17
- task.options << "--display-cop-names"
14
+ begin
15
+ require "chefstyle"
16
+ require "rubocop/rake_task"
17
+ RuboCop::RakeTask.new(:chefstyle) do |task|
18
+ task.options << "--display-cop-names"
19
+ end
20
+ rescue LoadError
21
+ puts "chefstyle gem is not installed"
18
22
  end
19
23
 
20
24
  namespace :travis do
@@ -148,13 +148,17 @@ module Mixlib
148
148
  # powershell.exe program with Mixlib::ShellOut
149
149
  Dir.mktmpdir do |d|
150
150
  File.open(File.join(d, "detect_platform.ps1"), "w+") do |f|
151
- f.puts self.detect_platform_ps1
151
+ f.puts detect_platform_ps1
152
152
  end
153
153
 
154
- Mixlib::ShellOut.new("powershell.exe -file #{File.join(d, "detect_platform.ps1")}").run_command
154
+ # An update to most Windows versions > 2008r2 now sets the execution policy
155
+ # to disallow unsigned powershell scripts. This changes it for just this
156
+ # powershell session, which allows this to run even if the execution policy
157
+ # is set higher.
158
+ Mixlib::ShellOut.new("powershell.exe -file #{File.join(d, "detect_platform.ps1")}", :env => { "PSExecutionPolicyPreference" => "Bypass" }).run_command
155
159
  end
156
160
  else
157
- Mixlib::ShellOut.new(self.detect_platform_sh).run_command
161
+ Mixlib::ShellOut.new(detect_platform_sh).run_command
158
162
  end
159
163
 
160
164
  platform_info = output.stdout.split
@@ -74,7 +74,7 @@ module Mixlib
74
74
  end
75
75
 
76
76
  def clone_with(data)
77
- ArtifactInfo.new(self.to_hash.merge(data))
77
+ ArtifactInfo.new(to_hash.merge(data))
78
78
  end
79
79
 
80
80
  def appx_artifact?
@@ -47,13 +47,27 @@ function Install-Project {
47
47
  [string]
48
48
  $daemon = 'auto',
49
49
  [string]
50
- $http_proxy
50
+ $http_proxy,
51
+ [string]
52
+ $download_url_override,
53
+ # Specify an alternate download url, must also include checksum
54
+ [string]
55
+ $checksum
56
+ # SHA256 checksum of the download file
57
+ # Must be present when using download_url_override
51
58
  )
52
59
 
53
60
  # Set http_proxy as env var
54
61
  $env:http_proxy = $http_proxy
55
62
 
56
- $package_metadata = Get-ProjectMetadata -project $project -channel $channel -version $version -prerelease:$prerelease -nightlies:$nightlies -architecture $architecture
63
+ if (-not [string]::IsNullOrEmpty($download_url_override)) {
64
+ $download_url = $download_url_override
65
+ $sha256 = $checksum
66
+ } else {
67
+ $package_metadata = Get-ProjectMetadata -project $project -channel $channel -version $version -prerelease:$prerelease -nightlies:$nightlies -architecture $architecture
68
+ $download_url = $package_metadata.url
69
+ $sha256 = $package_metadata.sha256
70
+ }
57
71
 
58
72
  if (-not [string]::IsNullOrEmpty($filename)) {
59
73
  $download_directory = split-path $filename
@@ -63,7 +77,7 @@ function Install-Project {
63
77
  }
64
78
  }
65
79
  else {
66
- $filename = ($package_metadata.url -split '/')[-1]
80
+ $filename = ($download_url -split '/')[-1]
67
81
  }
68
82
  Write-Verbose "Download directory: $download_directory"
69
83
  Write-Verbose "Filename: $filename"
@@ -75,18 +89,18 @@ function Install-Project {
75
89
  $download_destination = join-path $download_directory $filename
76
90
 
77
91
  if ((test-path $download_destination) -and
78
- (Test-ProjectPackage -Path $download_destination -Algorithm 'SHA256' -Hash $package_metadata.sha256 -ea SilentlyContinue)){
92
+ (Test-ProjectPackage -Path $download_destination -Algorithm 'SHA256' -Hash $sha256 -ea SilentlyContinue)){
79
93
  Write-Verbose "Found existing valid installer at $download_destination."
80
94
  }
81
95
  else {
82
- if ($pscmdlet.ShouldProcess("$($package_metadata.url)", "Download $project")) {
83
- Write-Verbose "Downloading $project from $($package_metadata.url) to $download_destination."
84
- Get-WebContent $package_metadata.url -filepath $download_destination
96
+ if ($pscmdlet.ShouldProcess("$($download_url)", "Download $project")) {
97
+ Write-Verbose "Downloading $project from $($download_url) to $download_destination."
98
+ Get-WebContent $download_url -filepath $download_destination
85
99
  }
86
100
  }
87
101
 
88
102
  if ($pscmdlet.ShouldProcess("$download_destination", "Installing")){
89
- if (Test-ProjectPackage -Path $download_destination -Algorithm 'SHA256' -Hash $package_metadata.sha256) {
103
+ if (Test-ProjectPackage -Path $download_destination -Algorithm 'SHA256' -Hash $sha256) {
90
104
  Write-Host "Installing $project from $download_destination"
91
105
  $installingProject = $True
92
106
  $installAttempts = 0
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class Install
3
- VERSION = "3.3.0"
3
+ VERSION = "3.3.1"
4
4
  end
5
5
  end
@@ -20,15 +20,4 @@ Gem::Specification.new do |spec|
20
20
  spec.add_dependency "mixlib-shellout"
21
21
  spec.add_dependency "mixlib-versioning"
22
22
  spec.add_dependency "thor"
23
-
24
- spec.add_development_dependency "aruba"
25
- spec.add_development_dependency "bundler"
26
- spec.add_development_dependency "chefstyle"
27
- spec.add_development_dependency "pry"
28
- spec.add_development_dependency "rake"
29
- spec.add_development_dependency "rb-readline"
30
- spec.add_development_dependency "rspec"
31
- spec.add_development_dependency "simplecov"
32
- spec.add_development_dependency "vcr"
33
- spec.add_development_dependency "webmock"
34
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixlib-install
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom May
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-06-01 00:00:00.000000000 Z
12
+ date: 2017-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mixlib-shellout
@@ -53,146 +53,6 @@ dependencies:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
- - !ruby/object:Gem::Dependency
57
- name: aruba
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- - !ruby/object:Gem::Dependency
71
- name: bundler
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: '0'
84
- - !ruby/object:Gem::Dependency
85
- name: chefstyle
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
- - !ruby/object:Gem::Dependency
99
- name: pry
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: '0'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
- - !ruby/object:Gem::Dependency
113
- name: rake
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - ">="
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- - !ruby/object:Gem::Dependency
127
- name: rb-readline
128
- requirement: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - ">="
131
- - !ruby/object:Gem::Version
132
- version: '0'
133
- type: :development
134
- prerelease: false
135
- version_requirements: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - ">="
138
- - !ruby/object:Gem::Version
139
- version: '0'
140
- - !ruby/object:Gem::Dependency
141
- name: rspec
142
- requirement: !ruby/object:Gem::Requirement
143
- requirements:
144
- - - ">="
145
- - !ruby/object:Gem::Version
146
- version: '0'
147
- type: :development
148
- prerelease: false
149
- version_requirements: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- version: '0'
154
- - !ruby/object:Gem::Dependency
155
- name: simplecov
156
- requirement: !ruby/object:Gem::Requirement
157
- requirements:
158
- - - ">="
159
- - !ruby/object:Gem::Version
160
- version: '0'
161
- type: :development
162
- prerelease: false
163
- version_requirements: !ruby/object:Gem::Requirement
164
- requirements:
165
- - - ">="
166
- - !ruby/object:Gem::Version
167
- version: '0'
168
- - !ruby/object:Gem::Dependency
169
- name: vcr
170
- requirement: !ruby/object:Gem::Requirement
171
- requirements:
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- version: '0'
175
- type: :development
176
- prerelease: false
177
- version_requirements: !ruby/object:Gem::Requirement
178
- requirements:
179
- - - ">="
180
- - !ruby/object:Gem::Version
181
- version: '0'
182
- - !ruby/object:Gem::Dependency
183
- name: webmock
184
- requirement: !ruby/object:Gem::Requirement
185
- requirements:
186
- - - ">="
187
- - !ruby/object:Gem::Version
188
- version: '0'
189
- type: :development
190
- prerelease: false
191
- version_requirements: !ruby/object:Gem::Requirement
192
- requirements:
193
- - - ">="
194
- - !ruby/object:Gem::Version
195
- version: '0'
196
56
  description:
197
57
  email:
198
58
  - thom@chef.io
@@ -205,6 +65,7 @@ files:
205
65
  - ".gitattributes"
206
66
  - ".gitignore"
207
67
  - ".rspec"
68
+ - ".rubocop.yml"
208
69
  - ".travis.yml"
209
70
  - CHANGELOG.md
210
71
  - CONTRIBUTING.md