Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support hiera v5 #74

Closed
wants to merge 117 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
98e002f
Release 0.1.0
mcanevet Apr 22, 2015
b7e36af
Skip symlink files
mcanevet Apr 23, 2015
7ba1ed3
Release 0.1.1
mcanevet Apr 23, 2015
1313251
Skip symlink files
mcanevet Apr 23, 2015
42d120c
Release 0.1.2
mcanevet Apr 23, 2015
de04292
add @@logger and log level option
saimonn Apr 23, 2015
fbd0d88
update README
saimonn Apr 23, 2015
94b2b4a
Release 0.1.3
saimonn Apr 23, 2015
5cd33c0
update README
saimonn Apr 29, 2015
ab57f49
Search for files in all subfolders
roman-mueller Sep 11, 2015
bfa525d
README
raphink Sep 14, 2015
ce24b68
Fix README
raphink Sep 14, 2015
52efdc2
Add .travis.yml
raphink Sep 14, 2015
c01de61
Add Rakefile
raphink Sep 14, 2015
e9266c4
Release 0.1.4
raphink Sep 14, 2015
bfe4751
Add some dev dependencies
raphink Sep 14, 2015
1a7499a
Implement a .ghostbusterignore file
roidelapluie Oct 7, 2015
3c62fdd
Release 0.2.0
mcanevet Oct 7, 2015
a258917
Add documentation and allow relative paths in .ghostbusterignore file
roidelapluie Oct 7, 2015
72718e7
Release 0.2.1
raphink Oct 7, 2015
706d632
Configure client for PuppetDB API v4
daenney Apr 26, 2016
edc90c9
Update README.md
mcanevet Apr 26, 2016
c8d624e
Update CHANGELOG
mcanevet Apr 26, 2016
1f72e63
Release 0.3.0
mcanevet Apr 26, 2016
4ff0270
Output to JSON (fixes #17)
mcanevet Apr 28, 2016
9cf9a5c
Release 0.4.0
mcanevet Apr 28, 2016
7c1c5ee
Fix unused files detection
mcanevet Apr 29, 2016
97948e2
Release 0.4.1
mcanevet May 2, 2016
3175168
Fix variable name
mcanevet May 2, 2016
bbe1b58
Release 0.4.2
mcanevet May 2, 2016
11586d4
Implement --key, --cert and --ca options
Phil0xF7 May 2, 2016
9405ee9
Use found instead of count
mcanevet May 4, 2016
eb749a0
Lookup files used by fileserver in puppetdb
mcanevet May 4, 2016
80a98d8
Release 0.4.3
mcanevet May 4, 2016
234d014
Fix unless/if issue
mcanevet May 4, 2016
18b145a
Release 0.4.4
mcanevet May 4, 2016
5d2cbea
Don't use regex
mcanevet May 4, 2016
2527379
Release 0.4.5
mcanevet May 4, 2016
6f967b7
Fix travis run (fixes #18)
mcanevet May 6, 2016
ed6b491
Add default rake task
mcanevet May 9, 2016
3dc5a53
Use puppet-lint plugins
mcanevet May 9, 2016
6a9f4e7
Update README.md
mcanevet May 10, 2016
a903845
Add a ghostbuster lib for refactoring
raphink May 10, 2016
f813ef7
Make a PuppetGhostbuster::PuppetDB class
raphink May 10, 2016
c2c5a6c
Use a better regexp for manifests
raphink May 10, 2016
562f8ff
Fix unit tests
mcanevet May 10, 2016
1dd3712
Fix deprecation warning in unit tests
mcanevet May 10, 2016
c3f8015
Update README.md
mcanevet May 10, 2016
5bd6e32
Release 0.5.0
mcanevet May 10, 2016
20e0968
Use fixtures for unit tests (Fixes #38)
mcanevet May 11, 2016
0e7727a
Revert ghostbuster_defines unit test logic
mcanevet May 11, 2016
1a9e417
Add a spec lib to ease PuppetDB mocking
raphink May 11, 2016
cab4166
Rename expect_puppetdb as expect_puppetdb_resources
raphink May 11, 2016
b533d83
Detect templates included in templates (Fix #37)
mcanevet May 11, 2016
0c83318
Release 0.5.1
mcanevet May 11, 2016
5b92537
Detect unused hiera files (fixes #26)
mcanevet May 12, 2016
85650f9
Update README.md
mcanevet May 12, 2016
1fbfadc
Release 0.6.0
mcanevet May 12, 2016
0aaf0e6
Use fixtures for puppetdb queries (Fixes #42)
mcanevet May 13, 2016
54caed6
Detect unused facts (fixes #45)
mcanevet May 11, 2016
4b3c902
Detect unused functions (fixes #43)
mcanevet May 16, 2016
8c77738
Detect unused types (fixes #44)
mcanevet May 16, 2016
fdc1d9d
Release 0.7.0
mcanevet May 16, 2016
809eae2
Update README.md
mcanevet May 16, 2016
b561205
Use puppetdb instead of manifests for unused types detection
mcanevet May 16, 2016
684ac95
Release 0.7.1
mcanevet May 16, 2016
1a64c41
Add missing monkey patch
mcanevet May 17, 2016
b8f1549
Detect facts used in inline_template (fixes #53)
mcanevet May 19, 2016
207c9fe
Release 0.7.2
mcanevet May 19, 2016
a8c97cb
Convert fact value to boolean (fixes #59)
mcanevet Jun 8, 2016
c73e109
Release 0.7.3
mcanevet Jun 8, 2016
b1a3aad
Support puppet-lint v2 (Fixes #61)
mcanevet Sep 23, 2016
ad92471
Release 0.8.0
mcanevet Sep 23, 2016
c05fc56
Use PQL in classes
raphink Aug 17, 2017
651bae8
Use PQL to query resources and cache list
raphink Aug 17, 2017
3321687
Use PQL to query file resources
raphink Aug 17, 2017
7449efc
Only query not deactivated nodes
raphink Aug 17, 2017
5d23d6d
'Test' PQL queries
raphink Aug 17, 2017
bb3b599
List resouces by type, not title
raphink Aug 17, 2017
edf34fa
No debug
raphink Aug 17, 2017
b6fded4
dir_name, not file_name
raphink Aug 17, 2017
451a201
Replace all instances of parameters.
raphink Aug 17, 2017
b0773e3
Upgrade Ruby version for Travis
raphink Aug 17, 2017
5d420df
Fix PuppetDB URL
raphink Aug 18, 2017
b090259
Missing closing brace
raphink Aug 18, 2017
d508161
Fix query
raphink Aug 18, 2017
1f0a688
Fix tests by rstripping jgrep command
raphink Aug 18, 2017
d03de82
Fix hiera_files query
raphink Aug 18, 2017
52eceb1
deactivated IS null
raphink Aug 18, 2017
c60ff07
Release 0.9.0
raphink Aug 18, 2017
0132017
Update version to 0.9.0
raphink Aug 18, 2017
33d4179
Require puppetdb-ruby > 1.1.1
raphink Aug 18, 2017
4b57143
typo fix in the readme file
Sher-Chowdhury Oct 10, 2017
d576145
Add defaults for openssl
raphink May 6, 2020
2b74fd7
Get puppetserver server from PuppetDB config
raphink May 6, 2020
1ddfcfa
missing require
raphink May 6, 2020
681540d
Use localcacert
raphink May 6, 2020
54b06cb
Initialize settings once
raphink May 6, 2020
b2da225
add transfer notice to README; adjust gemspec accordingly
Aug 23, 2023
e6ecfac
add/change flags according to voxpupuli standards
Aug 23, 2023
ce951b5
Update from voxpupuli modulesync_config
Aug 23, 2023
11308f6
rubocop autofixes
Aug 23, 2023
abb0006
add rubocop todos
Aug 23, 2023
d0adc7b
revert spec_helper.rb
Aug 23, 2023
1daf374
remove no longer available Puppet/util/puppetdb references and hardco…
Aug 23, 2023
3a8dc97
rubocop autofixes and todos
Aug 23, 2023
de21d76
semantically version puppetdb-ruby gem in gemspec
Aug 23, 2023
728d4e6
add bounded gem dependencies for target versions >= ruby2.7
Aug 23, 2023
8419488
readded reading puppetdb url setting from puppet/util/puppetdb
Aug 25, 2023
06b0bae
added some unsafe rubocop fixes
Aug 26, 2023
a5e8fcd
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 4, 2023
d7636c1
Update puppet-lint requirement from >= 1.0, < 3.0 to >= 1.0, < 5.0
dependabot[bot] Aug 26, 2023
3f94d57
Support hiera v5
marek130 Nov 1, 2023
2cbca2a
Fix tests. Replace have with eq
marek130 Nov 1, 2023
03e8cf8
fix hiera.yaml
marek130 Nov 1, 2023
2e48b4f
Remove yaml suffix for hiera files
marek130 Nov 1, 2023
d170d66
Fix string interpolation
marek130 Nov 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
# raise PRs for gem updates
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
time: "13:00"
open-pull-requests-limit: 10

# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "13:00"
open-pull-requests-limit: 10
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
if: github.repository_owner == 'voxpupuli'
steps:
- uses: actions/checkout@v4
- name: Install Ruby 3.0
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler: 'none'
env:
BUNDLE_WITHOUT: release:development:rubocop
- name: Build gem
run: gem build --strict --verbose *.gemspec
- name: Publish gem to rubygems.org
run: gem push *.gem
env:
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
- name: Setup GitHub packages access
run: |
mkdir -p ~/.gem
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
chmod 0600 ~/.gem/credentials
- name: Publish gem to GitHub packages
run: gem push --key github --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem
57 changes: 57 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Test

on:
pull_request: {}
push:
branches:
- master
- main

env:
BUNDLE_WITHOUT: release

jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: Run rake rubocop
run: bundle exec rake rubocop
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby: "2.7"
- ruby: "3.0"
- ruby: "3.1"
coverage: "yes"
- ruby: "3.2"
env:
COVERAGE: ${{ matrix.coverage }}
name: Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v4
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake spec
- name: Verify gem builds
run: gem build --strict --verbose *.gemspec
tests:
needs:
- rubocop
- test
runs-on: ubuntu-latest
name: Test suite
steps:
- run: echo Test suite completed
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.gem
*.swp
Gemfile.lock
.bundle/
/.bundle/
/vendor/gems/
/Gemfile.lock
vendor/bundle
.vendor/
12 changes: 12 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
inherit_from: .rubocop_todo.yml

# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

inherit_gem:
voxpupuli-rubocop: rubocop.yml

Naming/FileName:
Exclude:
- "*.gemspec"
177 changes: 177 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-08-26 05:38:06 UTC using RuboCop version 1.54.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
Exclude:
- 'puppet-ghostbuster.gemspec'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Exclude:
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'

# Offense count: 6
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'spec/fixtures/modules/foo/lib/puppet/parser/functions/bar.rb'
- 'spec/fixtures/modules/foo/lib/puppet/parser/functions/baz.rb'
- 'spec/fixtures/modules/foo/lib/puppet/parser/functions/foo.rb'
- 'spec/fixtures/modules/foo/lib/puppet/parser/functions/quux.rb'
- 'spec/fixtures/modules/foo/lib/puppet/type/bar.rb'
- 'spec/fixtures/modules/foo/lib/puppet/type/foo.rb'

# Offense count: 12
Lint/NonLocalExitFromIterator:
Exclude:
- 'lib/puppet-lint/plugins/check_ghostbuster_classes.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_defines.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'

# Offense count: 1
# Configuration parameters: AllowKeywordBlockArguments.
Lint/UnderscorePrefixedVariableName:
Exclude:
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'

# Offense count: 1
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
Naming/MethodParameterName:
Exclude:
- 'spec/spec_helper.rb'

# Offense count: 8
# Configuration parameters: IgnoredMetadata.
RSpec/DescribeClass:
Exclude:
- '**/spec/features/**/*'
- '**/spec/requests/**/*'
- '**/spec/routing/**/*'
- '**/spec/system/**/*'
- '**/spec/views/**/*'
- 'spec/puppet-lint/plugins/ghostbuster_classes_spec.rb'
- 'spec/puppet-lint/plugins/ghostbuster_defines_spec.rb'
- 'spec/puppet-lint/plugins/ghostbuster_facts_spec.rb'
- 'spec/puppet-lint/plugins/ghostbuster_files_spec.rb'
- 'spec/puppet-lint/plugins/ghostbuster_functions_spec.rb'
- 'spec/puppet-lint/plugins/ghostbuster_hiera_files_spec.rb'
- 'spec/puppet-lint/plugins/ghostbuster_templates_spec.rb'
- 'spec/puppet-lint/plugins/ghostbuster_types_spec.rb'

# Offense count: 2
RSpec/RepeatedDescription:
Exclude:
- 'spec/puppet-lint/plugins/ghostbuster_facts_spec.rb'

# Offense count: 9
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Exclude:
- 'lib/puppet-lint/plugins/check_ghostbuster_classes.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_defines.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_facts.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_types.rb'
- 'spec/spec_helper.rb'

# Offense count: 5
Style/ClassVars:
Exclude:
- 'lib/puppet-ghostbuster/puppetdb.rb'

# Offense count: 9
# Configuration parameters: AllowedConstants.
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/puppet-ghostbuster/puppetdb.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_classes.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_defines.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_facts.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_types.rb'

# Offense count: 11
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
Style/FrozenStringLiteralComment:
Exclude:
- 'lib/puppet-ghostbuster/puppetdb.rb'
- 'lib/puppet-ghostbuster/version.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_classes.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_defines.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_facts.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_types.rb'
- 'spec/spec_helper.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Style/IfUnlessModifier:
Exclude:
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: literals, strict
Style/MutableConstant:
Exclude:
- 'lib/puppet-ghostbuster/version.rb'

# Offense count: 15
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
- 'lib/puppet-lint/plugins/check_ghostbuster_facts.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'

# Offense count: 15
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/ZeroLengthPredicate:
Exclude:
- 'lib/puppet-lint/plugins/check_ghostbuster_facts.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_functions.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_hiera_files.rb'
- 'lib/puppet-lint/plugins/check_ghostbuster_templates.rb'

# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 189
Loading