puppet-debugger 1.0.0 → 1.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b42685da91441b7bff1494b4be01e91ebfb9e5e291e1483c129fff536fd2c75c
|
4
|
+
data.tar.gz: 3746ddb94008917e9394800a2c1553986128af574f68368865d509e0b9d60343
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04dccda493638a6834d285edc4d79d4871181349ef9e57bfabe6ff8106bc2c371a1ab9ae76e052aca90c8cc1a3cdf76b7f6b3813f54931f9e3b363acfd3e94cf
|
7
|
+
data.tar.gz: d60dd7a5fd14c6258a2a1c85612f3475e1b72081c0c1e9c6ca5cd3c777fd764caedacf18082abd0b2c5a5b863f78960e016f4086fc3e3b1ae3e23bf2a1f3b905
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
+
# Puppet Debugger Changelog
|
2
|
+
|
3
|
+
## Unreleased
|
4
|
+
|
5
|
+
## 1.1
|
6
|
+
- Catch signals and allow control-d for quitting.
|
1
7
|
## 1.0
|
2
8
|
Released: 8/3/2020
|
3
9
|
|
4
|
-
This is a major revision with breaking changes,
|
10
|
+
This is a major revision with breaking changes, notably the requirement of ruby 2.4 and puppet 5.5.
|
5
11
|
|
6
12
|
- Bump required ruby version to 2.4
|
7
13
|
- Bump required puppet version to puppet 5.5
|
@@ -9,7 +15,7 @@ This is a major revision with breaking changes, notibly the requirement of ruby
|
|
9
15
|
- Add a pager for long output
|
10
16
|
- Remove puppet4 and older work arounds
|
11
17
|
- Use rubocop for better code quality
|
12
|
-
- Fix issue when the debugger was not loading the
|
18
|
+
- Fix issue when the debugger was not loading the manifest properly
|
13
19
|
|
14
20
|
## 0.19.0
|
15
21
|
- Search datatypes with filter
|
@@ -14,9 +14,17 @@ module PuppetDebugger
|
|
14
14
|
s.empty? ? 'stacktrace not available'.warning : s.ai
|
15
15
|
end
|
16
16
|
|
17
|
-
# @return [Array] - an array of files
|
17
|
+
# @return [Array] - an array of files with line numbers
|
18
|
+
# @example
|
19
|
+
# [
|
20
|
+
# "/nwops/puppetlabs-peadm/spec/fixtures/modules/peadm/plans/status.pp:23",
|
21
|
+
# "/nwops/puppetlabs-peadm/spec/fixtures/modules/peadm/plans/status.pp:20"
|
22
|
+
# ]
|
18
23
|
def stacktrace
|
19
|
-
Puppet::Pops::PuppetStack.stacktrace.find_all { |line| !line.include?('unknown') }
|
24
|
+
stack = Puppet::Pops::PuppetStack.stacktrace.find_all { |line| !line.include?('unknown') }
|
25
|
+
stack.each_with_object([]) do |item, acc|
|
26
|
+
acc << item.join(':')
|
27
|
+
end
|
20
28
|
end
|
21
29
|
end
|
22
30
|
end
|
data/lib/puppet-debugger/cli.rb
CHANGED
@@ -42,6 +42,15 @@ module PuppetDebugger
|
|
42
42
|
sort_keys: true,
|
43
43
|
indent: 2
|
44
44
|
}
|
45
|
+
# Catch control-c sequences
|
46
|
+
trap('SIGINT') do
|
47
|
+
# control-d
|
48
|
+
exit 0
|
49
|
+
end
|
50
|
+
trap('INT') do
|
51
|
+
# control-c
|
52
|
+
# handle_output('Type exit or use control-d')
|
53
|
+
end
|
45
54
|
end
|
46
55
|
|
47
56
|
# @return [Proc] the proc used in the command completion for readline
|
@@ -145,7 +154,8 @@ module PuppetDebugger
|
|
145
154
|
# Disabled if CI or testing is being done
|
146
155
|
def handle_output(output)
|
147
156
|
return if output.nil?
|
148
|
-
|
157
|
+
|
158
|
+
if pager_enabled? && output.lines.count >= TTY::Screen.height
|
149
159
|
output << "\n"
|
150
160
|
pager.page(output)
|
151
161
|
else
|
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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Osman
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -307,7 +307,7 @@ licenses:
|
|
307
307
|
- MIT
|
308
308
|
metadata:
|
309
309
|
allowed_push_host: https://rubygems.org
|
310
|
-
post_install_message:
|
310
|
+
post_install_message:
|
311
311
|
rdoc_options: []
|
312
312
|
require_paths:
|
313
313
|
- lib
|
@@ -323,7 +323,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
323
323
|
version: '0'
|
324
324
|
requirements: []
|
325
325
|
rubygems_version: 3.0.3
|
326
|
-
signing_key:
|
326
|
+
signing_key:
|
327
327
|
specification_version: 4
|
328
328
|
summary: A repl based debugger for the puppet language
|
329
329
|
test_files: []
|