lighthouse-ruby 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/lighthouse/ruby/builder.rb +5 -6
- data/lib/lighthouse/ruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4fcbcfe84e6da713a30ee7cb5ecf3ff3439903bd541b0b6d0e1b7a400727ba0
|
4
|
+
data.tar.gz: 860089ede53ecd28a61f89f3d9d8a3fb951c45b2c91353cfe13d23789f99f0db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98fa94e5d230733b4797f6faa12e38fb0945601c5ceb521a9d7d6d8938a1a8f75a9e233780495d4565918cad8134f3ff384ef380be80bf945730c562c37f8ff7
|
7
|
+
data.tar.gz: 8a2270362c61611ebd4adf8a7a09a039e798bdde1c4aa1a9d00d2fa2dd80af03b2414d5e2d0633aad3ae8715d46e762af1c0536f9cc5a436d29d8587e623ac62
|
data/Gemfile.lock
CHANGED
@@ -5,8 +5,7 @@ module Lighthouse
|
|
5
5
|
module Ruby
|
6
6
|
class Builder
|
7
7
|
|
8
|
-
def initialize
|
9
|
-
@url = url
|
8
|
+
def initialize
|
10
9
|
@runner = Lighthouse::Preferences.runner
|
11
10
|
@cli = Lighthouse::Preferences.lighthouse_cli
|
12
11
|
@port = Lighthouse::Preferences.remote_debugging_port
|
@@ -14,8 +13,8 @@ module Lighthouse
|
|
14
13
|
@lighthouse_options = Lighthouse::Preferences.lighthouse_options
|
15
14
|
end
|
16
15
|
|
17
|
-
def execute
|
18
|
-
@response = @runner.call("#{@cli} #{options}")
|
16
|
+
def execute(url)
|
17
|
+
@response = @runner.call("#{@cli} #{options(url)}")
|
19
18
|
end
|
20
19
|
|
21
20
|
def test_scores
|
@@ -24,8 +23,8 @@ module Lighthouse
|
|
24
23
|
|
25
24
|
private
|
26
25
|
|
27
|
-
def options
|
28
|
-
"'#{
|
26
|
+
def options(url)
|
27
|
+
"'#{url}'".tap do |builder|
|
29
28
|
builder << ' --quiet'
|
30
29
|
builder << ' --output=json'
|
31
30
|
builder << " --port=#{@port}" if @port
|