busser 0.7.1 → 0.8.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
- SHA1:
3
- metadata.gz: 30f4595bebbc27b98f099d0e238e426fea215e25
4
- data.tar.gz: 651088d9f4151726593bcceb028f109c9493e225
2
+ SHA256:
3
+ metadata.gz: 461cec059616e39a6f7f86d6c7bf2478e36116fab040dc2b9076dc09641963c7
4
+ data.tar.gz: 2a21f5a58dc7a107b6af55e86a267143f3d9d5212b8590b3d0996ac182625074
5
5
  SHA512:
6
- metadata.gz: a0a98ba07cfdc996db7457857002286f4cce1a3475554acf02b93236deb389d56362f443d7ca44e7c063e0b64941c8c5570c18482001ab2c19db34706a6411f2
7
- data.tar.gz: 1f430ccc80672473ac4c48b0ee17e194e8a6f2297e5af94aee7a154edc03c7eb8d77c0756f5bb9c5edf7576bdcb530f0716f19f76b676b8e7e67c9f74797c6ab
6
+ metadata.gz: d2f10dfebb25a155b78f91a0d9b06d7f06fe5bf33174c48ee5078543d271a44f1cdb040ca8ed54ce26c9b3210b5264c5e7e89406b6669f8a1e9126bec1063979
7
+ data.tar.gz: b29b1a3e4a4392dd74a6a4f0e2d3475b267bdd253b3d745da2687b44621777ae95c34beef7db82102a48dcdac6f1de22e1e7ef0ee6fa27e7e54d913ad3be2cda
@@ -1,3 +1,12 @@
1
+ ## 0.8.0 / 2020-08-20
2
+
3
+ - Add http_proxy support to `busser plugin install`
4
+ - Use a SPDX compliant license string in the gemspec
5
+ - Remove the pin to bundler 1.x in the development gems
6
+ - Misc readme updates
7
+ - Add testing with Appveyor
8
+ - Pin the Aruba dev dep to prevent API churn
9
+
1
10
  ## 0.7.1 / 2015-04-20
2
11
 
3
12
  ### Bug fixes
data/README.md CHANGED
@@ -1,15 +1,18 @@
1
1
  # Busser
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/busser.png)](http://badge.fury.io/rb/busser)
4
- [![Build Status](https://travis-ci.org/test-kitchen/busser.png?branch=master)](https://travis-ci.org/test-kitchen/busser)
5
- [![Code Climate](https://codeclimate.com/github/test-kitchen/busser.png)](https://codeclimate.com/github/test-kitchen/busser)
6
- [![Dependency Status](https://gemnasium.com/test-kitchen/busser.svg)](https://gemnasium.com/test-kitchen/busser)
3
+ [![Gem Version](https://badge.fury.io/rb/busser.svg)](http://badge.fury.io/rb/busser)
4
+ [![Build Status](https://travis-ci.org/test-kitchen/busser.svg?branch=master)](https://travis-ci.org/test-kitchen/busser)
5
+ [![Code Climate](https://codeclimate.com/github/test-kitchen/busser.svg)](https://codeclimate.com/github/test-kitchen/busser)
7
6
 
8
7
  Busser is a test setup and execution framework designed to
9
8
  work on remote nodes whose system dependencies cannot be relied upon, except
10
9
  for an Omnibus installation of Chef. It uses a plugin architecture to add
11
10
  support for different testing strategies such minitest, cucumber, bash, etc.
12
11
 
12
+ ## Status
13
+
14
+ This software project is no longer under active development as it has no active maintainers. The software may continue to work for some or all use cases, but issues filed in GitHub will most likely not be triaged. If a new maintainer is interested in working on this project please come chat with us in #test-kitchen on Chef Community Slack.
15
+
13
16
  ## Installation
14
17
 
15
18
  Add this line to your application's Gemfile:
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ Rake::TestTask.new(:unit) do |t|
10
10
  end
11
11
 
12
12
  Cucumber::Rake::Task.new(:features) do |t|
13
- t.cucumber_opts = ['features', '-x', '--format progress']
13
+ t.cucumber_opts = ['features', '-x', '--format progress', '--no-color', '-b']
14
14
  end
15
15
 
16
16
  desc "Run all test suites"
@@ -0,0 +1,36 @@
1
+ version: "master-{build}"
2
+
3
+ os: Windows Server 2012 R2
4
+ platform:
5
+ - x64
6
+
7
+ environment:
8
+ matrix:
9
+ - ruby_version: "200-x64"
10
+ - ruby_version: "21"
11
+
12
+ clone_folder: c:\projects\busser
13
+ clone_depth: 1
14
+ skip_tags: true
15
+ branches:
16
+ only:
17
+ - master
18
+
19
+ install:
20
+ - systeminfo
21
+ - winrm quickconfig -q
22
+ - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
23
+ - echo %PATH%
24
+ - ruby --version
25
+ - gem install bundler --quiet --no-ri --no-rdoc || gem install bundler --quiet --no-ri --no-rdoc || gem install bundler --quiet --no-ri --no-rdoc
26
+ - gem install rubygems-pkg/rubygems-update-2.4.6.gem
27
+ - update_rubygems
28
+ - gem --version
29
+ - bundler --version
30
+
31
+ build_script:
32
+ - bundle install || bundle install || bundle install
33
+
34
+ test_script:
35
+ - SET SPEC_OPTS=--format progress
36
+ - bundle exec rake
data/bin/busser CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- encoding: utf-8 -*-
3
3
 
4
4
  $:.unshift File.join(File.dirname(__FILE__), %w{.. lib})
5
- require 'rubygems'
5
+ require 'rubygems' unless defined?(Gem)
6
6
  require 'busser/cli'
7
7
 
8
8
  Busser::CLI.start
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_dependency 'thor', '<= 0.19.0'
24
24
 
25
- spec.add_development_dependency 'aruba'
26
- spec.add_development_dependency "bundler", "~> 1.3"
25
+ spec.add_development_dependency 'aruba', "0.7.4"
26
+ spec.add_development_dependency "bundler"
27
27
  spec.add_development_dependency 'cane'
28
28
  spec.add_development_dependency 'countloc'
29
29
  spec.add_development_dependency 'fakefs'
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require 'pathname'
19
+ require 'pathname' unless defined?(Pathname)
20
20
 
21
21
  require 'busser/version'
22
22
 
@@ -16,8 +16,8 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require 'base64'
20
- require 'digest'
19
+ require 'base64' unless defined?(Base64)
20
+ require 'digest' unless defined?(Digest)
21
21
 
22
22
  require 'busser/thor'
23
23
 
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require 'openssl'
19
+ require 'openssl' unless defined?(OpenSSL)
20
20
 
21
21
  require 'busser/rubygems'
22
22
  require 'busser/thor'
@@ -38,7 +38,15 @@ module Busser
38
38
  class_option :force_postinstall, :type => :boolean, :default => false,
39
39
  :desc => "Run the plugin's postinstall if it is already installed"
40
40
 
41
+ class_option :verbose, :type => :boolean, :default => false,
42
+ :desc => "Set a more verbose output"
43
+
41
44
  def install_all
45
+ if options[:verbose]
46
+ Gem.configuration.verbose = 2 if options[:verbose]
47
+ info("Using http_proxy=#{rbg_options[:http_proxy].inspect}")
48
+ end
49
+
42
50
  silence_gem_ui do
43
51
  plugins.each { |plugin| install(plugin) }
44
52
  end
@@ -6,8 +6,8 @@ end
6
6
 
7
7
  require 'busser/cucumber/hooks'
8
8
 
9
- require 'tmpdir'
10
- require 'pathname'
9
+ require 'tmpdir' unless defined?(Dir.mktmpdir)
10
+ require 'pathname' unless defined?(Pathname)
11
11
 
12
12
  Given(/^a BUSSER_ROOT of "(.*?)"$/) do |busser_root|
13
13
  backup_envvar('BUSSER_ROOT')
@@ -111,7 +111,7 @@ Then(/^a bat busser binstub file should contain:$/) do |partial_content|
111
111
  end
112
112
 
113
113
  Then(/^the file "(.*?)" should have permissions "(.*?)"$/) do |file, perms|
114
- in_current_dir do
114
+ in_current_directory do
115
115
  file_perms = sprintf("%o", File.stat(file).mode)
116
116
  file_perms = file_perms[2, 4]
117
117
  expect(file_perms).to eq(perms)
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require 'pathname'
19
+ require 'pathname' unless defined?(Pathname)
20
20
 
21
21
  require 'busser/rubygems'
22
22
 
@@ -29,56 +29,38 @@ module Busser
29
29
  module_function
30
30
 
31
31
  def gem_installed?(name, version)
32
- installed = Array(Gem::Specification.find_all_by_name(name, version))
33
- version = latest_gem_version(name) if version.nil?
34
-
35
- if version.nil?
36
- ! installed.empty?
37
- else
38
- installed.find { |spec| spec.version.to_s == version }
39
- end
32
+ version = Gem::Requirement.default unless version
33
+ ! Gem::Dependency.new(name, version).matching_specs.empty?
40
34
  end
41
35
 
42
36
  def install_gem(gem, version)
43
- install_arg = gem =~ /\.gem$/ ? gem : new_dep(gem, version)
44
- spec = dep_installer.install(install_arg).find { |s| s.name == gem }
45
- Gem.clear_paths
46
- spec
47
- end
37
+ version = Gem::Requirement.default unless version
48
38
 
49
- def latest_gem_version(name)
50
- available_gems = dep_installer.find_gems_with_sources(new_dep(name))
39
+ inst = Gem::DependencyInstaller.new(rbg_options)
40
+ specs = inst.install(gem, Gem::Requirement.create(version))
51
41
 
52
- spec, source = if available_gems.respond_to?(:last)
53
- # DependencyInstaller sorts the results such that the last one is
54
- # always the one it considers best.
55
- spec_with_source = available_gems.last
56
- spec_with_source && spec_with_source
57
- else
58
- # Rubygems 2.0 returns a Gem::Available set, which is a
59
- # collection of AvailableSet::Tuple structs
60
- available_gems.pick_best!
61
- best_gem = available_gems.set.first
62
- best_gem && [best_gem.spec, best_gem.source]
63
- end
42
+ Gem.clear_paths
43
+ specs.find { |s| s.name == gem }
44
+ end
64
45
 
65
- spec && spec.version && spec.version.to_s
46
+ def rbg_options
47
+ @rbg_options ||= Gem::DependencyInstaller::DEFAULT_OPTIONS.merge(
48
+ :suggest_alternate => false,
49
+ :version => Gem::Requirement.default,
50
+ :without_groups => [],
51
+ :minimal_deps => true,
52
+ :http_proxy => ENV.fetch("http_proxy", ENV.fetch("HTTP_PROXY", nil))
53
+ )
66
54
  end
67
55
 
68
56
  def silence_gem_ui
69
57
  interaction = Gem::DefaultUserInteraction.ui
70
- Gem::DefaultUserInteraction.ui = Gem::SilentUI.new
58
+ if !Gem.configuration.really_verbose
59
+ Gem::DefaultUserInteraction.ui = Gem::SilentUI.new
60
+ end
71
61
  yield
72
62
  ensure
73
63
  Gem::DefaultUserInteraction.ui = interaction
74
64
  end
75
-
76
- def dep_installer
77
- Gem::DependencyInstaller.new
78
- end
79
-
80
- def new_dep(name, version = nil)
81
- Gem::Dependency.new(name, version)
82
- end
83
65
  end
84
66
  end
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require 'thor'
19
+ require 'thor' unless defined?(Thor)
20
20
 
21
21
  require 'busser/helpers'
22
22
  require 'busser/ui'
@@ -17,5 +17,5 @@
17
17
  # limitations under the License.
18
18
 
19
19
  module Busser
20
- VERSION = "0.7.1"
20
+ VERSION = "0.8.0"
21
21
  end
@@ -15,11 +15,11 @@ describe Busser::Helpers do
15
15
  describe "with a default root path" do
16
16
 
17
17
  it "returns a base path if no suite name is given" do
18
- suite_path.to_s.must_equal "/opt/busser/suites"
18
+ suite_path.to_s.must_match %r{/opt/busser/suites$}
19
19
  end
20
20
 
21
21
  it "returns a suite path given a suite name" do
22
- suite_path("fuzzy").to_s.must_equal "/opt/busser/suites/fuzzy"
22
+ suite_path("fuzzy").to_s.must_match %r{/opt/busser/suites/fuzzy$}
23
23
  end
24
24
  end
25
25
 
@@ -30,12 +30,12 @@ describe Busser::Helpers do
30
30
 
31
31
  it "returns a base path if no suite name is given" do
32
32
  ENV['BUSSER_ROOT'] = "/path/to/busser"
33
- suite_path.to_s.must_equal "/path/to/busser/suites"
33
+ suite_path.to_s.must_match %r{/path/to/busser/suites$}
34
34
  end
35
35
 
36
36
  it "returns a suite path given a suite name" do
37
37
  ENV['BUSSER_ROOT'] = "/path/to/busser"
38
- suite_path("fuzzy").to_s.must_equal "/path/to/busser/suites/fuzzy"
38
+ suite_path("fuzzy").to_s.must_match %r{/path/to/busser/suites/fuzzy$}
39
39
  end
40
40
  end
41
41
  end
@@ -49,11 +49,11 @@ describe Busser::Helpers do
49
49
  describe "with a default root path" do
50
50
 
51
51
  it "returns a base path if no product name is given" do
52
- vendor_path.to_s.must_equal "/opt/busser/vendor"
52
+ vendor_path.to_s.must_match %r{/opt/busser/vendor$}
53
53
  end
54
54
 
55
55
  it "returns a vendor path given a product name" do
56
- vendor_path("supreme").to_s.must_equal "/opt/busser/vendor/supreme"
56
+ vendor_path("supreme").to_s.must_match %r{/opt/busser/vendor/supreme$}
57
57
  end
58
58
  end
59
59
 
@@ -64,12 +64,13 @@ describe Busser::Helpers do
64
64
 
65
65
  it "returns a base path if no product name is given" do
66
66
  ENV['BUSSER_ROOT'] = "/path/to/busser"
67
- vendor_path.to_s.must_equal "/path/to/busser/vendor"
67
+ vendor_path.to_s.must_match %r{/path/to/busser/vendor$}
68
68
  end
69
69
 
70
70
  it "returns a suite path given a product name" do
71
71
  ENV['BUSSER_ROOT'] = "/path/to/busser"
72
- vendor_path("maximal").to_s.must_equal "/path/to/busser/vendor/maximal"
72
+ vendor_path("maximal").to_s.must_match \
73
+ %r{/path/to/busser/vendor/maximal$}
73
74
  end
74
75
  end
75
76
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: busser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2020-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -28,30 +28,30 @@ dependencies:
28
28
  name: aruba
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 0.7.4
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 0.7.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.3'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.3'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: cane
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -168,6 +168,7 @@ files:
168
168
  - LICENSE
169
169
  - README.md
170
170
  - Rakefile
171
+ - appveyor.yml
171
172
  - bin/busser
172
173
  - busser.gemspec
173
174
  - features/deserialize_command.feature
@@ -225,7 +226,7 @@ homepage: https://github.com/test-kitchen/busser
225
226
  licenses:
226
227
  - Apache 2.0
227
228
  metadata: {}
228
- post_install_message:
229
+ post_install_message:
229
230
  rdoc_options: []
230
231
  require_paths:
231
232
  - lib
@@ -240,9 +241,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
241
  - !ruby/object:Gem::Version
241
242
  version: '0'
242
243
  requirements: []
243
- rubyforge_project:
244
- rubygems_version: 2.4.2
245
- signing_key:
244
+ rubygems_version: 3.1.2
245
+ signing_key:
246
246
  specification_version: 4
247
247
  summary: Busser - Runs tests for projects in Test Kitchen
248
248
  test_files: