honkster-jelly 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Jelly. a sweet unobtrusive javascript framework for Rails
3
3
  *
4
- * version 0.11.0
4
+ * version 0.12.0
5
5
  *
6
6
  * Copyright (c) 2009 Pivotal Labs
7
7
  * Licensed under the MIT license.
@@ -18,11 +18,7 @@ module JellyHelper
18
18
  end
19
19
 
20
20
  def attach_javascript_component_javascript_tag(components)
21
- javascript_tag <<-JS
22
- jQuery(document).ready(function() {
23
- Jelly.attach.apply(Jelly, #{components.to_json});
24
- });
25
- JS
21
+ javascript_tag "Jelly.attach.apply(Jelly, #{components.to_json});"
26
22
  end
27
23
 
28
24
  def clear_jelly_attached
@@ -66,7 +66,7 @@ describe JellyHelper, :type => :helper do
66
66
  ]
67
67
  end
68
68
 
69
- it "adds a call to Jelly.attach in an jQuery(document).ready block" do
69
+ it "adds a call to Jelly.attach" do
70
70
  helper.attach_javascript_component("MyComponent", 'arg1', 'arg2', 'arg3')
71
71
  expected_args = ['arg1','arg2','arg3'].to_json
72
72
  helper.instance_variable_get(:@jelly_attachments).should == [
@@ -76,8 +76,7 @@ describe JellyHelper, :type => :helper do
76
76
  html = helper.spread_jelly
77
77
  doc = Nokogiri::HTML(html)
78
78
  document_ready_tag = doc.at("script")
79
- document_ready_tag.inner_html.should include("jQuery(document).ready(function() {")
80
- document_ready_part = document_ready_tag.inner_html.split("\n")[3]
79
+ document_ready_part = document_ready_tag.inner_html.split("\n")[2]
81
80
  arguments = jelly_attach_arguments(document_ready_part)
82
81
  arguments.should include(["MyComponent", 'arg1', 'arg2', 'arg3'])
83
82
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: honkster-jelly
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.11.0
5
+ version: 0.12.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Pivotal Labs, Inc