tweaks
This commit is contained in:
parent
3b786f92f9
commit
01cb7cde64
1
Gemfile
1
Gemfile
@ -6,3 +6,4 @@ gem 'rack-livereload'
|
||||
gem 'guard'
|
||||
gem 'guard-livereload'
|
||||
|
||||
gem 'thin'
|
||||
|
76
Gemfile.lock
76
Gemfile.lock
@ -6,6 +6,7 @@ PATH
|
||||
coffee-script
|
||||
compass (~> 0.12.rc)
|
||||
haml
|
||||
naturalsort (~> 1.1.1)
|
||||
nokogiri
|
||||
pygments.rb
|
||||
rack (~> 1.4.0)
|
||||
@ -19,12 +20,12 @@ PATH
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
actionmailer (3.2.1)
|
||||
actionpack (= 3.2.1)
|
||||
actionmailer (3.2.2)
|
||||
actionpack (= 3.2.2)
|
||||
mail (~> 2.4.0)
|
||||
actionpack (3.2.1)
|
||||
activemodel (= 3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
actionpack (3.2.2)
|
||||
activemodel (= 3.2.2)
|
||||
activesupport (= 3.2.2)
|
||||
builder (~> 3.0.0)
|
||||
erubis (~> 2.7.0)
|
||||
journey (~> 1.0.1)
|
||||
@ -32,23 +33,23 @@ GEM
|
||||
rack-cache (~> 1.1)
|
||||
rack-test (~> 0.6.1)
|
||||
sprockets (~> 2.1.2)
|
||||
activemodel (3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
activemodel (3.2.2)
|
||||
activesupport (= 3.2.2)
|
||||
builder (~> 3.0.0)
|
||||
activerecord (3.2.1)
|
||||
activemodel (= 3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
arel (~> 3.0.0)
|
||||
activerecord (3.2.2)
|
||||
activemodel (= 3.2.2)
|
||||
activesupport (= 3.2.2)
|
||||
arel (~> 3.0.2)
|
||||
tzinfo (~> 0.3.29)
|
||||
activeresource (3.2.1)
|
||||
activemodel (= 3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
activesupport (3.2.1)
|
||||
activeresource (3.2.2)
|
||||
activemodel (= 3.2.2)
|
||||
activesupport (= 3.2.2)
|
||||
activesupport (3.2.2)
|
||||
i18n (~> 0.6)
|
||||
multi_json (~> 1.0)
|
||||
addressable (2.2.6)
|
||||
arel (3.0.2)
|
||||
backbone-rails (0.9.0)
|
||||
backbone-rails (0.9.1)
|
||||
rails (>= 3.0.0)
|
||||
blankslate (2.1.2.4)
|
||||
builder (3.0.0)
|
||||
@ -57,10 +58,11 @@ GEM
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.2.0)
|
||||
compass (0.12.rc.1)
|
||||
compass (0.12.1)
|
||||
chunky_png (~> 1.2)
|
||||
fssm (>= 0.2.7)
|
||||
sass (~> 3.1)
|
||||
daemons (1.1.8)
|
||||
em-websocket (0.3.6)
|
||||
addressable (>= 2.1.1)
|
||||
eventmachine (>= 0.12.9)
|
||||
@ -82,18 +84,19 @@ GEM
|
||||
i18n (0.6.0)
|
||||
journey (1.0.3)
|
||||
json (1.6.5)
|
||||
mail (2.4.1)
|
||||
mail (2.4.4)
|
||||
i18n (>= 0.4.0)
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
mime-types (1.17.2)
|
||||
mime-types (1.18)
|
||||
multi_json (1.0.4)
|
||||
nokogiri (1.5.0)
|
||||
naturalsort (1.1.1)
|
||||
nokogiri (1.5.2)
|
||||
polyglot (0.3.3)
|
||||
pygments.rb (0.2.4)
|
||||
pygments.rb (0.2.7)
|
||||
rubypython (~> 0.5.3)
|
||||
rack (1.4.1)
|
||||
rack-cache (1.1)
|
||||
rack-cache (1.2)
|
||||
rack (>= 0.4)
|
||||
rack-livereload (0.3.4)
|
||||
rack
|
||||
@ -103,17 +106,17 @@ GEM
|
||||
rack
|
||||
rack-test (0.6.1)
|
||||
rack (>= 1.0)
|
||||
rails (3.2.1)
|
||||
actionmailer (= 3.2.1)
|
||||
actionpack (= 3.2.1)
|
||||
activerecord (= 3.2.1)
|
||||
activeresource (= 3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
rails (3.2.2)
|
||||
actionmailer (= 3.2.2)
|
||||
actionpack (= 3.2.2)
|
||||
activerecord (= 3.2.2)
|
||||
activeresource (= 3.2.2)
|
||||
activesupport (= 3.2.2)
|
||||
bundler (~> 1.0)
|
||||
railties (= 3.2.1)
|
||||
railties (3.2.1)
|
||||
actionpack (= 3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
railties (= 3.2.2)
|
||||
railties (3.2.2)
|
||||
actionpack (= 3.2.2)
|
||||
activesupport (= 3.2.2)
|
||||
rack-ssl (~> 1.3.2)
|
||||
rake (>= 0.8.7)
|
||||
rdoc (~> 3.4)
|
||||
@ -134,16 +137,20 @@ GEM
|
||||
hike (~> 1.2)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
sprockets-sass (0.6.0)
|
||||
sprockets-sass (0.7.0)
|
||||
sprockets (~> 2.0)
|
||||
tilt (~> 1.1)
|
||||
sprockets-vendor_gems (0.1.1)
|
||||
thin (1.3.1)
|
||||
daemons (>= 1.0.9)
|
||||
eventmachine (>= 0.12.6)
|
||||
rack (>= 1.0.0)
|
||||
thor (0.14.6)
|
||||
tilt (1.3.3)
|
||||
treetop (1.4.10)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.31)
|
||||
tzinfo (0.3.32)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@ -153,3 +160,4 @@ DEPENDENCIES
|
||||
guard
|
||||
guard-livereload
|
||||
rack-livereload
|
||||
thin
|
||||
|
@ -131,44 +131,3 @@ describe 'cat moods', ->
|
||||
expect(cat.mood).toEqual('angry')
|
||||
```
|
||||
|
||||
!SLIDE
|
||||
# Underscore.js mixins
|
||||
## and other prototype mixin-style extensions
|
||||
|
||||
!SLIDE even-larger
|
||||
``` coffeescript
|
||||
CatLike =
|
||||
catify: (name) ->
|
||||
"meow meow #{name}"
|
||||
|
||||
# mix in to the Underscore object
|
||||
_.mixin(CatLike)
|
||||
|
||||
# use it
|
||||
_.catify("john") # => "meow meow john"
|
||||
```
|
||||
|
||||
!SLIDE larger
|
||||
``` coffeescript
|
||||
describe '_.catify', ->
|
||||
it 'should catify', ->
|
||||
expect(_.catify("hiss")).toEqual("meow meow hiss")
|
||||
```
|
||||
|
||||
!SLIDE
|
||||
# Eliminate the Underscore.js dependency
|
||||
|
||||
!SLIDE
|
||||
``` coffeescript
|
||||
describe 'CatLike', ->
|
||||
beforeEach ->
|
||||
@helper = {}
|
||||
|
||||
for method, code of CatLike
|
||||
@helper[method] = code
|
||||
|
||||
describe '#catify', ->
|
||||
it 'should catify', ->
|
||||
expect(@helper.catify("hiss")).toEqual("meow meow hiss")
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user