Skip to content
Commits on Oct 22, 2014
  1. @5minpause @croaky

    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.
    5minpause committed with croaky Oct 22, 2014
  2. @jferris

    Don't use /etc/zshrc

    * Using zshrc causes path_helper to override PATH from zshenv
    * We set up rbenv among other things in zshenv
    jferris committed Oct 22, 2014
Commits on Oct 19, 2014
  1. @ffleming @croaky

    Only change to zsh if it is not the shell

    `chsh` requires a password input, which we want to avoid where possible.
    ffleming committed with croaky Oct 19, 2014
Commits on Oct 16, 2014
  1. @croaky

    Link to Yosemite marketing page

    croaky committed Oct 16, 2014
Commits on Oct 14, 2014
  1. @croaky

    Restrict .gitignore to only Vim files

    No need to ignore Vagrant-related, Ruby-related, and other files
    now that we are not supporting Linux.
    croaky committed Oct 14, 2014
Commits on Oct 12, 2014
  1. @croaky

    Drop Linux support

    We don't have anyone at thoughtbot using the supported Linux versions,
    which makes supporting those versions difficult:
    The majority of the code in the project deals with Linux
    or with the need to support multiple operating systems.
    croaky committed Oct 12, 2014
  2. @gohanlon @croaky
  3. @gohanlon @croaky
Commits on Oct 10, 2014
  1. @kenyonj

    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.
    kenyonj committed Oct 10, 2014
Commits on Oct 9, 2014
  1. @kenyonj

    Re-order manifest build order

    kenyonj committed Oct 9, 2014
  2. @kenyonj

    Create append_to_zshrc()

    kenyonj committed Oct 9, 2014
  3. @kenyonj
Commits on Oct 2, 2014
  1. @croaky

    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:
    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.
    croaky committed Sep 30, 2014
Commits on Oct 1, 2014
  1. @croaky

    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.
    Simon committed with croaky Oct 1, 2014
  2. @croaky

    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.
    croaky committed Sep 30, 2014
Commits on Sep 30, 2014
  1. @AlJohri @croaky
Commits on Sep 25, 2014
  1. @mtthwhggns @croaky
Commits on Sep 23, 2014
  1. @croaky @pbrisbin

    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].
    [deprecated]: github/hub#475
    croaky committed with pbrisbin Aug 9, 2014
Commits on Sep 22, 2014
  1. @croaky

    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.
    croaky committed Sep 21, 2014
Commits on Aug 31, 2014
  1. @gohanlon

    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:
    * thoughtbot#276
    * thoughtbot#282
    gohanlon committed Aug 31, 2014
Commits on Aug 15, 2014
  1. Remove support for EOL'd ubuntu-13.10 (saucy)

    Dan Collis-Puro committed Aug 8, 2014
Commits on Aug 8, 2014
  1. Repackage base boxes, used by rspec tests

    Dan Collis-Puro committed Jul 18, 2014
Commits on Aug 5, 2014
  1. @jkrmr @croaky

    Add compatibility for Bash 3.x

    The `|&` is new in Bash 4, which is not the default on Macs.
    Given that Laptop is meant to be run on a fresh machine, `2>&1 |` is preferable,
    since it'll work on the Bash 3.x, which is what comes installed on new machines.
    jkrmr committed with croaky Aug 3, 2014
Commits on Jul 29, 2014
  1. @croaky

    Clarify OS X support

    croaky committed Jul 29, 2014
Commits on Jul 28, 2014
  1. @croaky

    Link README to programs that Laptop installs

    So that users can learn more about them.
    croaky committed Jul 26, 2014
Commits on Jul 26, 2014
  1. @croaky

    Drop support for Snow Leopard

    * Snow Leopard was released in August, 2009 (about five years ago).
    * Yosemite will be released in a couple of months.
    * We support the last three versions of Ubuntu, so this is a little more
    * Use the same format as the Linux "Requirements" section for consistency.
    croaky committed Jul 26, 2014
  2. @skippednote @croaky

    Upgrade to latest version of Node.js

    We can future-proof the script little more by setting `node_version` to 0.10.
    NVM will automatically install the latest 0.10.x version:
    skippednote committed with croaky Jul 26, 2014
Commits on Jul 25, 2014
  1. @gohanlon @croaky

    Add idempotent brew_launchctl_restart function

    Fixes thoughtbot#260
    This is a soft error that occurs when Laptop is run and PostgreSQL isn't
    currently loaded by `launchclt`, e.g. on the first run of Laptop:
        Starting Postgres ...
        /Users/wellmade/Library/LaunchAgents/homebrew.mxcl.postgresql.plist ->
        launchctl: Error unloading: homebrew.mxcl.postgresql
    The fix would probably be to check `launchctl list` to see if the service is
    already loaded before calling `launchctl unload`.
    This small added complexity probably justifies a function for running
    appropriate `launchctl` commands. Homebrew has a strong convention for the
    naming of `launchd` plists: "homebrew.mxcl.FORMULA_NAME.plist", e.g.
    "homebrew.mxcl.postgresql.plist" and "homebrew.mxcl.redis.plist". This likely
    makes a function to do the `launchctl` work fairly straightforward.
    gohanlon committed with croaky Jul 23, 2014
  2. @gohanlon @croaky

    Fix warning when linking already-linked OpenSSL

    Fixes thoughtbot#259
    Laptop raises the following warning on `brew link openssl ` when OpenSSL has
    already been linked:
        Warning: Already linked: /usr/local/Cellar/openssl/1.0.1h
        To relink: brew unlink openssl && brew link openssl
    I think the resolution is straightforward: follow Homebrew's recommendation and
    `brew unlink` before `brew link`. I verified that `brew unlink` exits with
    success even if the formula wasn't previously linked as would be the case the
    first time Laptop is installed.
    gohanlon committed with croaky Jul 22, 2014
  3. @gohanlon @croaky

    Test whether Homebrew formula is installed

    More readable and testable this way.
    gohanlon committed with croaky Jul 22, 2014
  4. @gohanlon @croaky

    Make brew_install_or_upgrade work with aliases

    Fixes thoughtbot#258
    The following doesn't behave as intended:
        brew_install_or_upgrade 'postgres'
    because "postgres" is an alias, not the full name of the formula. The actual
    formula name is "postgresql".
    The first time `brew_install_or_upgrade 'postgres'` is invoked it works as
    expected — `brew install postgres` is run. Additional invocations result in
    `brew install` instead of the expected `brew upgrade`.
    The `brew_install_or_upgrade` function uses `brew list -1` to obtain a complete
    list of installed packages, and these package names will be the actual package
    names. So, grepping for an alias (with the `-x` option) won't match:
        $ brew list -1 | grep -Fx postgres
    Note that there's no output, even though PostgreSQL is installed. Using the full
    package name behaves as expected:
        $ brew list -1 | grep -Fx postgresql
    Rather than passing on the first argument to `brew_install_or_upgrade` to the
    `brew list` commands, the argument should first be expanded to the actual
    package name.
    gohanlon committed with croaky Jul 21, 2014
  5. @gohanlon @croaky

    Don't upgrade a brew that is already up to date

    Fixes thoughtbot#257
    On a clean OS X Mavericks, Laptop outputs an error message towards the end of
    the install script when `brew_install_or_upgrade` is invoked for OpenSSL:
        Upgrading and linking OpenSSL ...
        Error: openssl-1.0.1h already installed
        Linking /usr/local/Cellar/openssl/1.0.1h... 1139 symlinks created
    The current version of OpenSSL was installed earlier as a dependency of
    PostgreSQL. In general, a similar error will be logged whenever
    `brew_install_or_upgrade` is called for an installed package that's already up
    to date.
    Currently, Laptop discards the error exit code of `brew upgrade` as follows:
        (brew upgrade "$@") || true
    In addition to logging an error when there isn't truly an error, this approach
    can cause real `brew upgrade` errors and potential bugs in Laptop to be masked
    (e.g. Homebrew formula build failures or Laptop mistakenly invoking `brew
    upgrade` for a package that isn't actually installed).
    I think a better approach would be to check whether the installed package is the
    same version as the current Homebrew formula before attempting `brew upgrade`.
    gohanlon committed with croaky Jul 21, 2014
Commits on Jul 23, 2014
  1. @gohanlon @croaky

    Update prerequisites in README

    Homebrew's install script checks whether the command line tools are installed,
    and, only if necessary, will run `xcode-select --install`.
    The test they are using depends in part on a heuristic:
    I confirmed that it works on a clean 10.9 install.
    We also should not instruct the user to run `sudo xcodebuild -license` at all.
    Here's why:
    The `xcodebuild program` isn't included in OS X Mavericks. When you run
    `xcodebuild`, you're actually finding one of 83 shims found in `/usr/bin` that
    are included in Mavericks. These shims are an important part of how the
    `xcode-select` mechanism works. When the command line developer tools have not
    been installed, invoking any of these shims won't do anything other than prompt
    you to install the command line developer tools:
        $ xcodebuild -license
        xcode-select: note: no developer tools were found at
        '/Applications/', requesting install.
        Choose an option in the dialog to download the command line developer tools.
    (And, the GUI install dialog is presented.)
    Of course, since the real `xcodebuild` program isn't actually available, it
    doesn't make sense to try and use it to accept the Xcode License Agreement.
    Instead, go straight to installing with `xcode-select --install` (xcode-select
    comes with OS X Mavericks and is not a shim):
        $ xcode-select --install
        xcode-select: note: install requested for command line developer tools
    And, the exact same GUI install dialog is presented (prompting the user to
    either "Get Xcode" from the App Store or immediately "Install" the command line
    developer tools).
    For more about `xcode-select` and it's shims, see `man xcode-select`.
    This also removes redundant Vagrant setup instructions and capitalize Vagrant.
    gohanlon committed with croaky Jul 19, 2014
  2. @croaky

    Log the output of the script to a file and stdout

    Thanks for the implementation, @pbrisbin.
    croaky committed Jul 19, 2014
Commits on Jul 22, 2014
  1. @croaky

    Switch to launchctl for Postgres

    `brew services` is no longer supported:
    * Fixes thoughtbot#93
    * Fixes thoughtbot#243
    * Idempotently creates Postgres database cluster and starts (or restarts)
    croaky committed Jul 19, 2014
Something went wrong with that request. Please try again.