bump boxen and change credential script to support 2fa.
This commit is contained in:
parent
97c386a836
commit
c3a5ff956f
16 changed files with 15 additions and 22 deletions
2
Gemfile
2
Gemfile
|
@ -1,6 +1,6 @@
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "boxen", "~> 1.5"
|
gem "boxen", "~> 2.0.0"
|
||||||
gem "open4", "~> 1.3"
|
gem "open4", "~> 1.3"
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
|
|
27
Gemfile.lock
27
Gemfile.lock
|
@ -1,27 +1,23 @@
|
||||||
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.5.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.8)
|
faraday (0.8.8)
|
||||||
multipart-post (~> 1.2.0)
|
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)
|
||||||
|
@ -30,18 +26,11 @@ GEM
|
||||||
librarian-puppet (0.9.10)
|
librarian-puppet (0.9.10)
|
||||||
json
|
json
|
||||||
thor (~> 0.15)
|
thor (~> 0.15)
|
||||||
multi_json (1.7.9)
|
|
||||||
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.4)
|
puppet (3.2.4)
|
||||||
facter (~> 1.6)
|
facter (~> 1.6)
|
||||||
|
@ -51,9 +40,13 @@ GEM
|
||||||
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.5)
|
boxen (~> 2.0.0)
|
||||||
net-ssh
|
net-ssh
|
||||||
open4 (~> 1.3)
|
open4 (~> 1.3)
|
||||||
rbvmomi
|
rbvmomi
|
||||||
|
|
|
@ -26,7 +26,10 @@ 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("=") }]
|
||||||
|
|
||||||
if command != "get" || attrs["host"] != "github.com"
|
if command == "get" && attrs["host"] =~ /(^|\.)github\.com$/
|
||||||
|
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"]
|
||||||
|
@ -41,6 +44,3 @@ if command != "get" || attrs["host"] != "github.com"
|
||||||
|
|
||||||
exit status.exitstatus
|
exit status.exitstatus
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "username=#{config.login}"
|
|
||||||
puts "password=#{config.password}"
|
|
||||||
|
|
BIN
vendor/cache/addressable-2.3.5.gem
vendored
BIN
vendor/cache/addressable-2.3.5.gem
vendored
Binary file not shown.
BIN
vendor/cache/boxen-1.5.2.gem
vendored
BIN
vendor/cache/boxen-1.5.2.gem
vendored
Binary file not shown.
BIN
vendor/cache/boxen-2.0.0.gem
vendored
Normal file
BIN
vendor/cache/boxen-2.0.0.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/faraday_middleware-0.9.0.gem
vendored
BIN
vendor/cache/faraday_middleware-0.9.0.gem
vendored
Binary file not shown.
BIN
vendor/cache/hashie-2.0.5.gem
vendored
BIN
vendor/cache/hashie-2.0.5.gem
vendored
Binary file not shown.
BIN
vendor/cache/multi_json-1.7.9.gem
vendored
BIN
vendor/cache/multi_json-1.7.9.gem
vendored
Binary file not shown.
BIN
vendor/cache/netrc-0.7.7.gem
vendored
BIN
vendor/cache/netrc-0.7.7.gem
vendored
Binary file not shown.
BIN
vendor/cache/octokit-1.25.0.gem
vendored
BIN
vendor/cache/octokit-1.25.0.gem
vendored
Binary file not shown.
BIN
vendor/cache/octokit-2.0.0.gem
vendored
Normal file
BIN
vendor/cache/octokit-2.0.0.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/rgen-0.6.5.gem
vendored
BIN
vendor/cache/rgen-0.6.5.gem
vendored
Binary file not shown.
BIN
vendor/cache/rgen-0.6.6.gem
vendored
Normal file
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
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
BIN
vendor/cache/uri_template-0.5.3.gem
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue