Bump version and update docs for v0.3.2 gem release #16
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
backbone-support (0.3.1) | ||
backbone-support (0.3.2) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,17 @@ | |
|
||
[![Build Status](https://travis-ci.org/thoughtbot/backbone-support.png?branch=master)](https://travis-ci.org/thoughtbot/backbone-support) | ||
|
||
There's no built-in garbage collection for Backbone’s event bindings, and | ||
forgetting to unbind can cause bugs and memory leaks. | ||
Backbone Support provides a collection of utility classes for use with | ||
[Backbone.js][]. There's no built-in garbage collection for Backbone’s event | ||
bindings, and forgetting to unbind can cause bugs and memory leaks. Backbone | ||
Support has your covered. | ||
|
||
Backbone Support currently provides two utility classes, SwappingRouter and CompositeView, | ||
that introduce a `leave()` function, which unbinds and cleans up the view. | ||
They should be used where views are instantiated (in Router instances and in composite views). | ||
Backbone Support currently provides two utility classes, SwappingRouter and | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd remove "currently" - unless you are The Doctor, or have access to time crystals, everything is "currently". |
||
CompositeView, that introduce a `leave()` function, which unbinds and cleans up | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like two ideas - what about something like "...provides two utility classes, SwappingRouter and CompositeView, which should be used where views are instantiated (in Router instances and in composite views), and introduce the |
||
the view. They should be used where views are instantiated (in Router | ||
instances and in composite views). | ||
|
||
Inspired by our projects and the Backbone.js on Rails book: | ||
http://workshops.thoughtbot.com/backbone-js-on-rails | ||
Inspired by our projects and the [Backbone.js on Rails book][]. | ||
|
||
The book contains complete instructions and in-depth coverage of the internals | ||
of CompositeView and SwappingRouter, and an example application that shows | ||
|
@@ -81,7 +83,7 @@ maintain a back-reference at `this.parent`. This is used to reach up and call | |
|
||
## Dependencies | ||
|
||
Backbone Support requires the following dependencies: | ||
Backbone Support has the following dependencies: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think of "Backbone Support requires the following libraries"? |
||
|
||
* jQuery or Zepto | ||
* Underscore | ||
|
@@ -96,47 +98,47 @@ use these included files, simply follow the instructions below in the | |
|
||
### Alternate Versions | ||
|
||
If you require a different version of Backbone or Underscore than those provided | ||
by this gem, simply put them in `vendor/assets/javascripts` and they will | ||
take higher precedence than the versions provided by the gem thanks to the | ||
ordering of the [search paths in the asset pipeline][]. | ||
|
||
## Development | ||
|
||
First: | ||
|
||
bundle | ||
|
||
While TDD'ing: | ||
|
||
bundle exec rake jasmine | ||
|
||
To not open tests in a browser window: | ||
|
||
bundle exec rake jasmine:ci | ||
If you require a different version of Backbone or Underscore than those | ||
provided by this gem, simply put the script files in | ||
`vendor/assets/javascripts` and they will take higher precedence than the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. " |
||
versions provided by the gem thanks to the ordering of the [search paths in the | ||
asset pipeline][]. | ||
|
||
## Installation | ||
|
||
The recommended usage is with Rails 3.1. | ||
The recommended usage is with Rails 3.1 or higher to take advantage of the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about "We recommend you use Backbone-Support with Rails 3.1 or higher in order to take advantage of the asset pipeline"? |
||
asset pipeline. | ||
|
||
### With Rails 3.1 | ||
### With Rails 3.1 or higher | ||
|
||
Add the gem to your Gemfile | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a colon at the end of this line? |
||
|
||
gem "backbone-support" | ||
|
||
And then `bundle install` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd add a period to the end of this line. |
||
|
||
In your application.js, or in whatever file your backbone.js assets are | ||
required in, add the following: | ||
Before including any part of Backbone Support, you must include its | ||
dependencies. In your application.js or any other manifest file, add the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe wrap "or any other manifest file" in a parenthetical? |
||
following to load in the needed dependencies: | ||
|
||
// jQuery is provided by the 'jquery-rails' gem, included with Rails | ||
//= require jquery | ||
// | ||
// Backbone Support includes Backbone and Underscore, or you can provides | ||
// alternate versions by placing them in vendor/assets/javascripts/ | ||
//= require backbone | ||
//= require underscore | ||
|
||
To require all of Backbone Support, add the following: | ||
|
||
//= require backbone-support | ||
|
||
This should be _above_ any usage of SwappingController or SwappingRouter, but | ||
below the inclusion of Backbone.js, Underscore, and jQuery. | ||
|
||
If you do not wish to include all of backbone-support, you can include | ||
individual pieces. Require the support file(s) and the individual assets you wish to use: | ||
individual pieces. Require the support file and the individual assets you | ||
wish to use: | ||
|
||
//= require backbone-support/support | ||
//= require backbone-support/swapping_router | ||
|
@@ -195,9 +197,26 @@ require("/vendor/plugins/backbone-support/lib/assets/javascripts/backbone-suppor | |
require("/vendor/plugins/backbone-support/lib/assets/javascripts/backbone-support/swapping_router.js"); | ||
``` | ||
|
||
## Development | ||
|
||
First: | ||
|
||
bundle | ||
|
||
While TDD'ing: | ||
|
||
bundle exec rake jasmine | ||
|
||
To not open tests in a browser window: | ||
|
||
bundle exec rake jasmine:ci | ||
|
||
## License | ||
|
||
Copyright 2012 thoughtbot. Please check LICENSE for more details. | ||
Copyright 2012 thoughtbot. Please check [LICENSE][] for more details. | ||
|
||
[Installation]: https://github.com/thoughtbot/backbone-support#installation | ||
[search paths in the asset pipeline]: http://edgeguides.rubyonrails.org/asset_pipeline.html#search-paths | ||
[Backbone.js on Rails book]: https://learn.thoughtbot.com/products/1-backbone-js-on-rails | ||
[Backbone.js]: http://backbonejs.org/ | ||
[LICENSE]: https://github.com/thoughtbot/backbone-support/blob/master/LICENSE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
window.Support = {}; | ||
Support.VERSION = "0.0.1"; | ||
Support.VERSION = "0.3.2"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module BackboneSupport | ||
VERSION = '0.3.1'.freeze | ||
VERSION = '0.3.2'.freeze | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[typo] your