moose-inventory 0.1.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 +7 -0
- data/.coveralls.yml +0 -0
- data/.gitignore +17 -0
- data/.rubocop.yml +793 -0
- data/Gemfile +3 -0
- data/Guardfile +38 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/README.md.orig +35 -0
- data/Rakefile +1 -0
- data/bin/moose_inventory +10 -0
- data/config/dotfiles/coveralls.yml +0 -0
- data/config/dotfiles/gitignore +17 -0
- data/config/dotfiles/rubocop.yml +793 -0
- data/lib/moose/inventory/cli/application.rb +30 -0
- data/lib/moose/inventory/cli/formatter.rb +92 -0
- data/lib/moose/inventory/cli/group.rb +23 -0
- data/lib/moose/inventory/cli/group_add.rb +98 -0
- data/lib/moose/inventory/cli/group_addchild.rb +21 -0
- data/lib/moose/inventory/cli/group_addhost.rb +97 -0
- data/lib/moose/inventory/cli/group_addvar.rb +72 -0
- data/lib/moose/inventory/cli/group_get.rb +52 -0
- data/lib/moose/inventory/cli/group_list.rb +41 -0
- data/lib/moose/inventory/cli/group_rm.rb +77 -0
- data/lib/moose/inventory/cli/group_rmchild.rb +20 -0
- data/lib/moose/inventory/cli/group_rmhost.rb +89 -0
- data/lib/moose/inventory/cli/group_rmvar.rb +65 -0
- data/lib/moose/inventory/cli/host.rb +24 -0
- data/lib/moose/inventory/cli/host_add.rb +93 -0
- data/lib/moose/inventory/cli/host_addgroup.rb +88 -0
- data/lib/moose/inventory/cli/host_addvar.rb +76 -0
- data/lib/moose/inventory/cli/host_get.rb +59 -0
- data/lib/moose/inventory/cli/host_list.rb +40 -0
- data/lib/moose/inventory/cli/host_rm.rb +62 -0
- data/lib/moose/inventory/cli/host_rmgroup.rb +80 -0
- data/lib/moose/inventory/cli/host_rmvar.rb +69 -0
- data/lib/moose/inventory/config/config.rb +169 -0
- data/lib/moose/inventory/db/db.rb +249 -0
- data/lib/moose/inventory/db/exceptions.rb +14 -0
- data/lib/moose/inventory/db/models.rb +32 -0
- data/lib/moose/inventory/moose_inventory_cli.rb +25 -0
- data/lib/moose/inventory/version.rb +7 -0
- data/moose-inventory.gemspec +45 -0
- data/scripts/guard_quality.sh +3 -0
- data/scripts/guard_test.sh +2 -0
- data/scripts/reports.sh +4 -0
- data/spec/config/config.yml +12 -0
- data/spec/lib/moose/inventory/cli/application_spec.rb +15 -0
- data/spec/lib/moose/inventory/cli/cli_spec.rb +26 -0
- data/spec/lib/moose/inventory/cli/formatter_spec.rb +63 -0
- data/spec/lib/moose/inventory/cli/group_add_spec.rb +398 -0
- data/spec/lib/moose/inventory/cli/group_addhost_spec.rb +251 -0
- data/spec/lib/moose/inventory/cli/group_addvar_spec.rb +235 -0
- data/spec/lib/moose/inventory/cli/group_get_spec.rb +107 -0
- data/spec/lib/moose/inventory/cli/group_list_spec.rb +79 -0
- data/spec/lib/moose/inventory/cli/group_rm_spec.rb +191 -0
- data/spec/lib/moose/inventory/cli/group_rmhost_spec.rb +215 -0
- data/spec/lib/moose/inventory/cli/group_rmvar_spec.rb +202 -0
- data/spec/lib/moose/inventory/cli/group_spec.rb +15 -0
- data/spec/lib/moose/inventory/cli/host_add_spec.rb +330 -0
- data/spec/lib/moose/inventory/cli/host_addgroup_spec.rb +248 -0
- data/spec/lib/moose/inventory/cli/host_addvar_spec.rb +233 -0
- data/spec/lib/moose/inventory/cli/host_get_spec.rb +106 -0
- data/spec/lib/moose/inventory/cli/host_list_spec.rb +83 -0
- data/spec/lib/moose/inventory/cli/host_rm_spec.rb +132 -0
- data/spec/lib/moose/inventory/cli/host_rmgroup_spec.rb +245 -0
- data/spec/lib/moose/inventory/cli/host_rmvar_spec.rb +206 -0
- data/spec/lib/moose/inventory/cli/host_spec.rb +12 -0
- data/spec/lib/moose/inventory/config/config_spec.rb +80 -0
- data/spec/lib/moose/inventory/db/db_spec.rb +184 -0
- data/spec/lib/moose/inventory/db/models_spec.rb +150 -0
- data/spec/shared/shared_config_setup.rb +21 -0
- data/spec/spec_helper.rb +110 -0
- metadata +386 -0
| @@ -0,0 +1,150 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            RSpec.describe 'models' do
         | 
| 4 | 
            +
              #=============================
         | 
| 5 | 
            +
              # Initialization
         | 
| 6 | 
            +
              #
         | 
| 7 | 
            +
             | 
| 8 | 
            +
              before(:all) do
         | 
| 9 | 
            +
                # Set up the configuration object
         | 
| 10 | 
            +
                @mockarg_parts = {
         | 
| 11 | 
            +
                  config:  File.join(spec_root, 'config/config.yml'),
         | 
| 12 | 
            +
                  format:  'yaml',
         | 
| 13 | 
            +
                  env:     'test'
         | 
| 14 | 
            +
                }
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                @mockargs = []
         | 
| 17 | 
            +
                @mockarg_parts.each do |key, val|
         | 
| 18 | 
            +
                  @mockargs << "--#{key}"
         | 
| 19 | 
            +
                  @mockargs << val
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                @config = Moose::Inventory::Config
         | 
| 23 | 
            +
                @config.init(@mockargs)
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                @db = Moose::Inventory::DB
         | 
| 26 | 
            +
                @db.init
         | 
| 27 | 
            +
              end
         | 
| 28 | 
            +
             | 
| 29 | 
            +
              before(:each) do
         | 
| 30 | 
            +
                @db.reset
         | 
| 31 | 
            +
              end
         | 
| 32 | 
            +
             | 
| 33 | 
            +
              #=============================
         | 
| 34 | 
            +
              # Tests
         | 
| 35 | 
            +
              #
         | 
| 36 | 
            +
              describe 'Hostvars model' do
         | 
| 37 | 
            +
                it 'should be be functional per Sequel' do
         | 
| 38 | 
            +
                  name = 'hostvar-test'
         | 
| 39 | 
            +
                  val = '1'
         | 
| 40 | 
            +
             | 
| 41 | 
            +
                  @db.models[:hostvar].create(name: name, value: val)
         | 
| 42 | 
            +
             | 
| 43 | 
            +
                  hostvar = @db.models[:hostvar].find(name: name)
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                  expect(hostvar).not_to be_nil
         | 
| 46 | 
            +
                  expect(hostvar[:name]).to eq(name)
         | 
| 47 | 
            +
                  expect(hostvar[:value]).to eq(val)
         | 
| 48 | 
            +
                end
         | 
| 49 | 
            +
              end
         | 
| 50 | 
            +
             | 
| 51 | 
            +
              describe 'Host model' do
         | 
| 52 | 
            +
                it 'should be be functional per Sequel' do
         | 
| 53 | 
            +
                  @db.models[:host].create(name: 'Host-test')
         | 
| 54 | 
            +
                  host = @db.models[:host].find(name: 'Host-test')
         | 
| 55 | 
            +
                  expect(host).not_to be_nil
         | 
| 56 | 
            +
                  expect(host[:name]).to eq('Host-test')
         | 
| 57 | 
            +
                end
         | 
| 58 | 
            +
             | 
| 59 | 
            +
                it 'should have relationships with Groups' do
         | 
| 60 | 
            +
                  host = @db.models[:host].create(name: 'Host-test')
         | 
| 61 | 
            +
                  group = @db.models[:group].create(name: 'Group-test')
         | 
| 62 | 
            +
             | 
| 63 | 
            +
                  host.add_group(group)
         | 
| 64 | 
            +
             | 
| 65 | 
            +
                  host = @db.models[:host].find(name: 'Host-test')
         | 
| 66 | 
            +
                  groups = host.groups_dataset
         | 
| 67 | 
            +
             | 
| 68 | 
            +
                  expect(groups).not_to be_nil
         | 
| 69 | 
            +
                  expect(groups.count).to eq(1)
         | 
| 70 | 
            +
                  expect(groups.first[:name]).to eq('Group-test')
         | 
| 71 | 
            +
                end
         | 
| 72 | 
            +
             | 
| 73 | 
            +
                it 'should have relationships with Hostvars' do
         | 
| 74 | 
            +
                  name = 'host-test'
         | 
| 75 | 
            +
                  varname = 'hostvar-test'
         | 
| 76 | 
            +
                  varval = '1'
         | 
| 77 | 
            +
             | 
| 78 | 
            +
                  host = @db.models[:host].create(name: name)
         | 
| 79 | 
            +
                  hostvar = @db.models[:hostvar].create(name: varname, value: varval)
         | 
| 80 | 
            +
             | 
| 81 | 
            +
                  host.add_hostvar(hostvar)
         | 
| 82 | 
            +
             | 
| 83 | 
            +
                  host = @db.models[:host].find(name: name)
         | 
| 84 | 
            +
                  hostvars = host.hostvars_dataset
         | 
| 85 | 
            +
             | 
| 86 | 
            +
                  expect(hostvars).not_to be_nil
         | 
| 87 | 
            +
                  expect(hostvars.count).to eq(1)
         | 
| 88 | 
            +
                  expect(hostvars.first[:name]).to eq(varname)
         | 
| 89 | 
            +
                  expect(hostvars.first[:value]).to eq(varval)
         | 
| 90 | 
            +
                end
         | 
| 91 | 
            +
              end
         | 
| 92 | 
            +
             | 
| 93 | 
            +
              describe 'Groupvars model' do
         | 
| 94 | 
            +
                it 'should be be functional per Sequel' do
         | 
| 95 | 
            +
                  name = 'groupvar-test'
         | 
| 96 | 
            +
                  val = '1'
         | 
| 97 | 
            +
             | 
| 98 | 
            +
                  @db.models[:groupvar].create(name: name, value: val)
         | 
| 99 | 
            +
             | 
| 100 | 
            +
                  groupvar = @db.models[:groupvar].find(name: name)
         | 
| 101 | 
            +
             | 
| 102 | 
            +
                  expect(groupvar).not_to be_nil
         | 
| 103 | 
            +
                  expect(groupvar[:name]).to eq(name)
         | 
| 104 | 
            +
                  expect(groupvar[:value]).to eq(val)
         | 
| 105 | 
            +
                end
         | 
| 106 | 
            +
              end
         | 
| 107 | 
            +
             | 
| 108 | 
            +
              describe 'Group model' do
         | 
| 109 | 
            +
                it 'should be be functional per Sequel' do
         | 
| 110 | 
            +
                  @db.models[:group].create(name: 'Group-test')
         | 
| 111 | 
            +
                  group = @db.models[:group].find(name: 'Group-test')
         | 
| 112 | 
            +
                  expect(group).not_to be_nil
         | 
| 113 | 
            +
                  expect(group[:name]).to eq('Group-test')
         | 
| 114 | 
            +
                end
         | 
| 115 | 
            +
             | 
| 116 | 
            +
                it 'should have relationships with Hosts' do
         | 
| 117 | 
            +
                  group = @db.models[:group].create(name: 'Group-test')
         | 
| 118 | 
            +
                  host = @db.models[:host].create(name: 'Host-test')
         | 
| 119 | 
            +
             | 
| 120 | 
            +
                  group.add_host(host)
         | 
| 121 | 
            +
             | 
| 122 | 
            +
                  group = @db.models[:group].find(name: 'Group-test')
         | 
| 123 | 
            +
                  hosts = group.hosts_dataset
         | 
| 124 | 
            +
             | 
| 125 | 
            +
                  expect(hosts).not_to be_nil
         | 
| 126 | 
            +
                  expect(hosts.count).to eq(1)
         | 
| 127 | 
            +
                  expect(hosts.first[:name]).to eq('Host-test')
         | 
| 128 | 
            +
                end
         | 
| 129 | 
            +
              end
         | 
| 130 | 
            +
             | 
| 131 | 
            +
              it 'should have relationships with Hostvars' do
         | 
| 132 | 
            +
                groupname = 'group-test'
         | 
| 133 | 
            +
                groupvarname = 'groupvar-test'
         | 
| 134 | 
            +
                groupvarval = '1'
         | 
| 135 | 
            +
             | 
| 136 | 
            +
                group = @db.models[:group].create(name: groupname)
         | 
| 137 | 
            +
                groupvar = @db.models[:groupvar].create(name: groupvarname,
         | 
| 138 | 
            +
                                                        value: groupvarval)
         | 
| 139 | 
            +
             | 
| 140 | 
            +
                group.add_groupvar(groupvar)
         | 
| 141 | 
            +
             | 
| 142 | 
            +
                group = @db.models[:group].find(name: groupname)
         | 
| 143 | 
            +
                groupvars = group.groupvars_dataset
         | 
| 144 | 
            +
             | 
| 145 | 
            +
                expect(groupvars).not_to be_nil
         | 
| 146 | 
            +
                expect(groupvars.count).to eq(1)
         | 
| 147 | 
            +
                expect(groupvars.first[:name]).to eq(groupvarname)
         | 
| 148 | 
            +
                expect(groupvars.first[:value]).to eq(groupvarval)
         | 
| 149 | 
            +
              end
         | 
| 150 | 
            +
            end
         | 
| @@ -0,0 +1,21 @@ | |
| 1 | 
            +
             | 
| 2 | 
            +
            RSpec.shared_context 'shared config init', a: :b do
         | 
| 3 | 
            +
              before(:all) do
         | 
| 4 | 
            +
                @mockarg_parts = {
         | 
| 5 | 
            +
                  config:  File.join(spec_dir, 'config/config.yml'),
         | 
| 6 | 
            +
                  format:  'yaml',
         | 
| 7 | 
            +
                  env:     'test'
         | 
| 8 | 
            +
                }
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                @mockargs = []
         | 
| 11 | 
            +
                @mockarg_parts.each do |key, val|
         | 
| 12 | 
            +
                  @mockargs << "--#{key}"
         | 
| 13 | 
            +
                  @mockargs << val
         | 
| 14 | 
            +
                end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                @config = Moose::Inventory::Config
         | 
| 17 | 
            +
                @config.init(@mockargs)
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                @db      = Moose::Inventory::DB
         | 
| 20 | 
            +
              end
         | 
| 21 | 
            +
            end
         | 
    
        data/spec/spec_helper.rb
    ADDED
    
    | @@ -0,0 +1,110 @@ | |
| 1 | 
            +
            if RUBY_VERSION >= '1.9'
         | 
| 2 | 
            +
              require 'simplecov'
         | 
| 3 | 
            +
              require 'coveralls'
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              SimpleCov.formatters = [
         | 
| 6 | 
            +
                SimpleCov::Formatter::HTMLFormatter # ,
         | 
| 7 | 
            +
                # Coveralls::SimpleCov::Formatter
         | 
| 8 | 
            +
              ]
         | 
| 9 | 
            +
             | 
| 10 | 
            +
              SimpleCov.start do
         | 
| 11 | 
            +
                coverage_dir 'spec/reports/coverage'
         | 
| 12 | 
            +
                # coverage_path 'spec/reports/coverage'
         | 
| 13 | 
            +
                add_group 'bin', 'bin'
         | 
| 14 | 
            +
                add_group 'lib', 'lib'
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                add_filter '/config'
         | 
| 17 | 
            +
                add_filter '/coverage'
         | 
| 18 | 
            +
                add_filter '/spec'
         | 
| 19 | 
            +
                add_filter '/test'
         | 
| 20 | 
            +
                add_filter '/tmp'
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                minimum_coverage(90)
         | 
| 23 | 
            +
                # minimum_coverage_by_file(80)
         | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
            end
         | 
| 26 | 
            +
             | 
| 27 | 
            +
            $LOAD_PATH.unshift(File.join(File.dirname(__FILE__),
         | 
| 28 | 
            +
                                         '..', 'lib/moose/inventory'))
         | 
| 29 | 
            +
             | 
| 30 | 
            +
            # require 'rdoc'
         | 
| 31 | 
            +
            require 'rspec'
         | 
| 32 | 
            +
            require 'json'
         | 
| 33 | 
            +
            require 'yaml'
         | 
| 34 | 
            +
            require 'find'
         | 
| 35 | 
            +
            require 'moose_inventory_cli'
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            RSpec.configure do |config|
         | 
| 38 | 
            +
              #config.filter_run focus: true # <- enable to allow test focus
         | 
| 39 | 
            +
              config.color = true
         | 
| 40 | 
            +
              config.tty = true
         | 
| 41 | 
            +
              config.formatter = :progress #:documentation # :progress, :html, :textmate
         | 
| 42 | 
            +
              def capture(stream)
         | 
| 43 | 
            +
                case stream
         | 
| 44 | 
            +
                when :STDOUT
         | 
| 45 | 
            +
                  begin
         | 
| 46 | 
            +
                    orig = $stdout
         | 
| 47 | 
            +
                    $stdout = StringIO.new
         | 
| 48 | 
            +
                    yield
         | 
| 49 | 
            +
                    result = $stdout.string
         | 
| 50 | 
            +
                  ensure
         | 
| 51 | 
            +
                    $stdout = orig
         | 
| 52 | 
            +
                  end
         | 
| 53 | 
            +
                when :STDERR
         | 
| 54 | 
            +
                  begin
         | 
| 55 | 
            +
                    orig = $stderr
         | 
| 56 | 
            +
                    $stderr = StringIO.new
         | 
| 57 | 
            +
                    yield
         | 
| 58 | 
            +
                    result = $stderr.string
         | 
| 59 | 
            +
                  ensure
         | 
| 60 | 
            +
                    $stderr = orig
         | 
| 61 | 
            +
                  end
         | 
| 62 | 
            +
                end
         | 
| 63 | 
            +
                result
         | 
| 64 | 
            +
              end
         | 
| 65 | 
            +
             | 
| 66 | 
            +
              def runner
         | 
| 67 | 
            +
                out = { aborted: false, unexpected: false }
         | 
| 68 | 
            +
             | 
| 69 | 
            +
                out[:STDERR] = capture(:STDERR) do
         | 
| 70 | 
            +
                  out[:STDOUT] = capture(:STDOUT) do
         | 
| 71 | 
            +
                    begin
         | 
| 72 | 
            +
                      yield
         | 
| 73 | 
            +
             | 
| 74 | 
            +
                    rescue SystemExit
         | 
| 75 | 
            +
                      out[:aborted] = true
         | 
| 76 | 
            +
             | 
| 77 | 
            +
                    # rubocop:disable Lint/RescueException
         | 
| 78 | 
            +
                    rescue Exception => e
         | 
| 79 | 
            +
                      # rubocop:enable Lint/RescueException
         | 
| 80 | 
            +
                      out[:unexpected] = e
         | 
| 81 | 
            +
                    end
         | 
| 82 | 
            +
                  end
         | 
| 83 | 
            +
                end
         | 
| 84 | 
            +
                out # return the output
         | 
| 85 | 
            +
              end
         | 
| 86 | 
            +
             | 
| 87 | 
            +
              def expected(actual, desired)
         | 
| 88 | 
            +
                desired[:aborted].nil? && desired[:aborted] = false
         | 
| 89 | 
            +
                desired[:STDOUT].nil? && desired[:STDOUT] = ''
         | 
| 90 | 
            +
                desired[:STDERR].nil? && desired[:STDERR] = '' 
         | 
| 91 | 
            +
             | 
| 92 | 
            +
                expect(actual[:unexpected]).to eq(false)
         | 
| 93 | 
            +
                expect(actual[:aborted]).to eq(desired[:aborted])
         | 
| 94 | 
            +
                expect(actual[:STDOUT]).to eq(desired[:STDOUT])
         | 
| 95 | 
            +
                expect(actual[:STDERR]).to eq(desired[:STDERR])
         | 
| 96 | 
            +
              end
         | 
| 97 | 
            +
             | 
| 98 | 
            +
              def clobber_db_files
         | 
| 99 | 
            +
                paths = []
         | 
| 100 | 
            +
                Find.find('tmp/') { |path|  paths << path if path =~ /.*\.db$/ }
         | 
| 101 | 
            +
                paths.each { |file|  File.delete(file) }
         | 
| 102 | 
            +
              end
         | 
| 103 | 
            +
             | 
| 104 | 
            +
              def spec_root
         | 
| 105 | 
            +
                File.dirname(__FILE__)
         | 
| 106 | 
            +
              end
         | 
| 107 | 
            +
             | 
| 108 | 
            +
              # Always start with a fresh db file.
         | 
| 109 | 
            +
              clobber_db_files
         | 
| 110 | 
            +
            end
         | 
    
        metadata
    ADDED
    
    | @@ -0,0 +1,386 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 | 
            +
            name: moose-inventory
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.1.0
         | 
| 5 | 
            +
            platform: ruby
         | 
| 6 | 
            +
            authors:
         | 
| 7 | 
            +
            - Russell Davies
         | 
| 8 | 
            +
            autorequire: 
         | 
| 9 | 
            +
            bindir: bin
         | 
| 10 | 
            +
            cert_chain: []
         | 
| 11 | 
            +
            date: 2015-07-07 00:00:00.000000000 Z
         | 
| 12 | 
            +
            dependencies:
         | 
| 13 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            +
              name: indentation
         | 
| 15 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 | 
            +
                requirements:
         | 
| 17 | 
            +
                - - "~>"
         | 
| 18 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            +
                    version: '0.1'
         | 
| 20 | 
            +
              type: :runtime
         | 
| 21 | 
            +
              prerelease: false
         | 
| 22 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 | 
            +
                requirements:
         | 
| 24 | 
            +
                - - "~>"
         | 
| 25 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            +
                    version: '0.1'
         | 
| 27 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            +
              name: json
         | 
| 29 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 | 
            +
                requirements:
         | 
| 31 | 
            +
                - - "~>"
         | 
| 32 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            +
                    version: '1.8'
         | 
| 34 | 
            +
              type: :runtime
         | 
| 35 | 
            +
              prerelease: false
         | 
| 36 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 | 
            +
                requirements:
         | 
| 38 | 
            +
                - - "~>"
         | 
| 39 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            +
                    version: '1.8'
         | 
| 41 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              name: mysql
         | 
| 43 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            +
                requirements:
         | 
| 45 | 
            +
                - - "~>"
         | 
| 46 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            +
                    version: '2.9'
         | 
| 48 | 
            +
              type: :runtime
         | 
| 49 | 
            +
              prerelease: false
         | 
| 50 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - "~>"
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: '2.9'
         | 
| 55 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 56 | 
            +
              name: pg
         | 
| 57 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 | 
            +
                requirements:
         | 
| 59 | 
            +
                - - "~>"
         | 
| 60 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            +
                    version: '0.17'
         | 
| 62 | 
            +
              type: :runtime
         | 
| 63 | 
            +
              prerelease: false
         | 
| 64 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 | 
            +
                requirements:
         | 
| 66 | 
            +
                - - "~>"
         | 
| 67 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            +
                    version: '0.17'
         | 
| 69 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 70 | 
            +
              name: sequel
         | 
| 71 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 72 | 
            +
                requirements:
         | 
| 73 | 
            +
                - - "~>"
         | 
| 74 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 75 | 
            +
                    version: '4.22'
         | 
| 76 | 
            +
              type: :runtime
         | 
| 77 | 
            +
              prerelease: false
         | 
| 78 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 79 | 
            +
                requirements:
         | 
| 80 | 
            +
                - - "~>"
         | 
| 81 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 82 | 
            +
                    version: '4.22'
         | 
| 83 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 84 | 
            +
              name: sqlite3
         | 
| 85 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 86 | 
            +
                requirements:
         | 
| 87 | 
            +
                - - "~>"
         | 
| 88 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 89 | 
            +
                    version: '1.3'
         | 
| 90 | 
            +
              type: :runtime
         | 
| 91 | 
            +
              prerelease: false
         | 
| 92 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 93 | 
            +
                requirements:
         | 
| 94 | 
            +
                - - "~>"
         | 
| 95 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 96 | 
            +
                    version: '1.3'
         | 
| 97 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 98 | 
            +
              name: thor
         | 
| 99 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 100 | 
            +
                requirements:
         | 
| 101 | 
            +
                - - "~>"
         | 
| 102 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 103 | 
            +
                    version: '0.19'
         | 
| 104 | 
            +
              type: :runtime
         | 
| 105 | 
            +
              prerelease: false
         | 
| 106 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 107 | 
            +
                requirements:
         | 
| 108 | 
            +
                - - "~>"
         | 
| 109 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 110 | 
            +
                    version: '0.19'
         | 
| 111 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 112 | 
            +
              name: bundler
         | 
| 113 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 114 | 
            +
                requirements:
         | 
| 115 | 
            +
                - - "~>"
         | 
| 116 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 117 | 
            +
                    version: '1.10'
         | 
| 118 | 
            +
              type: :development
         | 
| 119 | 
            +
              prerelease: false
         | 
| 120 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 121 | 
            +
                requirements:
         | 
| 122 | 
            +
                - - "~>"
         | 
| 123 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 124 | 
            +
                    version: '1.10'
         | 
| 125 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 126 | 
            +
              name: coveralls
         | 
| 127 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 128 | 
            +
                requirements:
         | 
| 129 | 
            +
                - - "~>"
         | 
| 130 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 131 | 
            +
                    version: '0.8'
         | 
| 132 | 
            +
              type: :development
         | 
| 133 | 
            +
              prerelease: false
         | 
| 134 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 135 | 
            +
                requirements:
         | 
| 136 | 
            +
                - - "~>"
         | 
| 137 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 138 | 
            +
                    version: '0.8'
         | 
| 139 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 140 | 
            +
              name: hitimes
         | 
| 141 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 142 | 
            +
                requirements:
         | 
| 143 | 
            +
                - - "~>"
         | 
| 144 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 145 | 
            +
                    version: '1.2'
         | 
| 146 | 
            +
              type: :development
         | 
| 147 | 
            +
              prerelease: false
         | 
| 148 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 149 | 
            +
                requirements:
         | 
| 150 | 
            +
                - - "~>"
         | 
| 151 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 152 | 
            +
                    version: '1.2'
         | 
| 153 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 154 | 
            +
              name: guard
         | 
| 155 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 156 | 
            +
                requirements:
         | 
| 157 | 
            +
                - - "~>"
         | 
| 158 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 159 | 
            +
                    version: '2.12'
         | 
| 160 | 
            +
              type: :development
         | 
| 161 | 
            +
              prerelease: false
         | 
| 162 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 163 | 
            +
                requirements:
         | 
| 164 | 
            +
                - - "~>"
         | 
| 165 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 166 | 
            +
                    version: '2.12'
         | 
| 167 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 168 | 
            +
              name: guard-rspec
         | 
| 169 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 170 | 
            +
                requirements:
         | 
| 171 | 
            +
                - - "~>"
         | 
| 172 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 173 | 
            +
                    version: '4.5'
         | 
| 174 | 
            +
              type: :development
         | 
| 175 | 
            +
              prerelease: false
         | 
| 176 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 177 | 
            +
                requirements:
         | 
| 178 | 
            +
                - - "~>"
         | 
| 179 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 180 | 
            +
                    version: '4.5'
         | 
| 181 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 182 | 
            +
              name: guard-rubocop
         | 
| 183 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 184 | 
            +
                requirements:
         | 
| 185 | 
            +
                - - "~>"
         | 
| 186 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 187 | 
            +
                    version: '1.2'
         | 
| 188 | 
            +
              type: :development
         | 
| 189 | 
            +
              prerelease: false
         | 
| 190 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 191 | 
            +
                requirements:
         | 
| 192 | 
            +
                - - "~>"
         | 
| 193 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 194 | 
            +
                    version: '1.2'
         | 
| 195 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 196 | 
            +
              name: rake
         | 
| 197 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 198 | 
            +
                requirements:
         | 
| 199 | 
            +
                - - "~>"
         | 
| 200 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 201 | 
            +
                    version: '10.1'
         | 
| 202 | 
            +
              type: :development
         | 
| 203 | 
            +
              prerelease: false
         | 
| 204 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 205 | 
            +
                requirements:
         | 
| 206 | 
            +
                - - "~>"
         | 
| 207 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 208 | 
            +
                    version: '10.1'
         | 
| 209 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 210 | 
            +
              name: rspec
         | 
| 211 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 212 | 
            +
                requirements:
         | 
| 213 | 
            +
                - - "~>"
         | 
| 214 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 215 | 
            +
                    version: '3.2'
         | 
| 216 | 
            +
              type: :development
         | 
| 217 | 
            +
              prerelease: false
         | 
| 218 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 219 | 
            +
                requirements:
         | 
| 220 | 
            +
                - - "~>"
         | 
| 221 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 222 | 
            +
                    version: '3.2'
         | 
| 223 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 224 | 
            +
              name: rubocop
         | 
| 225 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 226 | 
            +
                requirements:
         | 
| 227 | 
            +
                - - ">="
         | 
| 228 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 229 | 
            +
                    version: '0.19'
         | 
| 230 | 
            +
              type: :development
         | 
| 231 | 
            +
              prerelease: false
         | 
| 232 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 233 | 
            +
                requirements:
         | 
| 234 | 
            +
                - - ">="
         | 
| 235 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 236 | 
            +
                    version: '0.19'
         | 
| 237 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 238 | 
            +
              name: simplecov
         | 
| 239 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 240 | 
            +
                requirements:
         | 
| 241 | 
            +
                - - "~>"
         | 
| 242 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 243 | 
            +
                    version: '0.10'
         | 
| 244 | 
            +
              type: :development
         | 
| 245 | 
            +
              prerelease: false
         | 
| 246 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 247 | 
            +
                requirements:
         | 
| 248 | 
            +
                - - "~>"
         | 
| 249 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 250 | 
            +
                    version: '0.10'
         | 
| 251 | 
            +
            description: The Moosecastle CLI tool for Ansible-compatable dynamic inventory management.
         | 
| 252 | 
            +
            email:
         | 
| 253 | 
            +
            - russell@blakemere.ca
         | 
| 254 | 
            +
            executables:
         | 
| 255 | 
            +
            - ".buildpath"
         | 
| 256 | 
            +
            - ".project"
         | 
| 257 | 
            +
            - moose_inventory
         | 
| 258 | 
            +
            extensions: []
         | 
| 259 | 
            +
            extra_rdoc_files: []
         | 
| 260 | 
            +
            files:
         | 
| 261 | 
            +
            - ".coveralls.yml"
         | 
| 262 | 
            +
            - ".gitignore"
         | 
| 263 | 
            +
            - ".rubocop.yml"
         | 
| 264 | 
            +
            - Gemfile
         | 
| 265 | 
            +
            - Guardfile
         | 
| 266 | 
            +
            - LICENSE.txt
         | 
| 267 | 
            +
            - README.md
         | 
| 268 | 
            +
            - README.md.orig
         | 
| 269 | 
            +
            - Rakefile
         | 
| 270 | 
            +
            - bin/.buildpath
         | 
| 271 | 
            +
            - bin/.project
         | 
| 272 | 
            +
            - bin/moose_inventory
         | 
| 273 | 
            +
            - config/dotfiles/coveralls.yml
         | 
| 274 | 
            +
            - config/dotfiles/gitignore
         | 
| 275 | 
            +
            - config/dotfiles/rubocop.yml
         | 
| 276 | 
            +
            - lib/moose/inventory/cli/application.rb
         | 
| 277 | 
            +
            - lib/moose/inventory/cli/formatter.rb
         | 
| 278 | 
            +
            - lib/moose/inventory/cli/group.rb
         | 
| 279 | 
            +
            - lib/moose/inventory/cli/group_add.rb
         | 
| 280 | 
            +
            - lib/moose/inventory/cli/group_addchild.rb
         | 
| 281 | 
            +
            - lib/moose/inventory/cli/group_addhost.rb
         | 
| 282 | 
            +
            - lib/moose/inventory/cli/group_addvar.rb
         | 
| 283 | 
            +
            - lib/moose/inventory/cli/group_get.rb
         | 
| 284 | 
            +
            - lib/moose/inventory/cli/group_list.rb
         | 
| 285 | 
            +
            - lib/moose/inventory/cli/group_rm.rb
         | 
| 286 | 
            +
            - lib/moose/inventory/cli/group_rmchild.rb
         | 
| 287 | 
            +
            - lib/moose/inventory/cli/group_rmhost.rb
         | 
| 288 | 
            +
            - lib/moose/inventory/cli/group_rmvar.rb
         | 
| 289 | 
            +
            - lib/moose/inventory/cli/host.rb
         | 
| 290 | 
            +
            - lib/moose/inventory/cli/host_add.rb
         | 
| 291 | 
            +
            - lib/moose/inventory/cli/host_addgroup.rb
         | 
| 292 | 
            +
            - lib/moose/inventory/cli/host_addvar.rb
         | 
| 293 | 
            +
            - lib/moose/inventory/cli/host_get.rb
         | 
| 294 | 
            +
            - lib/moose/inventory/cli/host_list.rb
         | 
| 295 | 
            +
            - lib/moose/inventory/cli/host_rm.rb
         | 
| 296 | 
            +
            - lib/moose/inventory/cli/host_rmgroup.rb
         | 
| 297 | 
            +
            - lib/moose/inventory/cli/host_rmvar.rb
         | 
| 298 | 
            +
            - lib/moose/inventory/config/config.rb
         | 
| 299 | 
            +
            - lib/moose/inventory/db/db.rb
         | 
| 300 | 
            +
            - lib/moose/inventory/db/exceptions.rb
         | 
| 301 | 
            +
            - lib/moose/inventory/db/models.rb
         | 
| 302 | 
            +
            - lib/moose/inventory/moose_inventory_cli.rb
         | 
| 303 | 
            +
            - lib/moose/inventory/version.rb
         | 
| 304 | 
            +
            - moose-inventory.gemspec
         | 
| 305 | 
            +
            - scripts/guard_quality.sh
         | 
| 306 | 
            +
            - scripts/guard_test.sh
         | 
| 307 | 
            +
            - scripts/reports.sh
         | 
| 308 | 
            +
            - spec/config/config.yml
         | 
| 309 | 
            +
            - spec/lib/moose/inventory/cli/application_spec.rb
         | 
| 310 | 
            +
            - spec/lib/moose/inventory/cli/cli_spec.rb
         | 
| 311 | 
            +
            - spec/lib/moose/inventory/cli/formatter_spec.rb
         | 
| 312 | 
            +
            - spec/lib/moose/inventory/cli/group_add_spec.rb
         | 
| 313 | 
            +
            - spec/lib/moose/inventory/cli/group_addhost_spec.rb
         | 
| 314 | 
            +
            - spec/lib/moose/inventory/cli/group_addvar_spec.rb
         | 
| 315 | 
            +
            - spec/lib/moose/inventory/cli/group_get_spec.rb
         | 
| 316 | 
            +
            - spec/lib/moose/inventory/cli/group_list_spec.rb
         | 
| 317 | 
            +
            - spec/lib/moose/inventory/cli/group_rm_spec.rb
         | 
| 318 | 
            +
            - spec/lib/moose/inventory/cli/group_rmhost_spec.rb
         | 
| 319 | 
            +
            - spec/lib/moose/inventory/cli/group_rmvar_spec.rb
         | 
| 320 | 
            +
            - spec/lib/moose/inventory/cli/group_spec.rb
         | 
| 321 | 
            +
            - spec/lib/moose/inventory/cli/host_add_spec.rb
         | 
| 322 | 
            +
            - spec/lib/moose/inventory/cli/host_addgroup_spec.rb
         | 
| 323 | 
            +
            - spec/lib/moose/inventory/cli/host_addvar_spec.rb
         | 
| 324 | 
            +
            - spec/lib/moose/inventory/cli/host_get_spec.rb
         | 
| 325 | 
            +
            - spec/lib/moose/inventory/cli/host_list_spec.rb
         | 
| 326 | 
            +
            - spec/lib/moose/inventory/cli/host_rm_spec.rb
         | 
| 327 | 
            +
            - spec/lib/moose/inventory/cli/host_rmgroup_spec.rb
         | 
| 328 | 
            +
            - spec/lib/moose/inventory/cli/host_rmvar_spec.rb
         | 
| 329 | 
            +
            - spec/lib/moose/inventory/cli/host_spec.rb
         | 
| 330 | 
            +
            - spec/lib/moose/inventory/config/config_spec.rb
         | 
| 331 | 
            +
            - spec/lib/moose/inventory/db/db_spec.rb
         | 
| 332 | 
            +
            - spec/lib/moose/inventory/db/models_spec.rb
         | 
| 333 | 
            +
            - spec/shared/shared_config_setup.rb
         | 
| 334 | 
            +
            - spec/spec_helper.rb
         | 
| 335 | 
            +
            homepage: http://www.blakemere.ca
         | 
| 336 | 
            +
            licenses:
         | 
| 337 | 
            +
            - MIT
         | 
| 338 | 
            +
            metadata: {}
         | 
| 339 | 
            +
            post_install_message: 
         | 
| 340 | 
            +
            rdoc_options: []
         | 
| 341 | 
            +
            require_paths:
         | 
| 342 | 
            +
            - lib
         | 
| 343 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 344 | 
            +
              requirements:
         | 
| 345 | 
            +
              - - ">="
         | 
| 346 | 
            +
                - !ruby/object:Gem::Version
         | 
| 347 | 
            +
                  version: '0'
         | 
| 348 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 349 | 
            +
              requirements:
         | 
| 350 | 
            +
              - - ">="
         | 
| 351 | 
            +
                - !ruby/object:Gem::Version
         | 
| 352 | 
            +
                  version: '0'
         | 
| 353 | 
            +
            requirements: []
         | 
| 354 | 
            +
            rubyforge_project: 
         | 
| 355 | 
            +
            rubygems_version: 2.2.3
         | 
| 356 | 
            +
            signing_key: 
         | 
| 357 | 
            +
            specification_version: 4
         | 
| 358 | 
            +
            summary: Moose-tools inventory manager
         | 
| 359 | 
            +
            test_files:
         | 
| 360 | 
            +
            - spec/config/config.yml
         | 
| 361 | 
            +
            - spec/lib/moose/inventory/cli/application_spec.rb
         | 
| 362 | 
            +
            - spec/lib/moose/inventory/cli/cli_spec.rb
         | 
| 363 | 
            +
            - spec/lib/moose/inventory/cli/formatter_spec.rb
         | 
| 364 | 
            +
            - spec/lib/moose/inventory/cli/group_add_spec.rb
         | 
| 365 | 
            +
            - spec/lib/moose/inventory/cli/group_addhost_spec.rb
         | 
| 366 | 
            +
            - spec/lib/moose/inventory/cli/group_addvar_spec.rb
         | 
| 367 | 
            +
            - spec/lib/moose/inventory/cli/group_get_spec.rb
         | 
| 368 | 
            +
            - spec/lib/moose/inventory/cli/group_list_spec.rb
         | 
| 369 | 
            +
            - spec/lib/moose/inventory/cli/group_rm_spec.rb
         | 
| 370 | 
            +
            - spec/lib/moose/inventory/cli/group_rmhost_spec.rb
         | 
| 371 | 
            +
            - spec/lib/moose/inventory/cli/group_rmvar_spec.rb
         | 
| 372 | 
            +
            - spec/lib/moose/inventory/cli/group_spec.rb
         | 
| 373 | 
            +
            - spec/lib/moose/inventory/cli/host_add_spec.rb
         | 
| 374 | 
            +
            - spec/lib/moose/inventory/cli/host_addgroup_spec.rb
         | 
| 375 | 
            +
            - spec/lib/moose/inventory/cli/host_addvar_spec.rb
         | 
| 376 | 
            +
            - spec/lib/moose/inventory/cli/host_get_spec.rb
         | 
| 377 | 
            +
            - spec/lib/moose/inventory/cli/host_list_spec.rb
         | 
| 378 | 
            +
            - spec/lib/moose/inventory/cli/host_rm_spec.rb
         | 
| 379 | 
            +
            - spec/lib/moose/inventory/cli/host_rmgroup_spec.rb
         | 
| 380 | 
            +
            - spec/lib/moose/inventory/cli/host_rmvar_spec.rb
         | 
| 381 | 
            +
            - spec/lib/moose/inventory/cli/host_spec.rb
         | 
| 382 | 
            +
            - spec/lib/moose/inventory/config/config_spec.rb
         | 
| 383 | 
            +
            - spec/lib/moose/inventory/db/db_spec.rb
         | 
| 384 | 
            +
            - spec/lib/moose/inventory/db/models_spec.rb
         | 
| 385 | 
            +
            - spec/shared/shared_config_setup.rb
         | 
| 386 | 
            +
            - spec/spec_helper.rb
         |