jquery-turbolinks 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module JqueryTurbolinks
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -31,6 +31,11 @@ describe '$ Turbolinks', ->
31
31
  callback1.should.have.been.calledOnce
32
32
  callback2.should.have.been.calledOnce
33
33
 
34
+ it 'should pass jQuery object to callbacks', ->
35
+ $(document).trigger('page:load')
36
+
37
+ callback1.should.have.been.calledWith($)
38
+
34
39
  describe '$.setReadyEvent', ->
35
40
 
36
41
  it 'should unbind default (page:load) event', ->
@@ -1,5 +1,5 @@
1
1
  ###
2
- jquery.turbolinks.js ~ v0.2.0 ~ https://github.com/kossnocorp/jquery.turbolinks
2
+ jquery.turbolinks.js ~ v0.2.1 ~ https://github.com/kossnocorp/jquery.turbolinks
3
3
 
4
4
  jQuery plugin for drop-in fix binded events problem caused by Turbolinks
5
5
 
@@ -15,7 +15,7 @@ callbacks = []
15
15
 
16
16
  # Call each callback in list
17
17
  ready = ->
18
- callback() for callback in callbacks
18
+ callback($) for callback in callbacks
19
19
 
20
20
  # Bind `ready` to DOM ready event
21
21
  $(ready)
@@ -1,7 +1,7 @@
1
1
  // Generated by CoffeeScript 1.3.3
2
2
 
3
3
  /*
4
- jquery.turbolinks.js ~ v0.2.0 ~ https://github.com/kossnocorp/jquery.turbolinks
4
+ jquery.turbolinks.js ~ v0.2.1 ~ https://github.com/kossnocorp/jquery.turbolinks
5
5
 
6
6
  jQuery plugin for drop-in fix binded events problem caused by Turbolinks
7
7
 
@@ -23,7 +23,7 @@
23
23
  _results = [];
24
24
  for (_i = 0, _len = callbacks.length; _i < _len; _i++) {
25
25
  callback = callbacks[_i];
26
- _results.push(callback());
26
+ _results.push(callback($));
27
27
  }
28
28
  return _results;
29
29
  };
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-turbolinks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: