diff --git a/.gitignore b/.gitignore index f48e022..6f12edf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,12 @@ /.bundle /.librarian /.ruby-version +/.snapshot /.tmp /bin /config/local.rb /log +/tmp /shared/* !/shared/README.md -/tmp +/vendor/gems/ diff --git a/Gemfile b/Gemfile index d68e2e5..8183526 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ source "https://rubygems.org" -gem "boxen", "0.7.3" +gem "boxen", "~> 1.0" +gem "open4", "~> 1.3" group :development do gem "aws-sdk" diff --git a/Gemfile.lock b/Gemfile.lock index 7b79750..738f1d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,11 +7,11 @@ GEM json (~> 1.4) nokogiri (>= 1.4.4) uuidtools (~> 2.1) - boxen (0.7.3) + boxen (1.0.0) ansi (~> 1.4) hiera (~> 1.0.0) highline (~> 1.6) - json_pure (~> 1.7) + json_pure (>= 1.7.7, < 2.0) librarian-puppet (~> 0.9) octokit (~> 1.15) puppet (~> 3.0) @@ -26,11 +26,10 @@ GEM highline (1.6.15) json (1.7.7) json_pure (1.7.7) - librarian-puppet (0.9.7) + librarian-puppet (0.9.8) json - puppet thor (~> 0.15) - multi_json (1.6.0) + multi_json (1.6.1) multipart-post (1.1.5) net-ssh (2.6.5) netrc (0.7.7) @@ -42,6 +41,7 @@ GEM hashie (~> 1.2) multi_json (~> 1.3) netrc (~> 0.7.7) + open4 (1.3.0) puppet (3.1.0) facter (~> 1.6) hiera (~> 1.0) @@ -58,6 +58,7 @@ PLATFORMS DEPENDENCIES aws-sdk - boxen (= 0.7.3) + boxen (~> 1.0) net-ssh + open4 (~> 1.3) rbvmomi diff --git a/Puppetfile b/Puppetfile index a286c9c..3b5b701 100644 --- a/Puppetfile +++ b/Puppetfile @@ -16,23 +16,23 @@ end # Includes many of our custom types and providers, as well as global # config. Required. -github "boxen", "0.2.4" +github "boxen", "1.0.0" # Core modules for a basic development environment. You can replace # some/most of these if you want, but it's not recommended. -github "dnsmasq", "0.2.1" -github "gcc", "0.0.2" -github "git", "0.1.0" -github "homebrew", "0.3.2" -github "hub", "0.0.1" +github "dnsmasq", "1.0.0" +github "gcc", "1.0.0" +github "git", "1.0.0" +github "homebrew", "1.0.0" +github "hub", "1.0.0" github "inifile", "0.9.0", :repo => "cprice-puppet/puppetlabs-inifile" -github "nginx", "0.2.1" -github "nodejs", "0.0.2" -github "nvm", "0.0.5" -github "ruby", "0.7.1" +github "nginx", "1.0.0" +github "nodejs", "1.0.0" +github "nvm", "1.0.0" +github "ruby", "1.0.0" github "stdlib", "3.0.0", :repo => "puppetlabs/puppetlabs-stdlib" -github "sudo", "0.0.1" +github "sudo", "1.0.0" # Optional/custom modules. There are tons available at # https://github.com/boxen. diff --git a/Puppetfile.lock b/Puppetfile.lock index dafe506..f6e7b38 100644 --- a/Puppetfile.lock +++ b/Puppetfile.lock @@ -1,57 +1,57 @@ GITHUBTARBALL remote: boxen/puppet-boxen specs: - boxen (0.2.4) + boxen (1.0.0) GITHUBTARBALL remote: boxen/puppet-dnsmasq specs: - dnsmasq (0.2.1) + dnsmasq (1.0.0) GITHUBTARBALL remote: boxen/puppet-gcc specs: - gcc (0.0.2) + gcc (1.0.0) GITHUBTARBALL remote: boxen/puppet-git specs: - git (0.1.0) + git (1.0.0) GITHUBTARBALL remote: boxen/puppet-homebrew specs: - homebrew (0.3.2) + homebrew (1.0.0) GITHUBTARBALL remote: boxen/puppet-hub specs: - hub (0.0.1) + hub (1.0.0) GITHUBTARBALL remote: boxen/puppet-nginx specs: - nginx (0.2.1) + nginx (1.0.0) GITHUBTARBALL remote: boxen/puppet-nodejs specs: - nodejs (0.0.2) + nodejs (1.0.0) GITHUBTARBALL remote: boxen/puppet-nvm specs: - nvm (0.0.5) + nvm (1.0.0) GITHUBTARBALL remote: boxen/puppet-ruby specs: - ruby (0.7.1) + ruby (1.0.0) GITHUBTARBALL remote: boxen/puppet-sudo specs: - sudo (0.0.1) + sudo (1.0.0) GITHUBTARBALL remote: cprice-puppet/puppetlabs-inifile @@ -64,17 +64,17 @@ GITHUBTARBALL stdlib (3.0.0) DEPENDENCIES - boxen (= 0.2.4) - dnsmasq (= 0.2.1) - gcc (= 0.0.2) - git (= 0.1.0) - homebrew (= 0.3.2) - hub (= 0.0.1) + boxen (= 1.0.0) + dnsmasq (= 1.0.0) + gcc (= 1.0.0) + git (= 1.0.0) + homebrew (= 1.0.0) + hub (= 1.0.0) inifile (= 0.9.0) - nginx (= 0.2.1) - nodejs (= 0.0.2) - nvm (= 0.0.5) - ruby (= 0.7.1) + nginx (= 1.0.0) + nodejs (= 1.0.0) + nvm (= 1.0.0) + ruby (= 1.0.0) stdlib (= 3.0.0) - sudo (= 0.0.1) + sudo (= 1.0.0) diff --git a/script/boxen-git-credential b/script/boxen-git-credential index a9b75a0..1960ff4 100755 --- a/script/boxen-git-credential +++ b/script/boxen-git-credential @@ -1,20 +1,11 @@ #!/usr/bin/ruby # Provide git credentials using Boxen's config. -unless command = ARGV.shift +unless command = ARGV[0] this = File.basename $0 abort "Usage: #{this} " end -# We only support get. - -exit 0 unless command == "get" - -# Make sure we're looking for github.com stuff. - -attrs = Hash[$stdin.read.split($/).map { |l| l.split("=") }] -exit 1 unless attrs["host"] == "github.com" - require "pathname" # Put us where we belong, in the root dir of our boxen repo. @@ -29,10 +20,27 @@ ENV.keys.select { |k| /^BUNDLE_/i }.each { |k| ENV.delete k } # Set up our local configuration, deps, and load path. load "config/basic.rb" - require "boxen/config" config = Boxen::Config.load +input = $stdin.read +attrs = Hash[input.split($/).map { |l| l.split("=") }] + +if command != "get" || attrs["host"] != "github.com" + require "open4" + + fallback = ENV["BOXEN_GIT_CREDENTIAL_FALLBACK"] + fallback ||= "#{config.homedir}/homebrew/bin/git-credential-osxkeychain" + + status = Open4.popen4 fallback, *ARGV do |pid, stdin, stdout, stderr| + stdin.write input + stdin.puts + + $stdout.write stdout.read + end + + exit status.exitstatus +end puts "username=#{config.login}" puts "password=#{config.password}" diff --git a/vendor/cache/boxen-0.7.3.gem b/vendor/cache/boxen-0.7.3.gem deleted file mode 100644 index 7c61115..0000000 Binary files a/vendor/cache/boxen-0.7.3.gem and /dev/null differ diff --git a/vendor/cache/boxen-1.0.0.gem b/vendor/cache/boxen-1.0.0.gem new file mode 100644 index 0000000..e7a0426 Binary files /dev/null and b/vendor/cache/boxen-1.0.0.gem differ diff --git a/vendor/cache/librarian-puppet-0.9.7.gem b/vendor/cache/librarian-puppet-0.9.7.gem deleted file mode 100644 index e89a7b9..0000000 Binary files a/vendor/cache/librarian-puppet-0.9.7.gem and /dev/null differ diff --git a/vendor/cache/librarian-puppet-0.9.8.gem b/vendor/cache/librarian-puppet-0.9.8.gem new file mode 100644 index 0000000..b5f8b69 Binary files /dev/null and b/vendor/cache/librarian-puppet-0.9.8.gem differ diff --git a/vendor/cache/multi_json-1.6.0.gem b/vendor/cache/multi_json-1.6.0.gem deleted file mode 100644 index 4716204..0000000 Binary files a/vendor/cache/multi_json-1.6.0.gem and /dev/null differ diff --git a/vendor/cache/multi_json-1.6.1.gem b/vendor/cache/multi_json-1.6.1.gem new file mode 100644 index 0000000..a147212 Binary files /dev/null and b/vendor/cache/multi_json-1.6.1.gem differ diff --git a/vendor/cache/open4-1.3.0.gem b/vendor/cache/open4-1.3.0.gem new file mode 100644 index 0000000..e979c9b Binary files /dev/null and b/vendor/cache/open4-1.3.0.gem differ diff --git a/vendor/puppet/cache/boxen-puppet-boxen-0.2.4.tar.gz b/vendor/puppet/cache/boxen-puppet-boxen-0.2.4.tar.gz deleted file mode 100644 index c828ae3..0000000 Binary files a/vendor/puppet/cache/boxen-puppet-boxen-0.2.4.tar.gz and /dev/null differ diff --git a/vendor/puppet/cache/boxen-puppet-boxen-1.0.0.tar.gz b/vendor/puppet/cache/boxen-puppet-boxen-1.0.0.tar.gz new file mode 100644 index 0000000..4cfc374 Binary files /dev/null and b/vendor/puppet/cache/boxen-puppet-boxen-1.0.0.tar.gz differ diff --git a/vendor/puppet/cache/boxen-puppet-dnsmasq-0.2.1.tar.gz b/vendor/puppet/cache/boxen-puppet-dnsmasq-0.2.1.tar.gz deleted file mode 100644 index 7726284..0000000 Binary files a/vendor/puppet/cache/boxen-puppet-dnsmasq-0.2.1.tar.gz and /dev/null differ diff --git a/vendor/puppet/cache/boxen-puppet-dnsmasq-1.0.0.tar.gz b/vendor/puppet/cache/boxen-puppet-dnsmasq-1.0.0.tar.gz new file mode 100644 index 0000000..ce4fa28 Binary files /dev/null and b/vendor/puppet/cache/boxen-puppet-dnsmasq-1.0.0.tar.gz differ diff --git a/vendor/puppet/cache/boxen-puppet-gcc-0.0.2.tar.gz b/vendor/puppet/cache/boxen-puppet-gcc-0.0.2.tar.gz deleted file mode 100644 index 6587043..0000000 Binary files a/vendor/puppet/cache/boxen-puppet-gcc-0.0.2.tar.gz and /dev/null differ diff --git a/vendor/puppet/cache/boxen-puppet-gcc-1.0.0.tar.gz b/vendor/puppet/cache/boxen-puppet-gcc-1.0.0.tar.gz new file mode 100644 index 0000000..fdb165c Binary files /dev/null and b/vendor/puppet/cache/boxen-puppet-gcc-1.0.0.tar.gz differ diff --git a/vendor/puppet/cache/boxen-puppet-git-0.1.0.tar.gz b/vendor/puppet/cache/boxen-puppet-git-0.1.0.tar.gz deleted file mode 100644 index b5412bb..0000000 Binary files a/vendor/puppet/cache/boxen-puppet-git-0.1.0.tar.gz and /dev/null differ diff --git a/vendor/puppet/cache/boxen-puppet-git-1.0.0.tar.gz b/vendor/puppet/cache/boxen-puppet-git-1.0.0.tar.gz new file mode 100644 index 0000000..97bc98c Binary files /dev/null and b/vendor/puppet/cache/boxen-puppet-git-1.0.0.tar.gz differ diff --git a/vendor/puppet/cache/boxen-puppet-homebrew-0.3.2.tar.gz b/vendor/puppet/cache/boxen-puppet-homebrew-0.3.2.tar.gz deleted file mode 100644 index ca772c1..0000000 Binary files a/vendor/puppet/cache/boxen-puppet-homebrew-0.3.2.tar.gz and /dev/null differ diff --git a/vendor/puppet/cache/boxen-puppet-homebrew-1.0.0.tar.gz b/vendor/puppet/cache/boxen-puppet-homebrew-1.0.0.tar.gz new file mode 100644 index 0000000..bcac8eb Binary files /dev/null and b/vendor/puppet/cache/boxen-puppet-homebrew-1.0.0.tar.gz differ diff --git a/vendor/puppet/cache/boxen-puppet-hub-0.0.1.tar.gz b/vendor/puppet/cache/boxen-puppet-hub-0.0.1.tar.gz deleted file mode 100644 index 6c5df23..0000000 Binary files a/vendor/puppet/cache/boxen-puppet-hub-0.0.1.tar.gz and /dev/null differ diff --git a/vendor/puppet/cache/boxen-puppet-hub-1.0.0.tar.gz b/vendor/puppet/cache/boxen-puppet-hub-1.0.0.tar.gz new file mode 100644 index 0000000..26cf708 Binary files /dev/null and b/vendor/puppet/cache/boxen-puppet-hub-1.0.0.tar.gz differ diff --git a/vendor/puppet/cache/boxen-puppet-nginx-0.2.1.tar.gz b/vendor/puppet/cache/boxen-puppet-nginx-0.2.1.tar.gz deleted file mode 100644 index 6bdcc81..0000000 Binary files a/vendor/puppet/cache/boxen-puppet-nginx-0.2.1.tar.gz and /dev/null differ diff --git a/vendor/puppet/cache/boxen-puppet-nginx-1.0.0.tar.gz b/vendor/puppet/cache/boxen-puppet-nginx-1.0.0.tar.gz new file mode 100644 index 0000000..51f74b4 Binary files /dev/null and b/vendor/puppet/cache/boxen-puppet-nginx-1.0.0.tar.gz differ diff --git a/vendor/puppet/cache/boxen-puppet-nodejs-0.0.2.tar.gz b/vendor/puppet/cache/boxen-puppet-nodejs-0.0.2.tar.gz deleted file mode 100644 index 189b227..0000000 Binary files a/vendor/puppet/cache/boxen-puppet-nodejs-0.0.2.tar.gz and /dev/null differ diff --git a/vendor/puppet/cache/boxen-puppet-nodejs-1.0.0.tar.gz b/vendor/puppet/cache/boxen-puppet-nodejs-1.0.0.tar.gz new file mode 100644 index 0000000..093cc8e Binary files /dev/null and b/vendor/puppet/cache/boxen-puppet-nodejs-1.0.0.tar.gz differ diff --git a/vendor/puppet/cache/boxen-puppet-nvm-0.0.5.tar.gz b/vendor/puppet/cache/boxen-puppet-nvm-0.0.5.tar.gz deleted file mode 100644 index ae7f24a..0000000 Binary files a/vendor/puppet/cache/boxen-puppet-nvm-0.0.5.tar.gz and /dev/null differ diff --git a/vendor/puppet/cache/boxen-puppet-nvm-1.0.0.tar.gz b/vendor/puppet/cache/boxen-puppet-nvm-1.0.0.tar.gz new file mode 100644 index 0000000..d4c8188 Binary files /dev/null and b/vendor/puppet/cache/boxen-puppet-nvm-1.0.0.tar.gz differ diff --git a/vendor/puppet/cache/boxen-puppet-ruby-0.7.1.tar.gz b/vendor/puppet/cache/boxen-puppet-ruby-0.7.1.tar.gz deleted file mode 100644 index c9f157c..0000000 Binary files a/vendor/puppet/cache/boxen-puppet-ruby-0.7.1.tar.gz and /dev/null differ diff --git a/vendor/puppet/cache/boxen-puppet-ruby-1.0.0.tar.gz b/vendor/puppet/cache/boxen-puppet-ruby-1.0.0.tar.gz new file mode 100644 index 0000000..cdb8a85 Binary files /dev/null and b/vendor/puppet/cache/boxen-puppet-ruby-1.0.0.tar.gz differ diff --git a/vendor/puppet/cache/boxen-puppet-sudo-0.0.1.tar.gz b/vendor/puppet/cache/boxen-puppet-sudo-0.0.1.tar.gz deleted file mode 100644 index 3f8f76c..0000000 Binary files a/vendor/puppet/cache/boxen-puppet-sudo-0.0.1.tar.gz and /dev/null differ diff --git a/vendor/puppet/cache/boxen-puppet-sudo-1.0.0.tar.gz b/vendor/puppet/cache/boxen-puppet-sudo-1.0.0.tar.gz new file mode 100644 index 0000000..1987f9a Binary files /dev/null and b/vendor/puppet/cache/boxen-puppet-sudo-1.0.0.tar.gz differ