ml-puppetdb-terminus 3.2.1

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.
Files changed (38) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +202 -0
  3. data/NOTICE.txt +17 -0
  4. data/README.md +22 -0
  5. data/puppet/lib/puppet/application/storeconfigs.rb +4 -0
  6. data/puppet/lib/puppet/face/node/deactivate.rb +37 -0
  7. data/puppet/lib/puppet/face/node/status.rb +80 -0
  8. data/puppet/lib/puppet/face/storeconfigs.rb +193 -0
  9. data/puppet/lib/puppet/indirector/catalog/puppetdb.rb +400 -0
  10. data/puppet/lib/puppet/indirector/facts/puppetdb.rb +152 -0
  11. data/puppet/lib/puppet/indirector/facts/puppetdb_apply.rb +25 -0
  12. data/puppet/lib/puppet/indirector/node/puppetdb.rb +19 -0
  13. data/puppet/lib/puppet/indirector/resource/puppetdb.rb +108 -0
  14. data/puppet/lib/puppet/reports/puppetdb.rb +188 -0
  15. data/puppet/lib/puppet/util/puppetdb.rb +108 -0
  16. data/puppet/lib/puppet/util/puppetdb/char_encoding.rb +316 -0
  17. data/puppet/lib/puppet/util/puppetdb/command.rb +116 -0
  18. data/puppet/lib/puppet/util/puppetdb/command_names.rb +8 -0
  19. data/puppet/lib/puppet/util/puppetdb/config.rb +148 -0
  20. data/puppet/lib/puppet/util/puppetdb/http.rb +121 -0
  21. data/puppet/spec/README.markdown +8 -0
  22. data/puppet/spec/spec.opts +6 -0
  23. data/puppet/spec/spec_helper.rb +38 -0
  24. data/puppet/spec/unit/face/node/deactivate_spec.rb +28 -0
  25. data/puppet/spec/unit/face/node/status_spec.rb +43 -0
  26. data/puppet/spec/unit/face/storeconfigs_spec.rb +199 -0
  27. data/puppet/spec/unit/indirector/catalog/puppetdb_spec.rb +703 -0
  28. data/puppet/spec/unit/indirector/facts/puppetdb_apply_spec.rb +27 -0
  29. data/puppet/spec/unit/indirector/facts/puppetdb_spec.rb +347 -0
  30. data/puppet/spec/unit/indirector/node/puppetdb_spec.rb +61 -0
  31. data/puppet/spec/unit/indirector/resource/puppetdb_spec.rb +199 -0
  32. data/puppet/spec/unit/reports/puppetdb_spec.rb +249 -0
  33. data/puppet/spec/unit/util/puppetdb/char_encoding_spec.rb +212 -0
  34. data/puppet/spec/unit/util/puppetdb/command_spec.rb +98 -0
  35. data/puppet/spec/unit/util/puppetdb/config_spec.rb +227 -0
  36. data/puppet/spec/unit/util/puppetdb/http_spec.rb +138 -0
  37. data/puppet/spec/unit/util/puppetdb_spec.rb +33 -0
  38. metadata +115 -0
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env rspec
2
+ # encoding: UTF-8
3
+
4
+ require 'spec_helper'
5
+ require 'digest/sha1'
6
+ require 'puppet/util/puppetdb'
7
+ require 'puppet/util/puppetdb/command_names'
8
+
9
+ Command = Puppet::Util::Puppetdb::Command
10
+
11
+
12
+ describe Puppet::Util::Puppetdb do
13
+ subject { Object.new.extend described_class }
14
+
15
+ describe "#submit_command" do
16
+ let(:payload) { {'resistance' => 'futile', 'opinion' => 'irrelevant'} }
17
+ let(:command1) { Command.new("OPEN SESAME", 1, 'foo.localdomain',
18
+ payload.merge(:uniqueprop => "command1")) }
19
+
20
+ it "should submit the command" do
21
+ # careful here... since we're going to stub Command.new, we need to
22
+ # make sure we reference command1 first, because it calls Command.new.
23
+ command1.expects(:submit).once
24
+ Command.expects(:new).once.returns(command1)
25
+ subject.submit_command(command1.certname,
26
+ command1.payload,
27
+ command1.command,
28
+ command1.version)
29
+ end
30
+
31
+ end
32
+
33
+ end
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ml-puppetdb-terminus
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.2.1
5
+ platform: ruby
6
+ authors:
7
+ - Mark Lawler
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: json
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: puppet
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 3.8.1
34
+ - - <
35
+ - !ruby/object:Gem::Version
36
+ version: '5.0'
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - '>='
42
+ - !ruby/object:Gem::Version
43
+ version: 3.8.1
44
+ - - <
45
+ - !ruby/object:Gem::Version
46
+ version: '5.0'
47
+ description: Puppet terminus files to connect to PuppetDB - in a gem
48
+ email:
49
+ - marklawler@gmail.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - LICENSE.txt
55
+ - NOTICE.txt
56
+ - README.md
57
+ - puppet/lib/puppet/application/storeconfigs.rb
58
+ - puppet/lib/puppet/face/node/deactivate.rb
59
+ - puppet/lib/puppet/face/node/status.rb
60
+ - puppet/lib/puppet/face/storeconfigs.rb
61
+ - puppet/lib/puppet/indirector/catalog/puppetdb.rb
62
+ - puppet/lib/puppet/indirector/facts/puppetdb.rb
63
+ - puppet/lib/puppet/indirector/facts/puppetdb_apply.rb
64
+ - puppet/lib/puppet/indirector/node/puppetdb.rb
65
+ - puppet/lib/puppet/indirector/resource/puppetdb.rb
66
+ - puppet/lib/puppet/reports/puppetdb.rb
67
+ - puppet/lib/puppet/util/puppetdb.rb
68
+ - puppet/lib/puppet/util/puppetdb/char_encoding.rb
69
+ - puppet/lib/puppet/util/puppetdb/command.rb
70
+ - puppet/lib/puppet/util/puppetdb/command_names.rb
71
+ - puppet/lib/puppet/util/puppetdb/config.rb
72
+ - puppet/lib/puppet/util/puppetdb/http.rb
73
+ - puppet/spec/README.markdown
74
+ - puppet/spec/spec.opts
75
+ - puppet/spec/spec_helper.rb
76
+ - puppet/spec/unit/face/node/deactivate_spec.rb
77
+ - puppet/spec/unit/face/node/status_spec.rb
78
+ - puppet/spec/unit/face/storeconfigs_spec.rb
79
+ - puppet/spec/unit/indirector/catalog/puppetdb_spec.rb
80
+ - puppet/spec/unit/indirector/facts/puppetdb_apply_spec.rb
81
+ - puppet/spec/unit/indirector/facts/puppetdb_spec.rb
82
+ - puppet/spec/unit/indirector/node/puppetdb_spec.rb
83
+ - puppet/spec/unit/indirector/resource/puppetdb_spec.rb
84
+ - puppet/spec/unit/reports/puppetdb_spec.rb
85
+ - puppet/spec/unit/util/puppetdb/char_encoding_spec.rb
86
+ - puppet/spec/unit/util/puppetdb/command_spec.rb
87
+ - puppet/spec/unit/util/puppetdb/config_spec.rb
88
+ - puppet/spec/unit/util/puppetdb/http_spec.rb
89
+ - puppet/spec/unit/util/puppetdb_spec.rb
90
+ homepage: https://github.com/marklawler/ml-puppetdb-terminus
91
+ licenses:
92
+ - Apache-2.0
93
+ metadata: {}
94
+ post_install_message:
95
+ rdoc_options: []
96
+ require_paths:
97
+ - lib
98
+ required_ruby_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - '>='
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ requirements: []
109
+ rubyforge_project:
110
+ rubygems_version: 2.4.6
111
+ signing_key:
112
+ specification_version: 4
113
+ summary: Connect Puppet to PuppetDB by setting up a terminus for PuppetDB - bundled
114
+ into a gem
115
+ test_files: []