Skip to content
Commits on Jan 27, 2016
  1. @seanpdoyle

    Prefer testing your Ember application with QUnit

    seanpdoyle committed
    https://trello.com/c/VnZehZn1
    
    > Prefer testing your application with [QUnit][ember-test-guides].
    
    [ember-test-guides]: https://guides.emberjs.com/v2.2.0/testing/
Commits on Jan 15, 2016
  1. @jferris

    Use an ORDER BY clause for user-visible queries

    jferris committed
    > If sorting is not chosen, the rows will be returned in an unspecified
    > order. The actual order in that case will depend on the scan and join
    > plan types and the order on disk, but it must not be relied on. A
    > particular output ordering can only be guaranteed if the sort step is
    > explicitly chosen.
    
    http://www.postgresql.org/docs/8.3/static/queries-order.html
  2. @jferris

    Avoid rendering issues from async loading

    jferris committed
    We want pages which render quickly, smoothly, and securely. Techniques
    which disrupt a smooth rendering process should be avoided.
Commits on Jan 12, 2016
  1. @seanpdoyle

    JavaScript: Disallow multiple `var` declaration

    seanpdoyle committed
    The `disallowMultipleVarDecl` rule already exists in the `.jscsrc`.
    Unfortunately, it is invalidly declared.
    
    This commit corrects the declaration.
    
    [rule]: http://jscs.info/rule/disallowMultipleVarDecl
Commits on Jan 11, 2016
  1. @malandrina

    Add best practices for building Ruby JSON APIs

    malandrina committed
    * Recommend that readers review Heroku's HTTP API Design Guide before
      developing JSON APIs
    * Recommend `oj` for parsing JSON and RSpec request specs for integration
      testing, per iOS on Rails
    * References:
      https://github.com/thoughtbot/ios-on-rails/blob/master/book/rails/introduction.md#parsing-incoming-json-requests
      https://github.com/thoughtbot/ios-on-rails/blob/master/book/rails/creating_a_get_request.md#it-all-starts-with-a-request-spec
  2. @LkeMitchll

    Add link to an explanation of `git rebase -i ...`

    LkeMitchll committed
    I did not understand the `git rebase -i ...` interface at first.
    
    This link to the Github docs really helped explain the interface.
Commits on Jan 8, 2016
  1. @tysongach
  2. @seanpdoyle

    Enable Hound

    seanpdoyle committed
    Enable [Hound] linting for style guidelines with accompanying code
    samples.
    
    [Hound]: https://houndci.com
  3. @seanpdoyle

    Add `requireTrailingComma` rule to JSCS

    seanpdoyle committed
    Add the [`requireTrailingComma`][rule] rule to JSCS configuration.
    
    Enforce the presence of trailing comma's in multi-line array and object
    literal declarations.
    
    [rule]: http://jscs.info/rule/requireTrailingComma
  4. @seanpdoyle

    Reccommend `belongs_to :relation, touch: true`

    seanpdoyle committed
    Based on @sgrif's recommendation (near 17:19) on [The Bike Shed][bikeshed-41].
    
    Thinking about an application's caching strategy and its implications to
    the data model is usually put off until some point in the future.
    
    `touch`ing `belongs_to` relationships is a straightforward way to
    pre-emptively configure applications to integrate with Rails' russian
    doll caching.
    
    Rails 5 will batch `touch`-generated DB writes.
    
    [bikeshed-41]: http://bikeshed.fm/41
  5. @geoffharcourt

    Suggest referencing class by constant in AR macros

    geoffharcourt committed
    For ActiveRecord associations where AR can't automatically determine the
    class for the association, the `class_name` option allows the developer
    to specify what class should be used. This option can take either the
    constant of the model class `Person`, or a string that matches the
    class' name `"Person"`.
    
    Using a string to specify this option postpones feedback that the class
    might be missing. For example, if my model has an association like this
    where the `Author` class does not yet exist:
    
    ```ruby
        class Post < ActiveRecord::Base
          has_one :author, class_name: "Person"
        end
    ```
    
    Specs will only fail if they interact with the association. If
    `class_name` is specified as `class_name: Person`, and `Person` does not
    exist, an uninitialized constant `NameError` exception will stop all
    execution of the application.
    
    There may possibly be some memory-use benefit to creating fewer strings
    during application initialization, but I think the early failure
    feedback benefit of this practice provides enough value on its own to
    recommend it as a best practice.
Commits on Jan 5, 2016
  1. @joshuaclayton

    Prefer method invocation over instance variables

    joshuaclayton committed
    Referring to instance variables in various methods within a class
    violates the single level of abstraction principle; it applies a
    specificity that methods using this information need no context of.
    
    By preferring method invocation over instance variables, it provides the
    developer the ability to refer to a concept which can be defined by a
    method via direct definition or via `attr`, `attr_reader`, or `attr_accessor`.
Commits on Jan 4, 2016
  1. @mjankowski
Commits on Dec 9, 2015
  1. @gfontenot

    Add guideline for capitalization in Swift

    gfontenot committed
    When naming initialisms or acronyms, we should be following the
    capitalization of the initial letter.
    
    BAD:
    
    ```swift
    let Id: String
    let userId: String
    ```
    
    GOOD:
    
    ```swift
    let id: String
    let userID: String
    ```
Commits on Dec 7, 2015
  1. @seanpdoyle

    Add `style/javascript/.jscsrc`

    seanpdoyle committed
    Inspired by our Ruby styleguide, which has an accompanying
    `.rubocop.yml.
    
    Adding a JSCS linter to thoughtbot/guides allows us to configure Hound
    to use our company-wide styleguide:
    
    ```yml
    jscs:
      enabled: true
      config_file: https://raw.githubusercontent.com/thoughtbot/guides/master/style/javascript/.jscsrc
    ```
    
    Uses new [`JSCS@2.6.x`][jscs] rules.
    
    [jscs]: https://github.com/jscs-dev/node-jscs/releases/tag/v2.6.0
Commits on Nov 19, 2015
  1. @dgalarza
Commits on Nov 3, 2015
  1. @seanpdoyle

    Use blocks when declaring date and time attributes

    seanpdoyle committed
    `FactoryGirl` factories can lazily instantiate values. Since `Date`,
    `Time`, and `DateTime` can be affected by utilities such as `Timecop`
    and `ActiveSupport` (configured at the test level), we should avoid
    instantiating instances until the last possible moment.
Commits on Oct 30, 2015
  1. @gabebw

    Recommend new-style Rails validations

    gabebw committed
    Avoid:
    
    validates :name, presence: true
    validates :name, uniqueness: true
    
    or:
    
    validates_presence_of :name
    validates_uniqueness_of :name
    
    Using new-style validations like in the recommended example forces all of the
    validations for a given column to be in one place, making it easy to scan a
    model's validations.
Commits on Oct 26, 2015
  1. @calleerlandsson

    Prefer `--force-with-lease` over `--force`

    calleerlandsson committed
    Using `--force-with-lease` allows one to force push without the risk of
    unintentionally overwriting someone else's work.
    
    The git-push(1) man page states:
    
    > Usually, "git push" refuses to update a remote ref that is not an
    > ancestor of the local ref used to overwrite it.
    >
    > This option overrides this restriction if the current value of the
    > remote ref is the expected value. "git push" fails otherwise.
    >
    > --force-with-lease alone, without specifying the details, will protect
    > all remote refs that are going to be updated by requiring their
    > current value to be the same as the remote-tracking branch we have for
    > them.
Commits on Oct 20, 2015
  1. @mike-burns

    Remove argument list style guide

    mike-burns committed
    This guideline has proven to be the most unintuitive one, most often
    broken and complained about in Slack and real life. It's the one that we
    only get right after Hound complains other times. In short, it's not
    natural.
    
    Removing this guideline allows us to put the art back into formatting,
    giving us the freedom to align arguments in the style that is most
    readable and expressive.
Commits on Oct 16, 2015
  1. @tysongach
  2. @aenain @sikachu
  3. @reshleman @sikachu

    Update Links in `README` and `protocol/README`

    reshleman committed with sikachu
    In order to make it easier to quickly find information in the Guides
    from the GitHub project page, this commit:
    
    * Adds a missing link to `README` for the "Security" section
    * Adds missing links to `README` and `protocol/README` for some
      "Protocol" sub-sections
    * Sorts links alphabetically
    
    Close #329
Commits on Oct 8, 2015
  1. @salbertson
Commits on Sep 28, 2015
  1. @tysongach
Commits on Sep 24, 2015
  1. @tysongach

    Update SCSS sample

    tysongach committed
    - Change the `@import` to indicate that partial names should use hyphens
    - Remove nesting where it was unnecessary, which gave the wrong
      impression
    - Use more class selectors and less element selectors
    - Use actual CSS properties and values so that it renders with better code
      highlighting on GitHub
    - Remove reference to Neat’s `media` helper, because Neat is not always used and
      this should focus more on plain SCSS style
    - Show use of zero values to indicate that they should not have a unit
    - Show that `@extend` should come before `@include`
    - Show the multiple selectors should go on their own line
    - Use `background-color` to indicate that we prefer it over just `background`
Commits on Sep 20, 2015
  1. @jakecraige

    Prefer ember-ajax over ic-ajax

    jakecraige committed
    Why:
    
    * The ember-fetch RFC was an experiement that [failed].
    * This is now the recommended approach from the ember-cli team.
    
    [failed]: ember-cli/rfcs#19 (comment)
    
    This change addresses the need by:
    
    * Updating the copy and sample to prefer ember-ajax over ic-ajax
Commits on Sep 17, 2015
  1. @seanpdoyle

    Add examples

    seanpdoyle committed
  2. @seanpdoyle

    Prefer dependency injection through `Ember.inject`

    seanpdoyle committed with seanpdoyle
    [`Ember 1.10.0]()` adds:
    
    * `Ember.inject.service()`
    * `Ember.inject.controller()`
    
    [ember]: http://emberjs.com/blog/2015/02/07/ember-1-10-0-released.html#toc_injected-properties
    
    `[Ember-Data](ember-data)` supports injecting the `store` as a service.
    
    This makes injecting services via initializers a bad idea.
    
    [ember-data]: http://emberjs.com/blog/2015/03/23/ember-data-1-0-beta-16-released.html#toc_store-as-a-service
Commits on Aug 28, 2015
  1. @JSalig1 @mike-burns
Commits on Aug 24, 2015
  1. @kylefiedler
Commits on Aug 7, 2015
  1. @jcwilk @mcmire

    Adjust BAD example to use `subject`

    jcwilk committed with mcmire
    Adjusting the "BAD" example to utilize `subject`, `let`, and `context` since that at least shows the (perhaps flawed) intention of the "BAD" way.
Commits on Aug 6, 2015
  1. @jakecraige

    Ember: Prefer `ember-fetch` over `ic-ajax`

    jakecraige committed
    Stefan is looking for people to try this out and give feedback.
    We have enough Ember projects that we could contribute
    good information to this RFC and the spec.
    
    There isn't much risk to establishing this preference
    because it's being polyfilled so it will work wherever.
    
    The gain is that we will be able to
    provide valuable feedback to the ember community.
    Assuming this eventually get's merged we will also be ahead
    of the curve and not need to update existing apps
    to accomidate it.
    
    > What is ember-fetch?
    >
    > * a wrapper around: https://github.com/github/fetch
    > * which is a partial polyfil for  https://fetch.spec.whatwg.org/
    > * more info: https://github.com/stefanpenner/ember-fetch
    > * never falls back to native (so always works the same, and works with pretender)
    >
    > Why is this discussion happening now and not earlier?
    >
    > * ember 2 no longer supports IE8, and github/fetch is IE9+
    > * fetch is a spec primitive of the DOM, it stands to reason we should prefer that over $.ajax
    > * maybe we can catch issues to help adapt/improve/add to the spec
    > * $.ajax is crazy quirky
    > * uploads have progress in the request object (unsure if the polifill does this or not actually, need to verify)
    >
    > Cons:
    >
    > * its not $.ajax which, although not a spec thing, is basically a primitive many devs are used to
    > * features like `$.ajaxPrefilter` are not obviously a thing in `fetch` (maybe some other approach ?)
    > * .... ?
    >
    >
    > Noop:
    >
    > * still no formal cancelation
    >
    > RFC: ember-cli/rfcs#19
Commits on Jul 17, 2015
  1. @derekprior

    Drop support for IE9

    derekprior committed
    The playbook was updated a few weeks ago to indicate that we no longer
    support IE9 by default. There may be business cases where this is deemed
    necessary, but our best practices should align with the playbook.
Commits on Jul 11, 2015
  1. @MattMSumner

    Local Ember/DS functions

    MattMSumner committed
    Why:
    
    * Ember and Ember-Data will move to JavaScript modules allowing us to
    only import functions we actually use.
    
    This PR:
    
    * Proposes creating local constants for functions on `Ember` and `DS`
    * This means when these libraries are converted to modules, updating the
    code is as simple as converting:
    ```js
    const { computed } = Ember;
    ```
    to:
    ```js
    import { computed } from 'ember';
    ```
Something went wrong with that request. Please try again.