puppet-debugger 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitlab-ci.yml +16 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile +1 -1
- data/lib/plugins/puppet-debugger/input_responders/functions.rb +7 -1
- data/lib/plugins/puppet-debugger/input_responders/whereami.rb +10 -1
- data/lib/puppet-debugger/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c6827971409d63ad14e8fb1b28c9a8bc3d657d62
|
4
|
+
data.tar.gz: f389615784cbcf574631f4232202c546b7ca41e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fda93d37a028cd6ce6bed7c92ea15a7300d3fd867775cec96635e403619a37b6f742efbbe6ca88083ac7446a952fb3c8b27fe94a8a17503de29ee5c9039e3861
|
7
|
+
data.tar.gz: 35b5144743256cb1dc44f7c788c3d686e48876644fa3800f92ad8a97bf545eca25261f8eaaa2bcb3195cb860f6e5b72c9ec3ee7f0cdf727ebb65af0c691f2206
|
data/.gitlab-ci.yml
CHANGED
@@ -118,12 +118,24 @@ puppet_55_ruby24:
|
|
118
118
|
|
119
119
|
puppet_63_ruby25:
|
120
120
|
variables:
|
121
|
-
PUPPET_GEM_VERSION: "~> 6.
|
121
|
+
PUPPET_GEM_VERSION: "~> 6.3"
|
122
122
|
<<: *puppet_job_def
|
123
123
|
<<: *ruby25
|
124
124
|
|
125
|
-
|
125
|
+
puppet_64_ruby25:
|
126
126
|
variables:
|
127
|
-
PUPPET_GEM_VERSION: "~> 6.4"
|
127
|
+
PUPPET_GEM_VERSION: "~> 6.4.0"
|
128
128
|
<<: *puppet_job_def
|
129
|
-
<<: *
|
129
|
+
<<: *ruby25
|
130
|
+
|
131
|
+
puppet_610_ruby25:
|
132
|
+
variables:
|
133
|
+
PUPPET_GEM_VERSION: "~> 6.10.0"
|
134
|
+
<<: *puppet_job_def
|
135
|
+
<<: *ruby25
|
136
|
+
|
137
|
+
puppet_55_ruby24:
|
138
|
+
variables:
|
139
|
+
PUPPET_GEM_VERSION: "~> 5.5.0"
|
140
|
+
<<: *puppet_job_def
|
141
|
+
<<: *ruby24
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
## 0.15.0
|
4
|
+
- Fixes issue with listing native functions when inside module directory
|
5
|
+
- Adds more puppet versions to matrix for testing
|
6
|
+
- Adds ability to specify number of lines in whereami command, defaults to 7
|
7
|
+
|
8
|
+
## 0.14.0
|
9
|
+
- Adds back ruby 2.1 support to matrix for pdk console
|
10
|
+
- Requires ruby 2.1 for gemspec
|
11
|
+
|
3
12
|
## 0.13.0
|
4
13
|
|
5
14
|
- Fixes gh-66 - colon symbol vanishing from variable output
|
data/Gemfile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "puppet-debugger/input_responder_plugin"
|
2
2
|
require "table_print"
|
3
|
+
require 'fileutils'
|
3
4
|
|
4
5
|
module PuppetDebugger
|
5
6
|
module InputResponders
|
@@ -39,11 +40,16 @@ module PuppetDebugger
|
|
39
40
|
functions
|
40
41
|
end
|
41
42
|
|
43
|
+
# @return [String] - the current module directory or directory that contains a gemfile
|
44
|
+
def current_module_dir
|
45
|
+
@current_module_dir ||= File.dirname(Bundler.default_gemfile)
|
46
|
+
end
|
47
|
+
|
42
48
|
def lib_dirs(module_dirs = modules_paths)
|
43
49
|
dirs = module_dirs.map do |mod_dir|
|
44
50
|
Dir["#{mod_dir}/*/lib"].entries
|
45
51
|
end.flatten
|
46
|
-
dirs + [puppet_debugger_lib_dir]
|
52
|
+
dirs + [puppet_debugger_lib_dir, File.join(current_module_dir, 'lib')]
|
47
53
|
end
|
48
54
|
|
49
55
|
# @return [Array] - returns a array of the parentname and function name
|
@@ -11,6 +11,7 @@ module PuppetDebugger
|
|
11
11
|
# @return [String] - string output of the code surrounded by the breakpoint or nil if file
|
12
12
|
# or line_num do not exist
|
13
13
|
def run(args = [])
|
14
|
+
num_lines = parse(args.first)
|
14
15
|
file = debugger.source_file
|
15
16
|
line_num = debugger.source_line_num
|
16
17
|
if file && line_num
|
@@ -20,10 +21,18 @@ module PuppetDebugger
|
|
20
21
|
else
|
21
22
|
code = DebuggerCode.from_file(file, :puppet)
|
22
23
|
end
|
23
|
-
return code.with_marker(line_num).around(line_num,
|
24
|
+
return code.with_marker(line_num).around(line_num, num_lines)
|
24
25
|
.with_line_numbers.with_indentation(5).with_file_reference.to_s
|
25
26
|
end
|
26
27
|
end
|
28
|
+
|
29
|
+
# @return [Integer]
|
30
|
+
# @param num [String,Integer] number of lines
|
31
|
+
# @param defalt [Integer] - default value to return if supplied is less than 5
|
32
|
+
def parse(num, default = 7)
|
33
|
+
value = num.to_i
|
34
|
+
value >= 5 ? value : default
|
35
|
+
end
|
27
36
|
end
|
28
37
|
end
|
29
38
|
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: 0.
|
4
|
+
version: 0.15.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: 2019-
|
11
|
+
date: 2019-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: table_print
|
@@ -288,7 +288,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
288
|
- !ruby/object:Gem::Version
|
289
289
|
version: '0'
|
290
290
|
requirements: []
|
291
|
-
|
291
|
+
rubyforge_project:
|
292
|
+
rubygems_version: 2.6.14.3
|
292
293
|
signing_key:
|
293
294
|
specification_version: 4
|
294
295
|
summary: A repl based debugger for the puppet language
|