puppetdb_rundeck 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d137d7acb59b1240a8d53c1471dcf01d24ac45e3
4
- data.tar.gz: ee572a7dc6556e8a8735ec5da9fab07003728319
3
+ metadata.gz: cb848a254fd03349efc48fb7abc971318a31e260
4
+ data.tar.gz: 950e752161296069b43acbf5536854f891e4619d
5
5
  SHA512:
6
- metadata.gz: 6adc0c9d2fd8d9b2497b0333be3d2134d519d1d6660de5aa0f89b620492d04500bd395ed1ae8fbc37e5ec96c808123d2a1adfd50b093db332075cf33473632f2
7
- data.tar.gz: 38ba950db22bf7c4cf44d1ff463b938882f85ce729409dc2e0f25fcb9334c75cfecd01410b01dbab06a0e9bc5c701c2749532ceb347505ff313d15cb733a6cfe
6
+ metadata.gz: 751fdd01fb55f9d4fc67e92bb692bb411e2d3d51e1b78fb0023d11006f1840af819972e55942d443d6cb392652f91239bf819f0005d1ba7deeaaf40ffc046581
7
+ data.tar.gz: 9dedecfc7046dc76e1cea863fe92a9c53f204d59ff796c7a0f535ebef3abac39e2d3f90abdb33a4cd22578b7e5512732f727a857cd059983582f9f8e5eb8bddd
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ before_install: rm Gemfile.lock || true
3
+ rvm:
4
+ - 1.9.3
5
+ - 2.0.0
6
+ script: bundle exec rspec spec/
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 2014-04-27 Release 0.2.2
2
+ - fixes for ruby 1.8.7
3
+
1
4
  2014-04-27 Release 0.2.1
2
5
  - explicitly adding tilt dependency to fix issue with sinartra
3
6
 
data/README.md CHANGED
@@ -1,9 +1,12 @@
1
- # PuppetDBRundeck
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
- require_relative 'helpers/puppetdb'
7
- require_relative 'helpers/process'
6
+ require File.expand_path('../helpers/puppetdb', __FILE__)
7
+ require File.expand_path('../helpers/process', __FILE__)
8
8
 
9
- require_relative 'model/endpoint'
10
- require_relative 'model/xml'
11
- require_relative 'model/yaml'
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
@@ -1,4 +1,4 @@
1
- require_relative '../helpers/process'
1
+ require File.expand_path('../../helpers/process', __FILE__)
2
2
 
3
3
  class XMLOutput
4
4
  attr_accessor :tmp_file
data/lib/model/yaml.rb CHANGED
@@ -1,4 +1,4 @@
1
- require_relative '../helpers/process'
1
+ require File.expand_path('../../helpers/process', __FILE__)
2
2
 
3
3
  class YAMLOutput
4
4
  attr_accessor :tmp_file
@@ -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.1'
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'], 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'}).
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'], 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'}).
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'], 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'}).
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'], 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'}).
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
- require_relative '../spec/support/fake_puppetdb'
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.1
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-27 00:00:00.000000000 Z
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