puppet-debugger 0.18.0 → 0.19.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 +4 -4
 - data/.gitlab-ci.yml +1 -0
 - data/.vscode/launch.json +15 -0
 - data/CHANGELOG.md +4 -0
 - data/README.md +27 -13
 - data/lib/plugins/puppet-debugger/input_responders/datatypes.rb +11 -1
 - data/lib/puppet-debugger/cli.rb +0 -1
 - data/lib/puppet-debugger/support/node.rb +0 -2
 - data/lib/puppet-debugger/version.rb +1 -1
 - data/spec/input_responders/datatypes_spec.rb +5 -0
 - data/spec/input_responders/help_spec.rb +1 -1
 - metadata +3 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 1c85b3723080b5d574daae84be6415f6561a39556d2d74688ff31c4a1c43d664
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 682218a9598d40f24428d368747b08223a81f952b309c255e0d1804aef49b171
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 4f40cfb1aa4d03b3ab0f447a9b2464329c87ac5ba7e003ab5c22ad2c3b665c5780d46df4d3f2d0f29f9d8b8a8776210ae44681237ac728a496a46a983baeb050
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 2ded5279c9449e704363dd937655c7d3680fb5b24d2e34b26d914214334c4e1624bdc1c2cf6802929b313e36fcaf4834b6ce8e64bece90edc9cca516983c2862
         
     | 
    
        data/.gitlab-ci.yml
    CHANGED
    
    
    
        data/.vscode/launch.json
    ADDED
    
    | 
         @@ -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 
     | 
    
         
            +
            }
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        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 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
       68 
     | 
    
         
            -
            Puppet Version:  
     | 
| 
       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 " 
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
              
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
               
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
      
 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 
     | 
    
         
            -
                     
     | 
| 
      
 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
         
     | 
    
        data/lib/puppet-debugger/cli.rb
    CHANGED
    
    | 
         @@ -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)
         
     | 
| 
         @@ -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
         
     | 
    
        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.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- 
     | 
| 
      
 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
         
     |