puppet-lint-lookup_in_parameter-check 1.0.0 → 2.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: 306b66e0da869127acdf80e59dbabefe5c58dacc396bf6e47f661c9e1d5c766a
4
- data.tar.gz: ccd82125accb783e960bc3c5a89657247859da71bdd025055f9df4b426901bab
3
+ metadata.gz: 293087673f08d7e9d2fa3532a16c30cbb0f657d598911427eaf2e439801d2898
4
+ data.tar.gz: dbb528ac933229b6a606e2000902db34fa6e623e8b44bfa8ec2c0bacc3e83928
5
5
  SHA512:
6
- metadata.gz: 0b394aa75ca884ccc45d0118a53b434efeb95a1c9e780144c6d5d9f9ab72836f500f696031e523d1cbaa060a2770f784560778499c4e953559cfc049e3f07713
7
- data.tar.gz: b7ea9768113811b52622c9c641b753107b86b2322f3e36c116b5545ce0a395a5e7307e7d4395b7d711c19c55ed53a4f4d279a05f8e2b25cc53cdfcb1fb6e2064
6
+ metadata.gz: 5fb5502e3aab6991586eabf0b016453d0b343eb230d57cc27ff11be139dd5ee9e42b1abc9528a0ad66cc58b63f4b550132a263795308ef25eb8f77d214a948c0
7
+ data.tar.gz: 6c78cfc4d34f8c9c9d643aa05579317165f368e0d47a964d2a4608c316dd76bfdc094184ead67a5493b835210f965b3a4c157a7cc38606e304197d9e824a8f29
@@ -0,0 +1,17 @@
1
+ version: 2
2
+ updates:
3
+ # raise PRs for gem updates
4
+ - package-ecosystem: bundler
5
+ directory: "/"
6
+ schedule:
7
+ interval: daily
8
+ time: "13:00"
9
+ open-pull-requests-limit: 10
10
+
11
+ # Maintain dependencies for GitHub Actions
12
+ - package-ecosystem: github-actions
13
+ directory: "/"
14
+ schedule:
15
+ interval: daily
16
+ time: "13:00"
17
+ open-pull-requests-limit: 10
@@ -10,14 +10,16 @@ jobs:
10
10
  runs-on: ubuntu-latest
11
11
  if: github.repository_owner == 'voxpupuli'
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Install Ruby 3.0
15
15
  uses: ruby/setup-ruby@v1
16
16
  with:
17
17
  ruby-version: '3.0'
18
18
  bundler: 'none'
19
+ env:
20
+ BUNDLE_WITHOUT: release:development:rubocop
19
21
  - name: Build gem
20
- run: gem build *.gemspec
22
+ run: gem build --strict --verbose *.gemspec
21
23
  - name: Publish gem to rubygems.org
22
24
  run: gem push *.gem
23
25
  env:
@@ -1,29 +1,43 @@
1
1
  name: Test
2
2
 
3
3
  on:
4
- - pull_request
5
- - push
4
+ pull_request: {}
5
+ push:
6
+ branches:
7
+ - master
8
+ - main
6
9
 
7
10
  env:
8
11
  BUNDLE_WITHOUT: release
9
12
 
10
13
  jobs:
14
+ rubocop:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ - name: Setup ruby
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: '3.0'
22
+ bundler-cache: true
23
+ - name: Run rake rubocop
24
+ run: bundle exec rake rubocop
11
25
  test:
12
26
  runs-on: ubuntu-latest
13
27
  strategy:
14
28
  fail-fast: false
15
29
  matrix:
16
30
  include:
17
- - ruby: "2.4"
18
- - ruby: "2.5"
19
- - ruby: "2.6"
20
31
  - ruby: "2.7"
21
32
  - ruby: "3.0"
33
+ - ruby: "3.1"
22
34
  coverage: "yes"
35
+ - ruby: "3.2"
23
36
  env:
24
37
  COVERAGE: ${{ matrix.coverage }}
38
+ name: Ruby ${{ matrix.ruby }}
25
39
  steps:
26
- - uses: actions/checkout@v2
40
+ - uses: actions/checkout@v3
27
41
  - name: Install Ruby ${{ matrix.ruby }}
28
42
  uses: ruby/setup-ruby@v1
29
43
  with:
@@ -32,4 +46,12 @@ jobs:
32
46
  - name: Run tests
33
47
  run: bundle exec rake spec
34
48
  - name: Verify gem builds
35
- run: gem build *.gemspec
49
+ run: gem build --strict --verbose *.gemspec
50
+ tests:
51
+ needs:
52
+ - rubocop
53
+ - test
54
+ runs-on: ubuntu-latest
55
+ name: Test suite
56
+ steps:
57
+ - run: echo Test suite completed
data/.rubocop.yml CHANGED
@@ -1,6 +1,12 @@
1
+ ---
2
+ inherit_from: .rubocop_todo.yml
3
+
4
+ # Managed by modulesync - DO NOT EDIT
5
+ # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
6
+
1
7
  inherit_gem:
2
- voxpupuli-test: rubocop.yml
8
+ voxpupuli-rubocop: rubocop.yml
3
9
 
4
- Style/FileName:
10
+ Naming/FileName:
5
11
  Exclude:
6
12
  - "*.gemspec"
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,34 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2023-04-21 11:42:36 UTC using RuboCop version 1.50.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: Prefixes, AllowedPatterns.
11
+ # Prefixes: when, with, without
12
+ RSpec/ContextWording:
13
+ Exclude:
14
+ - 'spec/puppet-lint/plugins/lookup_in_parameter/lookup_in_parameter_spec.rb'
15
+
16
+ # Offense count: 1
17
+ # Configuration parameters: IgnoredMetadata.
18
+ RSpec/DescribeClass:
19
+ Exclude:
20
+ - '**/spec/features/**/*'
21
+ - '**/spec/requests/**/*'
22
+ - '**/spec/routing/**/*'
23
+ - '**/spec/system/**/*'
24
+ - '**/spec/views/**/*'
25
+ - 'spec/puppet-lint/plugins/lookup_in_parameter/lookup_in_parameter_spec.rb'
26
+
27
+ # Offense count: 2
28
+ # This cop supports unsafe autocorrection (--autocorrect-all).
29
+ # Configuration parameters: EnforcedStyle.
30
+ # SupportedStyles: always, always_true, never
31
+ Style/FrozenStringLiteralComment:
32
+ Exclude:
33
+ - 'Gemfile'
34
+ - 'Rakefile'
data/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [2.0.0](https://github.com/voxpupuli/puppet-lint-lookup_in_parameter-check/tree/2.0.0) (2023-04-21)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/puppet-lint-lookup_in_parameter-check/compare/1.1.0...2.0.0)
8
+
9
+ **Breaking changes:**
10
+
11
+ - Drop Ruby \< 2.7; Add RuboCop [\#6](https://github.com/voxpupuli/puppet-lint-lookup_in_parameter-check/pull/6) ([bastelfreak](https://github.com/bastelfreak))
12
+
13
+ ## [1.1.0](https://github.com/voxpupuli/puppet-lint-lookup_in_parameter-check/tree/1.1.0) (2023-02-24)
14
+
15
+ [Full Changelog](https://github.com/voxpupuli/puppet-lint-lookup_in_parameter-check/compare/1.0.0...1.1.0)
16
+
17
+ **Merged pull requests:**
18
+
19
+ - Mark compatible with puppet-lint 3.x [\#3](https://github.com/voxpupuli/puppet-lint-lookup_in_parameter-check/pull/3) ([ekohl](https://github.com/ekohl))
20
+
5
21
  ## [1.0.0](https://github.com/voxpupuli/puppet-lint-lookup_in_parameter-check/tree/1.0.0) (2021-10-28)
6
22
 
7
23
  [Full Changelog](https://github.com/voxpupuli/puppet-lint-lookup_in_parameter-check/compare/5a7c1367870df1f8cd84621e74f50cc850c66311...1.0.0)
data/Gemfile CHANGED
@@ -3,10 +3,19 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :release do
6
- gem 'github_changelog_generator', require: false
6
+ gem 'faraday-retry', '~> 2.1', require: false
7
+ gem 'github_changelog_generator', '~> 1.16.4', require: false
7
8
  end
8
9
 
9
- group :coverage, optional: ENV['COVERAGE']!='yes' do
10
- gem 'simplecov-console', :require => false
11
- gem 'codecov', :require => false
10
+ group :coverage, optional: ENV['COVERAGE'] != 'yes' do
11
+ gem 'codecov', require: false
12
+ gem 'simplecov-console', require: false
13
+ end
14
+
15
+ group :development do
16
+ gem 'rake', '~> 13.0', '>= 13.0.6'
17
+ gem 'rspec', '~> 3.12'
18
+ gem 'rspec-collection_matchers', '~> 1.2'
19
+ gem 'rspec-its', '~> 1.3'
20
+ gem 'voxpupuli-rubocop', '~> 1.1'
12
21
  end
data/Rakefile CHANGED
@@ -7,13 +7,28 @@ task default: :spec
7
7
  begin
8
8
  require 'rubygems'
9
9
  require 'github_changelog_generator/task'
10
-
10
+ rescue LoadError
11
+ # github-changelog-generator is an optional group
12
+ else
11
13
  GitHubChangelogGenerator::RakeTask.new :changelog do |config|
12
14
  config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file."
13
- config.exclude_labels = %w{duplicate question invalid wontfix wont-fix skip-changelog modulesync}
15
+ config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog modulesync]
14
16
  config.user = 'voxpupuli'
15
17
  config.project = 'puppet-lint-lookup_in_parameter-check'
16
18
  config.future_release = Gem::Specification.load("#{config.project}.gemspec").version
17
19
  end
20
+ end
21
+
22
+ begin
23
+ require 'rubocop/rake_task'
18
24
  rescue LoadError
25
+ # RuboCop is an optional group
26
+ else
27
+ RuboCop::RakeTask.new(:rubocop) do |task|
28
+ # These make the rubocop experience maybe slightly less terrible
29
+ task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
30
+
31
+ # Use Rubocop's Github Actions formatter if possible
32
+ task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true'
33
+ end
19
34
  end
@@ -17,6 +17,7 @@ PuppetLint.new_check(:lookup_in_parameter) do
17
17
  when :FUNCTION_NAME
18
18
  next unless active
19
19
  next unless token.value == 'lookup'
20
+
20
21
  notify :warning, {
21
22
  message: 'lookup used to set the default value of a parameter',
22
23
  line: token.line,
@@ -2,14 +2,13 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'puppet-lint-lookup_in_parameter-check'
5
- spec.version = '1.0.0'
6
- spec.authors = ['Romain Tartière']
7
- spec.email = ['romain@blogreen.org']
5
+ spec.version = '2.0.0'
6
+ spec.authors = ['Romain Tartière', 'Vox Pupuli']
7
+ spec.email = ['voxpupuli@groups.io']
8
8
 
9
9
  spec.summary = 'Check lookup is not used in parameters'
10
10
  spec.homepage = 'https://github.com/voxpupuli/puppet-lint-lookup_in_parameter-check'
11
11
  spec.license = 'MIT'
12
- spec.required_ruby_version = '>= 2.4.0'
13
12
 
14
13
  spec.metadata['homepage_uri'] = spec.homepage
15
14
  spec.metadata['source_code_uri'] = spec.homepage
@@ -24,11 +23,7 @@ Gem::Specification.new do |spec|
24
23
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
25
24
  spec.require_paths = ['lib']
26
25
 
27
- spec.add_dependency 'puppet-lint', '~> 2.0'
28
- spec.add_development_dependency 'rake'
29
- spec.add_development_dependency 'rspec'
30
- spec.add_development_dependency 'rspec-collection_matchers'
31
- spec.add_development_dependency 'rspec-its'
32
- spec.add_development_dependency 'rubocop'
33
- spec.add_development_dependency 'voxpupuli-test'
26
+ spec.required_ruby_version = '>= 2.7.0'
27
+
28
+ spec.add_dependency 'puppet-lint', '>= 3', '< 5'
34
29
  end
metadata CHANGED
@@ -1,116 +1,39 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-lint-lookup_in_parameter-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Romain Tartière
8
+ - Vox Pupuli
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2021-10-28 00:00:00.000000000 Z
12
+ date: 2023-04-21 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: puppet-lint
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.0'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '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: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec-collection_matchers
57
16
  requirement: !ruby/object:Gem::Requirement
58
17
  requirements:
59
18
  - - ">="
60
19
  - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
20
+ version: '3'
21
+ - - "<"
67
22
  - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec-its
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
23
+ version: '5'
24
+ type: :runtime
91
25
  prerelease: false
92
26
  version_requirements: !ruby/object:Gem::Requirement
93
27
  requirements:
94
28
  - - ">="
95
29
  - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: voxpupuli-test
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
30
+ version: '3'
31
+ - - "<"
109
32
  - !ruby/object:Gem::Version
110
- version: '0'
33
+ version: '5'
111
34
  description:
112
35
  email:
113
- - romain@blogreen.org
36
+ - voxpupuli@groups.io
114
37
  executables: []
115
38
  extensions: []
116
39
  extra_rdoc_files: []
@@ -119,11 +42,13 @@ files:
119
42
  - ".github/ISSUE_TEMPLATE.md"
120
43
  - ".github/PULL_REQUEST_TEMPLATE.md"
121
44
  - ".github/SECURITY.md"
45
+ - ".github/dependabot.yml"
122
46
  - ".github/workflows/release.yml"
123
47
  - ".github/workflows/test.yml"
124
48
  - ".gitignore"
125
49
  - ".rspec"
126
50
  - ".rubocop.yml"
51
+ - ".rubocop_todo.yml"
127
52
  - CHANGELOG.md
128
53
  - CODE_OF_CONDUCT.md
129
54
  - Gemfile
@@ -149,14 +74,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
74
  requirements:
150
75
  - - ">="
151
76
  - !ruby/object:Gem::Version
152
- version: 2.4.0
77
+ version: 2.7.0
153
78
  required_rubygems_version: !ruby/object:Gem::Requirement
154
79
  requirements:
155
80
  - - ">="
156
81
  - !ruby/object:Gem::Version
157
82
  version: '0'
158
83
  requirements: []
159
- rubygems_version: 3.2.22
84
+ rubygems_version: 3.2.33
160
85
  signing_key:
161
86
  specification_version: 4
162
87
  summary: Check lookup is not used in parameters