379 Commits (trunk)
 

Author SHA1 Message Date
Richard Moorhead b153d5e58e Add link to wiki from README for customizations 9 years ago
Robert Eshleman 55c9ce5c56 Correct typo in README
The sample `.laptop.local` incorrectly referred to
`gem_install_or_upgrade` instead of `gem_install_or_update`.
9 years ago
Dan Croak 37f4575f99 Fix rbenv idempotence
The `if` statement causes
rbenv to only be installed,
never upgraded.

Now that we have `brew_install_or_upgrade`,
we can eliminate the `if` statement.
9 years ago
Dan Croak ae5b1a1a03 Use newer functions in customization instructions 9 years ago
Al Johri 971bfae503 Add brew_tap function
This prevents the ugly "Warning" messages
which Homebrew outputs by default
when tapping something that is already tapped.

Sourcing this script in my personal set up,
I use it as thus:

brew_tap 'homebrew/dupes'
brew_tap 'homebrew/versions'
brew_tap 'homebrew/boneyard'
brew_tap 'homebrew/science'
brew_tap 'homebrew/php'
brew_tap 'caskroom/cask'
brew_tap 'caskroom/versions'
brew_tap 'caskroom/fonts'
brew_tap 'thoughtbot/formulae'
9 years ago
Dan Croak 4d07ad0df5 Remove NVM, simplify to `brew install node`
From @derekprior:

> I never used NVM. I just kept my homebrew installed version pinned to
> the version we were using. As a company this is probably totally fine
> because we don't jump back and forth between node projects like we do
> with Ruby projects. Also, there is no "system" node to worry about.

https://github.com/thoughtbot/laptop/pull/341#issuecomment-66179326
9 years ago
Dan Croak bfdd42927b Restart Redis 9 years ago
patrick brisbin efd21607a5
Setup travis build to run shellcheck
Disable false-positives via shellcheck declarations:

- L10: We're passing a format string as argument
- L44, etc: We want the expressions to be appended literally
9 years ago
patrick brisbin 8034b8d39a
Remove bashisms, use /bin/sh shebang
- Remove glob within test command
- Replace [[ bashism with POSIX [
- Replace source bashism with POSIX .
- Replace (( bashism with POSIX [
- Remove process substitution bashism

Other fixes:

- Simplify return value negation
- Use grep -F for speedup on non-regex
- Use $HOME consistently over ~
9 years ago
Dan Croak bcf2993e34 Add gem_install_or_update function
* Use it for Bundler.
* Document it for others' use in their ~/laptop.local.
* Delete out of date part of README.
9 years ago
Dan Croak 5224a9dc50 Install, upgrade, or skip Bundler 9 years ago
Dan Croak 26fb8cf459 Use rbenv shell instead of rbenv local
`rbenv local` creates a `.ruby_version` file
in the current directory.
9 years ago
Dan Croak ef0e9989a9 Use Homebrew for Git
We previously relied on the version of Git
that comes with Xcode.
The Homebrew version is easier to upgrade
when new versions of Git are released,
such as yesterday's security patch:

https://github.com/blog/1938-git-client-vulnerability-announced
9 years ago
Dan Croak 350530a1da Be more specific in printed output
* Say whether we are Installing, Upgrading, or Skipping.
* Changes the behavior of `brew_install_or_upgrade`
  but simplifies and shortens the rest of the script.
9 years ago
Dan Croak bf1922a5e3 Use `tree` as customization example
Laptop should be responsible for setting up
the compilers,
system package manager,
programming language version managers & installers,
large system dependencies such as Postgres,
and any critical config for those tools
which is often overlooked but can cause bugs and headaches.

Other useful command-line tools such as `watch` and `tree`
are better installed in individuals' `~/.laptop.local` files.

Add `tree` as a good example for that file.

Try to make `~/.laptop.local` explanation clearer
and more prominent by placing it in a heading.

Remove Suspenders as an example.
Right before using Suspenders,
it's probably best to re-install it to get the latest.
10 years ago
Dan Croak c500edb8bd Document that we install (or update) RCM 10 years ago
Dan Croak 545d207ba5 Remove Parity, Watch, Suspenders, and Rails
* These are great tools, but not critical.
* Some tools should be re-installed right before their use,
  such as Suspenders.
* Restrict Laptop to more fundamental setup.
* Document how to install these in `~/.laptop.local`.
10 years ago
Dan Croak d9fe627f07 Rehash to get `bundle` command 10 years ago
Dan Croak 5ddcf54c05 Install libyaml to avoid failed Ruby compilation
I saw this problem while installing Ruby 2.1.4.
Installing libyaml first solved the problem.

https://github.com/sstephenson/ruby-build/wiki#suggested-build-environment
10 years ago
patrick brisbin 85386c09ff
Suggested installation includes an explicit review step
While we did previously state "Read, then...", that's easier to ignore.
This brings the copy-pastable commands in line with the intent: to have
the user review the script before executing it. This also removes the
potentially confusing use of process substitution.

Note: The presence of `less` is assumed to avoid assumptions about
editors or the noise of handling that robustly (e.g. `${EDITOR:-vim}`)
10 years ago
Dan Croak 36adc4acd9 Use ShellCheck to enforce shell style
* Document in "Contributing" section.
* Use GitHub code fences to improve syntax highlighting.
* Don't be so Rails-y in the documentation.
10 years ago
Dan Croak and Ken Ip e47f3135a9 Use Homebrew for rbenv and ruby-build
* Many thoughtbot employees are successfully using Homebrew'd rbenv.
* rbenv's recommended install is Homebrew for OS X:
  https://github.com/rbenv/rbenv#installation
* We use Homebrew / package management whenever possible for
  system dependencies.
* We save a step adding rbenv to `PATH` in zshrc / zshenv,
  because Homebrew does it for us.
  This is nice because we don't add `rbenv` to `PATH` in
  thoughtbot/dotfiles.
10 years ago
Dan Croak 39dc3eff23 Remove Heroku Config
I haven't been using `heroku config:pull`, etc. for some time.
Instead, I've been using more targeted shell lines insides our
[`bin/setup`] convention, such as:

    if ! grep -F "FILEPICKER" .env > /dev/null; then
      heroku config --remote staging | grep "FILEPICKER" >> .env
      sed -i '' 's/\:/=/' .env
      sed -i '' 's/ //g' .env
    fi

[`bin/setup`]: http://robots.thoughtbot.com/bin-setup

This is more targeted and automated than using `heroku config:pull`.
10 years ago
Dan Croak 29636fde69 Remove redundant Foreman
It is installed earlier via https://toolbelt.heroku.com/
10 years ago
Keith Smiley 74fe1e8a24 Remove rbenv-gem-rehash plugin installation
This plugin was merged into rbenv
https://github.com/sstephenson/rbenv/pull/638
10 years ago
Keith Smiley cbacb37484 Add $HOME/.rbenv to $PATH even if it's installed 10 years ago
Dan Croak 7b18ef65b9 Fix typo
https://github.com/thoughtbot/laptop/issues/319
10 years ago
Dan Croak af2df6de76 Make rbenv idempotent, install Ruby 2.1.4
* Don't repeat ourselves by using variables.
* Use more consistent variable naming and use of `local` in functions.
* Use `snake_case` for variable names and `ALLCAPS` for environment variables.
  https://github.com/thoughtbot/guides/tree/master/style#shell
* Use Bash double-bracket.
* Set current shell to newest Ruby version.
* Don't install `--pre` version of Bundler.

https://www.ruby-lang.org/en/news/2014/10/27/ruby-2-1-4-released/
10 years ago
5minpause 478ca1c543 Changes heroku-config plugin url to use https
Many corporate firewalls block the git:// protocol.
Changing this URI to use https:// makes it usable for more people.
The other Git URIs are all using https://.
This was previously the only exception.
10 years ago
Joe Ferris f118c213bd Don't use /etc/zshrc
* Using zshrc causes path_helper to override PATH from zshenv
* We set up rbenv among other things in zshenv

https://github.com/thoughtbot/dotfiles/pull/307
10 years ago
Forrest Fleming 96c95f1df8 Only change to zsh if it is not the shell
`chsh` requires a password input, which we want to avoid where possible.
10 years ago
Dan Croak 95fbaa5f34 Link to Yosemite marketing page 10 years ago
Dan Croak 13a17ff39c Restrict .gitignore to only Vim files
No need to ignore Vagrant-related, Ruby-related, and other files
now that we are not supporting Linux.
10 years ago
Dan Croak 91048f3f96 Drop Linux support
We don't have anyone at thoughtbot using the supported Linux versions,
which makes supporting those versions difficult:

https://github.com/thoughtbot/laptop/issues/302
https://github.com/thoughtbot/laptop/issues/242

The majority of the code in the project deals with Linux
or with the need to support multiple operating systems.
10 years ago
Galen O'Hanlon 39768b1995 Declare support for OS X Yosemite 10 years ago
Galen O'Hanlon 14c870b9ec Apple renamed "Mac OS X" to simply "OS X" with Mountain Lion (2012)
Sources:

* http://en.wikipedia.org/wiki/OS_X
* http://www.macrumors.com/2012/02/16/apple-officially-drops-mac-name-from-os-x-mountain-lion/
* http://www.theverge.com/2012/2/16/2802281/apple-officially-renames-mac-os-x-to-os-x-drops-the-mac
10 years ago
Justin Kenyon 3897ad81ee Remove explicit new line addition
Relies on `append_to_zshrc` to add a new line after the appended text.

`append_to_zshrc()` will accept a second argument (`boolean`) to skip the new
line before the appended text, by default a new line will always be prepended.
10 years ago
Justin Kenyon 4e7f598fee Re-order manifest build order 10 years ago
Justin Kenyon 0f359caa15 Create append_to_zshrc() 10 years ago
Justin Kenyon 4d75fb33e8 Check for .zshrc.local before appending .zshrc 10 years ago
Dan Croak b162203263 Install Postgres via Hombrew bottle
Upstream maintainers put thought into what is
and what isn't sensible to include by default.
Those decisions establish a de facto standard
that is broader in scope than Laptop:
Homebrew users, library users, etc.

The further we stray from the defaults,
the more likely we are to run into problems,
and those problems will be harder.

The most widely experienced, most urgent,
and most rapidly fixed problems will be
problems with installing using formula defaults.
Problems from using non-defaults are relatively lonely.

Also, Homebrew bottles are awesome:

https://github.com/Homebrew/homebrew/wiki/FAQ#why-do-you-compile-everything

Using options forces an install from source rather than a bottle,
which is much, much slower:

> Options were passed to the install command i.e. `brew install
> $FORMULA` will use a bottled version of `$FORMULA`, but `brew install
> $FORMULA --enable-bar` will trigger a source build.
10 years ago
Simon f3b85f907a Fixes rbenv component path in the manifest files
Commit bc5a7c6 changed how rbenv is installed
("Use the same Git/GitHub approach for Mac as we do for Linux."),
but was missing the changes in the manifest files.

This commit fixes the corresponding manifest files.
10 years ago
Dan Croak bc5a7c6be7 Don't use Homebrew for rbenv
* Use the same Git/GitHub approach for Mac as we do for Linux.
* This makes upgrading easier via `git pull`.
* Add idempotency `if` guards.
* Use bash-preferred bracket-bracket style.

http://robots.thoughtbot.com/the-unix-shells-humble-if
10 years ago
Al Johri 8066ffa1b3 Add quotes around $HOME b/c path may have spaces 10 years ago
Matthew Higgins 8300f932d3 Update Homebrew script URL to new location
https://github.com/thoughtbot/laptop/issues/291
10 years ago
Dan Croak d9a9dfe09b
Switch from `hub` to `gh`
[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]: https://github.com/github/hub/issues/475
10 years ago
Dan Croak 01c0f05b74 Don't redirect stderr to /dev/null
`&>` redirects both `stderr` and `stdout`.
`>` redirects only stdout.

Use `&>` when we explicitly want to ignore/discard error messages,
which is rarely.

`command -v` outputs only stdout.
So, `>` is appropriate because there is expected `stderr` output.
In the rare case that command fails,
we want the reason printed.
10 years ago
Galen O'Hanlon 6b7c8e7a57 Make `brew_is_upgradable` mac function more robust
Rely on logic of `brew outdated` to decide whether a brew is upgradable.

Fixes #276 and #282:
* https://github.com/thoughtbot/laptop/issues/276
* https://github.com/thoughtbot/laptop/issues/282
10 years ago
Dan Collis-Puro 5754363058 Remove support for EOL'd ubuntu-13.10 (saucy)
Saucy reached its EOL on 7/17/14.

https://lists.ubuntu.com/archives/ubuntu-announce/2014-June/000185.html
10 years ago
Dan Collis-Puro 7e7cdcf4bf Repackage base boxes, used by rspec tests 10 years ago