blinkr 0.3.7 → 0.3.8

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: 54dd678842389391ab5a75a1c3b24fc1498e4c34
4
- data.tar.gz: c69c3d35db9d2198ded5eeea890bac39151d4eec
3
+ metadata.gz: 66a212fd08a0e0112b033c4ba696dc8ff0c77be6
4
+ data.tar.gz: 23301db2cd611dcd4c075972ac94dbfebb4228be
5
5
  SHA512:
6
- metadata.gz: 60ec55073e024c042f2bb2981b779d915edffe746460f8e3715f7ff664e187f41a1924b2f2e79b49e95a4758ce32f4420027d208945356413e7975628fa5a03f
7
- data.tar.gz: 42df2a58c03eaa041bfd887c13fb7271166b67c0311c52bfb74988a8ccb6a6d92ab6ccb7512334f7b0d3ef4a819652d8a1972e18143d0bc209c6ca55002d696b
6
+ metadata.gz: 881c1f04dfddd69802a19e91b15aa6e5048731123578f65716c4517bed2106e327f59078e6b0ed2336204928cc1f2334dac331e549e4bb15d4b14142a18fbfcb
7
+ data.tar.gz: db66a8ec76a20da8df107c5602edc8b4e344f9a0754de35705236ce14be5d74135dde482c3054769e7cf02a2bf376f844299a2d9f27b956b0cd7da651a7ea37d
@@ -1,6 +1,7 @@
1
1
  require 'nokogiri'
2
2
  require 'blinkr/phantomjs_wrapper'
3
3
  require 'blinkr/typhoeus_wrapper'
4
+ require 'blinkr/slimer_js_wrapper'
4
5
  require 'blinkr/http_utils'
5
6
  require 'blinkr/sitemap'
6
7
  require 'blinkr/report'
@@ -44,6 +45,7 @@ module Blinkr
44
45
  bulk_browser = browser = TyphoeusWrapper.new(@config, context)
45
46
  end
46
47
  browser = PhantomJSWrapper.new(@config, context) if @config.browser == 'phantomjs'
48
+ browser = SlimerJSWrapper.new(@config, context) if @config.browser == 'slimerjs'
47
49
  page_count = 0
48
50
  urls = sitemap_locations.uniq
49
51
  puts "Fetching #{urls.size} pages from sitemap"
@@ -47,7 +47,7 @@ module Blinkr
47
47
  return block.call response, @cache.get("#{url}-resourceErrors"), @cache.get("#{url}-javascriptErrors")
48
48
  end
49
49
 
50
- output, status = Open3.capture2("phantomjs #{SNAP_JS} #{url} #{@config.viewport}")
50
+ output, status = Open3.capture2("#{name} #{SNAP_JS} #{url} #{@config.viewport}")
51
51
  if status == 0
52
52
  json = JSON.load(output)
53
53
  response = Typhoeus::Response.new(:code => 200, :body => json['content'], :effective_url => json['url'],
@@ -0,0 +1,7 @@
1
+ module Blinkr
2
+ class SlimerJSWrapper < PhantomJSWrapper
3
+ def name
4
+ 'slimerjs'
5
+ end
6
+ end
7
+ end
@@ -1,4 +1,4 @@
1
1
  module Blinkr
2
- VERSION='0.3.7'
2
+ VERSION='0.3.8'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blinkr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Muir
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-10 00:00:00.000000000 Z
12
+ date: 2015-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -134,6 +134,7 @@ files:
134
134
  - lib/blinkr/report.html.slim
135
135
  - lib/blinkr/report.rb
136
136
  - lib/blinkr/sitemap.rb
137
+ - lib/blinkr/slimer_js_wrapper.rb
137
138
  - lib/blinkr/snap.js
138
139
  - lib/blinkr/typhoeus_wrapper.rb
139
140
  - lib/blinkr/version.rb