The previous method places the `hub` command in ~/bin/hub, which shows
up in the dotfiles repo for thoughtbot/dotfiles users. We could
gitignore the `bin/hub` gem there, but the hub README recommends using
Homebrew or a package manager when it is available.
This leaves the Linux version functionally the same.
Started reading the thoughtbot playbook last week, which led me to laptop. Calling mac from Terminal went fine untill the last installation which yielded "ERROR: no available formula for rcm". Googling the error message brought me to Matthew Sumner's commit # 2915cf1f696777a7438d0bbf92f688f32e1e8264 in the dotfile repo. Applying the same modif to the laptop mac shell script got rid of the error message. If you accept my pull-in request, that'd be my first ofishal contribution to the open source world.
Required changes:
* Change #!
* Move pre-req actions directly into linux
* Switch uses of $+command for which (zsh-ism)
* Don't source ~/.zshrc to pickup new exports
* Add setting of zsh as $SHELL
* Update README
Ancillary changes:
* Switch [ with [[ (best practice)
* Switch if-newline-then with if; then (style)
* Use $( ) and $(( )) (best practice)
* Switch wget with curl (consistency)
These changes allow the laptop script to run more than once and can be
tested through ./test/runner.sh. The only significant side effects are:
* Gems (pg, rails, unicorn) will be updated
* ruby $RUBY_VERSION will be set as the global ruby if it wasn't already
* rubygems proper will be updated to the latest release
* hub will be updated
* the heroku toolbelt will be updated.
Back when rcm was an experiment by Mike Burns, the `homebrew-rcm` GitHub
repo was hosted under the `mike-burns` account. It has since been moved
to `thoughtbot` so that more may share in the love.
The rcm suite of tools are used to manage dotfiles. They can symlink
dotfiles from a repo into your homedir, turn an existing configuration
file into a symlinked dotfile, and in general make it easy to try new
dotfile repos.
* Set it globally for OS X.
* Determine number of cores dynamically.
* Pick one number less than number of cores to avoid deadlock errors.
http://archlever.blogspot.com/2013/09/lies-damned-lies-and-truths-backed-by.html
* Only install `--pre` for Bundler.
* Remove `pg` and `unicorn` gems as they will be installed during `bundle`
for a Rails project.
We install rbenv-gem-rehash, which will automatically rehash when you
install new binaries, so I can't conceive of why this is necessary. I've been
using --no-rehash for months now without issue, and there's a noticeable speed
up in shell initialization.
* `printf` is more portable and consistent than `echo`
* $( ) is allowed and preferred
* Always quote all variables
* Useless use of `cat`
* Remove uneeded permissions setting
Refactor laptop to componentize the creation of the `linux`, 'mac` and
`linux-prerequisites` laptop files, which will allow us to share similar
tasks and configurations. IMPORTANT: `/bin/build.sh` must be run before each
commit to re-render the laptop files. See `CONTRIBUTING.md` for details.
Using the latest vim gets us snytax highlighting and other things that
could otherwise be different from system vim.
For example:
989a49d2f0 (commitcomment-3740718)
Heroku Toolbelt includes Foreman. Installing the gem in addition to
Toolbelt may cause future problems. For example, the Toolbelt is
auto-updating and the gem isn't. So, we might run into weird problems
with an out-of-sync foreman vs Heroku command-line tool.
Thanks, @jonmountjoy.
Laptop currently generates a .zshrc file if one does not already exist.
However, this file is created with the # DO NOT EDIT BELOW THIS LINE
comment that does not fit with the new thoughtbot/dotfiles convention
of storing changes in .local files instead of above the placeholder
comment. If a user attempts to run laptop and then install dotfiles,
the dotfiles installation will not install .zshrc because of the
existing stub.
This change removes the creation of the .zshrc stub for both mac and
linux scripts.