bundle package
mkdir /tmp/gem_server
mv vendor/cache/ /tmp/gem_server/gems
gem generate_index -d /tmp/gem_server/
cd /tmp/gem_server/gems
python -m SimpleHTTPServer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc 'Encrypt environment variables for Travis' | |
task :travis_encrypt, [:aws_key_id, :aws_secret] do |t, args| | |
raw_vars = "AWS_ACCESS_KEY_ID=#{args[:aws_key_id]} AWS_SECRET_ACCESS_KEY=#{args[:aws_secret]}" | |
sh 'travis', 'encrypt', raw_vars | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'aws-sdk' | |
def validate_template(body) | |
cfn = AWS::CloudFormation.new | |
cfn.validate_template(body) | |
end | |
desc 'Validate CloudFormation template files' | |
task :test do | |
Dir.glob('*.json').each do |template| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATH | |
remote: . | |
specs: | |
chefspec (1.0.0) | |
chef (>= 0.9.12) | |
erubis | |
fauxhai (~> 0.1) | |
minitest-chef-handler (~> 0.6.0) | |
moneta (< 0.7.0) | |
rspec (~> 2.12.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bigpoint's foodcritic rules | |
rule 'BP001', 'Missing poem in README' do | |
tags %w(style readme poem) | |
cookbook do |path| | |
file = File.join(path, 'README.md') | |
# XXX FC011 already checks that the README exists. | |
if File.file?(file) && (File.read(file) !~ /^Poem/) | |
[ file_match(file) ] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/vendor/gems/ruby/1.9.1/gems/berkshelf-1.0.4/lib/berkshelf/berksfile.rb | |
+++ b/vendor/gems/ruby/1.9.1/gems/berkshelf-1.0.4/lib/berkshelf/berksfile.rb | |
@@ -38,10 +38,6 @@ | |
# Dir.glob does not support backslash as a File separator | |
src = cb.path.to_s.gsub('\\', '/') | |
FileUtils.cp_r(Dir.glob(File.join(src, "*")), dest) | |
+ | |
+ # Copy .git dir if present | |
+ git_dir = File.join(src, ".git") | |
+ FileUtils.cp_r(git_dir, dest) if File.exists?(git_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vi: set ft=ruby : | |
def github(user, repo, protocol = :git) | |
prefix = { | |
:git => 'git://github.com/', | |
:ssh => '[email protected]:', | |
:https => 'https://github.com/' | |
}[protocol] | |
"#{prefix}#{user}/#{repo}.git" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
set -e | |
APP_ROOT="$(cd -P -- $(dirname -- "$0") && pwd)" | |
cd "$APP_ROOT" | |
echo "Setting up your environment..." | |
if command -v ruby >/dev/null; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class CookbookSource | |
attr_reader :name, :options | |
def initialize(name, options = {}) | |
@name = name | |
@options = options | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path('../spec_helper', __FILE__) | |
describe 'The recipe RECIPE::default' do | |
let (:chef_run) do | |
ChefSpec::ChefRunner.new.converge 'RECIPE::default' | |
end | |
it "should install PACKAGE via ark" do | |
chef_run.should install_ark "PACKAGE" | |
end |