Import code from jquery.turbolinks
Clean up comments in jquery.turbolinks.coffee
Rename jquery.turbolinks.coffee -> jquery.turbolinks.js.coffee
Perhaps a short doc above the code explaining the issue why this was added to turbolinks, and update README to explain how/when to use this?
Once this is merged in I'd be happy to add the docs.
Pass jQuery object to each callback
Replace all $ with jQuery
Remove unnecessary brackets
Suddenly we found bug in jquery.turbolinks (kossnocorp/jquery.turbolinks#4). Now it fixed (kossnocorp/jquery.turbolinks@3212b54). Sorry.
Run callback after adding to waiting list if jQuery.isReady
One more bug was fixed: kossnocorp/jquery.turbolinks#6
Good deal. Can we get some documentation to go with this?
wow @dhh on a role today :)
Pull code from kossncorop/jquery.turbolinks v1.0.0-rc1
@dhh about documentation: I'm far away from native speaker, so it's better to delegate work on documentation to someone else. But anyway, I can copy texts from kossnocorp/jquery.turbolinks/README.
@аll Hey guys, can you help me with documentation to jquery.turbolinks? You can rework README for jquery.turbolinks or write new one from scratch. Thanks! /cc @ryw
@dhh what do you think about import specs from jquery.turbolinks?
@kossnocorp yeah, I'll take a crack at docs.
I tried writing complete tests using phantomjs and poltergeist, because poltergeist supports network_traffic monitoring.
But phantomjs does not support window.history.state, so it was failed.
Does anyone have another idea for complete suite?
@YasuOza I'm pretty sure it can be done via Mocha + Chai.js + Sinon.js. Actually I successfully emulate DOM in jquery.turbolinks via jsdom: https://github.com/kossnocorp/jquery.turbolinks/blob/master/spec/jquery.turbolinks_spec.coffee#L3:L4.
Actually I was start building specs for Turbolinks, but I'm not sure when I can finish it: kossnocorp/turbolinks@1b109a7.
@kossnocorp Can those emulate accessing assets changed page through turbolinks and detect it?
@YasuOza we can just stub requests, isn't?
@kossnocorp Keep going. I also think about test for turbolinks.
Add jquery.turbolinks section to README
Merge pull request #1 from ryw/import_code_from_jquery_turbolinks
Docs are shipped 🎉! @ryw, thank you a lot!
Maybe I'm missing something, but couldn't all this code be replaced w/
$.fn.ready = (callback) -> $(document).on 'page:load', callback
What's the point of reimplementing callback dispatching?
Here's the actual code I use:
jQuery_ready = $.fn.ready
$.fn.ready = (callback) ->
$(document).on 'page:load', callback
Binding the callbacks to document ready AND page:load.
I believe it does the same thing.
@macournoyer take a look at these issues: kossnocorp/jquery.turbolinks#6 & kossnocorp/jquery.turbolinks#8.
perhaps it may be better afterall to leave jquery.turbolinks as a seperate gem seeing as how there are still updates being made and in the event jquery library itself has any changes, may be easier to get updates pushed out rather than including here.
I agree. Doesn't seem like it's so cut and dry. Let's keep it separate from now and see how it goes.
But let's get that COMPATIBILITY readme going.