scelint 0.3.0 → 0.4.1

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: 7d121727337167a02dc39353a853b84f507f4dc6cf5c45c85bbe56d94086e02e
4
- data.tar.gz: 3f9b21206628774aaed2d47b6a908fe6be641b5a194dcd23adca977b19832bb4
3
+ metadata.gz: 4a057d6c2d1fea9e9d5ff8cc067236685a6c5fa1458091535c8b64e7e7faddf1
4
+ data.tar.gz: c520052501d0af91fd1b031cdf41e6c8e1185b4475d4b51385d2c45cc326a12f
5
5
  SHA512:
6
- metadata.gz: afaf9b7895df1b77779d97c3bec5ad28f03b706bdc8bf1538f76cab370e30ec0a5c324630796fe861d6ef2db413c079d371f4c854d3d9a0baa28a736fd184e7d
7
- data.tar.gz: aeb34f03d6970e7947dfb9b4c501e9ca902d9d92ea2d68ff96bfc78439eec526edeac4fb53ad845e8029821cad699b86bd9525eef817e8ea5ef1da284ea824ec
6
+ metadata.gz: e9ff311ea144f952f84f3215bfec4833370216e4fb89b10fcf03a1577b391e55ea66d75f6ca887c86214ad09a7b0a9f91c3237c9e1645af13f1a359cd069ed10
7
+ data.tar.gz: 575be45fdf396183fe5dee7e19d6b990b21f8a17e55f7f8620a7441945a82796ce159fe2986f7d5a01a62f3865e8a191383b7c7f7a49a664d7ef00e363af9d92
@@ -34,7 +34,7 @@ jobs:
34
34
  name: Add issue to project
35
35
  runs-on: ubuntu-latest
36
36
  steps:
37
- - uses: actions/add-to-project@v0.5.0
37
+ - uses: actions/add-to-project@v1.0.2
38
38
  with:
39
39
  project-url: https://github.com/orgs/simp/projects/11
40
40
  github-token: ${{ secrets.AUTO_TRIAGE_TOKEN }}
@@ -13,11 +13,11 @@ jobs:
13
13
  name: 'Ruby Style'
14
14
  runs-on: ubuntu-latest
15
15
  steps:
16
- - uses: actions/checkout@v3
16
+ - uses: actions/checkout@v6
17
17
  - name: "Install Ruby"
18
18
  uses: ruby/setup-ruby@v1
19
19
  with:
20
- ruby-version: 3.3
20
+ ruby-version: 4.0.0
21
21
  bundler-cache: true
22
22
  - run: bundle exec rake rubocop
23
23
 
@@ -27,12 +27,13 @@ jobs:
27
27
  strategy:
28
28
  matrix:
29
29
  ruby:
30
- - '2.7' # Puppet 7
31
- - '3.2' # Puppet 8
32
- - '3.3' # Latest
30
+ - '3.2' # Puppet/OpenVox 8
31
+ - '3.3'
32
+ - '3.4'
33
+ - '4.0' # Latest
33
34
 
34
35
  steps:
35
- - uses: actions/checkout@v3
36
+ - uses: actions/checkout@v6
36
37
  - name: Set up Ruby
37
38
  uses: ruby/setup-ruby@v1
38
39
  with:
@@ -63,7 +63,7 @@ jobs:
63
63
  steps:
64
64
  - name: "Assert '${{ github.ref }}' is a tag"
65
65
  run: '[[ "$GITHUB_REF" =~ ^refs/tags/ ]] || { echo "::error ::GITHUB_REF is not a tag: ${GITHUB_REF}"; exit 1 ; }'
66
- - uses: actions/checkout@v3
66
+ - uses: actions/checkout@v6
67
67
  with:
68
68
  ref: ${{ github.ref }}
69
69
  clean: true
@@ -92,7 +92,7 @@ jobs:
92
92
  echo "release_command=$GEM_RELEASE_COMMAND" | tee -a "$GITHUB_OUTPUT"
93
93
  - uses: ruby/setup-ruby@v1
94
94
  with:
95
- ruby-version: 2.7
95
+ ruby-version: 4.0.0
96
96
  bundler-cache: true
97
97
  - name: Test build the package
98
98
  run: "${{ steps.commands.outputs.build_command }}"
@@ -117,7 +117,7 @@ jobs:
117
117
  tag: ${{ steps.tag-check.outputs.tag }}
118
118
  steps:
119
119
  - name: Checkout code
120
- uses: actions/checkout@v3
120
+ uses: actions/checkout@v6
121
121
  with:
122
122
  ref: ${{ github.ref }}
123
123
  clean: true
@@ -181,13 +181,13 @@ jobs:
181
181
  PKG_DIR: ${{ needs.releng-checks.outputs.pkg_dir }}
182
182
  steps:
183
183
  - name: Checkout code
184
- uses: actions/checkout@v3
184
+ uses: actions/checkout@v6
185
185
  with:
186
186
  ref: ${{ github.ref }}
187
187
  clean: true
188
188
  - uses: ruby/setup-ruby@v1
189
189
  with:
190
- ruby-version: 2.7
190
+ ruby-version: 4.0.0
191
191
  bundler-cache: true
192
192
  - name: Build RubyGem
193
193
  run: |
data/.rubocop.yml CHANGED
@@ -1,11 +1,11 @@
1
1
  ---
2
- require:
2
+ plugins:
3
3
  - rubocop-performance
4
4
  - rubocop-rspec
5
5
  - rubocop-rake
6
6
  AllCops:
7
7
  DisplayCopNames: true
8
- TargetRubyVersion: "2.7"
8
+ TargetRubyVersion: 3.2
9
9
  Include:
10
10
  - "**/*.rb"
11
11
  - Gemfile
@@ -744,5 +744,49 @@ Performance/MapMethodChain:
744
744
  Enabled: true
745
745
  Performance/StringBytesize:
746
746
  Enabled: true
747
- RSpec/StringAsInstanceDoubleConstant:
747
+ Gemspec/AttributeAssignment:
748
+ Enabled: true
749
+ Layout/EmptyLinesAfterModuleInclusion:
750
+ Enabled: true
751
+ Lint/ArrayLiteralInRegexp:
752
+ Enabled: true
753
+ Lint/ConstantReassignment:
754
+ Enabled: true
755
+ Lint/CopDirectiveSyntax:
756
+ Enabled: true
757
+ Lint/RedundantTypeConversion:
758
+ Enabled: true
759
+ Lint/SharedMutableDefault:
760
+ Enabled: true
761
+ Lint/SuppressedExceptionInNumberConversion:
762
+ Enabled: true
763
+ Lint/UselessConstantScoping:
764
+ Enabled: true
765
+ Lint/UselessDefaultValueArgument:
766
+ Enabled: true
767
+ Lint/UselessOr:
768
+ Enabled: true
769
+ Naming/PredicateMethod:
770
+ Enabled: true
771
+ Style/CollectionQuerying:
772
+ Enabled: true
773
+ Style/ComparableBetween:
774
+ Enabled: true
775
+ Style/EmptyStringInsideInterpolation:
776
+ Enabled: true
777
+ Style/HashFetchChain:
778
+ Enabled: true
779
+ Style/HashSlice:
780
+ Enabled: true
781
+ Style/ItAssignment:
782
+ Enabled: true
783
+ Style/ItBlockParameter:
784
+ Enabled: true
785
+ Style/RedundantArrayFlatten:
786
+ Enabled: true
787
+ Style/RedundantFormat:
788
+ Enabled: true
789
+ Performance/ZipWithoutBlock:
790
+ Enabled: true
791
+ RSpec/IncludeExamples:
748
792
  Enabled: true
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 0.4.1 / 2026-01-26
2
+ * Support compliance_engine 0.2.x
3
+ * Test with Ruby 4.0
4
+
5
+ ### 0.4.0 / 2025-08-26
6
+ * Updates for recent rubocop and plugins
7
+ * Bump minimum required Ruby version to 3.2.0 (oldest version we're testing with)
8
+
1
9
  ### 0.3.0 / 2025-01-16
2
10
  * Use compliance_engine gem for data ingest
3
11
  * Check that all fact combinations return hiera data
data/Gemfile CHANGED
@@ -3,18 +3,18 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in scelint.gemspec
4
4
  gemspec
5
5
 
6
- gem 'rake', '~> 13.2'
6
+ gem 'rake', '~> 13.3.0'
7
7
 
8
8
  group :tests do
9
- gem 'rspec', '~> 3.13'
10
- gem 'rubocop', '~> 1.65'
11
- gem 'rubocop-performance', '~> 1.21'
12
- gem 'rubocop-rake', '~> 0.6.0'
13
- gem 'rubocop-rspec', '~> 3.0'
9
+ gem 'rspec', '~> 3.13.1'
10
+ gem 'rubocop', '~> 1.81.0'
11
+ gem 'rubocop-performance', '~> 1.26.0'
12
+ gem 'rubocop-rake', '~> 0.7.1'
13
+ gem 'rubocop-rspec', '~> 3.9.0'
14
14
  end
15
15
 
16
16
  group :development do
17
- gem 'pry', '~> 0.14.1'
18
- gem 'pry-byebug', '~> 3.10'
19
- gem 'rdoc', '~> 6.4'
17
+ gem 'pry', '~> 0.16.0'
18
+ gem 'pry-byebug', '~> 3.12.0'
19
+ gem 'rdoc', '~> 7.1.0'
20
20
  end
data/lib/scelint/cli.rb CHANGED
@@ -36,7 +36,7 @@ class Scelint::CLI < Thor
36
36
  end
37
37
 
38
38
  message = "Checked #{count} files."
39
- if lint.errors.count == 0
39
+ if lint.errors.empty?
40
40
  message += ' No errors.'
41
41
  exit_code = 0
42
42
  else
@@ -44,12 +44,12 @@ class Scelint::CLI < Thor
44
44
  exit_code = 1
45
45
  end
46
46
 
47
- if lint.warnings.count > 0
47
+ unless lint.warnings.empty?
48
48
  message += " #{lint.warnings.count} warnings."
49
49
  exit_code = 1 if options[:strict]
50
50
  end
51
51
 
52
- message += " #{lint.notes.count} notes." if lint.notes.count > 0
52
+ message += " #{lint.notes.count} notes." unless lint.notes.empty?
53
53
 
54
54
  logger.info message
55
55
  exit exit_code
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Scelint
4
- VERSION = '0.3.0'
4
+ VERSION = '0.4.1'
5
5
  end
data/lib/scelint.rb CHANGED
@@ -460,7 +460,7 @@ module Scelint
460
460
  # @param _check [String] The name of the check (currently unused)
461
461
  # @param _value [Object] The value to be validated (currently unused)
462
462
  # @return [Boolean] Always returns true (currently)
463
- def check_value(_file, _check, _value)
463
+ def check_value(_file, _check, _value) # rubocop:disable Naming/PredicateMethod
464
464
  # value could be anything
465
465
  true
466
466
  end
data/renovate.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:recommended"
5
+ ]
6
+ }
data/scelint.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
 
10
10
  spec.summary = 'Linter SIMP Compliance Engine data'
11
11
  spec.homepage = 'https://github.com/simp/rubygem-simp-scelint'
12
- spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
12
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.2.0')
13
13
 
14
14
  spec.metadata['homepage_uri'] = spec.homepage
15
15
  spec.metadata['source_code_uri'] = spec.homepage
@@ -26,5 +26,5 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_dependency 'deep_merge', '~> 1.2'
28
28
  spec.add_dependency 'thor', '~> 1.3'
29
- spec.add_dependency 'compliance_engine', '~> 0.1.0'
29
+ spec.add_dependency 'compliance_engine', '>= 0.1.0', '< 0.3.0'
30
30
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scelint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Pritchard
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-01-23 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: deep_merge
@@ -42,17 +41,22 @@ dependencies:
42
41
  name: compliance_engine
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
- - - "~>"
44
+ - - ">="
46
45
  - !ruby/object:Gem::Version
47
46
  version: 0.1.0
47
+ - - "<"
48
+ - !ruby/object:Gem::Version
49
+ version: 0.3.0
48
50
  type: :runtime
49
51
  prerelease: false
50
52
  version_requirements: !ruby/object:Gem::Requirement
51
53
  requirements:
52
- - - "~>"
54
+ - - ">="
53
55
  - !ruby/object:Gem::Version
54
56
  version: 0.1.0
55
- description:
57
+ - - "<"
58
+ - !ruby/object:Gem::Version
59
+ version: 0.3.0
56
60
  email:
57
61
  - simp@simp-project.org
58
62
  executables:
@@ -74,6 +78,7 @@ files:
74
78
  - lib/scelint.rb
75
79
  - lib/scelint/cli.rb
76
80
  - lib/scelint/version.rb
81
+ - renovate.json
77
82
  - scelint.gemspec
78
83
  homepage: https://github.com/simp/rubygem-simp-scelint
79
84
  licenses:
@@ -81,7 +86,6 @@ licenses:
81
86
  metadata:
82
87
  homepage_uri: https://github.com/simp/rubygem-simp-scelint
83
88
  source_code_uri: https://github.com/simp/rubygem-simp-scelint
84
- post_install_message:
85
89
  rdoc_options: []
86
90
  require_paths:
87
91
  - lib
@@ -89,15 +93,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
93
  requirements:
90
94
  - - ">="
91
95
  - !ruby/object:Gem::Version
92
- version: 2.7.0
96
+ version: 3.2.0
93
97
  required_rubygems_version: !ruby/object:Gem::Requirement
94
98
  requirements:
95
99
  - - ">="
96
100
  - !ruby/object:Gem::Version
97
101
  version: '0'
98
102
  requirements: []
99
- rubygems_version: 3.1.6
100
- signing_key:
103
+ rubygems_version: 4.0.3
101
104
  specification_version: 4
102
105
  summary: Linter SIMP Compliance Engine data
103
106
  test_files: []