Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Use puppetlabs_spec_helper. Add Modulefile to push to the forge
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Sanchez committed Jun 8, 2013
1 parent 390ef38 commit cf9ea18
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 62 deletions.
3 changes: 3 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fixtures:
symlinks:
artifactory: "#{source_dir}"
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
/.rvmrc
.idea
.rvmrc
.project
.librarian/
.tmp/
pkg/
doc/
spec/fixtures/
.vagrant/
12 changes: 7 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
source :rubygems
source 'https://rubygems.org'

group :rake do
gem 'puppet', '2.7.12'
gem 'rspec-puppet', '0.1.2'
gem 'rake', '0.9.2.2'
gem 'puppet-lint', '0.1.12'
gem 'puppet', '>=2.7.20'
gem 'rspec-puppet', '>=0.1.3'
gem 'rake', '>=0.9.2.2'
gem 'puppet-lint', '>=0.1.12'
gem 'puppetlabs_spec_helper'
gem 'puppet-blacksmith', '>=1.0.5'
end
66 changes: 46 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,54 @@
GEM
remote: http://rubygems.org/
remote: https://rubygems.org/
specs:
diff-lcs (1.1.3)
facter (1.6.8)
puppet (2.7.12)
facter (>= 1.5.1)
puppet-lint (0.1.12)
rake (0.9.2.2)
rspec (2.10.0)
rspec-core (~> 2.10.0)
rspec-expectations (~> 2.10.0)
rspec-mocks (~> 2.10.0)
rspec-core (2.10.0)
rspec-expectations (2.10.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.10.1)
rspec-puppet (0.1.2)
diff-lcs (1.2.4)
facter (1.7.1)
hiera (1.2.1)
json_pure
json_pure (1.8.0)
metaclass (0.0.1)
mime-types (1.23)
mocha (0.14.0)
metaclass (~> 0.0.1)
nokogiri (1.5.10)
puppet (3.2.1)
facter (~> 1.6)
hiera (~> 1.0)
rgen (~> 0.6)
puppet-blacksmith (1.0.5)
nokogiri
puppet (>= 2.7.16)
puppetlabs_spec_helper (>= 0.3.0)
rake
rest-client
puppet-lint (0.3.2)
puppetlabs_spec_helper (0.4.1)
mocha (>= 0.10.5)
rake
rspec (>= 2.9.0)
rspec-puppet (>= 0.1.1)
rake (10.0.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rgen (0.6.2)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
rspec-puppet (0.1.6)
rspec

PLATFORMS
ruby

DEPENDENCIES
puppet (= 2.7.12)
puppet-lint (= 0.1.12)
rake (= 0.9.2.2)
rspec-puppet (= 0.1.2)
puppet (>= 2.7.20)
puppet-blacksmith (>= 1.0.5)
puppet-lint (>= 0.1.12)
puppetlabs_spec_helper
rake (>= 0.9.2.2)
rspec-puppet (>= 0.1.3)
9 changes: 9 additions & 0 deletions Modulefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name 'maestrodev-artifactory'
version '1.0.0'

author 'maestrodev'
license 'Apache License, Version 2.0'
project_page 'http://github.com/maestrodev/puppet-artifactory'
source 'http://github.com/maestrodev/puppet-artifactory'
summary 'A really simple module to install Artifactory'
description 'Installs Artifactory package and service'
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
##Artifactory Puppet Module
This is a simple Puppet module used to provision Artifactory. Currently this only supports RPM-based environments.

`class { "artifactory": }` is all you need in your manifest.
This is a really simple Puppet module used to provision Artifactory. Currently this only supports RPM-based environments.

`class { "artifactory": }` is all you need in your manifest.
23 changes: 8 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
require 'bundler'
Bundler.require(:rake)
require 'rake/clean'
require 'puppet-lint/tasks/puppet-lint'
require 'rspec/core/rake_task'

CLEAN.include('pkg')
CLEAN.include('spec/fixtures/', 'doc', 'pkg')
CLOBBER.include('.tmp', '.librarian')

PuppetLint.configuration.send("disable_80chars")

desc "Run module RSpec tests."
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = ["--format", "doc", "--color"]
t.pattern = 'spec/*/*_spec.rb'
end
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet_blacksmith/rake_tasks'

desc "Create a Puppet module."
task :build => [:clean, :spec] do
sh 'puppet-module build'
end
PuppetLint.configuration.send("disable_80chars")

task :default => :build
task :default => [:clean, :spec]
4 changes: 3 additions & 1 deletion spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require "#{File.join(File.dirname(__FILE__),'..','spec_helper')}"
require 'spec_helper'

describe 'artifactory' do
it { should contain_package('artifactory') }
it { should contain_service('artifactory') }
end
9 changes: 0 additions & 9 deletions spec/fixtures/manifests/site.pp

This file was deleted.

1 change: 0 additions & 1 deletion spec/fixtures/modules/artifactory/manifests

This file was deleted.

9 changes: 1 addition & 8 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
require 'rspec-puppet'

fixture_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures'))

RSpec.configure do |c|
c.module_path = File.join(fixture_path, 'modules')
c.manifest_dir = File.join(fixture_path, 'manifests')
end
require 'puppetlabs_spec_helper/module_spec_helper'

0 comments on commit cf9ea18

Please sign in to comment.