lighthouse-ruby 0.1.8 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22af57ad86348f3461e430da52497878b1234839d4d8e436b4668ce0da21e2ff
4
- data.tar.gz: 47d325f1197e2b4df8483cfb2338d9b482ce9ce6698060604e6efc86e7e5db7c
3
+ metadata.gz: 5ac8778763d260e57a58b2468562b1aa3e86d0538756b96b4144773b4566e7fc
4
+ data.tar.gz: 5fa07b457f6585ddf2322799a8ab3ef92a9273e9acd0c788d57a9df203c71bc3
5
5
  SHA512:
6
- metadata.gz: a4bcc3c7e9202a5d94b949a80fbfd40f293a33d233b7d7a790ff4f9903e0a79e629428853e9878695f4852b74e630b17b91c586d356696aa5e3ffffd5acb66a0
7
- data.tar.gz: 9619d29f305570b33e8ede4836d255340795dddac528d27bd01d59d1bcc3ab66f2a28e17833cdb8016c7b3d405c69c9cce220dfe85e0ca768013394560b1b863
6
+ metadata.gz: 69e2487e4c51ee1ffed921220dd9d4de7ceb645c3f988674aa9594804423fa00740252bc05bfab6bc0e3dc25a00b6b7c61215a0c96547eaca02034c916de6a67
7
+ data.tar.gz: b919dcb91cc55bf9fb680bd4f388ef8f55b37bcab421464f3a9fabbb452df6af5a3ee3ed9672a1c6ba4d9adba1287f695854531f59cfc2f29df33aaa0c4be0dd
data/Gemfile.lock CHANGED
@@ -1,26 +1,26 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lighthouse-ruby (0.1.7)
4
+ lighthouse-ruby (0.1.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- diff-lcs (1.3)
9
+ diff-lcs (1.5.0)
10
10
  rake (12.3.3)
11
- rspec (3.9.0)
12
- rspec-core (~> 3.9.0)
13
- rspec-expectations (~> 3.9.0)
14
- rspec-mocks (~> 3.9.0)
15
- rspec-core (3.9.2)
16
- rspec-support (~> 3.9.3)
17
- rspec-expectations (3.9.2)
11
+ rspec (3.12.0)
12
+ rspec-core (~> 3.12.0)
13
+ rspec-expectations (~> 3.12.0)
14
+ rspec-mocks (~> 3.12.0)
15
+ rspec-core (3.12.2)
16
+ rspec-support (~> 3.12.0)
17
+ rspec-expectations (3.12.3)
18
18
  diff-lcs (>= 1.2.0, < 2.0)
19
- rspec-support (~> 3.9.0)
20
- rspec-mocks (3.9.1)
19
+ rspec-support (~> 3.12.0)
20
+ rspec-mocks (3.12.6)
21
21
  diff-lcs (>= 1.2.0, < 2.0)
22
- rspec-support (~> 3.9.0)
23
- rspec-support (3.9.3)
22
+ rspec-support (~> 3.12.0)
23
+ rspec-support (3.12.1)
24
24
 
25
25
  PLATFORMS
26
26
  ruby
data/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
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/lighthouse/ruby`. To experiment with that code, run `bin/console` for an interactive prompt.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
5
  ## Installation
8
6
 
9
7
  Add this line to your application's Gemfile:
@@ -57,7 +55,7 @@ Capybara.register_driver :chrome do |app|
57
55
  end
58
56
 
59
57
  Capybara.javascript_driver = :chrome
60
- Lighthouse::Matchers.remote_debugging_port = 9222
58
+ Lighthouse::Preferences.remote_debugging_port = 9222
61
59
  ```
62
60
 
63
61
  #### For Rspec
@@ -35,11 +35,13 @@ module Lighthouse
35
35
 
36
36
  def get_lighthouse_cli
37
37
  system("npm install -g lighthouse") unless File.exist?(lighthouse_bin_locator)
38
+ print("Lighthouse Version:")
39
+ system("lighthouse --version")
38
40
  lighthouse_bin_locator
39
41
  end
40
42
 
41
43
  def lighthouse_bin_locator
42
- `which lighthouse`.chomp("\n")
44
+ `which lighthouse`.gsub!("\n", " ")
43
45
  end
44
46
 
45
47
  end
@@ -21,7 +21,11 @@ module Lighthouse
21
21
  end
22
22
 
23
23
  def parsed_response
24
- get_test_scores(JSON.parse(@response))
24
+ get_test_scores(raw_response)
25
+ end
26
+
27
+ def raw_response
28
+ JSON.parse(@response)
25
29
  end
26
30
 
27
31
  private
@@ -1,5 +1,5 @@
1
1
  module Lighthouse
2
2
  module Ruby
3
- VERSION = "0.1.8"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -4,7 +4,7 @@ Gem::Specification.new do |spec|
4
4
  spec.name = "lighthouse-ruby"
5
5
  spec.version = Lighthouse::Ruby::VERSION
6
6
  spec.authors = ["Budi Sugianto"]
7
- spec.email = ["budi@teachable.com"]
7
+ spec.email = ["hi@budisugianto.com"]
8
8
 
9
9
  spec.summary = <<~DESC
10
10
  Ruby wrapper for lighthouse-cli command by
@@ -13,13 +13,13 @@ Gem::Specification.new do |spec|
13
13
  DESC
14
14
 
15
15
  spec.description = "Ruby wrapper for lighthouse-cli"
16
- spec.homepage = "https://github.com/UseFedora/lighthouse-ruby"
16
+ spec.homepage = "https://github.com/mcbuddy/lighthouse-ruby"
17
17
  spec.license = "MIT"
18
18
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
19
19
 
20
- spec.metadata["homepage_uri"] = "https://github.com/UseFedora/lighthouse-ruby"
21
- spec.metadata["source_code_uri"] = "https://github.com/UseFedora/lighthouse-ruby"
22
- spec.metadata["changelog_uri"] = "https://github.com/UseFedora/lighthouse-ruby/blob/master/CHANGELOG.md"
20
+ spec.metadata["homepage_uri"] = "https://github.com/mcbuddy/lighthouse-ruby"
21
+ spec.metadata["source_code_uri"] = "https://github.com/mcbuddy/lighthouse-ruby"
22
+ spec.metadata["changelog_uri"] = "https://github.com/mcbuddy/lighthouse-ruby/blob/master/CHANGELOG.md"
23
23
 
24
24
  # Specify which files should be added to the gem when it is released.
25
25
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lighthouse-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Budi Sugianto
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-06 00:00:00.000000000 Z
11
+ date: 2023-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '3'
55
55
  description: Ruby wrapper for lighthouse-cli
56
56
  email:
57
- - budi@teachable.com
57
+ - hi@budisugianto.com
58
58
  executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
@@ -75,14 +75,14 @@ files:
75
75
  - lib/lighthouse/ruby/builder.rb
76
76
  - lib/lighthouse/ruby/version.rb
77
77
  - lighthouse-ruby.gemspec
78
- homepage: https://github.com/UseFedora/lighthouse-ruby
78
+ homepage: https://github.com/mcbuddy/lighthouse-ruby
79
79
  licenses:
80
80
  - MIT
81
81
  metadata:
82
- homepage_uri: https://github.com/UseFedora/lighthouse-ruby
83
- source_code_uri: https://github.com/UseFedora/lighthouse-ruby
84
- changelog_uri: https://github.com/UseFedora/lighthouse-ruby/blob/master/CHANGELOG.md
85
- post_install_message:
82
+ homepage_uri: https://github.com/mcbuddy/lighthouse-ruby
83
+ source_code_uri: https://github.com/mcbuddy/lighthouse-ruby
84
+ changelog_uri: https://github.com/mcbuddy/lighthouse-ruby/blob/master/CHANGELOG.md
85
+ post_install_message:
86
86
  rdoc_options: []
87
87
  require_paths:
88
88
  - lib
@@ -97,8 +97,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubygems_version: 3.0.8
101
- signing_key:
100
+ rubygems_version: 3.0.3.1
101
+ signing_key:
102
102
  specification_version: 4
103
103
  summary: Ruby wrapper for lighthouse-cli command by execute and evaluate for Lighthouse-cli
104
104
  test JSON report ~ inspired from lighthouse-matchers gem by Ackama Group ~