From c5ce4042d41cd085312e52c3f66309bb3153420b Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Tue, 19 Feb 2013 11:10:21 +0000 Subject: [PATCH] Initial commit. --- .gitignore | 7 ++++ .travis.yml | 5 +++ CONTRIBUTING.md | 12 ++++++ Gemfile | 3 ++ Gemfile.lock | 72 ++++++++++++++++++++++++++++++++ README.md | 18 ++++++++ manifests/init.pp | 11 +++++ script/cardboard-exec | 19 +++++++++ script/cibuild | 1 + script/lint | 1 + script/specs | 1 + script/syntax | 1 + spec/classes/quicksilver_spec.rb | 10 +++++ spec/fixtures/manifests/site.pp | 0 spec/spec_helper.rb | 8 ++++ 15 files changed, 169 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 CONTRIBUTING.md create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 README.md create mode 100644 manifests/init.pp create mode 100755 script/cardboard-exec create mode 120000 script/cibuild create mode 120000 script/lint create mode 120000 script/specs create mode 120000 script/syntax create mode 100644 spec/classes/quicksilver_spec.rb create mode 100644 spec/fixtures/manifests/site.pp create mode 100644 spec/spec_helper.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c30d1ba --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/.bundle +/.ruby-version +/spec/fixtures/.librarian +/spec/fixtures/.tmp +/spec/fixtures/Puppetfile.lock +/spec/fixtures/modules +/spec/fixtures/vendor diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..80707b4 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +--- +script: "./script/cibuild" +gemfile: "this/does/not/exist" +rvm: + - "1.8.7" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..2fd60c9 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,12 @@ +Thanks for contributing to Boxen! A couple of notes to help you out: + +* We're conservative with version bumps, especially on services. We + tend to keep things aligned with what we're personally using in + development. If that doesn't work for your team, fork the module and + use it in your Boxen instead. + +* Otherwise, go crazy! Fork it, fix it, test it, pull request it. + Remember that a PR is the start of a conversation, not the end of one. + +:heart:, +Boxen diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..b35fba7 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "cardboard", "~> 1.0" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..20f1cf3 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,72 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.3.2) + ansi (1.4.3) + boxen (1.0.0) + ansi (~> 1.4) + hiera (~> 1.0.0) + highline (~> 1.6) + json_pure (>= 1.7.7, < 2.0) + librarian-puppet (~> 0.9) + octokit (~> 1.15) + puppet (~> 3.0) + cardboard (1.0.0) + boxen (~> 1.0) + puppet-lint (~> 0.3) + puppetlabs_spec_helper (~> 0.4) + rspec-puppet (~> 0.1) + diff-lcs (1.1.3) + facter (1.6.17) + faraday (0.8.5) + multipart-post (~> 1.1) + faraday_middleware (0.9.0) + faraday (>= 0.7.4, < 0.9) + hashie (1.2.0) + hiera (1.0.0) + highline (1.6.15) + json (1.7.7) + json_pure (1.7.7) + librarian-puppet (0.9.8) + json + thor (~> 0.15) + metaclass (0.0.1) + mocha (0.13.2) + metaclass (~> 0.0.1) + multi_json (1.6.0) + multipart-post (1.1.5) + netrc (0.7.7) + octokit (1.23.0) + addressable (~> 2.2) + faraday (~> 0.8) + faraday_middleware (~> 0.9) + hashie (~> 1.2) + multi_json (~> 1.3) + netrc (~> 0.7.7) + puppet (3.1.0) + facter (~> 1.6) + hiera (~> 1.0) + 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.3) + rspec (2.12.0) + rspec-core (~> 2.12.0) + rspec-expectations (~> 2.12.0) + rspec-mocks (~> 2.12.0) + rspec-core (2.12.2) + rspec-expectations (2.12.1) + diff-lcs (~> 1.1.3) + rspec-mocks (2.12.2) + rspec-puppet (0.1.6) + rspec + thor (0.17.0) + +PLATFORMS + ruby + +DEPENDENCIES + cardboard (~> 1.0) diff --git a/README.md b/README.md new file mode 100644 index 0000000..02e1d2b --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# Quicksilver Puppet Module for Boxen + +Install [Quicksilver](http://qsapp.com), a productivity app for Mac OS X. + +## Usage + +```puppet +include quicksilver +``` + +## Required Puppet Modules + +* `boxen` + +## Development + +Write code. Run `script/cibuild` to test it. Check the `script` +directory for other useful tools. diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000..5bc3db5 --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,11 @@ +# Public: Install Quicksilver.app into /Applications. +# +# Examples +# +# include quicksilver +class quicksilver { + package { 'Quicksilver': + provider => 'compressed_app', + source => 'http://github.qsapp.com/downloads/Quicksilver%20B71.dmg' + } +} diff --git a/script/cardboard-exec b/script/cardboard-exec new file mode 100755 index 0000000..664c5d2 --- /dev/null +++ b/script/cardboard-exec @@ -0,0 +1,19 @@ +#!/bin/sh +# Make sure deps are available and run a Cardboard command. + +set -e + +cd $(dirname "$0")/.. + +BUNDLE=.bundle +BIN=$BUNDLE/binstubs +SCRIPT=$(basename "$0") + +BUNDLE_ARGS="--binstubs $BIN --path $BUNDLE --quiet" +[ "cibuild" = "$SCRIPT" ] && BUNDLE_ARGS="$BUNDLE_ARGS --no-quiet" + +rm -rf {$BIN,$BUNDLE/config} +bundle install $BUNDLE_ARGS + +bundle exec cardboard bootstrap +exec bundle exec cardboard "$SCRIPT" "$@" diff --git a/script/cibuild b/script/cibuild new file mode 120000 index 0000000..ef98964 --- /dev/null +++ b/script/cibuild @@ -0,0 +1 @@ +cardboard-exec \ No newline at end of file diff --git a/script/lint b/script/lint new file mode 120000 index 0000000..ef98964 --- /dev/null +++ b/script/lint @@ -0,0 +1 @@ +cardboard-exec \ No newline at end of file diff --git a/script/specs b/script/specs new file mode 120000 index 0000000..ef98964 --- /dev/null +++ b/script/specs @@ -0,0 +1 @@ +cardboard-exec \ No newline at end of file diff --git a/script/syntax b/script/syntax new file mode 120000 index 0000000..ef98964 --- /dev/null +++ b/script/syntax @@ -0,0 +1 @@ +cardboard-exec \ No newline at end of file diff --git a/spec/classes/quicksilver_spec.rb b/spec/classes/quicksilver_spec.rb new file mode 100644 index 0000000..a0f76b2 --- /dev/null +++ b/spec/classes/quicksilver_spec.rb @@ -0,0 +1,10 @@ +require 'spec_helper' + +describe 'quicksilver' do + it do + should contain_package('Quicksilver').with({ + :provider => 'appdmg', + :source => 'http://github.qsapp.com/downloads/Quicksilver%20B71.dmg', + }) + end +end diff --git a/spec/fixtures/manifests/site.pp b/spec/fixtures/manifests/site.pp new file mode 100644 index 0000000..e69de29 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..d3923f8 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,8 @@ +require 'rspec-puppet' + +fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) + +RSpec.configure do |c| + c.module_path = File.join(fixture_path, 'modules') + c.manifest_dir = File.join(fixture_path, 'manifests') +end