updating github enterprise support for 2fa

This commit is contained in:
Morgan Delagrange 2013-10-09 15:23:57 -05:00
commit cf69886ac9
43 changed files with 65 additions and 59 deletions

View file

@ -1,6 +1,6 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "boxen", "~> 1.4" gem "boxen", "~> 2.0.0"
gem "open4", "~> 1.3" gem "open4", "~> 1.3"
group :development do group :development do

View file

@ -1,59 +1,52 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
addressable (2.3.5)
ansi (1.4.3) ansi (1.4.3)
aws-sdk (1.8.2) aws-sdk (1.8.2)
json (~> 1.4) json (~> 1.4)
nokogiri (>= 1.4.4) nokogiri (>= 1.4.4)
uuidtools (~> 2.1) uuidtools (~> 2.1)
boxen (1.4.2) boxen (2.0.0)
ansi (~> 1.4) ansi (~> 1.4)
hiera (~> 1.0) hiera (~> 1.0)
highline (~> 1.6) highline (~> 1.6)
json_pure (>= 1.7.7, < 2.0) json_pure (>= 1.7.7, < 2.0)
librarian-puppet (~> 0.9.9) librarian-puppet (~> 0.9.9)
octokit (~> 1.15) octokit (~> 2.0.0)
puppet (~> 3.0) puppet (~> 3.0)
builder (3.1.4) builder (3.1.4)
facter (1.7.2) facter (1.7.2)
faraday (0.8.7) faraday (0.8.8)
multipart-post (~> 1.1) multipart-post (~> 1.2.0)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
hashie (2.0.5)
hiera (1.2.1) hiera (1.2.1)
json_pure json_pure
highline (1.6.19) highline (1.6.19)
json (1.8.0) json (1.8.0)
json_pure (1.8.0) json_pure (1.8.0)
librarian-puppet (0.9.9) librarian-puppet (0.9.10)
json json
thor (~> 0.15) thor (~> 0.15)
multi_json (1.7.7)
multipart-post (1.2.0) multipart-post (1.2.0)
net-ssh (2.6.5) net-ssh (2.6.5)
netrc (0.7.7)
nokogiri (1.5.6) nokogiri (1.5.6)
octokit (1.25.0) octokit (2.0.0)
addressable (~> 2.2) sawyer (~> 0.3.0)
faraday (~> 0.8)
faraday_middleware (~> 0.9)
hashie (~> 2.0)
multi_json (~> 1.3)
netrc (~> 0.7.7)
open4 (1.3.0) open4 (1.3.0)
puppet (3.2.2) puppet (3.2.4)
facter (~> 1.6) facter (~> 1.6)
hiera (~> 1.0) hiera (~> 1.0)
rgen (~> 0.6) rgen (~> 0.6.5)
rbvmomi (1.6.0) rbvmomi (1.6.0)
builder builder
nokogiri (>= 1.4.1) nokogiri (>= 1.4.1)
trollop trollop
rgen (0.6.5) rgen (0.6.6)
sawyer (0.3.0)
faraday (~> 0.8, < 0.10)
uri_template (~> 0.5.0)
thor (0.18.1) thor (0.18.1)
trollop (2.0) trollop (2.0)
uri_template (0.5.3)
uuidtools (2.1.3) uuidtools (2.1.3)
PLATFORMS PLATFORMS
@ -61,7 +54,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
aws-sdk aws-sdk
boxen (~> 1.4) boxen (~> 2.0.0)
net-ssh net-ssh
open4 (~> 1.3) open4 (~> 1.3)
rbvmomi rbvmomi

View file

@ -13,7 +13,7 @@ end
# Includes many of our custom types and providers, as well as global # Includes many of our custom types and providers, as well as global
# config. Required. # config. Required.
github "boxen", "2.3.6" github "boxen", "3.0.2"
# Core modules for a basic development environment. You can replace # Core modules for a basic development environment. You can replace
# some/most of these if you want, but it's not recommended. # some/most of these if you want, but it's not recommended.
@ -21,15 +21,15 @@ github "boxen", "2.3.6"
github "autoconf", "1.0.0" github "autoconf", "1.0.0"
github "dnsmasq", "1.0.0" github "dnsmasq", "1.0.0"
github "gcc", "2.0.1" github "gcc", "2.0.1"
github "git", "1.2.4" github "git", "1.2.5"
github "homebrew", "1.2.0" github "homebrew", "1.4.1"
github "hub", "1.0.0" github "hub", "1.0.3"
github "inifile", "0.9.0", :repo => "cprice404/puppetlabs-inifile" github "inifile", "1.0.0", :repo => "puppetlabs/puppetlabs-inifile"
github "nginx", "1.4.2" github "nginx", "1.4.2"
github "nodejs", "3.2.7" github "nodejs", "3.2.9"
github "openssl", "1.0.0" github "openssl", "1.0.0"
github "repository", "2.2.0" github "repository", "2.2.0"
github "ruby", "6.1.1" github "ruby", "6.3.4"
github "stdlib", "4.1.0", :repo => "puppetlabs/puppetlabs-stdlib" github "stdlib", "4.1.0", :repo => "puppetlabs/puppetlabs-stdlib"
github "sudo", "1.0.0" github "sudo", "1.0.0"
github "xquartz", "1.1.0" github "xquartz", "1.1.0"

View file

@ -6,7 +6,7 @@ GITHUBTARBALL
GITHUBTARBALL GITHUBTARBALL
remote: boxen/puppet-boxen remote: boxen/puppet-boxen
specs: specs:
boxen (2.3.6) boxen (3.0.2)
GITHUBTARBALL GITHUBTARBALL
remote: boxen/puppet-dnsmasq remote: boxen/puppet-dnsmasq
@ -21,17 +21,17 @@ GITHUBTARBALL
GITHUBTARBALL GITHUBTARBALL
remote: boxen/puppet-git remote: boxen/puppet-git
specs: specs:
git (1.2.4) git (1.2.5)
GITHUBTARBALL GITHUBTARBALL
remote: boxen/puppet-homebrew remote: boxen/puppet-homebrew
specs: specs:
homebrew (1.2.0) homebrew (1.4.1)
GITHUBTARBALL GITHUBTARBALL
remote: boxen/puppet-hub remote: boxen/puppet-hub
specs: specs:
hub (1.0.0) hub (1.0.3)
GITHUBTARBALL GITHUBTARBALL
remote: boxen/puppet-nginx remote: boxen/puppet-nginx
@ -41,7 +41,7 @@ GITHUBTARBALL
GITHUBTARBALL GITHUBTARBALL
remote: boxen/puppet-nodejs remote: boxen/puppet-nodejs
specs: specs:
nodejs (3.2.7) nodejs (3.2.9)
GITHUBTARBALL GITHUBTARBALL
remote: boxen/puppet-openssl remote: boxen/puppet-openssl
@ -56,7 +56,7 @@ GITHUBTARBALL
GITHUBTARBALL GITHUBTARBALL
remote: boxen/puppet-ruby remote: boxen/puppet-ruby
specs: specs:
ruby (6.1.1) ruby (6.3.4)
GITHUBTARBALL GITHUBTARBALL
remote: boxen/puppet-sudo remote: boxen/puppet-sudo
@ -69,9 +69,9 @@ GITHUBTARBALL
xquartz (1.1.0) xquartz (1.1.0)
GITHUBTARBALL GITHUBTARBALL
remote: cprice404/puppetlabs-inifile remote: puppetlabs/puppetlabs-inifile
specs: specs:
inifile (0.9.0) inifile (1.0.0)
GITHUBTARBALL GITHUBTARBALL
remote: puppetlabs/puppetlabs-stdlib remote: puppetlabs/puppetlabs-stdlib
@ -80,18 +80,18 @@ GITHUBTARBALL
DEPENDENCIES DEPENDENCIES
autoconf (= 1.0.0) autoconf (= 1.0.0)
boxen (= 2.3.6) boxen (= 3.0.2)
dnsmasq (= 1.0.0) dnsmasq (= 1.0.0)
gcc (= 2.0.1) gcc (= 2.0.1)
git (= 1.2.4) git (= 1.2.5)
homebrew (= 1.2.0) homebrew (= 1.4.1)
hub (= 1.0.0) hub (= 1.0.3)
inifile (= 0.9.0) inifile (= 1.0.0)
nginx (= 1.4.2) nginx (= 1.4.2)
nodejs (= 3.2.7) nodejs (= 3.2.9)
openssl (= 1.0.0) openssl (= 1.0.0)
repository (= 2.2.0) repository (= 2.2.0)
ruby (= 6.1.1) ruby (= 6.3.4)
stdlib (= 4.1.0) stdlib (= 4.1.0)
sudo (= 1.0.0) sudo (= 1.0.0)
xquartz (= 1.1.0) xquartz (= 1.1.0)

View file

@ -261,8 +261,8 @@ It'll just be listed under the boxen org so folks can find it more easily.
## Integrating with Github Enterprise ## Integrating with Github Enterprise
If you're using a Github Enterprise instance rather than github.com, If you're using a Github Enterprise instance rather than github.com,
you will need to set the "BOXEN_GITHUB_ENTERPRISE_URL" and you will need to set the `BOXEN_GITHUB_ENTERPRISE_URL` and
"BOXEN_REPO_URL_TEMPLATE" variables in your `BOXEN_REPO_URL_TEMPLATE` variables in your
[Boxen config](config/boxen.rb). [Boxen config](config/boxen.rb).
## Halp! ## Halp!

View file

@ -5,7 +5,7 @@ require gcc
Exec { Exec {
group => 'staff', group => 'staff',
logoutput => on_failure, logoutput => on_failure,
user => $luser, user => $boxen_user,
path => [ path => [
"${boxen::config::home}/rbenv/shims", "${boxen::config::home}/rbenv/shims",
@ -20,13 +20,13 @@ Exec {
environment => [ environment => [
"HOMEBREW_CACHE=${homebrew::config::cachedir}", "HOMEBREW_CACHE=${homebrew::config::cachedir}",
"HOME=/Users/${::luser}" "HOME=/Users/${::boxen_user}"
] ]
} }
File { File {
group => 'staff', group => 'staff',
owner => $luser owner => $boxen_user
} }
Package { Package {

View file

@ -8,10 +8,14 @@ class people::jbarnette {
include emacs # requires emacs module in Puppetfile include emacs # requires emacs module in Puppetfile
include sparrow # requires sparrow module in Puppetfile include sparrow # requires sparrow module in Puppetfile
$home = "/Users/${::luser}" $home = "/Users/${::boxen_user}"
$my = "${home}/my" $my = "${home}/my"
$dotfiles = "${my}/dotfiles" $dotfiles = "${my}/dotfiles"
file { $my:
ensure => directory
}
repository { $dotfiles: repository { $dotfiles:
source => 'jbarnette/dotfiles', source => 'jbarnette/dotfiles',
require => File[$my] require => File[$my]

View file

@ -15,7 +15,13 @@ set -e
rm -rf .bundle/config rm -rf .bundle/config
rm -rf .librarian/puppet/config rm -rf .librarian/puppet/config
# Bundle install unless we're already up to date. # Put xcrun shim on PATH if on MoLo
set +e
OSX_VERSION_CHECK=`sw_vers | grep ProductVersion | cut -f 2 -d ':' | egrep '10\.8'`
if [ $? -eq 0 ]; then
export PATH=$(pwd)/vendor/shims:$PATH
fi
set -e
export PATH=$(pwd)/vendor/shims:$PATH # Bundle install unless we're already up to date.
/usr/bin/bundle install --binstubs bin --path .bundle --quiet "$@" /usr/bin/bundle install --binstubs bin --path .bundle --quiet "$@"

View file

@ -25,8 +25,9 @@ Dir.chdir Pathname.new(__FILE__).realpath + "../.."
# Auto-update code. This is done as early as possible so that changes # Auto-update code. This is done as early as possible so that changes
# to boxen support code or dependencies can be grabbed. # to boxen support code or dependencies can be grabbed.
NO_PULL_ARGS = %w[--no-pull -h -? --help] + [/-service/]
unless ENV["BOXEN_NO_PULL"] || ARGV.include?("--no-pull") unless ENV["BOXEN_NO_PULL"] ||
ARGV.any? { |arg| NO_PULL_ARGS.any? { |no| arg.match(no) } }
quietly = "> /dev/null 2>&1" quietly = "> /dev/null 2>&1"
if system("which git > /dev/null") && File.directory?(".git") \ if system("which git > /dev/null") && File.directory?(".git") \

View file

@ -25,9 +25,14 @@ require "boxen/config"
config = Boxen::Config.load config = Boxen::Config.load
input = $stdin.read input = $stdin.read
attrs = Hash[input.split($/).map { |l| l.split("=") }] attrs = Hash[input.split($/).map { |l| l.split("=") }]
# find GitHub or GitHub Enterprise host
ghhost = URI(config.ghurl).host ghhost = URI(config.ghurl).host
if command != "get" || attrs["host"] != ghhost host_exp = Regexp.new "(^|\.)" + Regexp.escape(ghhost)
if command == "get" && host_exp.match(attrs["host"])
puts "username=#{config.token}"
puts "password=x-oauth-basic"
else
require "open4" require "open4"
fallback = ENV["BOXEN_GIT_CREDENTIAL_FALLBACK"] fallback = ENV["BOXEN_GIT_CREDENTIAL_FALLBACK"]
@ -42,6 +47,3 @@ if command != "get" || attrs["host"] != ghhost
exit status.exitstatus exit status.exitstatus
end end
puts "username=#{config.login}"
puts "password=#{config.password}"

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/boxen-2.0.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/faraday-0.8.8.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/librarian-puppet-0.9.10.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/octokit-2.0.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/puppet-3.2.4.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rgen-0.6.6.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/sawyer-0.3.0.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/uri_template-0.5.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.