ruby_pagespeed_insights 1.0.1 → 1.2.0

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
  SHA256:
3
- metadata.gz: a3da48681214b327943fa772cc587c416d4bc5a2256be1efab1a4e30440ee249
4
- data.tar.gz: 8a6b6d5f3618a9dc96365a1a39aee4c586e5360b4fe9b5397983f3beda1c96c1
3
+ metadata.gz: 982a8a1f229a0621ae17475d2145b7baaf66278c865a1fa7f41f9ae2100c4dbf
4
+ data.tar.gz: a4a95aa1550387898cdeffebb708d12d9c90a80d5b50e723c6121cd0ee597b55
5
5
  SHA512:
6
- metadata.gz: 8bd8205104ea915d087529949f3fc1e2c3081c4bd6606a57af4caf7b7ebf2b44f84c5d1de518d710bd3018ed6185a4fa219700fed70f11ab55a051f720ed9718
7
- data.tar.gz: 65e4d8d7e1af4e553171febcfde6153e5cdb78fad971f716640e30a85a10ba77dd69003ac4f51168d16fe613b102afa081f09f539e228e2ae794d6b72b0533a9
6
+ metadata.gz: 00e9e58288a32cd029e2d50709a480a2eccab0825e61bccff4b7336e1f27b071fc494068dd3028eb27fb76ae15592b2bc0ea933e394fadae68e6b52bc96befbe
7
+ data.tar.gz: a5d23768eaca1a791e8cf798858d5a0fba59bb6a00cc3f8b9ea75514818041f594bc27d847c54283d974633cd9ad6118549bf1df860f539746cb4a561026b27b
data/.travis.yml CHANGED
@@ -3,13 +3,13 @@ sudo: false
3
3
  language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
- - 2.7.1
7
- - 2.6.3
8
- - 2.5.5
9
- - 2.4.10
6
+ - 3.1.2
7
+ - 3.0.4
8
+ - 2.7.6
9
+ - 2.6.10
10
10
  before_install:
11
- - gem i rubygems-update -v '3.1.2' && update_rubygems
12
- - gem i bundler -v '1.17.3'
11
+ - gem i rubygems-update -v '3.3.19' && update_rubygems
12
+ - gem i bundler -v '2.3.19'
13
13
  before_script:
14
14
  - bundle install --jobs=3 --retry=3
15
15
  script:
data/Gemfile.lock CHANGED
@@ -1,62 +1,65 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_pagespeed_insights (1.0.1)
5
- faraday (~> 1.0, >= 1.0.1)
6
- json (~> 2.3, >= 2.3.0)
4
+ ruby_pagespeed_insights (1.2.0)
5
+ faraday (~> 2.4)
6
+ json (~> 2.6, >= 2.6.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- ast (2.4.1)
11
+ ast (2.4.2)
12
12
  coveralls (0.8.23)
13
13
  json (>= 1.8, < 3)
14
14
  simplecov (~> 0.16.1)
15
15
  term-ansicolor (~> 1.3)
16
16
  thor (>= 0.19.4, < 2.0)
17
17
  tins (~> 1.6)
18
- diff-lcs (1.3)
19
- docile (1.3.2)
20
- dotenv (2.7.6)
21
- faraday (1.0.1)
22
- multipart-post (>= 1.2, < 3)
23
- json (2.3.0)
24
- multipart-post (2.1.1)
25
- parallel (1.19.2)
26
- parser (2.7.1.4)
18
+ diff-lcs (1.5.0)
19
+ docile (1.4.0)
20
+ dotenv (2.8.1)
21
+ faraday (2.6.0)
22
+ faraday-net_http (>= 2.0, < 3.1)
23
+ ruby2_keywords (>= 0.0.4)
24
+ faraday-net_http (3.0.2)
25
+ json (2.6.2)
26
+ parallel (1.22.1)
27
+ parser (3.1.2.0)
27
28
  ast (~> 2.4.1)
28
29
  pluginator (1.5.0)
29
30
  pre-commit (0.39.0)
30
31
  pluginator (~> 1.5)
31
- rainbow (3.0.0)
32
- rake (12.3.3)
33
- regexp_parser (1.7.1)
34
- rexml (3.2.4)
35
- rspec (3.9.0)
36
- rspec-core (~> 3.9.0)
37
- rspec-expectations (~> 3.9.0)
38
- rspec-mocks (~> 3.9.0)
39
- rspec-core (3.9.2)
40
- rspec-support (~> 3.9.3)
41
- rspec-expectations (3.9.2)
32
+ rainbow (3.1.1)
33
+ rake (13.0.6)
34
+ regexp_parser (2.5.0)
35
+ rexml (3.2.5)
36
+ rspec (3.11.0)
37
+ rspec-core (~> 3.11.0)
38
+ rspec-expectations (~> 3.11.0)
39
+ rspec-mocks (~> 3.11.0)
40
+ rspec-core (3.11.0)
41
+ rspec-support (~> 3.11.0)
42
+ rspec-expectations (3.11.0)
42
43
  diff-lcs (>= 1.2.0, < 2.0)
43
- rspec-support (~> 3.9.0)
44
- rspec-mocks (3.9.1)
44
+ rspec-support (~> 3.11.0)
45
+ rspec-mocks (3.11.1)
45
46
  diff-lcs (>= 1.2.0, < 2.0)
46
- rspec-support (~> 3.9.0)
47
- rspec-support (3.9.3)
48
- rubocop (0.90.0)
47
+ rspec-support (~> 3.11.0)
48
+ rspec-support (3.11.0)
49
+ rubocop (1.33.0)
50
+ json (~> 2.3)
49
51
  parallel (~> 1.10)
50
- parser (>= 2.7.1.1)
52
+ parser (>= 3.1.0.0)
51
53
  rainbow (>= 2.2.2, < 4.0)
52
- regexp_parser (>= 1.7)
53
- rexml
54
- rubocop-ast (>= 0.3.0, < 1.0)
54
+ regexp_parser (>= 1.8, < 3.0)
55
+ rexml (>= 3.2.5, < 4.0)
56
+ rubocop-ast (>= 1.19.1, < 2.0)
55
57
  ruby-progressbar (~> 1.7)
56
- unicode-display_width (>= 1.4.0, < 2.0)
57
- rubocop-ast (0.3.0)
58
- parser (>= 2.7.1.4)
59
- ruby-progressbar (1.10.1)
58
+ unicode-display_width (>= 1.4.0, < 3.0)
59
+ rubocop-ast (1.19.1)
60
+ parser (>= 3.1.1.0)
61
+ ruby-progressbar (1.11.0)
62
+ ruby2_keywords (0.0.5)
60
63
  simplecov (0.16.1)
61
64
  docile (~> 1.1)
62
65
  json (>= 1.8, < 3)
@@ -65,24 +68,24 @@ GEM
65
68
  sync (0.5.0)
66
69
  term-ansicolor (1.7.1)
67
70
  tins (~> 1.0)
68
- thor (1.0.1)
69
- tins (1.25.0)
71
+ thor (1.2.1)
72
+ tins (1.31.1)
70
73
  sync
71
- unicode-display_width (1.7.0)
74
+ unicode-display_width (2.2.0)
72
75
 
73
76
  PLATFORMS
74
77
  ruby
75
78
 
76
79
  DEPENDENCIES
77
- bundler (~> 1.17, >= 1.17.3)
80
+ bundler (~> 2.3, >= 2.3.19)
78
81
  coveralls
79
82
  dotenv (~> 2.7, >= 2.7.6)
80
83
  pre-commit (~> 0.39.0)
81
- rake (~> 12.3, >= 12.3.3)
82
- rspec (~> 3.0)
84
+ rake (~> 13.0, >= 13.0.6)
85
+ rspec (~> 3.11)
83
86
  rubocop
84
87
  ruby_pagespeed_insights!
85
88
  simplecov (~> 0.16.1)
86
89
 
87
90
  BUNDLED WITH
88
- 1.17.3
91
+ 2.3.25
data/README.md CHANGED
@@ -31,11 +31,13 @@ Once installed, you have to get your `API key` in the [Google Developers Console
31
31
  ### [API Version 5](https://developers.google.com/speed/docs/insights/v5/reference/pagespeedapi/runpagespeed)
32
32
 
33
33
  ```ruby
34
+ require 'pagespeed_insights'
35
+
34
36
  request = PagespeedInsights::V5.new(
35
37
  url: 'http://site.com',
36
38
  key: 'your api key',
37
39
  strategy: 'desktop',
38
- categories: 'seo'
40
+ categories: ['seo', 'pwa']
39
41
  )
40
42
 
41
43
  response = request.results
@@ -1,3 +1,3 @@
1
1
  module PagespeedInsights
2
- VERSION = "1.0.1"
2
+ VERSION = '1.2.0'
3
3
  end
data/lib/v5/api_v5.rb CHANGED
@@ -38,7 +38,9 @@ module PagespeedInsights
38
38
 
39
39
  def make_request(uri_params)
40
40
  headers = { 'Accept': 'application/json' }
41
- response = Faraday.get(@base_url, uri_params, headers)
41
+ response = Faraday.get(@base_url, uri_params, headers) do |req|
42
+ req.options.params_encoder = Faraday::FlatParamsEncoder
43
+ end
42
44
  @status = response.status
43
45
  @headers = response.headers
44
46
  @body = response.body
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = 'A Ruby wrapper for Google PageSpeed Insights API.'
13
13
  spec.homepage = 'https://github.com/kevyder/ruby_pagespeed_insights'
14
14
  spec.license = 'MIT'
15
- spec.required_ruby_version = '>= 2.4'
15
+ spec.required_ruby_version = '>= 2.6'
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the "allowed_push_host"
18
18
  # to allow pushing to a single host or delete this section to allow pushing to any host.
@@ -32,10 +32,10 @@ Gem::Specification.new do |spec|
32
32
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
33
  spec.require_paths = ['lib']
34
34
 
35
- spec.add_runtime_dependency 'faraday', '~> 1.0', '>= 1.0.1'
36
- spec.add_runtime_dependency 'json', '~> 2.3', '>= 2.3.0'
35
+ spec.add_runtime_dependency 'faraday', '~> 2.4'
36
+ spec.add_runtime_dependency 'json', '~> 2.6', '>= 2.6.2'
37
37
 
38
- spec.add_development_dependency 'bundler', '~> 1.17', '>= 1.17.3'
39
- spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
40
- spec.add_development_dependency 'rspec', '~> 3.0'
38
+ spec.add_development_dependency 'bundler', '~> 2.3', '>= 2.3.19'
39
+ spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
40
+ spec.add_development_dependency 'rspec', '~> 3.11'
41
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_pagespeed_insights
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Rodriguez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-13 00:00:00.000000000 Z
11
+ date: 2022-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,94 +16,88 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 1.0.1
19
+ version: '2.4'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '1.0'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 1.0.1
26
+ version: '2.4'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: json
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - "~>"
38
32
  - !ruby/object:Gem::Version
39
- version: '2.3'
33
+ version: '2.6'
40
34
  - - ">="
41
35
  - !ruby/object:Gem::Version
42
- version: 2.3.0
36
+ version: 2.6.2
43
37
  type: :runtime
44
38
  prerelease: false
45
39
  version_requirements: !ruby/object:Gem::Requirement
46
40
  requirements:
47
41
  - - "~>"
48
42
  - !ruby/object:Gem::Version
49
- version: '2.3'
43
+ version: '2.6'
50
44
  - - ">="
51
45
  - !ruby/object:Gem::Version
52
- version: 2.3.0
46
+ version: 2.6.2
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: bundler
55
49
  requirement: !ruby/object:Gem::Requirement
56
50
  requirements:
57
51
  - - "~>"
58
52
  - !ruby/object:Gem::Version
59
- version: '1.17'
53
+ version: '2.3'
60
54
  - - ">="
61
55
  - !ruby/object:Gem::Version
62
- version: 1.17.3
56
+ version: 2.3.19
63
57
  type: :development
64
58
  prerelease: false
65
59
  version_requirements: !ruby/object:Gem::Requirement
66
60
  requirements:
67
61
  - - "~>"
68
62
  - !ruby/object:Gem::Version
69
- version: '1.17'
63
+ version: '2.3'
70
64
  - - ">="
71
65
  - !ruby/object:Gem::Version
72
- version: 1.17.3
66
+ version: 2.3.19
73
67
  - !ruby/object:Gem::Dependency
74
68
  name: rake
75
69
  requirement: !ruby/object:Gem::Requirement
76
70
  requirements:
77
71
  - - "~>"
78
72
  - !ruby/object:Gem::Version
79
- version: '12.3'
73
+ version: '13.0'
80
74
  - - ">="
81
75
  - !ruby/object:Gem::Version
82
- version: 12.3.3
76
+ version: 13.0.6
83
77
  type: :development
84
78
  prerelease: false
85
79
  version_requirements: !ruby/object:Gem::Requirement
86
80
  requirements:
87
81
  - - "~>"
88
82
  - !ruby/object:Gem::Version
89
- version: '12.3'
83
+ version: '13.0'
90
84
  - - ">="
91
85
  - !ruby/object:Gem::Version
92
- version: 12.3.3
86
+ version: 13.0.6
93
87
  - !ruby/object:Gem::Dependency
94
88
  name: rspec
95
89
  requirement: !ruby/object:Gem::Requirement
96
90
  requirements:
97
91
  - - "~>"
98
92
  - !ruby/object:Gem::Version
99
- version: '3.0'
93
+ version: '3.11'
100
94
  type: :development
101
95
  prerelease: false
102
96
  version_requirements: !ruby/object:Gem::Requirement
103
97
  requirements:
104
98
  - - "~>"
105
99
  - !ruby/object:Gem::Version
106
- version: '3.0'
100
+ version: '3.11'
107
101
  description: A Ruby wrapper for Google PageSpeed Insights API.
108
102
  email:
109
103
  - kyrodriguez97@gmail.com
@@ -145,14 +139,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
139
  requirements:
146
140
  - - ">="
147
141
  - !ruby/object:Gem::Version
148
- version: '2.4'
142
+ version: '2.6'
149
143
  required_rubygems_version: !ruby/object:Gem::Requirement
150
144
  requirements:
151
145
  - - ">="
152
146
  - !ruby/object:Gem::Version
153
147
  version: '0'
154
148
  requirements: []
155
- rubygems_version: 3.1.2
149
+ rubygems_version: 3.1.4
156
150
  signing_key:
157
151
  specification_version: 4
158
152
  summary: A Ruby wrapper for Google PageSpeed Insights API.