Commit e7885ed5a41a9ed96bd58a7b21a35437bc19e9a8

Authored by John Barnette
1 parent 3cde3fa60f

Update for Boxen 0.1.0 development

Showing 6 changed files with 26 additions and 22 deletions Inline Diff

source "http://rubygems.org" 1 1 source "http://rubygems.org"
2 2
gem "boxen", "~> 0.0" 3 3 gem "boxen", "~> 0.1", :git => "https://github.com/boxen/boxen"
gem "librarian-puppet", "~> 0.9" 4
GEM 1 1 GIT
remote: http://rubygems.org/ 2 2 remote: https://github.com/boxen/boxen
3 revision: 8bde53257faeeb444987a251ada9e40f5d927168
specs: 3 4 specs:
addressable (2.3.2) 4 5 boxen (0.1.0)
ansi (1.4.3) 5
boxen (0.0.0) 6
ansi (~> 1.4) 7 6 ansi (~> 1.4)
highline (~> 1.6) 8 7 highline (~> 1.6)
json_pure (~> 1.7) 9 8 json_pure (~> 1.7)
9 librarian-puppet (~> 0.9)
octokit (~> 1.15) 10 10 octokit (~> 1.15)
puppet (~> 3.0) 11 11 puppet (~> 3.0)
12
13 GEM
14 remote: http://rubygems.org/
15 specs:
16 addressable (2.3.2)
17 ansi (1.4.3)
facter (1.6.12) 12 18 facter (1.6.12)
faraday (0.8.4) 13 19 faraday (0.8.4)
multipart-post (~> 1.1) 14 20 multipart-post (~> 1.1)
faraday_middleware (0.8.8) 15 21 faraday_middleware (0.8.8)
faraday (>= 0.7.4, < 0.9) 16 22 faraday (>= 0.7.4, < 0.9)
hashie (1.2.0) 17 23 hashie (1.2.0)
hiera (1.1.0.rc1) 18 24 hiera (1.1.0.rc1)
json 19 25 json
highline (1.6.15) 20 26 highline (1.6.15)
json (1.7.5) 21 27 json (1.7.5)
json_pure (1.7.5) 22 28 json_pure (1.7.5)
librarian-puppet (0.9.5) 23 29 librarian-puppet (0.9.5)
json 24 30 json
puppet 25 31 puppet
thor (~> 0.15) 26 32 thor (~> 0.15)
multi_json (1.3.6) 27 33 multi_json (1.3.6)
multipart-post (1.1.5) 28 34 multipart-post (1.1.5)
octokit (1.15.1) 29 35 octokit (1.15.1)
addressable (~> 2.2) 30 36 addressable (~> 2.2)
faraday (~> 0.8) 31 37 faraday (~> 0.8)
faraday_middleware (~> 0.8) 32 38 faraday_middleware (~> 0.8)
hashie (~> 1.2) 33 39 hashie (~> 1.2)
multi_json (~> 1.3) 34 40 multi_json (~> 1.3)
puppet (3.0.0) 35 41 puppet (3.0.0)
facter (>= 1.6.11) 36 42 facter (>= 1.6.11)
hiera (>= 1.0.0rc) 37 43 hiera (>= 1.0.0rc)
thor (0.16.0) 38 44 thor (0.16.0)
39 45
PLATFORMS 40 46 PLATFORMS
ruby 41 47 ruby
42 48
DEPENDENCIES 43 49 DEPENDENCIES
boxen (~> 0.0) 44 50 boxen (~> 0.1)!
librarian-puppet (~> 0.9) 45
46 51
# This file manages Puppet module dependencies. 1 1 # This file manages Puppet module dependencies.
# 2 2 #
# It works a lot like Bundler. We provide some core modules by default. 3 3 # It works a lot like Bundler. We provide some core modules by
# This ensures at least the ability to construct a basic environment. 4 4 # default. This ensures at least the ability to construct a basic
5 # environment.
5 6
# Includes many of our custom types and providers, as well as global config. 6 7 # Includes many of our custom types and providers, as well as global
# Required. 7 8 # config. Required.
#mod "boxen", "0.0.1.1", :github_tarball => "boxen/puppet-boxen" 8 9
10 mod "boxen", "0.0.1.1", :github_tarball => "boxen/puppet-boxen"
9 11
# Core modules for a basic development environment. 10 12 # Core modules for a basic development environment.
# You can replace some/most of those if you want, but it's not recommended. 11 13 # You can replace some/most of those if you want, but it's not recommended.
#%w(ruby rbenv nvm nodejs git hub inifile sudo homebrew xcode).each do |modulename| 12 14 #%w(ruby rbenv nvm nodejs git hub inifile sudo homebrew xcode).each do |modulename|
# mod modulename, "0.0.1", :github_tarball => "boxen/puppet-#{modulename}" 13 15 # mod modulename, "0.0.1", :github_tarball => "boxen/puppet-#{modulename}"
#end 14 16 #end
15 17
# Add your custom modules here. 16 18 # Add your custom modules here.
# There are tons available at https://github.com/boxen. 17 19 # There are tons available at https://github.com/boxen.
18 20
1 GITHUBTARBALL
2 remote: boxen/puppet-boxen
3 specs:
4 boxen (0.0.1.1)
5
DEPENDENCIES 1 6 DEPENDENCIES
7 boxen (= 0.0.1.1)
#!/bin/sh 1 1 #!/bin/sh
# Make sure all our local dependencies are available. 2 2 # Make sure all our local dependencies are available.
3 3
set -e 4 4 set -e
5 5
# FIX: only sudo if gem home isn't writable 6 6 # FIX: only sudo if gem home isn't writable
7 7
(gem spec bundler -v '~> 1.2.0' > /dev/null 2>&1) || 8 8 (gem spec bundler -v '~> 1.2.0' > /dev/null 2>&1) ||
sudo gem install bundler --no-rdoc --no-ri 9 9 sudo gem install bundler --no-rdoc --no-ri
10 10
# We don't want old config hanging around. 11 11 # We don't want old config hanging around.
12 12
rm -rf .bundle/config 13 13 rm -rf .bundle/config
rm -rf .librarian/puppet/config 14 14 rm -rf .librarian/puppet/config
15 15
#!/usr/bin/ruby 1 1 #!/usr/bin/ruby
# Run Boxen. 2 2 # Run Boxen.
3 3
require "pathname" 4 4 require "pathname"
5 5
if ENV["USER"] == "root" 6 6 if ENV["USER"] == "root"
abort "Run this as a normal user, I'll sudo if I need to." 7 7 abort "Run this as a normal user, I'll sudo if I need to."
end 8 8 end
9 9
# Make sure only one boxen process runs at a time. 10 10 # Make sure only one boxen process runs at a time.
11 11
myself = File.new __FILE__ 12 12 myself = File.new __FILE__
13 13
unless myself.flock File::LOCK_EX | File::LOCK_NB 14 14 unless myself.flock File::LOCK_EX | File::LOCK_NB
abort "You're already running a boxen process! Know a patience." 15 15 abort "You're already running a boxen process! Know a patience."
end 16 16 end
17 17
# Yeah yeah, I like to be explicit. 18 18 # Yeah yeah, I like to be explicit.
19 19
at_exit { myself.flock File::LOCK_UN } 20 20 at_exit { myself.flock File::LOCK_UN }
21 21
# Put us where we belong, in the root dir of our boxen repo. 22 22 # Put us where we belong, in the root dir of our boxen repo.
23 23
Dir.chdir Pathname.new(__FILE__).realpath + "../.." 24 24 Dir.chdir Pathname.new(__FILE__).realpath + "../.."
25 25
# FIX: temporarily set BOXEN_HOME to `./tmp/home` during porting. 26
27
ENV["BOXEN_HOME"] = File.expand_path("tmp/home") 28
29
# Auto-update code. This is done as early as possible so that changes 30 26 # Auto-update code. This is done as early as possible so that changes
# to boxen support code or dependencies can be grabbed. 31 27 # to boxen support code or dependencies can be grabbed.
32 28
unless ENV["BOXEN_NO_PULL"] || ARGV.include?("--no-pull") 33 29 unless ENV["BOXEN_NO_PULL"] || ARGV.include?("--no-pull")
if system("which git > /dev/null") && File.directory?(".git") 34 30 if system("which git > /dev/null") && File.directory?(".git")
clean = `git status --porcelain`.empty? 35 31 clean = `git status --porcelain`.empty?
master = `git symbolic-ref HEAD`.chomp == "refs/heads/master" 36 32 master = `git symbolic-ref HEAD`.chomp == "refs/heads/master"
no_new_commits = system('git diff --exit-code --quiet origin/master master') 37 33 no_new_commits = system('git diff --exit-code --quiet origin/master master')
38 34
if clean && master && no_new_commits 39 35 if clean && master && no_new_commits
quietly = "> /dev/null 2>&1" 40 36 quietly = "> /dev/null 2>&1"
fetch = "(git fetch origin #{quietly})" 41 37 fetch = "(git fetch origin #{quietly})"
reset = "(git reset --hard origin/master #{quietly})" 42 38 reset = "(git reset --hard origin/master #{quietly})"
reclean = "(git clean -df #{quietly})" 43 39 reclean = "(git clean -df #{quietly})"