pagespeedhelper 0.4.8 → 0.5.0
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 +5 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bd2578f41e15a526e01f90c5125972d5f5c66ef
|
4
|
+
data.tar.gz: faaf54c499fa8c6188e6030e2dacea41f4f0cfba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd1c7de5993418030eb666402bc9b94d5e5f765c7af185e4f3de280493638da5cbf4639fde6dc88e21af16fe162ec55684f1614d8ba59dc962206cc161d22fe4
|
7
|
+
data.tar.gz: 137fbdcd7cb2ebe4121c9914ab8072d97e9ef2aa14d1ced59984cd76814c0a8f521e7b13658eb22942daeab588eda97d9f2abc6426bfd98978d8a0dc78ac9ed0
|
data/lib/pagespeedhelper.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'google/apis/pagespeedonline_v2'
|
2
2
|
require 'google/apis'
|
3
3
|
require 'logger'
|
4
|
+
require 'pry'
|
4
5
|
|
5
6
|
class PagespeedHelper
|
6
7
|
|
@@ -17,7 +18,7 @@ class PagespeedHelper
|
|
17
18
|
end
|
18
19
|
end
|
19
20
|
|
20
|
-
def query(urls, strategy="desktop", secure=false
|
21
|
+
def query(urls, strategy="desktop", secure=false)
|
21
22
|
@wait_time = 1
|
22
23
|
data = Array.new
|
23
24
|
|
@@ -31,14 +32,14 @@ class PagespeedHelper
|
|
31
32
|
results = send_request(url_list, strategy)
|
32
33
|
end while rate_error?(results)
|
33
34
|
|
34
|
-
|
35
|
+
block_given? ? yield(results) : data.concat(results)
|
36
|
+
|
35
37
|
sleep(3)
|
36
38
|
end
|
37
39
|
|
38
|
-
data
|
40
|
+
data if !block_given?
|
39
41
|
end
|
40
42
|
|
41
|
-
|
42
43
|
def self.parse(data)
|
43
44
|
results = Array.new
|
44
45
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pagespeedhelper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirk Stennett
|
@@ -38,8 +38,8 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description: Utilizes Google's Api for ruby to batch query 20 websites
|
42
|
-
and
|
41
|
+
description: Utilizes Google's Api for ruby to batch query 20 websites, accessible
|
42
|
+
immediately, and formattable.
|
43
43
|
email: kirk.stennett@getg5.com
|
44
44
|
executables: []
|
45
45
|
extensions: []
|