ghost_in_the_post 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ghost_in_the_post.rb +5 -0
  3. data/lib/ghost_in_the_post/js_inline.rb +91 -0
  4. data/lib/ghost_in_the_post/phantom/staticize.js +4 -18
  5. data/lib/ghost_in_the_post/phantom_transform.rb +12 -75
  6. data/lib/ghost_in_the_post/version.rb +1 -1
  7. data/spec/dummy/Gemfile +1 -1
  8. data/spec/dummy/Gemfile.lock +40 -31
  9. data/spec/dummy/app/assets/javascripts/test.js +4 -1
  10. data/spec/dummy/app/mailers/auto_mailer.rb +0 -1
  11. data/spec/dummy/app/views/auto_mailer/normal_email.html.erb +2 -3
  12. data/spec/dummy/config/initializers/ghost_in_the_post.rb +1 -1
  13. data/spec/dummy/log/development.log +136 -0
  14. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-k4_XP2RpcjsXdbEn6qBsAPpql3gQiE93Y8QOMuVfs0.cache +1 -0
  15. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/48z_eOfEjcUZbqRkitvPcQWh7Hn-hgxue7ekRBojr9g.cache +1 -0
  16. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/86v25E0xnwy001YHLw8LduVEdijax96aorQrr3yJGJI.cache +1 -0
  17. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8qvOy3VZFmkwGRCIuLzhSIYOcVtu6GpZIn6bPPcZWi8.cache +0 -0
  18. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/E9yiq0UWmLGIt128qFot0ShF2tKgQYbUVL1KyYdGlp4.cache +1 -0
  19. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ek5gIbxd0Jy0_2XTxSft3tXuZ_-qEvr3I-AcVimfTNI.cache +2 -0
  20. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FDIcBN4OBSwV2FMgpvgdfhAZC-ycsr1PkaDrhR0YKXg.cache +3 -0
  21. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Fbiaq-Rp0eB0J2fCwImvqWSXj8Am1O_hHZvRxgWSj58.cache +1 -0
  22. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Mp7UGnWnNp4rKy5hCYvl9BsVHhctx-av-AYy7Wyz7CI.cache +1 -0
  23. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Oe5LRDH7di4WOiG-W-7zoXnP0Bv3hXzjKzRNdKBtCQI.cache +1 -0
  24. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gZp3uXMHuYQC4hzCr7bQfetKNdJAtbQmg3so2KpW1Dw.cache +2 -0
  25. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nFA3G3IroEqp51ggoqBK44-rTfddnvGQGGkyP8nV_LA.cache +0 -0
  26. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/s1fl9hrCR2SoMMkQWHyodwUJwS1iP6oNdK1WU-3I-QA.cache +0 -0
  27. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/w6JX5zWN8vK4afiR4ib5M9nD0_1jiLPfUiWYu5k7pVQ.cache +0 -0
  28. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xEPwyXpA7w7L0dn1hl5TQXVeRaJmX7MX6yxu4kMCfvU.cache +0 -0
  29. data/spec/lib/ghost_in_the_post/js_inline_spec.rb +62 -0
  30. data/spec/lib/ghost_in_the_post/phantom_transform_spec.rb +17 -64
  31. metadata +48 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52affd45a9ba53955a5d64508af2c2d4c2a6b070
4
- data.tar.gz: 111cf6580e29585c5f57dd93581dc60ac6fc21d0
3
+ metadata.gz: 94da021e6f8b23bd606f975de8e4130d6a776a9d
4
+ data.tar.gz: 9f8cd6d8aea34ece07434229d84ca35388bfde5d
5
5
  SHA512:
6
- metadata.gz: f05addd81378a725bc0fd3a46bbb94c6f4381ba4adae4ba7e09177dbad46ac122735a93b0b0347dcfcd572d06407dffe5db078037d77b2340a437adf6b32f9db
7
- data.tar.gz: 4955169572411927977258962ace862167f58676b5fe4cb8a62b922b327d9d34b4fc610d86d0a17b62689ef4cb229dda67a5628733a8d7ae09e37cad517ba2a1
6
+ metadata.gz: 0edf5ce3439fd879eb666ca6dd0491e83fbde0c591ec63eb25c2b191aa92e25b721e3072f592e4912f0101a8cc5cc0172f0ab6988b33316612ea1bb6fc3c681c
7
+ data.tar.gz: d279fb5c28e64647262a967b8189daa03cd8540ccc3d02c3d99eeaa81ae3a8c59061bfe6b9ca115d05de7a2aa1d6129aa43f6fd17e3862b849bb1b5ed887dade
@@ -6,17 +6,20 @@ module GhostInThePost
6
6
  :remove_js_tags,
7
7
  :timeout,
8
8
  :wait_event,
9
+ :debug,
9
10
  ]
10
11
  DEFAULT_TIMEOUT = 1000
11
12
  DEFAULT_WAIT_EVENT = "ghost_in_the_post:done"
12
13
  private_constant :ATTRIBUTE_NAMES
13
14
  cattr_reader(*ATTRIBUTE_NAMES)
14
15
 
16
+ #defaults
15
17
  @@phantomjs_path = nil #setting this to nil helps testing
16
18
  @@timeout = DEFAULT_TIMEOUT
17
19
  @@wait_event = DEFAULT_WAIT_EVENT
18
20
  @@includes = []
19
21
  @@remove_js_tags = true
22
+ @@debug = false
20
23
 
21
24
  def self.config=(new_config={})
22
25
  self.complain_about_unknown_keys(new_config.keys)
@@ -25,6 +28,7 @@ module GhostInThePost
25
28
  @@remove_js_tags = new_config[:remove_js_tags].nil? ? true : new_config[:remove_js_tags]
26
29
  @@timeout = new_config[:timeout] || DEFAULT_TIMEOUT
27
30
  @@wait_event = new_config[:wait_event] || DEFAULT_WAIT_EVENT
31
+ @@debug = new_config[:debug].nil? ? false : new_config[:debug]
28
32
  raise ArgumentError, "GhostInThePost.config.phantomjs_path is not set" if self.phantomjs_path.nil?
29
33
  end
30
34
 
@@ -45,6 +49,7 @@ end
45
49
 
46
50
  require "ghost_in_the_post/version"
47
51
 
52
+ require "ghost_in_the_post/js_inline"
48
53
  require "ghost_in_the_post/phantom_transform"
49
54
  require "ghost_in_the_post/mail_ghost"
50
55
 
@@ -0,0 +1,91 @@
1
+ require 'nokogiri'
2
+
3
+ module GhostInThePost
4
+
5
+ class AssetNotFoundError < StandardError; end
6
+
7
+ class JsInline
8
+
9
+ def initialize(html, included_scripts=[])
10
+ self.html = html
11
+ @included_scripts = Array(included_scripts).compact
12
+ end
13
+
14
+ def inline
15
+ create_script_element(generate_flat_js, @dom.at_xpath('html/body'))
16
+ end
17
+
18
+ def remove_all_script
19
+ @dom.css('script').map(&:remove)
20
+ end
21
+
22
+ def html=(html)
23
+ @dom = Nokogiri::HTML.parse(html)
24
+ end
25
+
26
+ def html
27
+ @dom.to_html
28
+ end
29
+
30
+ private
31
+
32
+ def create_script_element(script_blocks, body)
33
+ return unless body
34
+ element = Nokogiri::XML::Node.new("script", body.document)
35
+ element.content = script_blocks.join("\n")
36
+ body.add_child(element)
37
+ end
38
+
39
+ def generate_flat_js
40
+ injectable_scripts.map do |script|
41
+ asset = find_asset_in_pipeline(script)
42
+ if GhostInThePost.debug and asset.nil?
43
+ raise AssetNotFoundError.new("cannot find asset #{normalize_asset_name(script)}")
44
+ end
45
+ asset.to_s unless asset.nil?
46
+ end.compact
47
+ end
48
+
49
+ def injectable_scripts
50
+ doc_scripts = @dom.css('script').map do |script_node|
51
+ src = script_node['src']
52
+ script_node.remove unless src.nil?
53
+ src
54
+ end.compact
55
+ doc_scripts + GhostInThePost.includes + @included_scripts
56
+ end
57
+
58
+ def find_asset_in_pipeline(name)
59
+ normalized_name = normalize_asset_name(name)
60
+ Rails.application.assets[normalized_name] || Rails.application.assets[remove_asset_digest(normalized_name)]
61
+ end
62
+
63
+ def normalize_asset_name(href)
64
+ remove_asset_prefix(href.split('?').first)
65
+ end
66
+
67
+ DIGEST_PATTERN = /
68
+ - # Digest comes after a dash
69
+ (?:
70
+ [a-z0-9]{32} | # Old style is 32 character hash
71
+ [a-z0-9]{64} # New style is 64 characters
72
+ )
73
+ \. # Dot for the file extension
74
+ /x.freeze
75
+
76
+ def remove_asset_digest(path)
77
+ path.gsub(DIGEST_PATTERN, '.')
78
+ end
79
+
80
+ def remove_asset_prefix(path)
81
+ path.sub(Regexp.new("^#{Regexp.quote(asset_prefix)}/?"), "")
82
+ end
83
+
84
+ def asset_prefix
85
+ ::Rails.application.try(:config).try(:assets).try(:prefix) || "/assets"
86
+ end
87
+
88
+ end
89
+
90
+ end
91
+
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
  var system = require('system'),
3
3
  page = require('webpage').create(),
4
- address = system.args[1], //tmp file of the html to be processed
5
- no_script = system.args[2] == "true",
6
- include = system.args[3], //tmp file for the injected js file
4
+ html = system.args[1], //tmp file of the html to be processed
7
5
  timeout = parseInt(system.args[4]) || 1000, //return page contents after a timeout
8
6
  wait_event = system.args[5], //return page contents after an event
9
7
  error_tag = "[GHOSTINTHEPOST-STATICIZE-ERROR]";
@@ -29,7 +27,7 @@ page.onError = function(msg, trace) {
29
27
  if (trace && trace.length) {
30
28
  msgStack.push('TRACE:');
31
29
  trace.forEach(function(t) {
32
- msgStack.push(' -> ' + t.file + ': ' + t.line + (t.function ? ' (in function "' + t.function +'")' : ''));
30
+ msgStack.push(t.file + ': ' + t.line + (t.function ? ' (in function "' + t.function +'")' : ''));
33
31
  });
34
32
  }
35
33
  console.error(msgStack.join('\n'));
@@ -42,22 +40,10 @@ page.onLoadFinished = function(status){
42
40
  page.evaluate(function(finish, wait_event) {
43
41
  document.addEventListener(wait_event, window.callPhantom, false)
44
42
  }, finish, wait_event)
45
- //clear script tags
46
- if(no_script) {
47
- page.evaluate(function(){
48
- var script_tags = document.getElementsByTagName("script");
49
- for(var i = 0; i < script_tags.length; i++) {
50
- script_tags[i].parentNode.removeChild(script_tags[i]);
51
- }
52
- })
53
- }
54
- //load included scripts to be loaded on the dom
55
- if(!!include){
56
- page.injectJs(include);
57
- }
58
43
  if(timeout > 0){
59
44
  setTimeout(finish, timeout);//timout to bailout after a period
60
45
  }
61
46
  };
62
47
 
63
- page.open("file://"+address)
48
+ //load html content
49
+ page.setContent(html, 'ghost_in_the_post');
@@ -1,103 +1,40 @@
1
1
  module GhostInThePost
2
2
 
3
- class GhostError < StandardError; end
3
+ class GhostJSError < StandardError; end
4
4
 
5
5
  class PhantomTransform
6
6
  PHANTOMJS_SCRIPT = File.expand_path('../phantom/staticize.js', __FILE__)
7
7
  ERROR_TAG = "[GHOSTINTHEPOST-STATICIZE-ERROR]"
8
8
 
9
- def initialize(html, timeout=nil, wait_event=nil, included_scripts=[])
10
- @html = html
9
+ def initialize(html, timeout=nil, wait_event=nil, included_scripts=nil)
10
+ @inliner = JsInline.new(html, included_scripts)
11
11
  @timeout = timeout || GhostInThePost.timeout
12
12
  @wait_event = wait_event || GhostInThePost.wait_event
13
- @included_scripts = Array(included_scripts).compact
14
13
  end
15
14
 
16
15
  def transform
17
- output = @html
18
- begin
19
- htmlfile = html_file()
20
- jsfile = js_file()
21
- output = IO.popen(command(htmlfile, jsfile)){|io| io.read}
22
- checkError(output)
23
- ensure
24
- htmlfile.unlink unless htmlfile.nil?
25
- jsfile.unlink unless jsfile.nil?
26
- end
27
- output
16
+ @inliner.inline
17
+ p @inliner.html if GhostInThePost.debug
18
+ @inliner.html = checkError(IO.popen(command){|io| io.read})
19
+ @inliner.remove_all_script if GhostInThePost.remove_js_tags
20
+ @inliner.html
28
21
  end
29
22
 
30
23
  private
31
24
 
32
- def command(htmlfile, jsfile)
25
+ def command
33
26
  [
34
27
  GhostInThePost.phantomjs_path,
35
28
  PHANTOMJS_SCRIPT,
36
- htmlfile.path,
37
- GhostInThePost.remove_js_tags,
38
- jsfile.path,
29
+ @inliner.html,
39
30
  @timeout,
40
31
  @wait_event,
41
32
  ].map(&:to_s)
42
33
  end
43
34
 
44
- #generate a tempfile with all the html that we need so that phantom can inject
45
- #easily and not have to max out a single command
46
- def html_file
47
- file = Tempfile.new(['inject', '.html'])
48
- file.write(@html)
49
- file.close #closing the file makes it accessible by phantom
50
- file
51
- end
52
-
53
- #generate a tempfile with all the js that we need so that phantom can inject
54
- #easily and not have to max out a single command
55
- def js_file
56
- jsfile = Tempfile.new(['inject', '.js'])
57
- injectable_scripts.map do |script|
58
- asset = find_asset_in_pipeline(script)
59
- jsfile.write(asset.to_s) unless asset.nil?
60
- end.compact
61
- jsfile.close #closing the file makes it accessible by phantom
62
- jsfile
63
- end
64
-
65
- def injectable_scripts
66
- @injectable_scripts ||= (GhostInThePost.includes + @included_scripts)
67
- end
68
-
69
- def find_asset_in_pipeline(name)
70
- normalized_name = normalize_asset_name(name)
71
- Rails.application.assets[normalized_name] || Rails.application.assets[remove_asset_digest(normalized_name)]
72
- end
73
-
74
- def normalize_asset_name(href)
75
- remove_asset_prefix(href.split('?').first)
76
- end
77
-
78
- DIGEST_PATTERN = /
79
- - # Digest comes after a dash
80
- (?:
81
- [a-z0-9]{32} | # Old style is 32 character hash
82
- [a-z0-9]{64} # New style is 64 characters
83
- )
84
- \. # Dot for the file extension
85
- /x.freeze
86
-
87
- def remove_asset_digest(path)
88
- path.gsub(DIGEST_PATTERN, '.')
89
- end
90
-
91
- def remove_asset_prefix(path)
92
- path.sub(Regexp.new("^#{Regexp.quote(asset_prefix)}/?"), "")
93
- end
94
-
95
- def asset_prefix
96
- ::Rails.application.try(:config).try(:assets).try(:prefix) || "/assets"
97
- end
98
-
99
35
  def checkError output
100
- raise GhostError.new(output.gsub(ERROR_TAG, "")) if output.start_with?(ERROR_TAG)
36
+ raise GhostJSError.new(output.gsub(ERROR_TAG, "")) if output.start_with?(ERROR_TAG)
37
+ output
101
38
  end
102
39
 
103
40
  end
@@ -1,3 +1,3 @@
1
1
  module GhostInThePost
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/spec/dummy/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
- gem 'rails', '4.2.3'
2
+ gem 'rails', '4.2.4'
3
3
  gem 'ghost_in_the_post', :path => '../..'
4
4
 
5
5
  group :development do
@@ -1,42 +1,43 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- ghost_in_the_post (0.0.4)
4
+ ghost_in_the_post (0.0.5)
5
+ nokogiri
5
6
  rails (~> 4.2.3)
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
- actionmailer (4.2.3)
11
- actionpack (= 4.2.3)
12
- actionview (= 4.2.3)
13
- activejob (= 4.2.3)
11
+ actionmailer (4.2.4)
12
+ actionpack (= 4.2.4)
13
+ actionview (= 4.2.4)
14
+ activejob (= 4.2.4)
14
15
  mail (~> 2.5, >= 2.5.4)
15
16
  rails-dom-testing (~> 1.0, >= 1.0.5)
16
- actionpack (4.2.3)
17
- actionview (= 4.2.3)
18
- activesupport (= 4.2.3)
17
+ actionpack (4.2.4)
18
+ actionview (= 4.2.4)
19
+ activesupport (= 4.2.4)
19
20
  rack (~> 1.6)
20
21
  rack-test (~> 0.6.2)
21
22
  rails-dom-testing (~> 1.0, >= 1.0.5)
22
23
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- actionview (4.2.3)
24
- activesupport (= 4.2.3)
24
+ actionview (4.2.4)
25
+ activesupport (= 4.2.4)
25
26
  builder (~> 3.1)
26
27
  erubis (~> 2.7.0)
27
28
  rails-dom-testing (~> 1.0, >= 1.0.5)
28
29
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- activejob (4.2.3)
30
- activesupport (= 4.2.3)
30
+ activejob (4.2.4)
31
+ activesupport (= 4.2.4)
31
32
  globalid (>= 0.3.0)
32
- activemodel (4.2.3)
33
- activesupport (= 4.2.3)
33
+ activemodel (4.2.4)
34
+ activesupport (= 4.2.4)
34
35
  builder (~> 3.1)
35
- activerecord (4.2.3)
36
- activemodel (= 4.2.3)
37
- activesupport (= 4.2.3)
36
+ activerecord (4.2.4)
37
+ activemodel (= 4.2.4)
38
+ activesupport (= 4.2.4)
38
39
  arel (~> 6.0)
39
- activesupport (4.2.3)
40
+ activesupport (4.2.4)
40
41
  i18n (~> 0.7)
41
42
  json (~> 1.7, >= 1.7.7)
42
43
  minitest (~> 5.1)
@@ -48,6 +49,7 @@ GEM
48
49
  concurrent-ruby (1.0.0)
49
50
  concurrent-ruby (1.0.0-java)
50
51
  erubis (2.7.0)
52
+ ffi (1.9.10-java)
51
53
  globalid (0.3.6)
52
54
  activesupport (>= 4.1.0)
53
55
  i18n (0.7.0)
@@ -68,19 +70,24 @@ GEM
68
70
  coderay (~> 1.1.0)
69
71
  method_source (~> 0.8.1)
70
72
  slop (~> 3.4)
73
+ pry (0.10.3-java)
74
+ coderay (~> 1.1.0)
75
+ method_source (~> 0.8.1)
76
+ slop (~> 3.4)
77
+ spoon (~> 0.0)
71
78
  rack (1.6.4)
72
79
  rack-test (0.6.3)
73
80
  rack (>= 1.0)
74
- rails (4.2.3)
75
- actionmailer (= 4.2.3)
76
- actionpack (= 4.2.3)
77
- actionview (= 4.2.3)
78
- activejob (= 4.2.3)
79
- activemodel (= 4.2.3)
80
- activerecord (= 4.2.3)
81
- activesupport (= 4.2.3)
81
+ rails (4.2.4)
82
+ actionmailer (= 4.2.4)
83
+ actionpack (= 4.2.4)
84
+ actionview (= 4.2.4)
85
+ activejob (= 4.2.4)
86
+ activemodel (= 4.2.4)
87
+ activerecord (= 4.2.4)
88
+ activesupport (= 4.2.4)
82
89
  bundler (>= 1.3.0, < 2.0)
83
- railties (= 4.2.3)
90
+ railties (= 4.2.4)
84
91
  sprockets-rails
85
92
  rails-deprecated_sanitizer (1.0.3)
86
93
  activesupport (>= 4.2.0.alpha)
@@ -90,13 +97,15 @@ GEM
90
97
  rails-deprecated_sanitizer (>= 1.0.1)
91
98
  rails-html-sanitizer (1.0.3)
92
99
  loofah (~> 2.0)
93
- railties (4.2.3)
94
- actionpack (= 4.2.3)
95
- activesupport (= 4.2.3)
100
+ railties (4.2.4)
101
+ actionpack (= 4.2.4)
102
+ activesupport (= 4.2.4)
96
103
  rake (>= 0.8.7)
97
104
  thor (>= 0.18.1, < 2.0)
98
105
  rake (10.5.0)
99
106
  slop (3.6.0)
107
+ spoon (0.0.4)
108
+ ffi
100
109
  sprockets (3.5.2)
101
110
  concurrent-ruby (~> 1.0)
102
111
  rack (> 1, < 3)
@@ -117,7 +126,7 @@ PLATFORMS
117
126
  DEPENDENCIES
118
127
  ghost_in_the_post!
119
128
  pry
120
- rails (= 4.2.3)
129
+ rails (= 4.2.4)
121
130
 
122
131
  BUNDLED WITH
123
132
  1.10.6
@@ -1 +1,4 @@
1
- (function(){document.getElementById('test').innerHTML='complete';})()
1
+ (function(){
2
+ var el = document.getElementById('test');
3
+ el.innerHTML='complete';
4
+ })()
@@ -5,7 +5,6 @@ class AutoMailer < ActionMailer::Base
5
5
 
6
6
  def normal_email
7
7
  set_ghost_timeout 5000
8
- include_script "test"
9
8
  mail(to: 'example@example.org', subject: "Notification for you") do |format|
10
9
  format.html { render :normal_email }
11
10
  format.text { render :normal_email }
@@ -1,13 +1,12 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <script>
5
- //to be removed
6
- </script>
4
+ <%= javascript_include_tag "application" %>
7
5
  </head>
8
6
  <body>
9
7
  <span><%= "This makes sure it is preprocessed" %></span>
10
8
  <div id="test"></div>
9
+ <script> //to be removed </script>
11
10
  </body>
12
11
  </html>
13
12
 
@@ -1,5 +1,5 @@
1
1
  GhostInThePost.config = {
2
2
  phantomjs_path: "/usr/local/bin/phantomjs",
3
- includes: "application.js"
3
+ debug: true
4
4
  }
5
5
 
@@ -358,3 +358,139 @@ AutoMailer#normal_email: processed outbound mail in 13.5ms
358
358
  Rendered auto_mailer/normal_email.text (0.1ms)
359
359
 
360
360
  AutoMailer#normal_email: processed outbound mail in 14.9ms
361
+ Rendered auto_mailer/normal_email.html.erb (2.7ms)
362
+ Rendered auto_mailer/normal_email.text (0.5ms)
363
+
364
+ AutoMailer#normal_email: processed outbound mail in 230.0ms
365
+ Rendered auto_mailer/normal_email.html.erb (2.0ms)
366
+ Rendered auto_mailer/normal_email.text (0.5ms)
367
+
368
+ AutoMailer#normal_email: processed outbound mail in 236.0ms
369
+ Rendered auto_mailer/normal_email.html.erb (2.1ms)
370
+ Rendered auto_mailer/normal_email.text (0.5ms)
371
+
372
+ AutoMailer#normal_email: processed outbound mail in 238.2ms
373
+ Rendered auto_mailer/normal_email.html.erb (1.9ms)
374
+ Rendered auto_mailer/normal_email.text (0.4ms)
375
+
376
+ AutoMailer#normal_email: processed outbound mail in 232.7ms
377
+ Rendered auto_mailer/normal_email.html.erb (0.4ms)
378
+ Rendered auto_mailer/normal_email.text (0.0ms)
379
+
380
+ AutoMailer#normal_email: processed outbound mail in 13.7ms
381
+ Rendered auto_mailer/normal_email.html.erb (0.1ms)
382
+ Rendered auto_mailer/normal_email.text (0.0ms)
383
+
384
+ AutoMailer#normal_email: processed outbound mail in 13.7ms
385
+ Rendered auto_mailer/normal_email.html.erb (0.1ms)
386
+ Rendered auto_mailer/normal_email.text (0.3ms)
387
+
388
+ AutoMailer#normal_email: processed outbound mail in 11.3ms
389
+ Rendered auto_mailer/normal_email.html.erb (1.9ms)
390
+ Rendered auto_mailer/normal_email.text (0.3ms)
391
+
392
+ AutoMailer#normal_email: processed outbound mail in 225.6ms
393
+ Rendered auto_mailer/normal_email.html.erb (1.8ms)
394
+ Rendered auto_mailer/normal_email.text (0.4ms)
395
+
396
+ AutoMailer#normal_email: processed outbound mail in 223.3ms
397
+ Rendered auto_mailer/normal_email.html.erb (223.9ms)
398
+ Rendered auto_mailer/normal_email.text (0.4ms)
399
+
400
+ AutoMailer#normal_email: processed outbound mail in 508.1ms
401
+ Rendered auto_mailer/normal_email.html.erb (0.8ms)
402
+ Rendered auto_mailer/normal_email.text (0.0ms)
403
+
404
+ AutoMailer#normal_email: processed outbound mail in 10.1ms
405
+ Rendered auto_mailer/normal_email.html.erb (0.7ms)
406
+ Rendered auto_mailer/normal_email.text (0.1ms)
407
+
408
+ AutoMailer#normal_email: processed outbound mail in 13.4ms
409
+ Rendered auto_mailer/normal_email.html.erb (0.8ms)
410
+ Rendered auto_mailer/normal_email.text (0.0ms)
411
+
412
+ AutoMailer#normal_email: processed outbound mail in 10.0ms
413
+ Rendered auto_mailer/normal_email.html.erb (227.3ms)
414
+ Rendered auto_mailer/normal_email.text (0.3ms)
415
+
416
+ AutoMailer#normal_email: processed outbound mail in 532.7ms
417
+ Rendered auto_mailer/normal_email.html.erb (233.3ms)
418
+ Rendered auto_mailer/normal_email.text (0.4ms)
419
+
420
+ AutoMailer#normal_email: processed outbound mail in 509.7ms
421
+ Rendered auto_mailer/normal_email.html.erb (213.6ms)
422
+ Rendered auto_mailer/normal_email.text (0.4ms)
423
+
424
+ AutoMailer#normal_email: processed outbound mail in 551.6ms
425
+ Rendered auto_mailer/normal_email.html.erb (207.8ms)
426
+ Rendered auto_mailer/normal_email.text (0.5ms)
427
+
428
+ AutoMailer#normal_email: processed outbound mail in 518.4ms
429
+ Rendered auto_mailer/normal_email.html.erb (0.8ms)
430
+ Rendered auto_mailer/normal_email.text (0.1ms)
431
+
432
+ AutoMailer#normal_email: processed outbound mail in 13.3ms
433
+ Rendered auto_mailer/normal_email.html.erb (207.6ms)
434
+ Rendered auto_mailer/normal_email.text (0.4ms)
435
+
436
+ AutoMailer#normal_email: processed outbound mail in 502.0ms
437
+ Rendered auto_mailer/normal_email.html.erb (200.1ms)
438
+ Rendered auto_mailer/normal_email.text (0.4ms)
439
+
440
+ AutoMailer#normal_email: processed outbound mail in 483.3ms
441
+ Rendered auto_mailer/normal_email.html.erb (215.3ms)
442
+ Rendered auto_mailer/normal_email.text (0.5ms)
443
+
444
+ AutoMailer#normal_email: processed outbound mail in 483.7ms
445
+ Rendered auto_mailer/normal_email.html.erb (1.1ms)
446
+ Rendered auto_mailer/normal_email.text (0.1ms)
447
+
448
+ AutoMailer#normal_email: processed outbound mail in 13.6ms
449
+ Rendered auto_mailer/normal_email.html.erb (202.1ms)
450
+ Rendered auto_mailer/normal_email.text (0.3ms)
451
+
452
+ AutoMailer#normal_email: processed outbound mail in 472.0ms
453
+ Rendered auto_mailer/normal_email.html.erb (218.9ms)
454
+ Rendered auto_mailer/normal_email.text (0.4ms)
455
+
456
+ AutoMailer#normal_email: processed outbound mail in 488.1ms
457
+ Rendered auto_mailer/normal_email.html.erb (243.7ms)
458
+ Rendered auto_mailer/normal_email.text (0.4ms)
459
+
460
+ AutoMailer#normal_email: processed outbound mail in 557.8ms
461
+ Rendered auto_mailer/normal_email.html.erb (5.5ms)
462
+ Rendered auto_mailer/normal_email.text (0.1ms)
463
+
464
+ AutoMailer#normal_email: processed outbound mail in 17.8ms
465
+ Rendered auto_mailer/normal_email.html.erb (296.4ms)
466
+ Rendered auto_mailer/normal_email.text (0.4ms)
467
+
468
+ AutoMailer#normal_email: processed outbound mail in 636.3ms
469
+ Rendered auto_mailer/normal_email.html.erb (236.0ms)
470
+ Rendered auto_mailer/normal_email.text (0.4ms)
471
+
472
+ AutoMailer#normal_email: processed outbound mail in 516.8ms
473
+ Rendered auto_mailer/normal_email.html.erb (204.1ms)
474
+ Rendered auto_mailer/normal_email.text (0.5ms)
475
+
476
+ AutoMailer#normal_email: processed outbound mail in 468.0ms
477
+ Rendered auto_mailer/normal_email.html.erb (207.7ms)
478
+ Rendered auto_mailer/normal_email.text (0.3ms)
479
+
480
+ AutoMailer#normal_email: processed outbound mail in 506.0ms
481
+ Rendered auto_mailer/normal_email.html.erb (206.2ms)
482
+ Rendered auto_mailer/normal_email.text (0.3ms)
483
+
484
+ AutoMailer#normal_email: processed outbound mail in 457.0ms
485
+ Rendered auto_mailer/normal_email.html.erb (205.6ms)
486
+ Rendered auto_mailer/normal_email.text (0.3ms)
487
+
488
+ AutoMailer#normal_email: processed outbound mail in 454.9ms
489
+ Rendered auto_mailer/normal_email.html.erb (228.0ms)
490
+ Rendered auto_mailer/normal_email.text (0.3ms)
491
+
492
+ AutoMailer#normal_email: processed outbound mail in 545.1ms
493
+ Rendered auto_mailer/normal_email.html.erb (220.5ms)
494
+ Rendered auto_mailer/normal_email.text (0.3ms)
495
+
496
+ AutoMailer#normal_email: processed outbound mail in 542.3ms
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/test.js?type=application/javascript&pipeline=self&id=00a7ad8f25580c7c162696b16ed8df1e6590663fab3e44c6faca84ce05936121:ET
@@ -0,0 +1 @@
1
+ I"~app/assets/javascripts/test.js?type=application/javascript&id=b01bd31c3010de05bd05fd89712251020e09b3fee05a074143c1bb18d75f95b8:ET
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&id=22e6e8aae8435246a3382f4437575c60a353527db086760b608b593211c2103a:ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"1file-digest://app/assets/javascripts/test.js;TT
@@ -0,0 +1,3 @@
1
+ [o:Set:
2
+ @hash{
3
+ I"environment-version:ETTI"environment-paths;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"1file-digest://app/assets/javascripts/test.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=7a2295d6b6cb7c3844378b9f0b1d2e1b0ffb99fa410564c6dd64335363529ef4:ET
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=debug&id=c5079abe5689db2ecf07acb46a0e5f2d5c8c39d648056972e3979914ab70e36f:ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"[processors:type=application/javascript&file_type=application/javascript&pipeline=debug;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"1file-digest://app/assets/javascripts/test.js;TTI")file-digest://app/assets/javascripts;TT
@@ -0,0 +1,62 @@
1
+ require "spec_helper"
2
+
3
+ module GhostInThePost
4
+
5
+ describe JsInline do
6
+ let(:html){"<html><head><script></script></head><body><div id='test'></div></body></html>"}
7
+ let(:html_without_script){"<html><head></head><body><div id='test'></div></body></html>"}
8
+ let(:js){"(function(){document.getElementById('test').innerHTML='complete';})()"}
9
+ let(:html_with_js){"<html><head><script></script></head><body><div id='test'></div><script>#{js}</script></body></html>"}
10
+ let(:included_scripts){["application.js"]}
11
+ subject {JsInline.new(html, included_scripts)}
12
+
13
+ describe "#initialize" do
14
+ it "should assign html" do
15
+ expect(Nokogiri::HTML).to receive(:parse)
16
+ JsInline.new(html, included_scripts)
17
+ end
18
+ it "should set included_scripts" do
19
+ ji = JsInline.new(html, included_scripts)
20
+ expect(ji.instance_variable_get(:@included_scripts)).to eq(included_scripts)
21
+ end
22
+ it "should default included_scripts to an array" do
23
+ ji = JsInline.new(html)
24
+ expect(ji.instance_variable_get(:@included_scripts)).to eq([])
25
+ end
26
+ end
27
+
28
+ describe "#inline" do
29
+ before :each do
30
+ allow(subject).to receive(:find_asset_in_pipeline).with("application.js").and_return(js)
31
+ end
32
+
33
+ it "should inline js" do
34
+ subject.inline
35
+ expect(subject.html).to include(js)
36
+ end
37
+ end
38
+
39
+ describe "#remove_all_script" do
40
+ it "should remove all js" do
41
+ subject.remove_all_script
42
+ expect(subject.html).not_to include("<script")
43
+ end
44
+ end
45
+
46
+ describe "#html=" do
47
+ it "should parse the html" do
48
+ subject.html #initialize first so that it only receives once
49
+ expect(Nokogiri::HTML).to receive(:parse)
50
+ subject.html = ""
51
+ end
52
+ end
53
+
54
+ describe "#html" do
55
+ it "should return a string" do
56
+ expect(subject.html).to be_a(String)
57
+ end
58
+ end
59
+
60
+ end
61
+
62
+ end
@@ -13,9 +13,10 @@ module GhostInThePost
13
13
  end
14
14
 
15
15
  describe "#initialize" do
16
- it "should set html" do
17
- pt = PhantomTransform.new(html, nil, nil, included_scripts)
18
- expect(pt.instance_variable_get(:@html)).to eq(html)
16
+ it "should create a new JSInline" do
17
+ expect(JsInline).to receive(:new).with(html, included_scripts).and_call_original
18
+ t = PhantomTransform.new(html, nil, nil,included_scripts)
19
+ expect(t.instance_variable_get(:@inliner)).to be_a(JsInline)
19
20
  end
20
21
  it "should set the timeout" do
21
22
  pt = PhantomTransform.new(html, 45, nil, included_scripts)
@@ -33,84 +34,36 @@ module GhostInThePost
33
34
  pt = PhantomTransform.new(html, nil, nil, included_scripts)
34
35
  expect(pt.instance_variable_get(:@wait_event)).to eq(GhostInThePost.wait_event)
35
36
  end
36
- it "should set included_scripts" do
37
- pt = PhantomTransform.new(html, nil, nil, included_scripts)
38
- expect(pt.instance_variable_get(:@included_scripts)).to eq(included_scripts)
39
- end
40
- it "should default included_scripts to an array" do
41
- pt = PhantomTransform.new(html, nil, nil, nil)
42
- expect(pt.instance_variable_get(:@included_scripts)).to eq([])
43
- end
44
37
  end
45
38
 
46
39
  describe "#transform" do
47
- let(:html_path) {"/this/is/htmlpath"}
48
- let(:js_path) {"/this/is/js_path"}
49
-
50
40
  before :each do
51
- allow(IO).to receive(:popen)
52
- allow(Rails.application).to receive(:assets){{"application.js": js}}
53
- end
54
-
55
- it "should create a temp file for the html" do
56
- file = Object.new
57
- expect(subject).to receive(:html_file){file}
58
- allow(file).to receive(:path){html_path}
59
- expect(file).to receive(:unlink)
60
- subject.transform
61
- end
62
-
63
- it "should create a temp file for the js" do
64
- file = Object.new
65
- expect(subject).to receive(:js_file){file}
66
- allow(file).to receive(:path){js_path}
67
- expect(file).to receive(:unlink)
68
- subject.transform
41
+ @inliner = JsInline.new(html)
42
+ allow(@inliner).to receive(:inline)
43
+ allow(JsInline).to receive(:new){@inliner}
69
44
  end
70
45
 
71
46
  it "should call IO.popen with arguments" do
72
- html_file = Object.new
73
- expect(subject).to receive(:html_file){html_file}
74
- allow(html_file).to receive(:path){html_path}
75
- allow(html_file).to receive(:unlink)
76
-
77
- js_file = Object.new
78
- expect(subject).to receive(:js_file){js_file}
79
- allow(js_file).to receive(:path){js_path}
80
- allow(js_file).to receive(:unlink)
81
-
82
47
  expect(IO).to receive(:popen).with([
83
48
  GhostInThePost.phantomjs_path,
84
49
  GhostInThePost::PhantomTransform::PHANTOMJS_SCRIPT,
85
- html_path,
86
- GhostInThePost.remove_js_tags.to_s,
87
- js_path,
50
+ @inliner.html,
88
51
  "1000",
89
52
  "ghost_in_the_post:done",
90
- ])
91
-
53
+ ]).and_return html
92
54
  subject.transform
93
55
  end
94
56
 
95
- it "should return the result of IO.popen with arguments" do
96
- allow(IO).to receive(:popen) {"this is the end"}
97
- expect(subject.transform).to eq("this is the end")
57
+ it "should check if there is an error from phantom" do
58
+ allow(IO).to receive(:popen).and_return PhantomTransform::ERROR_TAG
59
+ expect{subject.transform}.to raise_error GhostJSError
98
60
  end
99
61
 
100
- it "should unlink file even if there was an error" do
101
- html_file = Object.new
102
- expect(subject).to receive(:html_file){html_file}
103
- allow(html_file).to receive(:path){html_path}
104
- expect(html_file).to receive(:unlink)
105
-
106
- js_file = Object.new
107
- expect(subject).to receive(:js_file){js_file}
108
- allow(js_file).to receive(:path){js_path}
109
- expect(js_file).to receive(:unlink)
110
-
111
- allow(IO).to receive(:popen) {raise ArgumentError}
112
-
113
- expect{subject.transform}.to raise_error ArgumentError
62
+ it "should remove script tags if config set" do
63
+ GhostInThePost.config = {phantomjs_path: "this/is/path", remove_js_tags: true}
64
+ allow(IO).to receive(:popen).and_return ""
65
+ expect(@inliner).to receive(:remove_all_script)
66
+ subject.transform
114
67
  end
115
68
 
116
69
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghost_in_the_post
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Anema
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.2.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: nokogiri
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +94,7 @@ files:
80
94
  - lib/ghost_in_the_post/automatic.rb
81
95
  - lib/ghost_in_the_post/ghost_on_command.rb
82
96
  - lib/ghost_in_the_post/ghost_on_delivery.rb
97
+ - lib/ghost_in_the_post/js_inline.rb
83
98
  - lib/ghost_in_the_post/mail_ghost.rb
84
99
  - lib/ghost_in_the_post/mailer.rb
85
100
  - lib/ghost_in_the_post/phantom/staticize.js
@@ -117,29 +132,39 @@ files:
117
132
  - spec/dummy/config/secrets.yml
118
133
  - spec/dummy/log/development.log
119
134
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/-4Tacd2aNU9g47XY4TSmQEnf1ef5LjeSZqNrE3qS-4I.cache
135
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/-k4_XP2RpcjsXdbEn6qBsAPpql3gQiE93Y8QOMuVfs0.cache
120
136
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/1hVihiFdBkDBsuCvA1I2vuFa9N6p-5zQ-qKvf4vz7jA.cache
121
137
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/23mzeUAO-pIzGJ1n84Dbg25udWeSiBcd6e_QsDihWQc.cache
122
138
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/2ONadWXZXepGMP-_rM4RSH-lrRkYGc5TIH-U0uN8lG0.cache
123
139
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/2it6AcrJYWU_rid4KTQQbQUlk6yrL99umLdDkl-bjhs.cache
124
140
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/438pUuXODQhzKPoJXcOlag9NCWp0HKhWhda1SqP2un0.cache
141
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/48z_eOfEjcUZbqRkitvPcQWh7Hn-hgxue7ekRBojr9g.cache
125
142
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/4PgfVpd4CZQ0vAsVTl2KDb1z4f6GLl4mXIc3jSrahHM.cache
126
143
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/4rPkFN0RbHFjbJe16_XepVFLtiWqn50qNpKLhKryqpE.cache
127
144
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/6544SZAu2zCeDrdro4h3izdKNXVvHzstwz12UxeiJoA.cache
128
145
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/6wWiAXBcdY6PLKOIhXQ6c8h9UtViuvdLcEO6wXK3mh0.cache
146
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/86v25E0xnwy001YHLw8LduVEdijax96aorQrr3yJGJI.cache
147
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/8qvOy3VZFmkwGRCIuLzhSIYOcVtu6GpZIn6bPPcZWi8.cache
129
148
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/AQYzgZ6xktowc8IFU5QCD16twvaTpVL3fTm5GAcMIcQ.cache
130
149
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/BMI0IB92xLhvUPcr_K0JuSk8zczmrEEbJCd3qwHauhQ.cache
131
150
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/CLll3B8DlG_2J0DLaC2sufKgEn_AmpxRV3x68HKgzOo.cache
151
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/E9yiq0UWmLGIt128qFot0ShF2tKgQYbUVL1KyYdGlp4.cache
132
152
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/Egcuj59mzXoDA4ZZ-fxt2CnFiU3NSBaSmw4Zyrtv5gE.cache
153
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Ek5gIbxd0Jy0_2XTxSft3tXuZ_-qEvr3I-AcVimfTNI.cache
133
154
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/EnUqN5N9ByzTXeKLQFjWdnXsXrkrw-FEQ1GxfS9eacg.cache
155
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/FDIcBN4OBSwV2FMgpvgdfhAZC-ycsr1PkaDrhR0YKXg.cache
134
156
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/FV_wDshDLBMnnkMa1Hc-Oel63UD1ZrLXpKxyXh4Girw.cache
157
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Fbiaq-Rp0eB0J2fCwImvqWSXj8Am1O_hHZvRxgWSj58.cache
135
158
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/GtqgDsC0JMsKfj0x5uQrbPcSS3QIPIzLKrq2fGJDBf0.cache
136
159
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/IFLV6zTaBXU1ccodbD3QJ4xUIOEix_Fbb7j8wsxrHw8.cache
137
160
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/J_D4gpddr1KPVysTvEE48iHsNzrL5Pbj8S5ZNt3PhA4.cache
138
161
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/Lc8lcXR-AibSZCIbx_imdfIOmD-zbZ_pwSNMs0o0Dos.cache
139
162
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/LvFfmsQjA0Dz1yL2mkUst9LnQQt2IGRaQrP_tLihwTg.cache
163
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Mp7UGnWnNp4rKy5hCYvl9BsVHhctx-av-AYy7Wyz7CI.cache
140
164
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/O9gjtBITAGlfzUwc2DT5N0GW2bo2b2yQ64gnQljLogM.cache
141
165
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/OQXwnC5z5STtd87Tr2dz1QBt4iZ8PoZTH8KBtBlUGnE.cache
142
166
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/OZ04c215C4Euu3scfhmxmte0o_tZOVWTqrv61cpy7H4.cache
167
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Oe5LRDH7di4WOiG-W-7zoXnP0Bv3hXzjKzRNdKBtCQI.cache
143
168
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/Q5jtbm8IDgytmUYx2yDM4wdqpIeUGokl32mrR0IXY7c.cache
144
169
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/T6IHjr1ecpmAaDU3ySLmeMaE5eP5QzVH1aTlw8V8554.cache
145
170
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/UbKcvOd2xh3MJoKxz4l4RHMy5IupdsiDoSllZDvYCZA.cache
@@ -155,12 +180,14 @@ files:
155
180
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/eN_ueL7m-D9xkEZpaLKwCxdrNzyz-MW9jcdJ5TdF9j8.cache
156
181
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/efKfhZKxLC7ERXlMb5CQMqYwbvWS-A--pH-0fqzvRiQ.cache
157
182
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/fQswKiWgHSxfd0vnhvPwkwh9wGIZTBu3yR03l3nv7CM.cache
183
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/gZp3uXMHuYQC4hzCr7bQfetKNdJAtbQmg3so2KpW1Dw.cache
158
184
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/gl6ySpQTPCReJGYFItlmokrpEOrxwM9EOrFmURA8laE.cache
159
185
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/goEv0RKoifagsjFSdEHY-23E9ybQn_t1HHEZq7PlKQI.cache
160
186
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/hZi1k6tpxxCGYxRe7zY74ItcOI8gZrREOpGuA8JSpGg.cache
161
187
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/lCVulsymaTRS2RTmXVBUqqENMSabeQbzngmYUHwM_5g.cache
162
188
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/n6_6RjvPX2rCv5dytbSnnDrGwAj1ZcPfninuNUeP_iE.cache
163
189
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/nCFQkSTtaw5Q2AGRmtIx6zI2cXXF9smOvNj4DA5S10Y.cache
190
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/nFA3G3IroEqp51ggoqBK44-rTfddnvGQGGkyP8nV_LA.cache
164
191
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/nPGy8yVxI1gvjhfwIRgcG5l2NLeLbWagQjt1eoJvwWE.cache
165
192
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/nXo-w2o4zQBM_uSUnniuP53t5erBbSZPecMED9YnzQI.cache
166
193
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/neKnx0KmAGPHELnZcml6jS-4_cwZbB1Oge9c5t2l0gY.cache
@@ -169,7 +196,10 @@ files:
169
196
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/orojWnvYjvANZxZ9nlW90sFI9a8FVmGhXIH-yrTJosw.cache
170
197
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/pEhaat2KBd5SrT7szC_8R1_6hK17FTpvoRFkmCRSD3M.cache
171
198
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/qxbw0jMkxTNeM5T2QovOD9vTyvjHVjBN5tZdwBf519A.cache
199
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/s1fl9hrCR2SoMMkQWHyodwUJwS1iP6oNdK1WU-3I-QA.cache
172
200
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/sQHPafPr1hZ7n-WhjqwFB8eUR8I1YOa1yeg0-yNdc0U.cache
201
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/w6JX5zWN8vK4afiR4ib5M9nD0_1jiLPfUiWYu5k7pVQ.cache
202
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/xEPwyXpA7w7L0dn1hl5TQXVeRaJmX7MX6yxu4kMCfvU.cache
173
203
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/xstXMnjOlL2Ynn6MaI9bxlRnhTPYdgCIeOWnWphFSlA.cache
174
204
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/y98HqYF9nxOk8t_j3BKv9Nc4LuSAEzhER7rCCvOM6xI.cache
175
205
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/yM0pBAbKKoakCqPlRmnIV65cxsg6TKDBsQwFISw76vE.cache
@@ -177,6 +207,7 @@ files:
177
207
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/zUYxDxkUr_FKBi6fF7kellqyG52AoZbYItHMUq17DJo.cache
178
208
  - spec/lib/ghost_in_the_post/automatic_spec.rb
179
209
  - spec/lib/ghost_in_the_post/ghost_on_command_spec.rb
210
+ - spec/lib/ghost_in_the_post/js_inline_spec.rb
180
211
  - spec/lib/ghost_in_the_post/mail_ghost_spec.rb
181
212
  - spec/lib/ghost_in_the_post/mailer_spec.rb
182
213
  - spec/lib/ghost_in_the_post/phantom_transform_spec.rb
@@ -241,15 +272,19 @@ test_files:
241
272
  - spec/dummy/Gemfile.lock
242
273
  - spec/dummy/log/development.log
243
274
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/-4Tacd2aNU9g47XY4TSmQEnf1ef5LjeSZqNrE3qS-4I.cache
275
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/-k4_XP2RpcjsXdbEn6qBsAPpql3gQiE93Y8QOMuVfs0.cache
244
276
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/1hVihiFdBkDBsuCvA1I2vuFa9N6p-5zQ-qKvf4vz7jA.cache
245
277
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/23mzeUAO-pIzGJ1n84Dbg25udWeSiBcd6e_QsDihWQc.cache
246
278
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/2it6AcrJYWU_rid4KTQQbQUlk6yrL99umLdDkl-bjhs.cache
247
279
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/2ONadWXZXepGMP-_rM4RSH-lrRkYGc5TIH-U0uN8lG0.cache
248
280
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/438pUuXODQhzKPoJXcOlag9NCWp0HKhWhda1SqP2un0.cache
281
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/48z_eOfEjcUZbqRkitvPcQWh7Hn-hgxue7ekRBojr9g.cache
249
282
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/4PgfVpd4CZQ0vAsVTl2KDb1z4f6GLl4mXIc3jSrahHM.cache
250
283
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/4rPkFN0RbHFjbJe16_XepVFLtiWqn50qNpKLhKryqpE.cache
251
284
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/6544SZAu2zCeDrdro4h3izdKNXVvHzstwz12UxeiJoA.cache
252
285
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/6wWiAXBcdY6PLKOIhXQ6c8h9UtViuvdLcEO6wXK3mh0.cache
286
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/86v25E0xnwy001YHLw8LduVEdijax96aorQrr3yJGJI.cache
287
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/8qvOy3VZFmkwGRCIuLzhSIYOcVtu6GpZIn6bPPcZWi8.cache
253
288
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/_Bn81xMZj4dS_W5s9uSDhtEdpRZtsc21rcKEYAPCsZY.cache
254
289
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/_Cw52w24AWZEbxLmduyWBMA6Y1OmJiEm1VNn7pY4rtk.cache
255
290
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/_HO5Nyj_TzTxVwa4OOf_0UJfBCmjgkv7NsRU29AD5Oo.cache
@@ -259,28 +294,36 @@ test_files:
259
294
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/CLll3B8DlG_2J0DLaC2sufKgEn_AmpxRV3x68HKgzOo.cache
260
295
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/cQ32JvqbsXa5gTruc7Rx0g8qjxG4LhyIzg-UaJ5NXZE.cache
261
296
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/d6QhPuZpbU0tjmizSeRHUfEsKpw9jU6xBMTiPjrLTU4.cache
297
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/E9yiq0UWmLGIt128qFot0ShF2tKgQYbUVL1KyYdGlp4.cache
262
298
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/efKfhZKxLC7ERXlMb5CQMqYwbvWS-A--pH-0fqzvRiQ.cache
263
299
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/Egcuj59mzXoDA4ZZ-fxt2CnFiU3NSBaSmw4Zyrtv5gE.cache
300
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Ek5gIbxd0Jy0_2XTxSft3tXuZ_-qEvr3I-AcVimfTNI.cache
264
301
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/eN_ueL7m-D9xkEZpaLKwCxdrNzyz-MW9jcdJ5TdF9j8.cache
265
302
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/EnUqN5N9ByzTXeKLQFjWdnXsXrkrw-FEQ1GxfS9eacg.cache
303
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Fbiaq-Rp0eB0J2fCwImvqWSXj8Am1O_hHZvRxgWSj58.cache
304
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/FDIcBN4OBSwV2FMgpvgdfhAZC-ycsr1PkaDrhR0YKXg.cache
266
305
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/fQswKiWgHSxfd0vnhvPwkwh9wGIZTBu3yR03l3nv7CM.cache
267
306
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/FV_wDshDLBMnnkMa1Hc-Oel63UD1ZrLXpKxyXh4Girw.cache
268
307
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/gl6ySpQTPCReJGYFItlmokrpEOrxwM9EOrFmURA8laE.cache
269
308
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/goEv0RKoifagsjFSdEHY-23E9ybQn_t1HHEZq7PlKQI.cache
270
309
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/GtqgDsC0JMsKfj0x5uQrbPcSS3QIPIzLKrq2fGJDBf0.cache
310
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/gZp3uXMHuYQC4hzCr7bQfetKNdJAtbQmg3so2KpW1Dw.cache
271
311
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/hZi1k6tpxxCGYxRe7zY74ItcOI8gZrREOpGuA8JSpGg.cache
272
312
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/IFLV6zTaBXU1ccodbD3QJ4xUIOEix_Fbb7j8wsxrHw8.cache
273
313
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/J_D4gpddr1KPVysTvEE48iHsNzrL5Pbj8S5ZNt3PhA4.cache
274
314
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/Lc8lcXR-AibSZCIbx_imdfIOmD-zbZ_pwSNMs0o0Dos.cache
275
315
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/lCVulsymaTRS2RTmXVBUqqENMSabeQbzngmYUHwM_5g.cache
276
316
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/LvFfmsQjA0Dz1yL2mkUst9LnQQt2IGRaQrP_tLihwTg.cache
317
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Mp7UGnWnNp4rKy5hCYvl9BsVHhctx-av-AYy7Wyz7CI.cache
277
318
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/n6_6RjvPX2rCv5dytbSnnDrGwAj1ZcPfninuNUeP_iE.cache
278
319
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/nCFQkSTtaw5Q2AGRmtIx6zI2cXXF9smOvNj4DA5S10Y.cache
279
320
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/neKnx0KmAGPHELnZcml6jS-4_cwZbB1Oge9c5t2l0gY.cache
321
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/nFA3G3IroEqp51ggoqBK44-rTfddnvGQGGkyP8nV_LA.cache
280
322
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/nPGy8yVxI1gvjhfwIRgcG5l2NLeLbWagQjt1eoJvwWE.cache
281
323
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/nXo-w2o4zQBM_uSUnniuP53t5erBbSZPecMED9YnzQI.cache
282
324
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/O9gjtBITAGlfzUwc2DT5N0GW2bo2b2yQ64gnQljLogM.cache
283
325
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/oB1njyQ78MOMRf_5TvuYzHleeI8eke5-FDIIVl7qas0.cache
326
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Oe5LRDH7di4WOiG-W-7zoXnP0Bv3hXzjKzRNdKBtCQI.cache
284
327
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/OQXwnC5z5STtd87Tr2dz1QBt4iZ8PoZTH8KBtBlUGnE.cache
285
328
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/orojWnvYjvANZxZ9nlW90sFI9a8FVmGhXIH-yrTJosw.cache
286
329
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/oRXvRqCp4o8l0MHPA7zkQLIyfyF3HD_VflN6a6aA3z0.cache
@@ -288,10 +331,13 @@ test_files:
288
331
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/pEhaat2KBd5SrT7szC_8R1_6hK17FTpvoRFkmCRSD3M.cache
289
332
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/Q5jtbm8IDgytmUYx2yDM4wdqpIeUGokl32mrR0IXY7c.cache
290
333
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/qxbw0jMkxTNeM5T2QovOD9vTyvjHVjBN5tZdwBf519A.cache
334
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/s1fl9hrCR2SoMMkQWHyodwUJwS1iP6oNdK1WU-3I-QA.cache
291
335
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/sQHPafPr1hZ7n-WhjqwFB8eUR8I1YOa1yeg0-yNdc0U.cache
292
336
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/T6IHjr1ecpmAaDU3ySLmeMaE5eP5QzVH1aTlw8V8554.cache
293
337
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/UbKcvOd2xh3MJoKxz4l4RHMy5IupdsiDoSllZDvYCZA.cache
338
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/w6JX5zWN8vK4afiR4ib5M9nD0_1jiLPfUiWYu5k7pVQ.cache
294
339
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/Wctefa7yQiJX5Ix7KeFOwwDLhKpdX3SmLGZlKSFgrC4.cache
340
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/xEPwyXpA7w7L0dn1hl5TQXVeRaJmX7MX6yxu4kMCfvU.cache
295
341
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/xstXMnjOlL2Ynn6MaI9bxlRnhTPYdgCIeOWnWphFSlA.cache
296
342
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/XuOqk2dVOcltjkihZ8J_u5Pbcm9Of5KFkjyihP6-5tc.cache
297
343
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/y98HqYF9nxOk8t_j3BKv9Nc4LuSAEzhER7rCCvOM6xI.cache
@@ -301,6 +347,7 @@ test_files:
301
347
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/zUYxDxkUr_FKBi6fF7kellqyG52AoZbYItHMUq17DJo.cache
302
348
  - spec/lib/ghost_in_the_post/automatic_spec.rb
303
349
  - spec/lib/ghost_in_the_post/ghost_on_command_spec.rb
350
+ - spec/lib/ghost_in_the_post/js_inline_spec.rb
304
351
  - spec/lib/ghost_in_the_post/mail_ghost_spec.rb
305
352
  - spec/lib/ghost_in_the_post/mailer_spec.rb
306
353
  - spec/lib/ghost_in_the_post/phantom_transform_spec.rb