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 hidden or 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 "net/https" | |
| require "json" | |
| gh_token = ENV.fetch("GITHUB_TOKEN") | |
| gh_user = ARGV.fetch(0) | |
| gh_repo = ARGV.fetch(1) | |
| release_name = ARGV.fetch(2) | |
| release_desc = ARGV[3] | |
| uri = URI("https://api.github.com") |
This file contains hidden or 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
| Vagrant.configure("2") do |config| | |
| config.vm.box = "ubuntu-12.04" | |
| config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
| # Install Chef version 11 | |
| config.vm.provision :shell, :inline => <<EOS | |
| set -e | |
| if ! command -V chef-solo >/dev/null 2>/dev/null; then | |
| curl -L https://www.opscode.com/chef/install.sh | bash -s -- -v 11.6.0 | |
| fi |
This file contains hidden or 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 : | |
| # Install Cucumber and dependencies, and run scenarios. | |
| $script = <<SCRIPT | |
| set -e -x | |
| test -f /var/lib/apt/periodic/update-success-stamp || sudo apt-get update -y | |
| sudo apt-get install -y update-notifier-common ruby rubygems ruby-bundler git | |
| bundle install --gemfile=/vagrant/Gemfile | |
| cd /vagrant | |
| bundle exec rake features |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |