bigpipe-rails 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bigpipe-rails}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Langevin"]
@@ -21,13 +21,17 @@ module BigpipeRails
21
21
  opts, block = pipe
22
22
  # we actually run the block here -
23
23
  # TODO: use em-synchrony and/or our own Fiber implementation
24
- opts[:content] = escape_javascript(capture(&block))
25
- data = capture do
26
- javascript_tag do
27
- %Q{BigPipe.add_pagelet(#{opts.to_json});}
28
- end
29
- end
30
- self.output_buffer << data
24
+ opts[:content] = capture(&block)
25
+ # TODO: we are re-escaping here for some reason - should be able to use javascript_tag
26
+ # helper, need to see why it doesn't work
27
+ data = %Q{
28
+ <script type="text/javascript">
29
+ <![CDATA[
30
+ BigPipe.add_pagelet(#{opts.to_json});
31
+ ]]>
32
+ </script>
33
+ }
34
+ self.output_buffer.safe_concat(data)
31
35
  end
32
36
  ""
33
37
  end
@@ -34,7 +34,7 @@ GEM
34
34
  archive-tar-minitar (0.5.2)
35
35
  arel (2.1.3)
36
36
  bcrypt-ruby (2.1.4)
37
- bigpipe-rails (0.0.2)
37
+ bigpipe-rails (0.1.0)
38
38
  rails (= 3.1.0.rc4)
39
39
  builder (3.0.0)
40
40
  columnize (0.3.4)
@@ -4,6 +4,7 @@
4
4
  <title>DummyApp</title>
5
5
  <%= stylesheet_link_tag "application" %>
6
6
  <%= javascript_include_tag "application" %>
7
+ <%= javascript_include_tag "bigpipe" %>
7
8
  <%= csrf_meta_tags %>
8
9
  </head>
9
10
  <body>
@@ -5,6 +5,8 @@ describe "BigpipeRails" do
5
5
  it "displays bigpipe content as a javascript tag" do
6
6
  get("/test")
7
7
  response.body.should match("Hello!")
8
+ # test to make sure that we aren't re-escaping
9
+ response.body.should_not match("&quot;")
8
10
  true
9
11
  end
10
12
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: bigpipe-rails
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dan Langevin
@@ -256,7 +256,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
256
256
  requirements:
257
257
  - - ">="
258
258
  - !ruby/object:Gem::Version
259
- hash: 863484909136685835
259
+ hash: 2541141229637377562
260
260
  segments:
261
261
  - 0
262
262
  version: "0"