Skip to content

Commit b8a108b

Browse files
author
jordanbreen28
committed
(CONT-704) - Disable all cops by default
1 parent 6435e0f commit b8a108b

File tree

6 files changed

+25
-49
lines changed

6 files changed

+25
-49
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,13 @@ jobs:
1717
puppet_gem_version:
1818
- '~> 6.0'
1919
- '~> 7.0'
20-
name: "spec (ruby ${{ matrix.ruby_version }} | puppet ${{matrix.puppet_gem_version}})"
20+
runs_on:
21+
- "ubuntu-latest"
22+
- "windows-latest"
23+
name: "spec (${{ matrix.runs_on }} ruby ${{ matrix.ruby_version }} | puppet ${{matrix.puppet_gem_version}})"
2124
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
2225
secrets: "inherit"
2326
with:
2427
ruby_version: ${{ matrix.ruby_version }}
2528
puppet_gem_version: ${{ matrix.puppet_gem_version }}
26-
27-
acceptance:
28-
needs: "spec"
29-
strategy:
30-
fail-fast: false
31-
matrix:
32-
os:
33-
- "ubuntu-latest"
34-
- "windows-2019"
35-
ruby_version:
36-
- "2.5"
37-
- "2.7"
38-
name: "acceptance (${{ matrix.os }} | ruby ${{ matrix.ruby_version }})"
39-
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main"
40-
secrets: "inherit"
41-
with:
42-
ruby_version: ${{ matrix.ruby_version }}
43-
rake_task: 'acceptance:local_parallel'
44-
runs_on: ${{ matrix.os }}
29+
runs_on: ${{ matrix.runs_on }}

.github/workflows/nightly.yml

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,13 @@ jobs:
1616
puppet_gem_version:
1717
- '~> 6.0'
1818
- '~> 7.0'
19-
name: "spec (ruby ${{ matrix.ruby_version }} | puppet ${{matrix.puppet_gem_version}})"
20-
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
21-
secrets: "inherit"
22-
with:
23-
ruby_version: ${{ matrix.ruby_version }}
24-
25-
acceptance:
26-
needs: "spec"
27-
strategy:
28-
fail-fast: false
29-
matrix:
30-
os:
19+
runs_on:
3120
- "ubuntu-latest"
32-
- "windows-2019"
33-
ruby_version:
34-
- "2.5"
35-
- "2.7"
36-
name: "acceptance (ruby ${{ matrix.ruby_version }} | ${{ matrix.os }})"
37-
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main"
21+
- "windows-latest"
22+
name: "spec (${{ matrix.runs_on }} ruby ${{ matrix.ruby_version }} | puppet ${{matrix.puppet_gem_version}})"
23+
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
3824
secrets: "inherit"
3925
with:
4026
ruby_version: ${{ matrix.ruby_version }}
41-
rake_task: 'acceptance:local_parallel'
42-
runs_on: ${{ matrix.os }}
27+
puppet_gem_version: ${{ matrix.puppet_gem_version }}
28+
runs_on: ${{ matrix.runs_on }}

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Silencing rubocop warnings until https://tickets.puppetlabs.com/browse/CONT-725
2+
# is completed
3+
AllCops:
4+
DisabledByDefault: true

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ if RUBY_VERSION =~ /^1\.?9/
1717
gem 'ffi', '<= 1.9.14'
1818
end
1919

20-
gem 'rspec', *location_for(ENV['RSPEC_GEM_VERSION'] || '~> 3.0')
21-
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'] || '~> 7.0')
22-
gem 'facter', *location_for(ENV['FACTER_GEM_VERSION'] || '~> 4.0')
20+
gem 'rspec', *location_for(!ENV['RSPEC_GEM_VERSION']&.empty? ? ENV['RSPEC_GEM_VERSION'] : '~> 3.0')
21+
gem 'puppet', *location_for(!ENV['PUPPET_GEM_VERSION']&.empty? ? ENV['PUPPET_GEM_VERSION'] : '~> 7.0')
22+
gem 'facter', *location_for(!ENV['FACTER_GEM_VERSION']&.empty? ? ENV['FACTER_GEM_VERSION'] : '~> 4.0')
2323
gem 'pry', :group => :development
2424

2525
if RUBY_VERSION =~ /^1\.?/

Rakefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'rake'
22
require 'rspec/core/rake_task'
3+
require 'rubocop/rake_task'
34
require 'bundler/gem_tasks'
45
require 'fileutils'
56
require 'puppet'
@@ -89,3 +90,7 @@ task :test do
8990
Rake::Task['test:teardown'].invoke
9091
end
9192
end
93+
94+
RuboCop::RakeTask.new(:rubocop) do |task|
95+
task.options = %w[-D -S -E]
96+
end

spec/classes/test_registry_spec.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
require 'spec_helper'
22

33
describe 'test::registry', :if => Puppet.version.to_f >= 4.0 do
4-
let(:facts) do
5-
{
6-
:operatingsystem => 'windows',
7-
}
8-
end
9-
4+
let(:facts) { {:os => { :name => 'windows' } } }
5+
106
it { should compile.with_all_deps }
117
end

0 commit comments

Comments
 (0)