puppetdb_rundeck 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/CHANGELOG +3 -0
- data/README.md +4 -1
- data/lib/app.rb +5 -5
- data/lib/model/xml.rb +1 -1
- data/lib/model/yaml.rb +1 -1
- data/puppetdb_rundeck.gemspec +1 -1
- data/spec/helpers/puppetdb_spec.rb +4 -4
- data/spec/spec_helper.rb +5 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb848a254fd03349efc48fb7abc971318a31e260
|
4
|
+
data.tar.gz: 950e752161296069b43acbf5536854f891e4619d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 751fdd01fb55f9d4fc67e92bb692bb411e2d3d51e1b78fb0023d11006f1840af819972e55942d443d6cb392652f91239bf819f0005d1ba7deeaaf40ffc046581
|
7
|
+
data.tar.gz: 9dedecfc7046dc76e1cea863fe92a9c53f204d59ff796c7a0f535ebef3abac39e2d3f90abdb33a4cd22578b7e5512732f727a857cd059983582f9f8e5eb8bddd
|
data/.travis.yml
ADDED
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
-
|
1
|
+
# PuppetDB_Rundeck
|
2
2
|
|
3
3
|
puppetdb_rundeck is a sinatra based application to provide integration between [PuppetDB](https://docs.puppetlabs.com/puppetdb/latest/) and [Rundeck](http://rundeck.org/).
|
4
4
|
It provides an api in either xml or yaml that allows the node and fact data with puppetdb to use used as a resource
|
5
5
|
with rundeck.
|
6
6
|
|
7
|
+
[![Build
|
8
|
+
Status](https://secure.travis-ci.org/opentable/puppetdb_rundeck.png)](https://secure.travis-ci.org/opentable/puppetdb_rundeck.png)
|
9
|
+
|
7
10
|
## Installation
|
8
11
|
|
9
12
|
Install it yourself as:
|
data/lib/app.rb
CHANGED
@@ -3,12 +3,12 @@ require 'yaml'
|
|
3
3
|
require 'sinatra'
|
4
4
|
require 'haml'
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
require File.expand_path('../helpers/puppetdb', __FILE__)
|
7
|
+
require File.expand_path('../helpers/process', __FILE__)
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
require File.expand_path('../model/endpoint', __FILE__)
|
10
|
+
require File.expand_path('../model/xml', __FILE__)
|
11
|
+
require File.expand_path('../model/yaml', __FILE__)
|
12
12
|
|
13
13
|
class PuppetDBRunDeck < Sinatra::Base
|
14
14
|
get '/' do
|
data/lib/model/xml.rb
CHANGED
data/lib/model/yaml.rb
CHANGED
data/puppetdb_rundeck.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = 'puppetdb_rundeck'
|
6
|
-
spec.version = '0.2.
|
6
|
+
spec.version = '0.2.2'
|
7
7
|
spec.authors = ['liamjbennett']
|
8
8
|
spec.email = ['lbennett@opentable.com']
|
9
9
|
spec.summary = %q{A sinatra based application to provide integration between PuppetDB and Rundeck}
|
@@ -6,7 +6,7 @@ describe Helpers::PuppetDB, '#get_nodes' do
|
|
6
6
|
it 'should return json when puppetdb details are valid' do
|
7
7
|
|
8
8
|
stub_request(:get, 'http://localhost:8080/v3/nodes').
|
9
|
-
with(:headers => {'Accept'=>['*/*', 'application/json'], '
|
9
|
+
with(:headers => {'Accept'=>['*/*', 'application/json'], 'User-Agent'=>'Ruby'}).
|
10
10
|
to_return(:status => 200, :body => '{ "name" : "test.internal" }', :headers => {})
|
11
11
|
|
12
12
|
puppetdb = Helpers::PuppetDB.new('localhost', '8080')
|
@@ -17,7 +17,7 @@ describe Helpers::PuppetDB, '#get_nodes' do
|
|
17
17
|
it 'should return an empty collection when the details are invalid' do
|
18
18
|
|
19
19
|
stub_request(:get, 'http://fubar:8080/v3/nodes').
|
20
|
-
with(:headers => {'Accept'=>['*/*', 'application/json'], '
|
20
|
+
with(:headers => {'Accept'=>['*/*', 'application/json'], 'User-Agent'=>'Ruby'}).
|
21
21
|
to_return(:status => 404, :body => '', :headers => {})
|
22
22
|
|
23
23
|
puppetdb = Helpers::PuppetDB.new('fubar', '8080')
|
@@ -32,7 +32,7 @@ describe Helpers::PuppetDB, '#get_facts' do
|
|
32
32
|
it 'should return json when puppetdb details are valid' do
|
33
33
|
|
34
34
|
stub_request(:get, 'http://localhost:8080/v3/facts').
|
35
|
-
with(:headers => {'Accept'=>['*/*', 'application/json'], '
|
35
|
+
with(:headers => {'Accept'=>['*/*', 'application/json'], 'User-Agent'=>'Ruby'}).
|
36
36
|
to_return(:status => 200, :body => '{ "name" : "osfamily" }', :headers => {})
|
37
37
|
|
38
38
|
puppetdb = Helpers::PuppetDB.new('localhost', '8080')
|
@@ -43,7 +43,7 @@ describe Helpers::PuppetDB, '#get_facts' do
|
|
43
43
|
it 'should return an empty collection when the details are invalid' do
|
44
44
|
|
45
45
|
stub_request(:get, 'http://fubar:8080/v3/facts').
|
46
|
-
with(:headers => {'Accept'=>['*/*', 'application/json'], '
|
46
|
+
with(:headers => {'Accept'=>['*/*', 'application/json'], 'User-Agent'=>'Ruby'}).
|
47
47
|
to_return(:status => 404, :body => '', :headers => {})
|
48
48
|
|
49
49
|
puppetdb = Helpers::PuppetDB.new('fubar', '8080')
|
data/spec/spec_helper.rb
CHANGED
@@ -3,7 +3,7 @@ require 'rack/test'
|
|
3
3
|
require 'webmock/rspec'
|
4
4
|
require 'rspec/mocks'
|
5
5
|
|
6
|
-
|
6
|
+
require File.expand_path '../../spec/support/fake_puppetdb', __FILE__
|
7
7
|
|
8
8
|
WebMock.disable_net_connect!(:allow_localhost => true)
|
9
9
|
|
@@ -22,4 +22,8 @@ end
|
|
22
22
|
RSpec.configure do |config|
|
23
23
|
config.include Rack::Test::Methods
|
24
24
|
config.mock_with :rspec
|
25
|
+
|
26
|
+
config.before(:all) do
|
27
|
+
WebMock.disable_net_connect!(:allow_localhost => true)
|
28
|
+
end
|
25
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppetdb_rundeck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- liamjbennett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -163,6 +163,7 @@ extra_rdoc_files: []
|
|
163
163
|
files:
|
164
164
|
- .gitignore
|
165
165
|
- .rspec
|
166
|
+
- .travis.yml
|
166
167
|
- CHANGELOG
|
167
168
|
- Gemfile
|
168
169
|
- LICENSE.txt
|