Commits on Sep 30, 2014
  1. v1.17.0

    croaky committed Sep 30, 2014
  2. Generate a Rails 4.1.6 app

    croaky committed Sep 30, 2014
  3. Generate rails_helper, not spec_helper

    croaky committed Sep 30, 2014
    RSpec 3.x introduces a `spec/rails_helper.rb` file
    which contains all dependencies necessary to run specs that need Rails.
    Achieves the goal of "Documenting Explicit Dependencies Through Tests":
    * Move Rails-specific things to rails_helper.rb.
    * Require spec_helper.rb from rails_helper.rb.
    * Remove duplication across files.
    * We do not need to require "spec_helper" manually.
      It is required for us in `.rspec`:
        --require spec_helper
Commits on Aug 16, 2014
  1. v1.16.0

    croaky committed Aug 16, 2014
  2. Be clear that the user must run the setup script

    croaky committed Aug 7, 2014
    This should help with confusion such as this report:
Commits on Jul 20, 2014
  1. Pick random port when generating Rails app

    croaky committed Jul 8, 2014
    We have lots of Suspenders-generated apps. We run them using Foreman.
    Randomizing the port number can help us run multiple apps locally while avoiding
    Convert `bin_setup` file to use ERb and interpolate `port_number` into template.
Commits on Jul 17, 2014
  1. Remove confusing line about Git

    croaky committed Jul 17, 2014
    Fixes #352
Commits on Jul 14, 2014
  1. Remove unnecessary FactoryGirl.find_definitions

    croaky committed Jul 14, 2014
    This line causes a "duplicate factory definition" error when running `rake
    db:setup`, which is run by `bin/setup`.
Commits on Jul 10, 2014
  1. Remove Brewfile, document laptop setup

    croaky committed Jul 8, 2014
    There was a Brewfile template in the Suspenders source that was not being used
    when generating an app. Rather than maintaining it, it might be better to
    document for app developers that they should set up their machine using
    something like thoughtbot/laptop.
Commits on Jul 9, 2014
  1. Upgrade to rspec-rails 3.x.x

    croaky committed Jul 9, 2014
    Gives us spec types for free, like `type: :controller` or `type: :feature`.
        config.treat_symbols_as_metadata_keys_with_true_values = true
    Defaults to true in RSpec 3.
  2. v1.15.0

    croaky committed Jul 9, 2014
Commits on Jul 8, 2014
  1. Use latest thoughtbot/guides, styles

    croaky committed Jul 8, 2014
    We normally don't edit existing code to match the style guide, but I think it's
    better to edit the generated code once here rather than every time we generate
    the app.
    The most widespread change is double quotes in Ruby:
  2. Update Rails version to 4.1.4

    croaky committed Jul 8, 2014
    Fix the location of the assets version, which has changed. Use a default value
    for `ENV['ASSETS_VERSION']` to make testing and other environments easier to
    work with but prioritize the ENV variable so we can bust the cache in production
    through changing the ENV variable without deploying new code.
  3. Remove Campfire in favor of Slack

    croaky committed Jul 8, 2014
    We don't need a placeholder for Slack because we'll typically add it using the
        travis encrypt "thoughtbot:123abc" --add notifications.slack
Commits on Jul 7, 2014
  1. Remove Pow in bin/setup

    croaky committed Jul 5, 2014
    Our primary issue is that we do not have development/staging/production parity
    when using Pow locally. Pow doesn't use event machine or a forking model, so:
    * Projects using Thin will work locally but not work in production if they use
      threads or gems with eventmachine incorrectly
    * Projects using Unicorn will work locally but not in production if process
      spawning is not managed correctly
    Using Pow in development and something else in production would be like using
    single threaded code in development but multiple threads in production; we'll
    end up with race conditions eventually.
    Pow is more different from production than Foreman is (at least Foreman uses the
    same web server), and it's likely to be different from other members of the
    We'd prefer to have only one way of running the app within a project and we'd
    prefer to have that way be as close to production as possible.
    Keeping it the same reduces the likelihood that somebody breaks the app for
    everybody else because of a "works on my machine" scenario. It also reduces the
    number of onboarding questions, because everybody sets up and runs the app the
    same way: `bin/setup` and `foreman start`.
Commits on Jun 11, 2014
  1. Bump to 1.14.0

    croaky committed Jun 11, 2014
Commits on Jun 9, 2014
  1. Lock Suspenders to a Rails version

    croaky committed Jun 9, 2014
    This is intended to help solve the error people are seeing by having
    Rails 4.1.2rc1 on their machine:
        `replace_in_file': "config.assets.version = '1.0'" not found in
        config/environments/production.rb (RuntimeError) from
        `setup_asset_host' from
    I don't think it will totally solve the issue but it is at least more
    declarative. To totally solve it, I think we need to fail fast when the
    script runs by checking for `rc` in the `gem list railties` output or
  2. Remove SimpleCov

    croaky committed Jun 9, 2014
    * SimpleCov was returning zero status even when build failed.
    * Remove SimpleCov so that we get real build results on Travis.
    * The team was reporting not regularly reviewing the coverage stats.
  3. Enforce Ruby version

    croaky committed Jun 2, 2014
    The pessimistic operator makes it possible to install Suspenders on Ruby
    2.1.2 but then run Suspenders and have it not bundle because the Gemfile
    is restricted to Ruby 2.1.1. This change enforces an exact Ruby version.
  4. Use RSpec 2.x until Travis/Capybara issues resolve

    croaky committed Jun 9, 2014
        `raise_too_low_error': You are using capybara 2.1.0. RSpec requires
        version >= 2.2.0. (RSpec::Support::LibraryVersionTooLowError)
Commits on May 29, 2014
  1. Bump to 1.13.0

    croaky committed May 29, 2014
Commits on May 27, 2014
  1. Remove before(:suite) block

    croaky committed May 27, 2014
  2. Remove FactoryGirl.lint in before(:suite)

    croaky committed May 27, 2014
    We estimate that `lint`ing adds an extra ~300ms on a typical app we work
    on for every `rspec` run, even a focused test that only runs one spec.
    Until we can find a way to avoid paying that penalty, the discussion
    below has landed at not putting it in Suspenders:
Commits on May 26, 2014
  1. Bump to 1.12.0

    croaky committed May 26, 2014
  2. Set up staging and production for CDN

    croaky committed Sep 22, 2013
    The value of `ASSET_HOST` will look like `//`.
    In production every asset has a hash added to its name. Whenever the
    file changes, the browser requests the latest version as the hash and
    therefore the whole filename changes.
    Putting the assets version in an environment variable makes it possible
    to invalidate the cache without a re-deploy, if necessary. Simply re-set
    the `ASSETS_VERSION` as a Heroku config variable to change the hash
    globally and make the browser request every asset again.
    Stuff we already have in Suspenders that makes this all work:
        gem 'coffee-rails'
        gem 'sass-rails'
        gem 'uglifier'
        config.assets.compile = false
        config.assets.digest = true
        config.assets.js_compressor = :uglifier
    We don't have to set `config.serve_static_assets = true` because the
    `rails_12factor` gem does it for us.
    We recommend using Fastly for the CDN.
  3. Set up by default

    croaky committed Apr 30, 2014
    In order to analyze metrics later, we need to instrument our app to log
    the right metrics. The primary type of instrumentation we care about is
    called "event tracking."
    We use to capture events whenever possible. It is basically
    the adapter pattern for analytics services. lets us drop one JS library into our web apps, or one Ruby
    library into our server-side framework, or one iOS SDK into our mobile
    apps. Then, we can toggle on and off different services such as Google
    Analytics, Intercom, and others.
    If we are working on an app that uses authentication through a library
    such as Clearance, we should add the following to
        <% if signed_in? %>
          <%= render 'signed_in_analytics' %>
        <% end %>
    At that time, we should also add
        <script type="text/javascript">
          analytics.identify("#{}", {
            created : "#{current_user.created_at}",
            email : "#{}"
          }, {
            Intercom : {
              userHash : "#{OpenSSL::HMAC.hexdigest('sha256',
    The most likely first signed in service we'll want is Intercom. It plays
    two important roles for an early stage product:
    1. communication (and support) with customers and
    2. measuring retention (such as Weekly Active Users)
Commits on May 18, 2014
  1. Bump to 1.11.0

    croaky committed May 18, 2014
Commits on Apr 30, 2014
  1. Add `bin/setup` for contributors

    croaky committed Apr 30, 2014
    * Use `mkdir .git/safe` convention in `bin/setup`.
    * Add missing `rake` binstub to version control.
    * Update and improve ``.
  2. Improve and document TravisCI configuration

    croaky committed Apr 30, 2014
    * Add Travis to README.
    * Color the RSpec output.
    * Create Postgres database.
    * Set up xvfb for Capybara Webkit.
    * Turn off email notifications.
    * Remove unnecessary `ruby-` prefix to Ruby version.
    * Use consistent formatting.
Commits on Apr 28, 2014
  1. Bump to 1.10.2

    croaky committed Apr 28, 2014
Commits on Apr 25, 2014
  1. Bump to 1.10.1

    croaky committed Apr 25, 2014
Commits on Apr 21, 2014
  1. Bump to 1.10.0

    croaky committed Apr 21, 2014
  2. Generate 2.1.1, not 2.1.1-p76 in .ruby-version

    croaky committed Apr 21, 2014
    This was breaking the initial `bundle` experience.
  3. Create a Rails 4.1 app

    croaky committed Apr 12, 2014
    * Update new routes line.
    * Remove explicit spring binstub creation as Rails now does it for us.
    * Use `Rails.application` consistently.
    * Use new `config/secrets.yml` convention with existing
      `SECRET_KEY_BASE` environment variable setup.
    * Rails 4 prefers Ruby 2.0 and requires 1.9.3 or newer.