Skip to content
This repository was archived by the owner on Feb 19, 2024. It is now read-only.

Use puppetlabs-apt & require_packages() #18

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fixtures:
symlinks:
packagecloud: "#{source_dir}"
repositories:
stdlib:
repo: https://github.com/puppetlabs/puppetlabs-stdlib.git
ref: 4.3.2
forge_modules:
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.tmp/
modules/
.librarian/
spec/fixtures/
53 changes: 41 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
source 'https://rubygems.org'

gem 'test-kitchen'
gem 'serverspec'
gem 'busser-serverspec'
gem 'busser'
gem 'psych'
gem 'kitchen-vagrant'
gem 'kitchen-puppet'
gem 'puppet'
gem 'librarian-puppet'
gem 'puppet-lint'
source 'http://rubygems.org'

group :test do
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', ENV['PUPPET_VERSION'] || '~> 3.8.0'
end

# rspec must be v2 for ruby 1.8.7
if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9'
gem 'rspec', '~> 2.0'
end

gem 'rake'
gem 'puppet-lint'
gem 'rspec-puppet', :git => 'https://github.com/rodjek/rspec-puppet.git'
gem 'puppet-syntax'
gem 'puppetlabs_spec_helper'
gem 'simplecov'
gem 'metadata-json-lint'
end

group :development do
gem 'travis'
gem 'travis-lint'
gem 'puppet-blacksmith'
gem 'guard-rake'
end

group :system_tests do
gem 'librarian-puppet'
gem 'test-kitchen'
gem 'serverspec'
gem 'busser-serverspec'
gem 'busser'
gem 'psych'
gem 'kitchen-vagrant'
gem 'kitchen-puppet'
gem 'vagrant-wrapper'
end
177 changes: 150 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,64 +1,148 @@
GIT
remote: https://github.com/rodjek/rspec-puppet.git
revision: 9eb2c6ffc7f2dd56e2a72ac4966482848ad148ba
specs:
rspec-puppet (2.3.2)
rspec

GEM
remote: https://rubygems.org/
remote: http://rubygems.org/
specs:
CFPropertyList (2.2.8)
activemodel (4.1.4)
activesupport (= 4.1.4)
activemodel (4.2.0)
activesupport (= 4.2.0)
builder (~> 3.1)
activesupport (4.1.4)
i18n (~> 0.6, >= 0.6.9)
activesupport (4.2.0)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.4.0)
backports (3.6.8)
builder (3.2.2)
busser (0.6.0)
thor
busser-serverspec (0.2.6)
busser
coderay (1.1.1)
diff-lcs (1.2.5)
facter (2.1.0)
docile (1.1.5)
domain_name (0.5.20160216)
unf (>= 0.0.5, < 1.0.0)
ethon (0.8.1)
ffi (>= 1.3.0)
facter (2.4.6)
CFPropertyList (~> 2.2.6)
faraday (0.9.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
her (0.7.2)
activemodel (>= 3.0.0, < 4.2)
activesupport (>= 3.0.0, < 4.2)
faraday_middleware (0.10.0)
faraday (>= 0.7.4, < 0.10)
ffi (1.9.10)
formatador (0.2.5)
gh (0.14.0)
addressable
backports
faraday (~> 0.8)
multi_json (~> 1.0)
net-http-persistent (>= 2.7)
net-http-pipeline
guard (2.13.0)
formatador (>= 0.2.4)
listen (>= 2.7, <= 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-rake (1.0.0)
guard
rake
her (0.7.3)
activemodel (>= 3.0.0, <= 4.2)
activesupport (>= 3.0.0, <= 4.2)
faraday (>= 0.8, < 1.0)
multi_json (~> 1.7)
hiera (1.3.4)
json_pure
highline (1.6.21)
i18n (0.6.11)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.7.0)
json (1.8.1)
json_pure (1.8.1)
json_pure (1.8.3)
kitchen-puppet (0.0.12)
kitchen-vagrant (0.15.0)
test-kitchen (~> 1.0)
librarian (0.1.2)
highline
launchy (2.4.3)
addressable (~> 2.3)
librarian-puppet (2.2.1)
librarianp (>= 0.6.3)
puppet_forge (~> 1.0)
rsync
librarianp (0.6.3)
thor (~> 0.15)
librarian-puppet (1.1.2)
listen (3.0.6)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9.7)
lumberjack (1.0.10)
metaclass (0.0.4)
metadata-json-lint (0.0.11)
json
librarian (>= 0.1.2)
puppet_forge
minitest (5.4.0)
spdx-licenses (~> 1.0)
method_source (0.8.2)
mime-types (2.99.1)
minitest (5.8.4)
mixlib-shellout (1.4.0)
multi_json (1.10.1)
mocha (1.1.0)
metaclass (~> 0.0.1)
multi_json (1.11.2)
multipart-post (2.0.0)
nenv (0.3.0)
net-http-persistent (2.9.4)
net-http-pipeline (1.0.1)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
netrc (0.11.0)
notiffany (0.0.8)
nenv (~> 0.1)
shellany (~> 0.0)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
psych (2.0.5)
puppet (3.6.2)
puppet (3.8.5)
facter (> 1.6, < 3)
hiera (~> 1.0)
json_pure
rgen (~> 0.6.5)
puppet-blacksmith (3.3.1)
puppet (>= 2.7.16)
rest-client
puppet-lint (1.1.0)
puppet_forge (1.0.3)
puppet-syntax (2.1.0)
rake
puppet_forge (1.0.4)
her (~> 0.6)
rgen (0.6.6)
puppetlabs_spec_helper (1.1.0)
mocha
puppet-lint
puppet-syntax
rake
rspec-puppet
pusher-client (0.6.2)
json
websocket (~> 1.0)
rake (10.5.0)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rest-client (1.8.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rspec (2.99.0)
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
Expand All @@ -70,13 +154,23 @@ GEM
rspec-core (>= 2.99.0.beta1)
rspec-expectations (>= 2.99.0.beta1)
rspec-mocks (2.99.1)
rsync (1.0.9)
safe_yaml (1.0.3)
serverspec (1.10.0)
highline
net-ssh
rspec (~> 2.99)
rspec-its
specinfra (~> 1.20)
shellany (0.0.1)
simplecov (0.11.2)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
slop (3.6.0)
spdx-licenses (1.0.0)
json
specinfra (1.20.0)
test-kitchen (1.2.1)
mixlib-shellout (~> 1.2)
Expand All @@ -85,21 +179,50 @@ GEM
safe_yaml (~> 1.0)
thor (~> 0.18)
thor (0.19.1)
thread_safe (0.3.4)
tzinfo (1.2.1)
thread_safe (0.3.5)
travis (1.8.2)
backports
faraday (~> 0.9)
faraday_middleware (~> 0.9, >= 0.9.1)
gh (~> 0.13)
highline (~> 1.6)
launchy (~> 2.1)
pusher-client (~> 0.4)
typhoeus (~> 0.6, >= 0.6.8)
travis-lint (2.0.0)
json
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
vagrant-wrapper (2.0.3)
websocket (1.2.2)

PLATFORMS
ruby

DEPENDENCIES
busser
busser-serverspec
guard-rake
kitchen-puppet
kitchen-vagrant
librarian-puppet
metadata-json-lint
psych
puppet
puppet (~> 3.8.0)
puppet-blacksmith
puppet-lint
puppet-syntax
puppetlabs_spec_helper
rake
rspec-puppet!
serverspec
simplecov
test-kitchen
travis
travis-lint
vagrant-wrapper
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ packagecloud.io repositories installed on your infrastructure.
Simply install the packagecloud puppet module and you will be able to use the packagecloud::repo resource in your manifests:

```
packagecloud::repo { "username/publicrepo":
packagecloud::repo { 'username/publicrepo':
type => 'rpm',
}

packagecloud::repo { "username/privaterepo":
packagecloud::repo { 'username/privaterepo':
type => 'deb',
master_token => 'eae123bca276162f376b9614ba134fa7993624a8de0bb3a2',
}
Expand All @@ -50,7 +50,7 @@ packagecloud: enterprise users can specify the host and port by setting
`server_address`:

```
packagecloud::repo { "username/privaterepo":
packagecloud::repo { 'username/privaterepo':
type => 'deb',
master_token => 'eae123bca276162f376b9614ba134fa7993624a8de0bb3a2',
server_address => 'http://my.internal.server.domain:1234/',
Expand All @@ -62,12 +62,12 @@ If you need to install more than one type of package from the same repository
`fq_name` parameter:

```
packagecloud::repo { "deb repository for blah":
packagecloud::repo { 'deb repository for blah':
fq_name => "username/blah",
type => 'rpm',
}

packagecloud::repo { "gem repository for blah":
packagecloud::repo { 'gem repository for blah':
fq_name => "username/blah",
type => 'gem',
}
Expand Down
39 changes: 39 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax'

# These two gems aren't always present, for instance
# on Travis with --without development
begin
require 'puppet_blacksmith/rake_tasks'
rescue LoadError
end

PuppetLint.configuration.fail_on_warnings
PuppetLint.configuration.send('relative')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_class_parameter_defaults')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

exclude_paths = [
"pkg/**/*",
"vendor/**/*",
"spec/**/*",
]
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths

desc "Run acceptance tests"
RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
end

desc "Run syntax, lint, and spec tests."
task :test => [
:syntax,
:lint,
:spec,
]
Loading