pagespeedhelper 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pagespeedhelper.rb +3 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f086fa7b7dd4362e870d0d3b9c79a4386a2545d7
4
- data.tar.gz: da5b0d8a7454a62586ca87beb011193c3f56576c
3
+ metadata.gz: bbd3038254584858ad8c005e7d870c00c1178239
4
+ data.tar.gz: 1cf6f88ccbb553d1462f4e7fcd7a4769ffd97a28
5
5
  SHA512:
6
- metadata.gz: 46237fe06dffffdc27eaaf8ec60919b38b8920342069b00fec5a8e29b4da35636475e626d5677af083305ecbda8277dcea3adf90664d2ee54472f12d83c5f92b
7
- data.tar.gz: 9af58280fd555a588933fee4741e5e3c72fe4bc77714640f94c2e038084b864fa97ded00a10aea96ac31b6c44f6a71a0830c8d871ae27423bfcef9eb9ce83995
6
+ metadata.gz: b5611bd2b6889becc828ad394879d0650c6773ba90792f59721789b78e3bf8ca08beaf1b92793b970644053a6f3918cfc7f44563ed67654fe642a08b6ed024d1
7
+ data.tar.gz: 746015a85b65865583895a8d2c3b0db30cbe4b86e4002ed417445dc0029ec105d1ed340b240adc3e5beba874808d7f98c0daa3b964085801d7a52ae51b836f8c
@@ -22,7 +22,7 @@ class PagespeedHelper
22
22
  data = Array.new
23
23
 
24
24
  urls = [urls] if !urls.is_a?(Array)
25
- urls = urls.each { |url| add_protocol_if_absent!(url, secure) }
25
+ urls = urls.each { |url| url = add_protocol_if_absent(url, secure) }
26
26
 
27
27
  urls.each_slice(20).to_a.each do |url_list|
28
28
 
@@ -120,9 +120,9 @@ class PagespeedHelper
120
120
  data
121
121
  end
122
122
 
123
- def add_protocol_if_absent!(url, secure=false)
123
+ def add_protocol_if_absent(url, secure=false)
124
124
  if !url.include? "http://" and !url.include? "https://"
125
- secure ? url.replace("https://" + url) : url.replace("http://" + url)
125
+ secure ? "https://" + url : "http://" + url
126
126
  end
127
127
  end
128
128
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagespeedhelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirk Stennett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-03 00:00:00.000000000 Z
11
+ date: 2016-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client