puppet-debugger 0.18.0 → 0.19.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: 4b3bdfc1af31ed95eebcbd69904b499bbf375d1fb17e5a0e4078e33895523ad4
4
- data.tar.gz: 3bea2e2171a810ff3c93cb03958cd175f79e3a50dd7c29248866890cbff8acc0
3
+ metadata.gz: 1c85b3723080b5d574daae84be6415f6561a39556d2d74688ff31c4a1c43d664
4
+ data.tar.gz: 682218a9598d40f24428d368747b08223a81f952b309c255e0d1804aef49b171
5
5
  SHA512:
6
- metadata.gz: 9faf47fdcc8a38a08b4f42ce8dd0b42fd53c497a54b6e7024fa95cb56e319eb6cf6ae542e3bb040ba49601b2acae23b734c46b52a3ed8a0a1b006f71c81fd42c
7
- data.tar.gz: 2e18f609c96b79fe134554edf93693811d80fdbfcfbcb7f45463b8934e2836065bded0ad16b28ade36c7e6ccc319725ef284e76657a5d255480f9f339a90573b
6
+ metadata.gz: 4f40cfb1aa4d03b3ab0f447a9b2464329c87ac5ba7e003ab5c22ad2c3b665c5780d46df4d3f2d0f29f9d8b8a8776210ae44681237ac728a496a46a983baeb050
7
+ data.tar.gz: 2ded5279c9449e704363dd937655c7d3680fb5b24d2e34b26d914214334c4e1624bdc1c2cf6802929b313e36fcaf4834b6ce8e64bece90edc9cca516983c2862
@@ -102,6 +102,7 @@ gem_production:
102
102
  - tags
103
103
 
104
104
  puppet_410_ruby24:
105
+ allow_failure: true
105
106
  variables:
106
107
  PUPPET_GEM_VERSION: "~> 4.10"
107
108
  <<: *puppet_job_def
@@ -0,0 +1,15 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "chrome",
9
+ "request": "launch",
10
+ "name": "Launch Chrome against localhost",
11
+ "url": "http://localhost:8080",
12
+ "webRoot": "${workspaceFolder}"
13
+ }
14
+ ]
15
+ }
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 0.19.0
4
+ - Search datatypes with filter
5
+ - Fix #8 - trusted_server_facts' as a setting is deprecated
6
+
3
7
  ## 0.18.0
4
8
  - Add bundler as a dependency
5
9
  - Add ability to filter out classes
data/README.md CHANGED
@@ -63,20 +63,34 @@ and see what it would actual do when compiling a resource.
63
63
 
64
64
  Example Usage
65
65
  ```
66
- MacBook-Pro-2/tmp % puppet debugger
67
- Ruby Version: 2.0.0
68
- Puppet Version: 4.8.1
69
- Puppet Debugger Version: 0.4.3
66
+ Ruby Version: 2.6.5
67
+ Puppet Version: 6.14.0
68
+ Puppet Debugger Version: 0.16.0
70
69
  Created by: NWOps <corey@nwops.io>
71
- Type "exit", "functions", "vars", "krt", "whereami", "facts", "resources", "classes",
72
- "play", "classification", "reset", or "help" for more information.
73
-
74
- 1:>> ['/tmp/test3', '/tmp/test4'].each |String $path| { file{$path: ensure => present} }
75
- => [
76
- [0] "/tmp/test3",
77
- [1] "/tmp/test4"
78
- ]
79
- 2:>>
70
+ Type "commands" for a list of debugger commands
71
+ or "help" to show the help screen.
72
+
73
+
74
+ 1:>> $os
75
+ => {
76
+ "architecture" => "x86_64",
77
+ "family" => "RedHat",
78
+ "hardware" => "x86_64",
79
+ "name" => "Fedora",
80
+ "release" => {
81
+ "full" => "23",
82
+ "major" => "23"
83
+ },
84
+ "selinux" => {
85
+ "config_mode" => "permissive",
86
+ "config_policy" => "targeted",
87
+ "current_mode" => "permissive",
88
+ "enabled" => true,
89
+ "enforced" => false,
90
+ "policy_version" => "29"
91
+ }
92
+ }
93
+ 2:>>
80
94
 
81
95
 
82
96
  ```
@@ -7,7 +7,17 @@ module PuppetDebugger
7
7
  COMMAND_GROUP = :environment
8
8
 
9
9
  def run(args = [])
10
- all_data_types.sort.ai
10
+ filter = args
11
+ datatypes = find_datatypes(all_data_types.sort, filter)
12
+ datatypes.ai
13
+ end
14
+
15
+ def find_datatypes(datatypes, filter = [])
16
+ return datatypes if filter.nil? || filter.empty?
17
+ filter_string = filter.join(' ').downcase
18
+ datatypes.find_all do |datatype|
19
+ datatype.downcase.include?(filter_string)
20
+ end
11
21
  end
12
22
 
13
23
  # @return [Array[String]] - returns a list of all the custom data types found in all the modules in the environment
@@ -21,7 +21,6 @@ module PuppetDebugger
21
21
  def initialize(options = {})
22
22
  do_initialize if Puppet[:codedir].nil?
23
23
  Puppet.settings[:name] = :debugger
24
- Puppet.settings[:trusted_server_facts] = true unless Puppet.settings[:trusted_server_facts].nil?
25
24
  Puppet[:static_catalogs] = false unless Puppet.settings[:static_catalogs].nil?
26
25
  set_remote_node_name(options[:node_name])
27
26
  initialize_from_scope(options[:scope])
@@ -8,8 +8,6 @@ module PuppetDebugger
8
8
  # creates a node object using defaults or gets the remote node
9
9
  # object if the remote_node_name is defined
10
10
  def create_node
11
- Puppet[:trusted_server_facts] = true if Puppet.version.to_f >= 4.1 && Puppet.version.to_f < 6.0
12
-
13
11
  if remote_node_name
14
12
  # refetch
15
13
  node_obj = set_node_from_name(remote_node_name)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PuppetDebugger
4
- VERSION = "0.18.0"
4
+ VERSION = "0.19.0"
5
5
  end
@@ -27,4 +27,9 @@ describe :datatypes do
27
27
  it 'returns environment datatypes' do
28
28
  expect(plugin.environment_data_types.count).to be >= 0
29
29
  end
30
+
31
+ it 'search datatypes' do
32
+ output = plugin.run(['integer'])
33
+ expect(output.split("Integer").count).to be >= 2
34
+ end
30
35
  end
@@ -23,7 +23,7 @@ describe :help do
23
23
  end
24
24
 
25
25
  it 'show debugger version' do
26
- expect(help_output).to match(/Puppet Debugger Version: \d.\d\d?.\d+\n/)
26
+ expect(help_output).to match(/Puppet Debugger Version: \d.\d\d?.\d.*+\n/)
27
27
  end
28
28
 
29
29
  it 'show created by' do
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.18.0
4
+ version: 0.19.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: 2020-04-21 00:00:00.000000000 Z
11
+ date: 2020-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: table_print
@@ -157,6 +157,7 @@ files:
157
157
  - ".rubocop.yml"
158
158
  - ".rubocop_todo.yml"
159
159
  - ".ruby-version"
160
+ - ".vscode/launch.json"
160
161
  - CHANGELOG.md
161
162
  - DEVELOPMENT.md
162
163
  - Gemfile