mixlib-install 0.1.0 → 0.2.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: b89b0d8d2bffd7bc3cafb4544212a1a2a661fc6b
4
- data.tar.gz: 2e8b09b8f17e26880b4fecd164defed7806b9552
3
+ metadata.gz: b0d07347dff5ac91c4e5bdeadf4c176894ed9d29
4
+ data.tar.gz: f2c175bfc51b1328ccadac6ce6e91f4c4d2a3c81
5
5
  SHA512:
6
- metadata.gz: ea21b2c07f490044dfe49db5f220ae10d58a6c9cb8cc891160745a7fce04e80d25077b8614e8f0d9752e843371f712a85bc8a73d969ccf30425fe1aee3c5afbb
7
- data.tar.gz: 274d20b1fef9661ba297b6ab7c065408e47d481508baeb6dd72c2e10bb6017d93e707dcd222d31ac1609c44e06ac9aefc8e01bfdfce43511853a4a7c3587b0fc
6
+ metadata.gz: ed7d7565cf4cc1838938fcd02dc6288c5f4526a7c70559528a2596ab2adc76d13836a2f55201d2be0bf3a12862d29b82dbe3612f9bc7ec42c42ed94b86a8aac7
7
+ data.tar.gz: 6f4cfc2c80b9559a51237260287eccbc5320c6ee79fee86e16fa73f610b0cf31c4ea5647f69e66ddfb98faccb9023d2a7bfa52f5a4146e8bbfd86d85de9cf730
@@ -1,3 +1,4 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  rvm:
3
4
  - 2.2.1
@@ -28,6 +28,8 @@ module Mixlib
28
28
 
29
29
  attr_accessor :nightlies
30
30
 
31
+ attr_accessor :install_flags
32
+
31
33
  attr_accessor :endpoint
32
34
 
33
35
  attr_accessor :root
@@ -45,6 +47,7 @@ module Mixlib
45
47
  @powershell = powershell
46
48
  @http_proxy = nil
47
49
  @https_proxy = nil
50
+ @install_flags = nil
48
51
  @prerelease = false
49
52
  @nightly = false
50
53
  @endpoint = "metadata"
@@ -78,14 +81,15 @@ module Mixlib
78
81
  # @return [String] shell variable lines
79
82
  # @api private
80
83
  def install_command_vars_for_bourne
81
- install_flags = %w[latest true].include?(version) ? "" : "-v #{version}"
82
- install_flags << " " << "-n" if nightlies
83
- install_flags << " " << "-p" if prerelease
84
+ flags = %w[latest true].include?(version) ? "" : "-v #{version}"
85
+ flags << " " << "-n" if nightlies
86
+ flags << " " << "-p" if prerelease
87
+ flags << " " << install_flags if install_flags
84
88
 
85
89
  [
86
90
  shell_var("chef_omnibus_root", root),
87
91
  shell_var("chef_omnibus_url", base_url),
88
- shell_var("install_flags", install_flags.strip),
92
+ shell_var("install_flags", flags.strip),
89
93
  shell_var("pretty_version", Util.pretty_version(version)),
90
94
  shell_var("sudo_sh", sudo("sh")),
91
95
  shell_var("version", version)
@@ -109,7 +113,7 @@ module Mixlib
109
113
  ].join("\n")
110
114
  end
111
115
 
112
- # rubocop:disable Metrics/CyclomaticComplexity
116
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLength
113
117
  def parse_opts(opts)
114
118
  opts.each do |opt, setting|
115
119
  case opt.to_s
@@ -117,6 +121,8 @@ module Mixlib
117
121
  self.http_proxy = setting
118
122
  when "https_proxy"
119
123
  self.https_proxy = setting
124
+ when "install_flags"
125
+ self.install_flags = setting
120
126
  when "prerelease"
121
127
  self.prerelease = setting
122
128
  when "endpoint"
@@ -125,6 +131,8 @@ module Mixlib
125
131
  self.base_url = setting
126
132
  when "nightlies"
127
133
  self.nightlies = setting
134
+ when "sudo"
135
+ self.use_sudo = setting
128
136
  when "sudo_command"
129
137
  self.use_sudo = true
130
138
  self.sudo_command = setting
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class Install
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Mixlib::Install::VERSION
9
9
  spec.authors = ["Thom May"]
10
10
  spec.email = ["thom@chef.io"]
11
+ spec.license = "Apache-2.0"
11
12
 
12
13
  spec.summary = "A mixin to help with omnitruck installs"
13
14
  spec.homepage = "https://chef.io"
@@ -16,6 +17,9 @@ Gem::Specification.new do |spec|
16
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
17
18
  spec.require_paths = ["lib"]
18
19
 
19
- spec.add_development_dependency "bundler", "~> 1.9"
20
+ spec.required_ruby_version = ">= 2.0.0"
21
+
22
+ spec.add_development_dependency "bundler"
20
23
  spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "rspec", "~> 3.3"
21
25
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixlib-install
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom May
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-14 00:00:00.000000000 Z
11
+ date: 2015-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.9'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.9'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.3'
41
55
  description:
42
56
  email:
43
57
  - thom@chef.io
@@ -60,7 +74,8 @@ files:
60
74
  - support/install_command.ps1
61
75
  - support/install_command.sh
62
76
  homepage: https://chef.io
63
- licenses: []
77
+ licenses:
78
+ - Apache-2.0
64
79
  metadata: {}
65
80
  post_install_message:
66
81
  rdoc_options: []
@@ -70,7 +85,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
85
  requirements:
71
86
  - - ">="
72
87
  - !ruby/object:Gem::Version
73
- version: '0'
88
+ version: 2.0.0
74
89
  required_rubygems_version: !ruby/object:Gem::Requirement
75
90
  requirements:
76
91
  - - ">="