puppet-debugger 1.1.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +37 -24
- data/CHANGELOG.md +7 -1
- data/Gemfile +3 -2
- data/lib/puppet-debugger/support.rb +23 -2
- data/lib/puppet-debugger/version.rb +1 -1
- data/puppet-debugger.gemspec +2 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2ccbfeec771b3cc202f749b5aa17e96e2dd5f5ebfa9090887e17fb22b035d30
|
4
|
+
data.tar.gz: c8169e8f2531f3cd62c7b74e3f06a93b0be8e82e09b34ad71abc6a0456a6c113
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7a4b91dee8c074e955cfefdae802d89f3ab1c3c5600fb56ea55cbbffca294845110f9b88ada2809bd1481925e7821fc34c9e4a8d77d986e5f02fa81f7e3a7e1
|
7
|
+
data.tar.gz: 839bd3f8c4ef3d4d8a8ac4ecb4b2c4782f94b1207fda0a4ceaa7d8a623151605838934437c3b02801d095389d55d9a590de385f7423a1c87adf7723cd79fcd86
|
data/.gitlab-ci.yml
CHANGED
@@ -6,11 +6,12 @@ stages:
|
|
6
6
|
- test
|
7
7
|
- release
|
8
8
|
- deploy
|
9
|
-
|
9
|
+
#- web_deploy
|
10
10
|
|
11
11
|
.puppet_def: &puppet_job_def
|
12
12
|
stage: test
|
13
13
|
script:
|
14
|
+
- rm -f Gemfile.lock
|
14
15
|
- gem update --system > /dev/null
|
15
16
|
- gem install bundler > /dev/null
|
16
17
|
- bundle install --without development validate
|
@@ -19,14 +20,15 @@ stages:
|
|
19
20
|
tags:
|
20
21
|
- ruby
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
23
|
+
# will be replaced by akash tf provider
|
24
|
+
# web_trigger_staging:
|
25
|
+
# stage: web_deploy
|
26
|
+
# variables:
|
27
|
+
# REF: staging
|
28
|
+
# only:
|
29
|
+
# - main
|
30
|
+
# script:
|
31
|
+
# - "curl -X POST -F token=$PREPL_BUILD_TRIGGER_TOKEN -F ref=$REF https://gitlab.com/api/v4/projects/1146764/trigger/builds"
|
30
32
|
|
31
33
|
rubocop_ruby:
|
32
34
|
stage: validate
|
@@ -36,6 +38,7 @@ rubocop_ruby:
|
|
36
38
|
tags:
|
37
39
|
- ruby
|
38
40
|
script:
|
41
|
+
- rm -f Gemfile.lock
|
39
42
|
- bundle install
|
40
43
|
- bundle exec rubocop -D
|
41
44
|
|
@@ -43,7 +46,7 @@ bump_and_tag:
|
|
43
46
|
stage: release
|
44
47
|
when: manual
|
45
48
|
tags:
|
46
|
-
- ruby2.
|
49
|
+
- ruby2.7
|
47
50
|
only:
|
48
51
|
- main@puppet-debugger/puppet-debugger
|
49
52
|
script:
|
@@ -73,8 +76,14 @@ bump_and_tag:
|
|
73
76
|
.ruby_27: &ruby27
|
74
77
|
image: ruby:2.7
|
75
78
|
|
79
|
+
.ruby_30: &ruby30
|
80
|
+
image: ruby:3.0
|
81
|
+
|
82
|
+
.ruby_31: &ruby31
|
83
|
+
image: ruby:3.1
|
84
|
+
|
76
85
|
gem_production:
|
77
|
-
image: ruby:2.
|
86
|
+
image: ruby:2.7
|
78
87
|
tags:
|
79
88
|
- ruby
|
80
89
|
before_script:
|
@@ -85,18 +94,6 @@ gem_production:
|
|
85
94
|
only:
|
86
95
|
- tags
|
87
96
|
|
88
|
-
puppet_5_ruby24:
|
89
|
-
variables:
|
90
|
-
PUPPET_GEM_VERSION: "~> 5.5"
|
91
|
-
<<: *puppet_job_def
|
92
|
-
<<: *ruby24
|
93
|
-
|
94
|
-
puppet_5_ruby25:
|
95
|
-
variables:
|
96
|
-
PUPPET_GEM_VERSION: "~> 5.5"
|
97
|
-
<<: *puppet_job_def
|
98
|
-
<<: *ruby25
|
99
|
-
|
100
97
|
puppet_6_ruby25:
|
101
98
|
variables:
|
102
99
|
PUPPET_GEM_VERSION: "~> 6.0"
|
@@ -110,8 +107,24 @@ puppet_6_ruby26:
|
|
110
107
|
<<: *ruby26
|
111
108
|
|
112
109
|
puppet_6_ruby27:
|
113
|
-
allow_failure:
|
110
|
+
allow_failure: false
|
114
111
|
variables:
|
115
112
|
PUPPET_GEM_VERSION: "~> 6.0"
|
116
113
|
<<: *puppet_job_def
|
117
114
|
<<: *ruby27
|
115
|
+
|
116
|
+
puppet_7_ruby27:
|
117
|
+
allow_failure: false
|
118
|
+
variables:
|
119
|
+
PUPPET_GEM_VERSION: "~> 7.0"
|
120
|
+
<<: *puppet_job_def
|
121
|
+
<<: *ruby27
|
122
|
+
|
123
|
+
# puppet_8_ruby3.0:
|
124
|
+
# allow_failure: true
|
125
|
+
# variables:
|
126
|
+
# PUPPET_GEM_VERSION: "~> 8.0"
|
127
|
+
# <<: *puppet_job_def
|
128
|
+
# <<: *ruby30
|
129
|
+
|
130
|
+
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# Puppet Debugger Changelog
|
2
2
|
|
3
3
|
## Unreleased
|
4
|
-
|
4
|
+
## 1.3
|
5
|
+
- Fix failures when using Bolt 3.23+
|
6
|
+
- Relax tty-pager constraints (for Bolt)
|
7
|
+
- Stop testing puppet 5
|
8
|
+
- Stop testing ruby 2.4
|
9
|
+
## 1.2
|
10
|
+
- Fix puppetdb_query errors when bolt_pdb_client was not loaded
|
5
11
|
## 1.1
|
6
12
|
- Catch signals and allow control-d for quitting.
|
7
13
|
## 1.0
|
data/Gemfile
CHANGED
@@ -4,14 +4,15 @@ 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'] || '
|
7
|
+
gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '~> 5.5'
|
8
8
|
gem 'rb-readline'
|
9
9
|
gem 'table_print'
|
10
10
|
gem 'tty-pager'
|
11
|
+
#gem 'bolt' if Gem::Version(ENV['PUPPET_GEM_VERSION'])
|
12
|
+
|
11
13
|
group :test, :development do
|
12
14
|
# ruby versions prior to 2.0 cannot install json_pure 2.0.2+
|
13
15
|
gem 'bundler'
|
14
|
-
gem 'CFPropertyList'
|
15
16
|
gem 'pry'
|
16
17
|
gem 'puppet-debugger', path: './'
|
17
18
|
gem 'rake', '~> 13.0'
|
@@ -142,6 +142,27 @@ module PuppetDebugger
|
|
142
142
|
file
|
143
143
|
end
|
144
144
|
|
145
|
+
# @return [Bolt::PuppetDB::Client]
|
146
|
+
def bolt_pdb_client
|
147
|
+
@bolt_pdb_client ||=
|
148
|
+
begin
|
149
|
+
require 'bolt/logger'
|
150
|
+
require 'bolt/puppetdb'
|
151
|
+
require 'bolt/puppetdb/client'
|
152
|
+
require 'bolt/puppetdb/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
|
160
|
+
rescue LoadError
|
161
|
+
# not puppet 6+
|
162
|
+
nil
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
145
166
|
# @param String - any valid puppet language code
|
146
167
|
# @return Object - returns either a string of the result or object from puppet evaulation
|
147
168
|
def puppet_eval(input, file: nil)
|
@@ -151,9 +172,9 @@ module PuppetDebugger
|
|
151
172
|
manifest_file = file || manifest_file(input)
|
152
173
|
manfifest_content = input || File.read(manifest_file)
|
153
174
|
ast = generate_ast(manfifest_content)
|
154
|
-
|
155
175
|
Puppet.override({ current_environment: puppet_environment, manifest: manifest_file,
|
156
|
-
global_scope: scope,
|
176
|
+
global_scope: scope, bolt_pdb_client: bolt_pdb_client,
|
177
|
+
loaders: scope.compiler.loaders }, 'For puppet-debugger') do
|
157
178
|
# because the debugger is not a module we leave the modname blank
|
158
179
|
scope.environment.known_resource_types.import_ast(ast, '')
|
159
180
|
|
data/puppet-debugger.gemspec
CHANGED
@@ -37,9 +37,10 @@ Gem::Specification.new do |s|
|
|
37
37
|
s.add_runtime_dependency('facterdb', ['>= 0.4.0'])
|
38
38
|
s.add_runtime_dependency('pluginator', ['~> 1.5.0'])
|
39
39
|
s.add_runtime_dependency('puppet', ['>= 5.5'])
|
40
|
+
# s.add_runtime_dependency('bolt', ['>= 2.42.0'])
|
40
41
|
s.add_runtime_dependency('rb-readline', ['>= 0.5.5'])
|
41
42
|
s.add_runtime_dependency('table_print', ['>= 1.0.0'])
|
42
|
-
s.add_runtime_dependency('tty-pager', ['~> 0.13
|
43
|
+
s.add_runtime_dependency('tty-pager', ['~> 0.13'])
|
43
44
|
s.add_development_dependency('rdoc', ['~> 3.12'])
|
44
45
|
s.add_development_dependency('rspec', ['~> 3.6'])
|
45
46
|
end
|
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.
|
4
|
+
version: 1.3.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:
|
11
|
+
date: 2022-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.13
|
117
|
+
version: '0.13'
|
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
|
124
|
+
version: '0.13'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rdoc
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|