pagespeedhelper 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pagespeedhelper.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09a3e6b69ff9d9c8343caaaaecdd9d132666b83b
|
4
|
+
data.tar.gz: 1e5da3ae049cde19d2820f841ef48f28d2577a88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e552244ec342f8ed7c2e3cb7368743bc2ee750bbf16f1347bedba7adceed1b78c3160a98700dcdc69f98714dac6a01fba7cfa10ddbc4bdff3ae3ac2288d86d7
|
7
|
+
data.tar.gz: 8308c211d07095e20891c1de1829bc2ff47603db0400d3a6166242e2138de401d603abc498ed58f8c61cb5ccd74a3f0d81029b32d6faccc702c32026a6c0d4ac
|
data/lib/pagespeedhelper.rb
CHANGED
@@ -113,8 +113,12 @@ class PagespeedHelper
|
|
113
113
|
|
114
114
|
@psservice.batch do |ps|
|
115
115
|
urls.each do |url|
|
116
|
-
|
117
|
-
|
116
|
+
begin
|
117
|
+
ps.run_pagespeed(url, strategy: strategy) do |result, err|
|
118
|
+
err.nil? ? data.push(result) : data.push({ "url" => url, "error" => err.to_s })
|
119
|
+
end
|
120
|
+
rescue Google::Apis::ServerError => e
|
121
|
+
puts '[PAGESPEEDHELPER]: ' + e
|
118
122
|
end
|
119
123
|
end
|
120
124
|
end
|