ghost_in_the_post 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 242a2ac58d97c81d8c54e6222b2f496e285ce921
4
- data.tar.gz: a05272d429042a057ffb0d0a5825b714f78da6bc
3
+ metadata.gz: 7aa0dd4f405673caca79f8fb8557b7c5cbb5cb55
4
+ data.tar.gz: 82e2565a50909c07b0e88f9185b99ffe58450d2c
5
5
  SHA512:
6
- metadata.gz: 61efd9ae29fd80b491590e6de213ed17a725b922b60220961ac5ab101268415850f698ba2b3c477e9d5169269ee6bddb48f4a81652198164c8d111d44eb159c2
7
- data.tar.gz: 69c1967d2556f70309e203125e6962a097e6d418ffc702e1f199bb1e2d1f96d71eb4f894957a31b6f12e3ef9759cb1053c6a75c461b1e8f18d3a12a50e5155e9
6
+ metadata.gz: a86e3b383b4a1f514b51ff044ae4039fe464f5ef7c2710aa9e8576238a65285129377a32d5b0e67b31fbed79291fec9d885f5e22335ae3a81f707beab258789e
7
+ data.tar.gz: 97b696dcfb777805d9e991e0157ea7aa9b05df04d5d37a7a0c1956a711ccaba4452c2810dd40a553cd1ae8aee0bdc0c1f45834699642693f0be0e874cce244fe
@@ -12,7 +12,7 @@ module GhostInThePost
12
12
  end
13
13
 
14
14
  def inline
15
- create_script_element(generate_flat_js, @dom.at_xpath('html/body'))
15
+ @dom.at_xpath('html/body').add_child("<script>#{generate_flat_js}</script>")
16
16
  end
17
17
 
18
18
  def remove_all_script
@@ -29,11 +29,6 @@ module GhostInThePost
29
29
 
30
30
  private
31
31
 
32
- def create_script_element(script_blocks, body)
33
- return unless body
34
- body.add_child("<script>#{@dom.create_cdata(script_blocks.join("\n"))}</script>")
35
- end
36
-
37
32
  def generate_flat_js
38
33
  injectable_scripts.map do |script|
39
34
  asset = find_asset_in_pipeline(script)
@@ -41,7 +36,7 @@ module GhostInThePost
41
36
  raise AssetNotFoundError.new("cannot find asset #{normalize_asset_name(script)}")
42
37
  end
43
38
  asset.to_s unless asset.nil?
44
- end.compact
39
+ end.compact.join("\n")
45
40
  end
46
41
 
47
42
  def injectable_scripts
@@ -1,3 +1,3 @@
1
1
  module GhostInThePost
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- ghost_in_the_post (0.0.9)
4
+ ghost_in_the_post (0.0.10)
5
5
  nokogiri
6
6
  rails (~> 4.2.3)
7
7
 
@@ -530,3 +530,7 @@ AutoMailer#normal_email: processed outbound mail in 561.1ms
530
530
  Rendered auto_mailer/normal_email.text (0.9ms)
531
531
 
532
532
  AutoMailer#normal_email: processed outbound mail in 518.5ms
533
+ Rendered auto_mailer/normal_email.html.erb (237.4ms)
534
+ Rendered auto_mailer/normal_email.text (0.6ms)
535
+
536
+ AutoMailer#normal_email: processed outbound mail in 499.7ms
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghost_in_the_post
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Anema
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-04 00:00:00.000000000 Z
11
+ date: 2016-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails