mixlib-install 3.11.24 → 3.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88153f6c3874e4dad6b3442bf58e6993bdbc6e7a7294122059a9108afc640b64
4
- data.tar.gz: c76a01c96566172ce05459abc5e3d506aa58210457b4b799979c5067db1f0ca2
3
+ metadata.gz: e9292398c41cc34a46a603c508a55b865da85bf161780dc19892fe9ae3607319
4
+ data.tar.gz: 767131ab311ea5ef51c3aef89f40beca0634aabacb6d0c4cdd60a9ba233cec49
5
5
  SHA512:
6
- metadata.gz: 867e2d785267ec1c30d7251c05b2617b85c08da5351014c0604817d3612f43130dcd8a1c06d92e5e6431f165a87dcadea2ec38e2702c33a418895151182353c0
7
- data.tar.gz: 792973fe4e00a2990b5b562cfa88e48aa26d7f5d6bf73483534aeb3e4cab2f1a46c259eb711e7905933681f0af4e518ef478219f7238b6149b96e7b30301ad1a
6
+ metadata.gz: f1c4f472513b0f4a61463f6314781f59c088b934a5ac8a9f812152dc4ae70f25647ce164e9856f4f7dc62ec4c3eccb3c34ddda2a990c56f1368476d25cc8e8dc
7
+ data.tar.gz: b6d9ff5a37a56484aa7028aa61421ffde2a6acd2f32d97cde6abfed658c74cb63402999b98d28f5e2d3999102ac8b9ff3aa868da7bef1afd5b33568e24c28cba
data/Gemfile CHANGED
@@ -27,6 +27,6 @@ end
27
27
  group :debug do
28
28
  gem "pry"
29
29
  gem "pry-byebug"
30
- gem "pry-stack_explorer"
30
+ gem "pry-stack_explorer", "~> 0.4.0" # pin until we drop ruby < 2.6
31
31
  gem "rb-readline"
32
32
  end
@@ -18,13 +18,13 @@
18
18
  #
19
19
 
20
20
  require "mixlib/versioning"
21
- require "mixlib/shellout"
21
+ require "mixlib/shellout" unless defined?(Mixlib::ShellOut)
22
22
 
23
- require "mixlib/install/backend"
24
- require "mixlib/install/options"
25
- require "mixlib/install/generator"
26
- require "mixlib/install/generator/bourne"
27
- require "mixlib/install/generator/powershell"
23
+ require_relative "install/backend"
24
+ require_relative "install/options"
25
+ require_relative "install/generator"
26
+ require_relative "install/generator/bourne"
27
+ require_relative "install/generator/powershell"
28
28
 
29
29
  module Mixlib
30
30
  class Install
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require "mixlib/install/backend/package_router"
19
+ require_relative "backend/package_router"
20
20
 
21
21
  module Mixlib
22
22
  class Install
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require "mixlib/install/util"
19
+ require_relative "../util"
20
20
 
21
21
  module Mixlib
22
22
  class Install
@@ -16,15 +16,15 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require "json"
20
- require "mixlib/install/artifact_info"
21
- require "mixlib/install/backend/base"
22
- require "mixlib/install/product"
23
- require "mixlib/install/product_matrix"
24
- require "mixlib/install/util"
25
- require "mixlib/install/dist"
19
+ require "json" unless defined?(JSON)
20
+ require_relative "../artifact_info"
21
+ require_relative "base"
22
+ require_relative "../product"
23
+ require_relative "../product_matrix"
24
+ require_relative "../util"
25
+ require_relative "../dist"
26
26
  require "mixlib/versioning"
27
- require "net/http"
27
+ require "net/http" unless defined?(Net::HTTP)
28
28
 
29
29
  module Mixlib
30
30
  class Install
@@ -78,7 +78,7 @@ EOF
78
78
 
79
79
  # Filter out the partial builds if we are in :unstable channel
80
80
  # In other channels we do not need to do this since all builds are
81
- # always complete. Infact we should not do this since for some arcane
81
+ # always complete. In fact we should not do this since for some arcane
82
82
  # builds like Chef Client 10.X we do not have build record created in
83
83
  # artifactory.
84
84
  if options.channel == :unstable
@@ -245,7 +245,7 @@ EOF
245
245
  private
246
246
 
247
247
  # Converts Array<Hash> where the Hash is a key pair and
248
- # value pair to a simplifed key/pair Hash
248
+ # value pair to a simplified key/pair Hash
249
249
  #
250
250
  def map_properties(properties)
251
251
  return {} if properties.nil?
@@ -12,17 +12,21 @@
12
12
  # limitations under the License.
13
13
  #
14
14
 
15
- require "mixlib/install"
16
- require "thor"
15
+ require_relative "../install"
16
+ require "thor" unless defined?(Thor)
17
17
 
18
18
  module Mixlib
19
19
  class Install
20
20
  class Cli < Thor
21
21
  include Thor::Actions
22
22
 
23
+ def self.exit_on_failure?
24
+ true
25
+ end
26
+
23
27
  desc "version", "print mixlib-install version"
24
28
  def version
25
- require "mixlib/install/version"
29
+ require_relative "version"
26
30
  say Mixlib::Install::VERSION
27
31
  end
28
32
 
@@ -63,7 +67,7 @@ If no earlier version is found the earliest version available will be set.",
63
67
  desc: "Print artifact attributes",
64
68
  type: :boolean
65
69
  def download(product_name)
66
- # Set mininum options
70
+ # Set minimum options
67
71
  mixlib_install_options = {
68
72
  channel: options[:channel].to_sym,
69
73
  product_name: product_name,
@@ -15,8 +15,8 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require "mixlib/install/generator/bourne"
19
- require "mixlib/install/generator/powershell"
18
+ require_relative "generator/bourne"
19
+ require_relative "generator/powershell"
20
20
 
21
21
  module Mixlib
22
22
  class Install
@@ -15,10 +15,10 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require "erb"
19
- require "ostruct"
20
- require "mixlib/install/util"
21
- require "mixlib/install/dist"
18
+ require "erb" unless defined?(Erb)
19
+ require "ostruct" unless defined?(OpenStruct)
20
+ require_relative "../util"
21
+ require_relative "../dist"
22
22
 
23
23
  module Mixlib
24
24
  class Install
@@ -45,7 +45,7 @@ module Mixlib
45
45
  script_path = File.join(script_base_path, name)
46
46
 
47
47
  # If there is an erb template we render it, otherwise we just read
48
- # and returnt the contents of the script
48
+ # and return the contents of the script
49
49
  if File.exist? "#{script_path}.erb"
50
50
  # Default values to use incase they are not set in the context
51
51
  context[:project_name] ||= Mixlib::Install::Dist::PROJECT_NAME.freeze
@@ -15,7 +15,7 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require "mixlib/install/generator/base"
18
+ require_relative "base"
19
19
 
20
20
  module Mixlib
21
21
  class Install
@@ -87,7 +87,7 @@ http_404_error() {
87
87
  echo "In order to test the version parameter, adventurous users may take the Metadata URL"
88
88
  echo "below and modify the '&v=<number>' parameter until you successfully get a URL that"
89
89
  echo "does not 404 (e.g. via curl or wget). You should be able to use '&v=11' or '&v=12'"
90
- echo "succesfully."
90
+ echo "successfully."
91
91
  echo ""
92
92
  echo "If you cannot fix this problem by setting the bootstrap_version, it probably means"
93
93
  echo "that $platform is not supported."
@@ -215,7 +215,7 @@ do_checksum() {
215
215
  checksum=`shasum -a 256 $1 | awk '{ print $1 }'`
216
216
  return `test "x$checksum" = "x$2"`
217
217
  else
218
- echo "WARNING: could not find a valid checksum program, pre-install shasum or sha256sum in your O/S image to get valdation..."
218
+ echo "WARNING: could not find a valid checksum program, pre-install shasum or sha256sum in your O/S image to get validation..."
219
219
  return 0
220
220
  fi
221
221
  }
@@ -48,7 +48,7 @@ elif test -f "/etc/redhat-release"; then
48
48
  platform_version=`sed 's/^.\+ release \([.0-9]\+\).*/\1/' /etc/redhat-release`
49
49
 
50
50
  if test "$platform" = "xenserver"; then
51
- # Current XenServer 6.2 is based on CentOS 5, platform is not reset to "el" server should hanlde response
51
+ # Current XenServer 6.2 is based on CentOS 5, platform is not reset to "el" server should handle response
52
52
  platform="xenserver"
53
53
  else
54
54
  # FIXME: use "redhat"
@@ -71,7 +71,7 @@ elif test -f "/etc/system-release"; then
71
71
  fi
72
72
  esac
73
73
 
74
- # Apple OS X
74
+ # Apple macOS
75
75
  elif test -f "/usr/bin/sw_vers"; then
76
76
  platform="mac_os_x"
77
77
  # Matching the tab-space with sed is error-prone
@@ -96,7 +96,7 @@ elif test -f "/etc/SuSE-release"; then
96
96
  then
97
97
  platform="sles"
98
98
  platform_version=`awk '/^VERSION/ {V = $3}; /^PATCHLEVEL/ {P = $3}; END {print V "." P}' /etc/SuSE-release`
99
- else
99
+ else # opensuse 43 only. 15 ships with /etc/os-release only
100
100
  platform="opensuseleap"
101
101
  platform_version=`awk '/^VERSION =/ { print $3 }' /etc/SuSE-release`
102
102
  fi
@@ -114,7 +114,14 @@ elif test -f "/etc/os-release"; then
114
114
  fi
115
115
 
116
116
  platform=$ID
117
- platform_version=$VERSION
117
+
118
+ # VERSION_ID is always the preferred variable to use, but not
119
+ # every distro has it so fallback to VERSION
120
+ if test "x$VERSION_ID" != "x"; then
121
+ platform_version=$VERSION_ID
122
+ else
123
+ platform_version=$VERSION
124
+ fi
118
125
  fi
119
126
 
120
127
  if test "x$platform" = "x"; then
@@ -163,6 +170,9 @@ esac
163
170
 
164
171
  # normalize the architecture we detected
165
172
  case $machine in
173
+ "arm64"|"aarch64")
174
+ machine="aarch64"
175
+ ;;
166
176
  "x86_64"|"amd64"|"x64")
167
177
  machine="x86_64"
168
178
  ;;
@@ -15,7 +15,7 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require "mixlib/install/generator/base"
18
+ require_relative "base"
19
19
 
20
20
  module Mixlib
21
21
  class Install
@@ -78,6 +78,15 @@ function Get-WebContentOnFullNet {
78
78
  $wc = new-object System.Net.WebClient
79
79
  $wc.Headers.Add("user-agent", "<%= user_agent_string %>")
80
80
  $proxy.Address = $env:http_proxy
81
+ $bypassList = $env:no_proxy
82
+
83
+
84
+ if($bypassList -ne $null){
85
+
86
+ $bypassList = $bypassList.split(",")
87
+ $proxy.BypassList = $byPassList
88
+ }
89
+
81
90
  $wc.Proxy = $proxy
82
91
 
83
92
  if ([string]::IsNullOrEmpty($filepath)) {
@@ -16,9 +16,9 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require "mixlib/install/product"
20
- require "mixlib/install/product_matrix"
21
- require "mixlib/install/util"
19
+ require_relative "product"
20
+ require_relative "product_matrix"
21
+ require_relative "util"
22
22
  require "mixlib/versioning"
23
23
 
24
24
  module Mixlib
@@ -16,7 +16,7 @@
16
16
  #
17
17
 
18
18
  require "mixlib/versioning"
19
- require "mixlib/install/dist"
19
+ require_relative "dist"
20
20
 
21
21
  module Mixlib
22
22
  class Install
@@ -1,4 +1,4 @@
1
- require "mixlib/install/product"
1
+ require_relative "product"
2
2
 
3
3
  #
4
4
  # If you are making a change to PRODUCT_MATRIX, please make sure
@@ -17,8 +17,8 @@
17
17
  # limitations under the License.
18
18
  #
19
19
 
20
- require "mixlib/install/util"
21
- require "mixlib/install/generator/powershell"
20
+ require_relative "util"
21
+ require_relative "generator/powershell"
22
22
  require "cgi"
23
23
 
24
24
  module Mixlib
@@ -226,7 +226,7 @@ module Mixlib
226
226
  # Conditionally prefixes a command with a sudo command.
227
227
  #
228
228
  # @param command [String] command to be prefixed
229
- # @return [String] the command, conditionaly prefixed with sudo
229
+ # @return [String] the command, conditionally prefixed with sudo
230
230
  # @api private
231
231
  def sudo(script)
232
232
  use_sudo ? "#{sudo_command} #{script}" : script
@@ -109,7 +109,7 @@ module Mixlib
109
109
  # invoked on a remote instance or locally.
110
110
  #
111
111
  # This method uses the Bourne shell (/bin/sh) to maximize the chance of
112
- # cross platform portability on Unixlike systems.
112
+ # cross platform portability on Unix-like systems.
113
113
  #
114
114
  # @param [String] the command
115
115
  # @return [String] a wrapped command string
@@ -126,10 +126,10 @@ module Mixlib
126
126
  # @param name [Array] headers
127
127
  # @return [String] generated user-agent string
128
128
  def user_agent_string(headers)
129
- require "mixlib/install/version"
129
+ require_relative "version"
130
130
  user_agents = %W{mixlib-install/#{Mixlib::Install::VERSION}}
131
131
  user_agents << headers
132
- # Ensure that if the default user agent is aleady set it doesn't get duplicated
132
+ # Ensure that if the default user agent is already set it doesn't get duplicated
133
133
  user_agents.flatten.compact.uniq.join(" ")
134
134
  end
135
135
 
@@ -162,6 +162,8 @@ module Mixlib
162
162
  case architecture
163
163
  when "amd64"
164
164
  "x86_64"
165
+ when "arm64"
166
+ "aarch64"
165
167
  when "i86pc", "i686"
166
168
  "i386"
167
169
  when "sun4u", "sun4v"
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class Install
3
- VERSION = "3.11.24"
3
+ VERSION = "3.12.3"
4
4
  end
5
5
  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.11.24
4
+ version: 3.12.3
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: 2019-12-12 00:00:00.000000000 Z
12
+ date: 2020-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mixlib-shellout