puppet-debugger 1.2.0 → 1.4.0

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: 22a19451584961b6bc90d4e634da4b3c5002e92780d84a9e19d5eb9d720a2aaa
4
- data.tar.gz: f3dae2f5c9d2648b886d126395797562358829de51fcc7dac13c166a8fa70b76
3
+ metadata.gz: 588f4c8928181443aa7e98e820530d79c9efb705a7a9b95f5e447066d87cac96
4
+ data.tar.gz: 109e0616bd93547ea2e6975bbdd4e58b27e92bcc9533b206c4194d37be6a49e8
5
5
  SHA512:
6
- metadata.gz: 88c59044e15d8209a21ce58fb4491bc267e7146dfa32fc3f3ee18f4ad7c81dd7a9969fd04208b85bd4be169cd7a1c67b26de96f0e65cdf6df3b355945621fff8
7
- data.tar.gz: 75ca9baae2f01da4696b57dd7c28aad61fe251a2dcdf9909c2a4d3ed4e254fcd6ee3b64624d3b78c4b7660a6b1b303cdda92c9d23380a3349d6bf2139a1bd722
6
+ metadata.gz: 592067114dea290451e1933655d0f72ee254c8c7fb063e5bcf7901d2f3caf9afb45c7f370a5c6cbbc2c9dfff22e35a2a60d776ad94e4ba5b6a6b476e2bd82c29
7
+ data.tar.gz: b7b2a003cdc1051f58e7be727ffcdd61d5d888312eac091015c54ea1ea137ba23ad4ac2d2c1514b0a4dd5d1ef7872a850dbf576b67d25ec49f419f0d6995c3b1
data/.gitlab-ci.yml CHANGED
@@ -5,29 +5,39 @@ stages:
5
5
  - validate
6
6
  - test
7
7
  - release
8
- - deploy
9
- - web_deploy
8
+ # - deploy
9
+ #- web_deploy
10
10
 
11
- .puppet_def: &puppet_job_def
11
+ .puppet_job_def_ruby27: &puppet_job_def_ruby27
12
12
  stage: test
13
13
  script:
14
14
  - rm -f Gemfile.lock
15
- - gem update --system > /dev/null
16
- - gem install bundler > /dev/null
15
+ - gem install bundler -v 2.4.22 > /dev/null
17
16
  - bundle install --without development validate
18
- - bundle exec puppet module install puppetlabs-stdlib
17
+ - bundle exec puppet module install puppetlabs-stdlib --version 8.6.0
19
18
  - bundle exec rspec
20
19
  tags:
21
20
  - ruby
22
21
 
23
- web_trigger_staging:
24
- stage: web_deploy
25
- variables:
26
- REF: staging
27
- only:
28
- - main
22
+ .puppet_job_def_ruby30plus: &puppet_job_def_ruby30plus
23
+ stage: test
29
24
  script:
30
- - "curl -X POST -F token=$PREPL_BUILD_TRIGGER_TOKEN -F ref=$REF https://gitlab.com/api/v3/projects/1146764/trigger/builds"
25
+ - rm -f Gemfile.lock
26
+ - bundle install --without development validate
27
+ - puppet module install puppetlabs-stdlib --version 9.4.1
28
+ - bundle exec rspec
29
+ tags:
30
+ - ruby
31
+
32
+ # will be replaced by akash tf provider
33
+ # web_trigger_staging:
34
+ # stage: web_deploy
35
+ # variables:
36
+ # REF: staging
37
+ # only:
38
+ # - main
39
+ # script:
40
+ # - "curl -X POST -F token=$PREPL_BUILD_TRIGGER_TOKEN -F ref=$REF https://gitlab.com/api/v4/projects/1146764/trigger/builds"
31
41
 
32
42
  rubocop_ruby:
33
43
  stage: validate
@@ -45,7 +55,7 @@ bump_and_tag:
45
55
  stage: release
46
56
  when: manual
47
57
  tags:
48
- - ruby2.2
58
+ - ruby2.7
49
59
  only:
50
60
  - main@puppet-debugger/puppet-debugger
51
61
  script:
@@ -63,57 +73,59 @@ bump_and_tag:
63
73
  # script:
64
74
  # - "curl -X POST -F token=$PREPL_BUILD_TRIGGER_TOKEN -F ref=$REF https://gitlab.com/api/v3/projects/1146764/trigger/builds"
65
75
 
66
- .ruby_24: &ruby24
67
- image: ruby:2.4
76
+ .ruby_27: &ruby27
77
+ image: ruby:2.7
68
78
 
69
- .ruby_25: &ruby25
70
- image: ruby:2.5
79
+ .ruby_31: &ruby31
80
+ image: ruby:3.1
71
81
 
72
- .ruby_26: &ruby26
73
- image: ruby:2.6
82
+ .ruby_32: &ruby32
83
+ image: ruby:3.2
74
84
 
75
- .ruby_27: &ruby27
76
- image: ruby:2.7
85
+ .ruby_33: &ruby33
86
+ image: ruby:3.3
77
87
 
78
- gem_production:
79
- image: ruby:2.5
80
- tags:
81
- - ruby
82
- before_script:
83
- - gem install dpl
84
- stage: deploy
85
- script:
86
- - dpl --provider=rubygems --api-key=$RUBYGEMS_API_KEY
87
- only:
88
- - tags
88
+ .ruby_34: &ruby34
89
+ image: ruby:3.4
89
90
 
90
- puppet_5_ruby24:
91
- variables:
92
- PUPPET_GEM_VERSION: "~> 5.5"
93
- <<: *puppet_job_def
94
- <<: *ruby24
91
+ # gem_production:
92
+ # image: ruby:2.7
93
+ # tags:
94
+ # - ruby
95
+ # before_script:
96
+ # - gem install dpl
97
+ # stage: deploy
98
+ # script:
99
+ # - dpl --provider=rubygems --api-key=$RUBYGEMS_API_KEY
100
+ # only:
101
+ # - tags
95
102
 
96
- puppet_5_ruby25:
103
+ puppet_6_ruby27:
104
+ allow_failure: false
97
105
  variables:
98
- PUPPET_GEM_VERSION: "~> 5.5"
99
- <<: *puppet_job_def
100
- <<: *ruby25
106
+ PUPPET_GEM_VERSION: "~> 6.0"
107
+ <<: *puppet_job_def_ruby27
108
+ <<: *ruby27
101
109
 
102
- puppet_6_ruby25:
110
+ puppet_7_ruby27:
111
+ allow_failure: false
103
112
  variables:
104
- PUPPET_GEM_VERSION: "~> 6.0"
105
- <<: *puppet_job_def
106
- <<: *ruby25
113
+ PUPPET_GEM_VERSION: "~> 7.0"
114
+ <<: *puppet_job_def_ruby27
115
+ <<: *ruby27
107
116
 
108
- puppet_6_ruby26:
117
+ puppet_8_ruby3.2:
118
+ allow_failure: true
109
119
  variables:
110
- PUPPET_GEM_VERSION: "~> 6.0"
111
- <<: *puppet_job_def
112
- <<: *ruby26
120
+ PUPPET_GEM_VERSION: "~> 8.0"
121
+ <<: *puppet_job_def_ruby30plus
122
+ <<: *ruby32
113
123
 
114
- puppet_6_ruby27:
124
+ puppet_8_ruby3.4:
115
125
  allow_failure: true
116
126
  variables:
117
- PUPPET_GEM_VERSION: "~> 6.0"
118
- <<: *puppet_job_def
119
- <<: *ruby27
127
+ PUPPET_GEM_VERSION: "~> 8.2"
128
+ <<: *puppet_job_def_ruby30plus
129
+ <<: *ruby32
130
+
131
+
data/.rubocop_todo.yml CHANGED
@@ -132,7 +132,7 @@ Style/IfUnlessModifier:
132
132
  - 'lib/puppet-debugger/hooks.rb'
133
133
 
134
134
  # Offense count: 1
135
- Style/MethodMissingSuper:
135
+ Lint/MissingSuper:
136
136
  Exclude:
137
137
  - 'lib/puppet-debugger/debugger_code.rb'
138
138
 
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Puppet Debugger Changelog
2
2
 
3
3
  ## Unreleased
4
+ ## 1.4
5
+ - Add support for puppet 8
6
+ - Add support for ruby 3 (tested with 3.0-3.4)
7
+ - Updates rdoc to 6.0 due to json issue
8
+
9
+ ## 1.3
10
+ - Fix failures when using Bolt 3.23+
11
+ - Relax tty-pager constraints (for Bolt)
12
+ - Stop testing puppet 5
13
+ - Stop testing ruby 2.4
4
14
  ## 1.2
5
15
  - Fix puppetdb_query errors when bolt_pdb_client was not loaded
6
16
  ## 1.1
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source 'http://rubygems.org'
4
4
  gem 'awesome_print', '~> 1.7'
5
5
  gem 'facterdb', '>= 0.5.0'
6
6
  gem 'pluginator', '~> 1.5.0'
7
- gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '~> 5.5'
7
+ gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '~> 8'
8
8
  gem 'rb-readline'
9
9
  gem 'table_print'
10
10
  gem 'tty-pager'
@@ -16,7 +16,7 @@ group :test, :development do
16
16
  gem 'pry'
17
17
  gem 'puppet-debugger', path: './'
18
18
  gem 'rake', '~> 13.0'
19
- gem 'rdoc', '~> 3.12'
19
+ gem 'rdoc', '~> 6.0'
20
20
  gem 'release_me'
21
21
  gem 'rspec', '~> 3.6'
22
22
  gem 'rubocop'
@@ -29,9 +29,10 @@ module PuppetDebugger
29
29
  files = globs.map { |g| Dir.glob(g) }.flatten
30
30
  files.map do |f|
31
31
  m = File.read(f).match(/type\s([a-z\d\:_]+)/i)
32
- next if m =~ /type|alias/ # can't figure out the best way to filter type and alias out
33
-
34
- m[1] if m && m[1] =~ /::/
32
+ if m
33
+ next if m[1] =~ /type|alias/ # can't figure out the best way to filter type and alias out
34
+ m[1] if m[1] =~ /::/
35
+ end
35
36
  end.uniq.compact
36
37
  end
37
38
 
@@ -325,7 +325,7 @@ class DebuggerCode
325
325
  def method_missing(name, *args, &block)
326
326
  to_s.send(name, *args, &block)
327
327
  end
328
- undef =~
328
+ undef =~ if method_defined?(:=~)
329
329
 
330
330
  protected
331
331
 
@@ -20,7 +20,7 @@ RSpec.shared_examples 'plugin_tests' do |_parameter|
20
20
  {}
21
21
  end
22
22
 
23
- it 'commands contant is an array' do
23
+ it 'commands content is an array' do
24
24
  expect(plugin.class::COMMAND_WORDS).to be_a(Array)
25
25
  end
26
26
 
@@ -150,8 +150,13 @@ module PuppetDebugger
150
150
  require 'bolt/puppetdb'
151
151
  require 'bolt/puppetdb/client'
152
152
  require 'bolt/puppetdb/config'
153
- config = Bolt::PuppetDB::Config.load_config({})
154
- Bolt::PuppetDB::Client.new(config)
153
+ if Bolt::PuppetDB::Config.respond_to?(:default_config)
154
+ config = Bolt::PuppetDB::Config.default_config
155
+ Bolt::PuppetDB::Client.new(config: config)
156
+ else
157
+ config = Bolt::PuppetDB::Config.load_config({})
158
+ Bolt::PuppetDB::Client.new(config)
159
+ end
155
160
  rescue LoadError
156
161
  # not puppet 6+
157
162
  nil
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PuppetDebugger
4
- VERSION = '1.2.0'
4
+ VERSION = '1.4.0'
5
5
  end
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
27
27
  'LICENSE.txt',
28
28
  'README.md'
29
29
  ]
30
- s.required_ruby_version = '>= 2.4'
30
+ s.required_ruby_version = '>= 2.7'
31
31
  s.homepage = 'https://gitlab.com/puppet-debugger/puppet-debugger'
32
32
  s.licenses = ['MIT']
33
33
  s.rubygems_version = '2.4.5.1'
@@ -36,11 +36,11 @@ Gem::Specification.new do |s|
36
36
  s.add_runtime_dependency('bundler')
37
37
  s.add_runtime_dependency('facterdb', ['>= 0.4.0'])
38
38
  s.add_runtime_dependency('pluginator', ['~> 1.5.0'])
39
- s.add_runtime_dependency('puppet', ['>= 5.5'])
39
+ s.add_runtime_dependency('puppet', ['>= 6'])
40
40
  # s.add_runtime_dependency('bolt', ['>= 2.42.0'])
41
41
  s.add_runtime_dependency('rb-readline', ['>= 0.5.5'])
42
42
  s.add_runtime_dependency('table_print', ['>= 1.0.0'])
43
- s.add_runtime_dependency('tty-pager', ['~> 0.13.0'])
44
- s.add_development_dependency('rdoc', ['~> 3.12'])
45
- s.add_development_dependency('rspec', ['~> 3.6'])
43
+ s.add_runtime_dependency('tty-pager', ['~> 0.14'])
44
+ s.add_development_dependency('rdoc', ['>= 6.0'])
45
+ s.add_development_dependency('rspec', ['>= 3.6'])
46
46
  end
@@ -24,7 +24,7 @@ describe :exit do
24
24
  {}
25
25
  end
26
26
 
27
- it 'commands contant is an array' do
27
+ it 'commands content is an array' do
28
28
  expect(plugin.class::COMMAND_WORDS).to be_a(Array)
29
29
  end
30
30
 
data/spec/pdb_spec.rb CHANGED
@@ -31,7 +31,7 @@ describe 'pdb' do
31
31
 
32
32
  describe 'remote_node' do
33
33
  let(:node_obj) do
34
- YAML.load_file(File.join(fixtures_dir, 'node_obj.yaml'))
34
+ YAML.unsafe_load_file(File.join(fixtures_dir, 'node_obj.yaml'))
35
35
  end
36
36
  let(:node_name) do
37
37
  'puppetdev.localdomain'
@@ -29,7 +29,7 @@ describe 'PuppetDebugger' do
29
29
 
30
30
  describe 'remote node' do
31
31
  let(:node_obj) do
32
- YAML.load_file(File.join(fixtures_dir, 'node_obj.yaml'))
32
+ YAML.unsafe_load_file(File.join(fixtures_dir, 'node_obj.yaml'))
33
33
  end
34
34
  let(:node_name) do
35
35
  'puppetdev.localdomain'
@@ -69,7 +69,7 @@ describe 'PuppetDebugger' do
69
69
  end
70
70
  describe 'use defaults when invalid' do
71
71
  let(:node_obj) do
72
- YAML.load_file(File.join(fixtures_dir, 'invalid_node_obj.yaml'))
72
+ YAML.unsafe_load_file(File.join(fixtures_dir, 'invalid_node_obj.yaml'))
73
73
  end
74
74
  let(:node_name) do
75
75
  'invalid.localdomain'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-debugger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Osman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-13 00:00:00.000000000 Z
11
+ date: 2024-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '5.5'
75
+ version: '6'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '5.5'
82
+ version: '6'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rb-readline
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -114,40 +114,40 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.13.0
117
+ version: '0.14'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.13.0
124
+ version: '0.14'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rdoc
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: '3.12'
131
+ version: '6.0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: '3.12'
138
+ version: '6.0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '3.6'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '3.6'
153
153
  description: A interactive command line tool for evaluating and debugging the puppet
@@ -315,14 +315,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
315
315
  requirements:
316
316
  - - ">="
317
317
  - !ruby/object:Gem::Version
318
- version: '2.4'
318
+ version: '2.7'
319
319
  required_rubygems_version: !ruby/object:Gem::Requirement
320
320
  requirements:
321
321
  - - ">="
322
322
  - !ruby/object:Gem::Version
323
323
  version: '0'
324
324
  requirements: []
325
- rubygems_version: 3.0.3
325
+ rubygems_version: 3.4.10
326
326
  signing_key:
327
327
  specification_version: 4
328
328
  summary: A repl based debugger for the puppet language