Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jul 14, 2014
  1. @croaky
Commits on Jul 10, 2014
  1. @croaky

    Remove Brewfile, document laptop setup

    croaky authored
    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. @croaky

    Upgrade to rspec-rails 3.x.x

    croaky authored
        config.infer_spec_type_from_file_location!
    
    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. @croaky

    v1.15.0

    croaky authored
Commits on Jul 8, 2014
  1. @croaky

    Use latest thoughtbot/guides, houndci.com styles

    croaky authored
    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:
    
    thoughtbot/guides@2e9733d
  2. @croaky

    Update Rails version to 4.1.4

    croaky authored
    http://weblog.rubyonrails.org/2014/7/2/Rails_3_2_19_4_0_7_and_4_1_3_have_been_released/
    http://weblog.rubyonrails.org/2014/7/2/Rails_4_0_8_and_4_1_4_have_been_released/
    
    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. @croaky

    Remove Campfire in favor of Slack

    croaky authored
    We don't need a placeholder for Slack because we'll typically add it using the
    CLI:
    
        travis encrypt "thoughtbot:123abc" --add notifications.slack
    
    http://blog.travis-ci.com/2014-03-13-slack-notifications/
Commits on Jul 7, 2014
  1. @croaky

    Remove Pow in bin/setup

    croaky authored
    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
    team.
    
    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. @croaky

    Bump to 1.14.0

    croaky authored
Commits on Jun 9, 2014
  1. @croaky

    Lock Suspenders to a Rails version

    croaky authored
    This is intended to help solve the error people are seeing by having
    Rails 4.1.2rc1 on their machine:
    
        thoughtbot/suspenders/lib/suspenders/actions.rb:7:in
        `replace_in_file': "config.assets.version = '1.0'" not found in
        config/environments/production.rb (RuntimeError) from
        thoughtbot/suspenders/lib/suspenders/app_builder.rb:94:in
        `setup_asset_host' from
        gems/railties-4.1.2.rc1/lib/rails/generators/app_base.rb:133:in
        `build'
    
    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
    something.
  2. @croaky

    Remove SimpleCov

    croaky authored
    * 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. @croaky

    Enforce Ruby version

    croaky authored
    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. @croaky

    Use RSpec 2.x until Travis/Capybara issues resolve

    croaky authored
    https://travis-ci.org/thoughtbot/suspenders/builds/26602519
    
        rspec-support-3.0.0/lib/rspec/support/version_checker.rb:28:in
        `raise_too_low_error': You are using capybara 2.1.0. RSpec requires
        version >= 2.2.0. (RSpec::Support::LibraryVersionTooLowError)
    
    https://rubygems.org/gems/capybara-webkit
Commits on May 29, 2014
  1. @croaky

    Bump to 1.13.0

    croaky authored
Commits on May 27, 2014
  1. @croaky

    Remove before(:suite) block

    croaky authored
  2. @croaky

    Remove FactoryGirl.lint in before(:suite)

    croaky authored
    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:
    
    https://github.com/thoughtbot/suspenders/pull/299/files#r10642936
Commits on May 26, 2014
  1. @croaky

    Bump to 1.12.0

    croaky authored
  2. @croaky

    Set up staging and production for CDN

    croaky authored
    The value of `ASSET_HOST` will look like `//global.prod.fastly.net`.
    
    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:
    
    Gemfile:
    
        gem 'coffee-rails'
        gem 'sass-rails'
        gem 'uglifier'
    
    config/environments/{staging,production}.rb:
    
        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.
    
    http://www.fastly.com/
  3. @croaky

    Set up Segment.io by default

    croaky authored
    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 Segment.io to capture events whenever possible. It is basically
    the adapter pattern for analytics services.
    
    Segment.io 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.
    
    http://playbook.thoughtbot.com/#instrumentation
    
    If we are working on an app that uses authentication through a library
    such as Clearance, we should add the following to
    `app/views/application/_analytics.html.erb`:
    
        <% if signed_in? %>
          <%= render 'signed_in_analytics' %>
        <% end %>
    
    https://github.com/thoughtbot/clearance
    
    At that time, we should also add
    `app/views/application/_signed_in_analytics.html.erb`:
    
        <script type="text/javascript">
          analytics.identify("#{current_user.id}", {
            created : "#{current_user.created_at}",
            email : "#{current_user.email}"
          }, {
            Intercom : {
              userHash : "#{OpenSSL::HMAC.hexdigest('sha256',
        ENV['INTERCOM_API_SECRET'], current_user.id.to_s)}"
            }
          });
        </script>
    
    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)
    
    https://intercom.io
Commits on May 18, 2014
  1. @croaky

    Bump to 1.11.0

    croaky authored
Commits on Apr 30, 2014
  1. @croaky

    Add `bin/setup` for contributors

    croaky authored
    * Use `mkdir .git/safe` convention in `bin/setup`.
      2ec7108
    * Add missing `rake` binstub to version control.
    * Update and improve `CONTRIBUTING.md`.
  2. @croaky

    Improve and document TravisCI configuration

    croaky authored
    * 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. @croaky

    Bump to 1.10.2

    croaky authored
Commits on Apr 25, 2014
  1. @croaky

    Bump to 1.10.1

    croaky authored
Commits on Apr 21, 2014
  1. @croaky

    Bump to 1.10.0

    croaky authored
  2. @croaky

    Generate 2.1.1, not 2.1.1-p76 in .ruby-version

    croaky authored
    This was breaking the initial `bundle` experience.
  3. @croaky

    Create a Rails 4.1 app

    croaky authored
    * 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.
      http://guides.rubyonrails.org/upgrading_ruby_on_rails.html
Commits on Apr 13, 2014
  1. @croaky

    Bumpt to 1.9.3

    croaky authored
Commits on Apr 11, 2014
  1. @croaky

    Replace "test factories first" code with FG.lint

    croaky authored
    This is now in FactoryGirl itself (beginning with version 4.4.0) so we
    don't need to maintain custom code.
    
    thoughtbot/factory_girl@6a692fe
Commits on Apr 10, 2014
  1. @croaky

    Bump to 1.9.2

    croaky authored
  2. @croaky

    Enable SMTP/TLS in SMTP settings

    croaky authored
    Be more secure by default.
    
    https://en.wikipedia.org/wiki/STARTTLS
    
    Recommended by SendGrid, our usual email provider.
    
    http://sendgrid.com/docs/Integrate/Frameworks/rubyonrails.html
  3. @croaky
Commits on Apr 8, 2014
  1. @croaky

    Bump to 1.9.1

    croaky authored
  2. @croaky

    Be less restrictive about sass-rails version

    croaky authored
    Per @derekprior's comment, we just need a minimum:
    
    #303 (comment)
Commits on Mar 14, 2014
  1. @croaky
Something went wrong with that request. Please try again.