puppetlabs_spec_helper 3.0.0 → 4.0.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
  SHA256:
3
- metadata.gz: ef65ff61efb2a4ba220a726fd2ac309dc077a37ba9a2a2951430cebdd449b3c3
4
- data.tar.gz: e079aa402cc3c638d7fb0f9dae179afb884a894ba20334ce781289523177446c
3
+ metadata.gz: f934201ede34e89f4c04e3cfa7b952e6e31b883163c06138833f3d1ec631d33d
4
+ data.tar.gz: 69202a2e69af3b92d9fe44298916005791d52f227d0151826dee267d8f3a10dc
5
5
  SHA512:
6
- metadata.gz: 616b63b83dafabafeb3d6ece228f76d94f21ac01266093100fd8fa2c75b14a99c8e2fa5ba3bff1a6e0203a4321486fa2e3133aeb7edc35541d139e31ce1495b3
7
- data.tar.gz: cb0399bf3984b9bab34d202819493c1829cabf6050f9f2d19ada65a41aaa268e7901e62382c77dfbaf948bff8bd944d42c80d25941a366115fdf79e67e9c5f93
6
+ metadata.gz: 962d07bc1fd4b324754d124e4c30619e238e342a18032ae210aa26531c61be9d4ecd7572e88e564ae4533d01c58a1abf9d907f0c89f8d3f59f2b136140913969
7
+ data.tar.gz: 452342796faa97b4d2b4cb4a16c06476358233de3e4ea7cf6d2f52f1c066807b6387bc4488072c4d424640db6706cf4f9047a4daf8740dd6c9c32016a865d721
@@ -0,0 +1,15 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "13:00"
8
+ open-pull-requests-limit: 10
9
+ ignore:
10
+ - dependency-name: rubocop
11
+ versions:
12
+ - "> 0.49, < 1"
13
+ - dependency-name: rubocop
14
+ versions:
15
+ - ">= 1.a, < 2"
data/CHANGELOG.md CHANGED
@@ -3,6 +3,21 @@
3
3
  All significant changes to this repo will be summarized in this file.
4
4
 
5
5
 
6
+ ## [v4.0.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v4.0.0) (2021-07-26)
7
+
8
+ [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v3.0.0...v4.0.0)
9
+
10
+ **Implemented enhancements:**
11
+
12
+ - Use Rubocop's Github Actions formatter if possible [\#340](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/340) ([ekohl](https://github.com/ekohl))
13
+ - Remove beaker integration [\#338](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/338) ([ekohl](https://github.com/ekohl))
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Upgrade to GitHub-native Dependabot [\#336](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/336) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
18
+ - \(IAC-1452\) - removal of Inappropriate Terminology [\#335](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/335) ([david22swan](https://github.com/david22swan))
19
+ - Add gemspec required\_ruby\_version [\#334](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/334) ([alexjfisher](https://github.com/alexjfisher))
20
+
6
21
  ## [v3.0.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v3.0.0) (2021-02-10)
7
22
 
8
23
  [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.16.0...v3.0.0)
@@ -13,6 +28,10 @@ All significant changes to this repo will be summarized in this file.
13
28
  - Remove i18n/gettext task [\#331](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/331) ([DavidS](https://github.com/DavidS))
14
29
  - Restructure PuppetLint rake tasks so they can be configurable [\#330](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/330) ([nmaludy](https://github.com/nmaludy))
15
30
 
31
+ **Merged pull requests:**
32
+
33
+ - Release prep for v3.0.0 [\#333](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/333) ([DavidS](https://github.com/DavidS))
34
+
16
35
  ## [v2.16.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.16.0) (2021-01-18)
17
36
 
18
37
  [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.15.0...v2.16.0)
@@ -645,7 +664,7 @@ compatible yet.
645
664
  ### Added
646
665
  * Initial release
647
666
 
648
- [unreleased]: https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.8.0...master
667
+ [unreleased]: https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.8.0...main
649
668
  [2.8.0]: https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.7.0...v2.8.0
650
669
  [2.7.0]: https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.6.2...v2.7.0
651
670
  [2.6.2]: https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.6.1...v2.6.2
data/HISTORY.md CHANGED
@@ -450,7 +450,7 @@ compatible yet.
450
450
  ### Added
451
451
  * Initial release
452
452
 
453
- [unreleased]: https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.8.0...master
453
+ [unreleased]: https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.8.0...main
454
454
  [2.8.0]: https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.7.0...v2.8.0
455
455
  [2.7.0]: https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.6.2...v2.7.0
456
456
  [2.6.2]: https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.6.1...v2.6.2
data/README.md CHANGED
@@ -102,10 +102,10 @@ This project is intended to serve two purposes:
102
102
  To Use this Project
103
103
  ===================
104
104
 
105
- The most common usage scenario is that you will check out the 'master'
105
+ The most common usage scenario is that you will check out the 'main'
106
106
  branch of this project from github, and install it as a rubygem.
107
107
  There should be few or no cases where you would want to have any other
108
- branch of this project besides master/HEAD.
108
+ branch of this project besides main/HEAD.
109
109
 
110
110
  Running on non-current ruby versions
111
111
  ------------------------------------
@@ -6,7 +6,6 @@ require 'rspec/core/rake_task'
6
6
  require 'tmpdir'
7
7
  require 'pathname'
8
8
  require 'puppetlabs_spec_helper/version'
9
- require 'puppetlabs_spec_helper/tasks/beaker'
10
9
  require 'puppetlabs_spec_helper/tasks/fixtures'
11
10
  require 'puppetlabs_spec_helper/tasks/check_symlinks'
12
11
  require 'English'
@@ -259,7 +258,7 @@ task :compute_dev_version do
259
258
 
260
259
  # If we're in a CI environment include our build number
261
260
  # If the branch is a release branch we append an 'r' into the new_version,
262
- # this is due to the release branch buildID conflicting with master branch when trying to push to the staging forge.
261
+ # this is due to the release branch buildID conflicting with main branch when trying to push to the staging forge.
263
262
  # More info can be found at https://tickets.puppetlabs.com/browse/FM-6170
264
263
  new_version = if build = (ENV['BUILD_NUMBER'] || ENV['TRAVIS_BUILD_NUMBER'])
265
264
  if branch.eql? 'release'
@@ -337,6 +336,14 @@ begin
337
336
  RuboCop::RakeTask.new(:rubocop) do |task|
338
337
  # These make the rubocop experience maybe slightly less terrible
339
338
  task.options = ['-D', '-S', '-E']
339
+
340
+ # Use Rubocop's Github Actions formatter if possible
341
+ if ENV['GITHUB_ACTIONS'] == 'true'
342
+ rubocop_spec = Gem::Specification.find_by_name('rubocop')
343
+ if Gem::Version.new(rubocop_spec.version) >= Gem::Version.new('1.2')
344
+ task.formatters << 'github'
345
+ end
346
+ end
340
347
  end
341
348
  rescue LoadError
342
349
  desc 'rubocop is not available in this installation'
@@ -41,7 +41,7 @@ module PuppetlabsSpecHelper::Tasks::FixtureHelpers
41
41
  # @return [Hash] - returns a hash of all the fixture repositories
42
42
  # @example
43
43
  # {"puppetlabs-stdlib"=>{"target"=>"https://gitlab.com/puppetlabs/puppet-stdlib.git",
44
- # "ref"=>nil, "branch"=>"master", "scm"=>nil,
44
+ # "ref"=>nil, "branch"=>"main", "scm"=>nil,
45
45
  # }}
46
46
  def repositories
47
47
  @repositories ||= fixtures('repositories') || {}
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PuppetlabsSpecHelper
4
- VERSION = '3.0.0'
4
+ VERSION = '4.0.0'
5
5
 
6
6
  # compat for pre-1.2.0 users; deprecated
7
7
  module Version
@@ -20,6 +20,8 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ['lib']
22
22
 
23
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.4')
24
+
23
25
  spec.add_runtime_dependency 'mocha', '~> 1.0'
24
26
  spec.add_runtime_dependency 'pathspec', '>= 0.2.1', '< 1.1.0'
25
27
  spec.add_runtime_dependency 'puppet-lint', '~> 2.0'
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppetlabs_spec_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet, Inc.
8
8
  - Community Contributors
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-02-10 00:00:00.000000000 Z
12
+ date: 2021-07-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mocha
@@ -211,6 +211,7 @@ executables: []
211
211
  extensions: []
212
212
  extra_rdoc_files: []
213
213
  files:
214
+ - ".github/dependabot.yml"
214
215
  - ".gitignore"
215
216
  - ".noexec.yaml"
216
217
  - ".rspec"
@@ -233,7 +234,6 @@ files:
233
234
  - lib/puppetlabs_spec_helper/puppetlabs_spec/puppet_internals.rb
234
235
  - lib/puppetlabs_spec_helper/puppetlabs_spec_helper.rb
235
236
  - lib/puppetlabs_spec_helper/rake_tasks.rb
236
- - lib/puppetlabs_spec_helper/tasks/beaker.rb
237
237
  - lib/puppetlabs_spec_helper/tasks/check_symlinks.rb
238
238
  - lib/puppetlabs_spec_helper/tasks/fixtures.rb
239
239
  - lib/puppetlabs_spec_helper/version.rb
@@ -244,7 +244,7 @@ homepage: http://github.com/puppetlabs/puppetlabs_spec_helper
244
244
  licenses:
245
245
  - Apache-2.0
246
246
  metadata: {}
247
- post_install_message:
247
+ post_install_message:
248
248
  rdoc_options: []
249
249
  require_paths:
250
250
  - lib
@@ -252,15 +252,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
252
252
  requirements:
253
253
  - - ">="
254
254
  - !ruby/object:Gem::Version
255
- version: '0'
255
+ version: '2.4'
256
256
  required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  requirements:
258
258
  - - ">="
259
259
  - !ruby/object:Gem::Version
260
260
  version: '0'
261
261
  requirements: []
262
- rubygems_version: 3.2.5
263
- signing_key:
262
+ rubyforge_project:
263
+ rubygems_version: 2.7.6.2
264
+ signing_key:
264
265
  specification_version: 4
265
266
  summary: Standard tasks and configuration for module spec tests.
266
267
  test_files: []
@@ -1,115 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rspec/core/rake_task'
4
-
5
- module PuppetlabsSpecHelper; end
6
- module PuppetlabsSpecHelper::Tasks; end
7
- module PuppetlabsSpecHelper::Tasks::BeakerHelpers
8
- # This is a helper for the self-symlink entry of fixtures.yml
9
- def source_dir
10
- Dir.pwd
11
- end
12
-
13
- # cache the repositories and return a hash object
14
- def repositories
15
- @repositories ||= fixtures('repositories')
16
- @repositories
17
- end
18
-
19
- # get the array of Beaker set names
20
- # @return [Array<String>]
21
- def beaker_node_sets
22
- return @beaker_nodes if @beaker_nodes
23
-
24
- @beaker_nodes = Dir['spec/acceptance/nodesets/*.yml'].sort.map do |node_set|
25
- node_set.slice!('.yml')
26
- File.basename(node_set)
27
- end
28
- end
29
-
30
- # Use "vagrant ssh" to login to the given node in the node set
31
- # @param set [String] The name of the node set (yml file)
32
- # @param node [String] The name of the node in the set. For multi-node sets.
33
- def vagrant_ssh(set, node = nil)
34
- vagrant_yml_dir = File.join '.vagrant', 'beaker_vagrant_files', "#{set}.yml"
35
- vagrant_file = File.join vagrant_yml_dir, 'Vagrantfile'
36
- unless File.file? vagrant_file
37
- puts "There is no Vagrantfile at: '#{vagrant_file}'. Perhaps, the node is not created or is destroyed."
38
- exit 1
39
- end
40
- Dir.chdir(vagrant_yml_dir) do
41
- command = 'vagrant ssh'
42
- command += " #{node}" if node
43
- # Vagrant is not distributed as a normal gem
44
- # and we should protect it from the current Ruby environment
45
- env = {
46
- 'RUBYLIB' => nil,
47
- 'GEM_PATH' => nil,
48
- 'BUNDLE_BIN_PATH' => nil,
49
- }
50
- system env, command
51
- end
52
- end
53
- end
54
- include PuppetlabsSpecHelper::Tasks::BeakerHelpers # legacy support code # rubocop:disable Style/MixinUsage
55
-
56
- desc 'Run beaker acceptance tests'
57
- RSpec::Core::RakeTask.new(:beaker) do |t|
58
- SetupBeaker.setup_beaker(t)
59
- end
60
-
61
- class SetupBeaker
62
- def self.setup_beaker(task)
63
- task.rspec_opts = []
64
- task.pattern = 'spec/acceptance'
65
- # TEST_TIERS env variable is a comma separated list of tiers to run. e.g. low, medium, high
66
- if ENV['TEST_TIERS']
67
- test_tiers = ENV['TEST_TIERS'].split(',')
68
- test_tiers_allowed = ENV.fetch('TEST_TIERS_ALLOWED', 'low,medium,high').split(',')
69
- raise 'TEST_TIERS env variable must have at least 1 tier specified. Either low, medium or high or one of the tiers listed in TEST_TIERS_ALLOWED (comma separated).' if test_tiers.count == 0
70
-
71
- test_tiers.each do |tier|
72
- tier_to_add = tier.strip.downcase
73
- raise "#{tier_to_add} not a valid test tier." unless test_tiers_allowed.include?(tier_to_add)
74
-
75
- tiers = "--tag tier_#{tier_to_add}"
76
- task.rspec_opts.push(tiers)
77
- end
78
- else
79
- puts 'TEST_TIERS env variable not defined. Defaulting to run all tests.'
80
- end
81
- task
82
- end
83
- end
84
-
85
- desc 'List available beaker nodesets'
86
- task 'beaker:sets' do
87
- beaker_node_sets.each do |set|
88
- puts set
89
- end
90
- end
91
-
92
- # alias for compatibility
93
- task 'beaker_nodes' => 'beaker:sets'
94
-
95
- desc 'Try to use vagrant to login to the Beaker node'
96
- task 'beaker:ssh', [:set, :node] do |_task, args|
97
- set = args[:set] || ENV['BEAKER_set'] || ENV['RS_SET'] || 'default'
98
- node = args[:node]
99
- vagrant_ssh set, node
100
- end
101
-
102
- beaker_node_sets.each do |set|
103
- desc "Run the Beaker acceptance tests for the node set '#{set}'"
104
- task "beaker:#{set}" do
105
- ENV['BEAKER_set'] = set
106
- Rake::Task['beaker'].reenable
107
- Rake::Task['beaker'].invoke
108
- end
109
-
110
- desc "Use vagrant to login to a node from the set '#{set}'"
111
- task "beaker:ssh:#{set}", [:node] do |_task, args|
112
- node = args[:node]
113
- vagrant_ssh set, node
114
- end
115
- end