Skip to content

Commit

Permalink
Switch from hub to gh
Browse files Browse the repository at this point in the history
[gh] is a [hub] reimplementation that's much faster and is now the official
Github CLI. It appears that "hub" is [deprecated].

[gh]: https://github.com/jingweno/gh
[hub]: https://github.com/github/hub
[deprecated]: mislav/hub#475
  • Loading branch information
Dan Croak authored and pbrisbin committed Sep 23, 2014
1 parent b1e4b3a commit 9da37e3
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 13 deletions.
1 change: 0 additions & 1 deletion Manifest.mac
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ common-components/ruby-environment
mac-components/bundler
common-components/default-gems
mac-components/heroku
mac-components/github
mac-components/rcm
common-components/personal-additions
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ What it sets up
* [Bundler] for managing Ruby libraries
* [Exuberant Ctags] for indexing files for vim tab completion
* [Foreman] for serving Rails apps locally
* [gh] for interacting with the GitHub API
* [Heroku Config] for local `ENV` variables
* [Heroku Toolbelt] for interacting with the Heroku API
* [Hub] for interacting with the GitHub API
* [Homebrew] for managing operating system libraries (OS X only)
* [ImageMagick] for cropping and resizing images
* [Node.js] and [NPM], for running apps and installing JavaScript packages
Expand All @@ -77,9 +77,9 @@ What it sets up
[Bundler]: http://bundler.io/
[Exuberant Ctags]: http://ctags.sourceforge.net/
[Foreman]: https://github.com/ddollar/foreman
[gh]: https://github.com/jingweno/gh
[Heroku Config]: https://github.com/ddollar/heroku-config
[Heroku Toolbelt]: https://toolbelt.heroku.com/
[Hub]: https://hub.github.com/
[Homebrew]: http://brew.sh/
[ImageMagick]: http://www.imagemagick.org/
[Node.js]: http://nodejs.org/
Expand Down
4 changes: 4 additions & 0 deletions lib/distro.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def silver_searcher_test
run_vagrant_ssh_command('command -v ag')
end

def gh_test
run_vagrant_ssh_command('command -v gh')
end

def package
run_vagrant_ssh_command('rm -Rf ~/test_app')
run_vagrant_ssh_command('sudo aptitude clean')
Expand Down
15 changes: 13 additions & 2 deletions linux
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,19 @@ fancy_echo "Installing the heroku-config plugin to pull config variables locally
### end linux-components/heroku

fancy_echo "Installing GitHub CLI client ..."
curl http://hub.github.com/standalone -sLo ~/.bin/hub
chmod +x ~/.bin/hub
version="$(curl https://github.com/jingweno/gh/releases/latest -s | cut -d'v' -f2 | cut -d'"' -f1)"

if uname -m | grep -Fq 'x86_64'; then
arch='amd64'
else
arch='i386'
fi

cd /tmp
url="https://github.com/jingweno/gh/releases/download/v${version}/gh_${version}_${arch}.deb"
curl "$url" -sLo gh.deb
sudo dpkg -i gh.deb
cd -
### end linux-components/github

fancy_echo "Installing rcm, to manage your dotfiles ..."
Expand Down
15 changes: 13 additions & 2 deletions linux-components/github
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
fancy_echo "Installing GitHub CLI client ..."
curl http://hub.github.com/standalone -sLo ~/.bin/hub
chmod +x ~/.bin/hub
version="$(curl https://github.com/jingweno/gh/releases/latest -s | cut -d'v' -f2 | cut -d'"' -f1)"

if uname -m | grep -Fq 'x86_64'; then
arch='amd64'
else
arch='i386'
fi

cd /tmp
url="https://github.com/jingweno/gh/releases/download/v${version}/gh_${version}_${arch}.deb"
curl "$url" -sLo gh.deb
sudo dpkg -i gh.deb
cd -
7 changes: 3 additions & 4 deletions mac
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ fancy_echo "Installing QT, used by Capybara Webkit for headless Javascript integ
fancy_echo "Installing watch, to execute a program periodically and show the output ..."
brew_install_or_upgrade 'watch'

fancy_echo "Installing GitHub CLI client ..."
brew_install_or_upgrade 'gh'

node_version="0.10"

fancy_echo "Installing NVM, Node.js, and NPM, for running apps and installing JavaScript packages ..."
Expand Down Expand Up @@ -218,10 +221,6 @@ fancy_echo "Installing foreman ..."
sudo installer -pkg /tmp/foreman.pkg -tgt /
### end mac-components/heroku

fancy_echo "Installing GitHub CLI client ..."
brew_install_or_upgrade 'hub'
### end mac-components/github

if ! command -v rcup >/dev/null; then
fancy_echo "Installing rcm, to manage your dotfiles ..."
brew tap thoughtbot/formulae
Expand Down
2 changes: 0 additions & 2 deletions mac-components/github

This file was deleted.

3 changes: 3 additions & 0 deletions mac-components/packages
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ fancy_echo "Installing QT, used by Capybara Webkit for headless Javascript integ
fancy_echo "Installing watch, to execute a program periodically and show the output ..."
brew_install_or_upgrade 'watch'

fancy_echo "Installing GitHub CLI client ..."
brew_install_or_upgrade 'gh'

node_version="0.10"

fancy_echo "Installing NVM, Node.js, and NPM, for running apps and installing JavaScript packages ..."
Expand Down
1 change: 1 addition & 0 deletions spec/laptop_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
expect { distro.scaffold_and_model_generation }.not_to raise_error
expect { distro.database_migration }.not_to raise_error
expect { distro.silver_searcher_test }.not_to raise_error
expect { distro.gh_test }.not_to raise_error

puts "Packaging box for distribution"

Expand Down

0 comments on commit 9da37e3

Please sign in to comment.