ruby_pagespeed_insights 1.0.0 → 1.0.1

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: 4f9bd12f73b3037fa196bfddbb42357d573009e43496c1e5bef4901dd0f89066
4
- data.tar.gz: 4baac14f76f0943ebaa04fbec06c7683f1d3665e411abec380ad81cd5fd63049
3
+ metadata.gz: a3da48681214b327943fa772cc587c416d4bc5a2256be1efab1a4e30440ee249
4
+ data.tar.gz: 8a6b6d5f3618a9dc96365a1a39aee4c586e5360b4fe9b5397983f3beda1c96c1
5
5
  SHA512:
6
- metadata.gz: 8c417b0a572a682615a36a84514c673fe6828fc9d589a4c1a13f01789c67dd1f905e0066c77d2dae4a579fdd9249e0e782ccb2371b4726b54dadea0634fda755
7
- data.tar.gz: '01495f527c4749b54fed753093b59a7a49ce5c45df205093223cddd3fff7c3236f6af905af1c6b1099e3a2d905ebacd4f32157d835c4b6cb87928aa019441102'
6
+ metadata.gz: 8bd8205104ea915d087529949f3fc1e2c3081c4bd6606a57af4caf7b7ebf2b44f84c5d1de518d710bd3018ed6185a4fa219700fed70f11ab55a051f720ed9718
7
+ data.tar.gz: 65e4d8d7e1af4e553171febcfde6153e5cdb78fad971f716640e30a85a10ba77dd69003ac4f51168d16fe613b102afa081f09f539e228e2ae794d6b72b0533a9
@@ -0,0 +1 @@
1
+ repo_token: ${COVERALLS_REPO_TOKEN}
@@ -0,0 +1 @@
1
+ exclude_rule 'MD013'
data/.mdlrc ADDED
@@ -0,0 +1 @@
1
+ style '.mdl_style.rb'
@@ -6,6 +6,7 @@ rvm:
6
6
  - 2.7.1
7
7
  - 2.6.3
8
8
  - 2.5.5
9
+ - 2.4.10
9
10
  before_install:
10
11
  - gem i rubygems-update -v '3.1.2' && update_rubygems
11
12
  - gem i bundler -v '1.17.3'
data/Gemfile CHANGED
@@ -4,3 +4,11 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in ruby-pagespeed-insights.gemspec
6
6
  gemspec
7
+
8
+ group :development, :test do
9
+ gem 'simplecov', '~> 0.16.1'
10
+ gem 'pre-commit', '~> 0.39.0'
11
+ gem 'rubocop', require: false
12
+ gem 'dotenv', '~> 2.7', '>= 2.7.6'
13
+ gem 'coveralls', require: false
14
+ end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_pagespeed_insights (1.0.0)
4
+ ruby_pagespeed_insights (1.0.1)
5
5
  faraday (~> 1.0, >= 1.0.1)
6
6
  json (~> 2.3, >= 2.3.0)
7
7
 
@@ -9,6 +9,12 @@ GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  ast (2.4.1)
12
+ coveralls (0.8.23)
13
+ json (>= 1.8, < 3)
14
+ simplecov (~> 0.16.1)
15
+ term-ansicolor (~> 1.3)
16
+ thor (>= 0.19.4, < 2.0)
17
+ tins (~> 1.6)
12
18
  diff-lcs (1.3)
13
19
  docile (1.3.2)
14
20
  dotenv (2.7.6)
@@ -50,13 +56,18 @@ GEM
50
56
  unicode-display_width (>= 1.4.0, < 2.0)
51
57
  rubocop-ast (0.3.0)
52
58
  parser (>= 2.7.1.4)
53
- rubocop-rspec (1.43.2)
54
- rubocop (~> 0.87)
55
59
  ruby-progressbar (1.10.1)
56
- simplecov (0.19.0)
60
+ simplecov (0.16.1)
57
61
  docile (~> 1.1)
58
- simplecov-html (~> 0.11)
59
- simplecov-html (0.12.2)
62
+ json (>= 1.8, < 3)
63
+ simplecov-html (~> 0.10.0)
64
+ simplecov-html (0.10.2)
65
+ sync (0.5.0)
66
+ term-ansicolor (1.7.1)
67
+ tins (~> 1.0)
68
+ thor (1.0.1)
69
+ tins (1.25.0)
70
+ sync
60
71
  unicode-display_width (1.7.0)
61
72
 
62
73
  PLATFORMS
@@ -64,14 +75,14 @@ PLATFORMS
64
75
 
65
76
  DEPENDENCIES
66
77
  bundler (~> 1.17, >= 1.17.3)
78
+ coveralls
67
79
  dotenv (~> 2.7, >= 2.7.6)
68
80
  pre-commit (~> 0.39.0)
69
81
  rake (~> 12.3, >= 12.3.3)
70
82
  rspec (~> 3.0)
71
- rubocop (~> 0.90.0)
72
- rubocop-rspec (~> 1.43, >= 1.43.2)
83
+ rubocop
73
84
  ruby_pagespeed_insights!
74
- simplecov (~> 0.19.0)
85
+ simplecov (~> 0.16.1)
75
86
 
76
87
  BUNDLED WITH
77
88
  1.17.3
data/README.md CHANGED
@@ -1,28 +1,55 @@
1
1
  # Ruby Pagespeed Insights
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pagespeed_insights`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Gem Version](https://badge.fury.io/rb/ruby_pagespeed_insights.svg)](https://rubygems.org/gems/ruby_pagespeed_insights) [![Build Status](https://travis-ci.org/kevyder/ruby_pagespeed_insights.svg?branch=master)](https://travis-ci.org/kevyder/ruby_pagespeed_insights) [![Coverage Status](https://coveralls.io/repos/github/kevyder/ruby_pagespeed_insights/badge.svg?branch=master)](https://coveralls.io/github/kevyder/ruby_pagespeed_insights?branch=master) [![Gem](https://img.shields.io/gem/dt/ruby_pagespeed_insights)](https://rubygems.org/gems/ruby_pagespeed_insights) ![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/kevyder/ruby_pagespeed_insights)
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ A Ruby wrapper for Google PageSpeed Insights API.
6
6
 
7
7
  ## Installation
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'ruby-pagespeed-insights'
12
+ gem 'ruby_pagespeed_insights'
13
13
  ```
14
14
 
15
15
  And then execute:
16
16
 
17
- $ bundle
17
+ ```bash
18
+ bundle
19
+ ```
18
20
 
19
21
  Or install it yourself as:
20
22
 
21
- $ gem install ruby-pagespeed-insights
23
+ ```bash
24
+ gem install ruby_pagespeed_insights
25
+ ```
22
26
 
23
27
  ## Usage
24
28
 
25
- TODO: Write usage instructions here
29
+ Once installed, you have to get your `API key` in the [Google Developers Console](https://developers.google.com/speed/docs/insights/v5/get-started) and then you can start to using the library.
30
+
31
+ ### [API Version 5](https://developers.google.com/speed/docs/insights/v5/reference/pagespeedapi/runpagespeed)
32
+
33
+ ```ruby
34
+ request = PagespeedInsights::V5.new(
35
+ url: 'http://site.com',
36
+ key: 'your api key',
37
+ strategy: 'desktop',
38
+ categories: 'seo'
39
+ )
40
+
41
+ response = request.results
42
+ response.status # response code status
43
+ response.headers # response headers
44
+ response.body # response body content
45
+ ```
46
+
47
+ param | default value | allowed values | optional?
48
+ -----------| ------------- | -------------------------------------------------------------- | ---------
49
+ url | `none` | | `false`
50
+ key | `none` | | `false`
51
+ strategy | `none` | `desktop`, `mobile` | `true`
52
+ categories | `none` | `accessibility`, `best-practices`, `performance`, `pwa`, `seo` | `true`
26
53
 
27
54
  ## Development
28
55
 
@@ -32,7 +59,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
59
 
33
60
  ## Contributing
34
61
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ruby-pagespeed-insights. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
62
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/kevyder/ruby_pagespeed_insights>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
63
 
37
64
  ## License
38
65
 
@@ -40,4 +67,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
40
67
 
41
68
  ## Code of Conduct
42
69
 
43
- Everyone interacting in the Ruby::Pagespeed::Insights projects codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/kevyder/ruby-pagespeed-insights/blob/master/CODE_OF_CONDUCT.md).
70
+ Everyone interacting in the Ruby Pagespeed Insights project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/kevyder/ruby_pagespeed_insights/blob/master/CODE_OF_CONDUCT.md).
@@ -1,3 +1,3 @@
1
1
  module PagespeedInsights
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -8,11 +8,11 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ['Kevin Rodriguez']
9
9
  spec.email = ['kyrodriguez97@gmail.com']
10
10
 
11
- spec.summary = 'A Ruby wrapper for the PageSpeed Insights API.'
11
+ spec.summary = 'A Ruby wrapper for Google PageSpeed Insights API.'
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.5'
15
+ spec.required_ruby_version = '>= 2.4'
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.
@@ -38,9 +38,4 @@ Gem::Specification.new do |spec|
38
38
  spec.add_development_dependency 'bundler', '~> 1.17', '>= 1.17.3'
39
39
  spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
40
40
  spec.add_development_dependency 'rspec', '~> 3.0'
41
- spec.add_development_dependency 'simplecov', '~> 0.19.0'
42
- spec.add_development_dependency 'pre-commit', '~> 0.39.0'
43
- spec.add_development_dependency 'rubocop', '~> 0.90.0'
44
- spec.add_development_dependency 'rubocop-rspec', '~> 1.43', '>= 1.43.2'
45
- spec.add_development_dependency 'dotenv', '~> 2.7', '>= 2.7.6'
46
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.0
4
+ version: 1.0.1
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-12 00:00:00.000000000 Z
11
+ date: 2020-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -104,88 +104,6 @@ dependencies:
104
104
  - - "~>"
105
105
  - !ruby/object:Gem::Version
106
106
  version: '3.0'
107
- - !ruby/object:Gem::Dependency
108
- name: simplecov
109
- requirement: !ruby/object:Gem::Requirement
110
- requirements:
111
- - - "~>"
112
- - !ruby/object:Gem::Version
113
- version: 0.19.0
114
- type: :development
115
- prerelease: false
116
- version_requirements: !ruby/object:Gem::Requirement
117
- requirements:
118
- - - "~>"
119
- - !ruby/object:Gem::Version
120
- version: 0.19.0
121
- - !ruby/object:Gem::Dependency
122
- name: pre-commit
123
- requirement: !ruby/object:Gem::Requirement
124
- requirements:
125
- - - "~>"
126
- - !ruby/object:Gem::Version
127
- version: 0.39.0
128
- type: :development
129
- prerelease: false
130
- version_requirements: !ruby/object:Gem::Requirement
131
- requirements:
132
- - - "~>"
133
- - !ruby/object:Gem::Version
134
- version: 0.39.0
135
- - !ruby/object:Gem::Dependency
136
- name: rubocop
137
- requirement: !ruby/object:Gem::Requirement
138
- requirements:
139
- - - "~>"
140
- - !ruby/object:Gem::Version
141
- version: 0.90.0
142
- type: :development
143
- prerelease: false
144
- version_requirements: !ruby/object:Gem::Requirement
145
- requirements:
146
- - - "~>"
147
- - !ruby/object:Gem::Version
148
- version: 0.90.0
149
- - !ruby/object:Gem::Dependency
150
- name: rubocop-rspec
151
- requirement: !ruby/object:Gem::Requirement
152
- requirements:
153
- - - "~>"
154
- - !ruby/object:Gem::Version
155
- version: '1.43'
156
- - - ">="
157
- - !ruby/object:Gem::Version
158
- version: 1.43.2
159
- type: :development
160
- prerelease: false
161
- version_requirements: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - "~>"
164
- - !ruby/object:Gem::Version
165
- version: '1.43'
166
- - - ">="
167
- - !ruby/object:Gem::Version
168
- version: 1.43.2
169
- - !ruby/object:Gem::Dependency
170
- name: dotenv
171
- requirement: !ruby/object:Gem::Requirement
172
- requirements:
173
- - - "~>"
174
- - !ruby/object:Gem::Version
175
- version: '2.7'
176
- - - ">="
177
- - !ruby/object:Gem::Version
178
- version: 2.7.6
179
- type: :development
180
- prerelease: false
181
- version_requirements: !ruby/object:Gem::Requirement
182
- requirements:
183
- - - "~>"
184
- - !ruby/object:Gem::Version
185
- version: '2.7'
186
- - - ">="
187
- - !ruby/object:Gem::Version
188
- version: 2.7.6
189
107
  description: A Ruby wrapper for Google PageSpeed Insights API.
190
108
  email:
191
109
  - kyrodriguez97@gmail.com
@@ -193,7 +111,10 @@ executables: []
193
111
  extensions: []
194
112
  extra_rdoc_files: []
195
113
  files:
114
+ - ".coveralls.yml"
196
115
  - ".gitignore"
116
+ - ".mdl_style.rb"
117
+ - ".mdlrc"
197
118
  - ".pre-commit-config.yaml"
198
119
  - ".rspec"
199
120
  - ".rubocop.yml"
@@ -224,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
145
  requirements:
225
146
  - - ">="
226
147
  - !ruby/object:Gem::Version
227
- version: '2.5'
148
+ version: '2.4'
228
149
  required_rubygems_version: !ruby/object:Gem::Requirement
229
150
  requirements:
230
151
  - - ">="
@@ -234,5 +155,5 @@ requirements: []
234
155
  rubygems_version: 3.1.2
235
156
  signing_key:
236
157
  specification_version: 4
237
- summary: A Ruby wrapper for the PageSpeed Insights API.
158
+ summary: A Ruby wrapper for Google PageSpeed Insights API.
238
159
  test_files: []