File tree Expand file tree Collapse file tree 5 files changed +44
-28
lines changed Expand file tree Collapse file tree 5 files changed +44
-28
lines changed Original file line number Diff line number Diff line change @@ -2,27 +2,36 @@ name: Linter
2
2
on : [push]
3
3
4
4
jobs :
5
- # linters:
6
- # name: Linters
7
- # runs-on: ubuntu-latest
8
- # steps:
9
- # - name: Checkout code
10
- # uses: actions/checkout@v2
5
+ linters :
6
+ name : Linters
7
+ strategy :
8
+ fail-fast : false
9
+ matrix :
10
+ ruby : [ 2.7, 3.0 ]
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v2
11
15
12
- # - name: Setup Ruby
13
- # uses: ruby/setup-ruby@v1
14
- # - name: Ruby gem cache
15
- # uses: actions/cache@v1
16
- # with:
17
- # path: vendor/bundle
18
- # key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
19
- # restore-keys: |
20
- # ${{ runner.os }}-gems-
21
- # - name: Install gems
22
- # run: |
23
- # bundle config path vendor/bundle
24
- # bundle install --jobs 4 --retry 3
16
+ - name : Setup Ruby
17
+ uses : ruby/setup-ruby@v1
18
+ with :
19
+ ruby-version : ${{ matrix.ruby }}
20
+ bundler-cache : true
25
21
26
- # - name: Run linters
27
- # run: |
28
- # bin/rubocop --parallel
22
+ - name : Ruby gem cache
23
+ uses : actions/cache@v1
24
+ with :
25
+ path : vendor/bundle
26
+ key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
27
+ restore-keys : |
28
+ ${{ runner.os }}-gems-
29
+
30
+ - name : Install gems
31
+ run : |
32
+ bundle config path vendor/bundle
33
+ bundle install --jobs 4 --retry 3
34
+
35
+ - name : Run linters
36
+ run : |
37
+ bundle exec rubocop --parallel
Original file line number Diff line number Diff line change 4
4
branches :
5
5
- master
6
6
pull_request :
7
- types : [opened, synchronize, reopened, labeled]
8
7
9
8
jobs :
10
9
tests :
39
38
- name : Run tests
40
39
run : bundle exec rake
41
40
if : |
42
- github.event.pull_request.draft == false ||
43
- (github.event.pull_request.draft == true &&
44
- contains(github.event.pull_request.labels.*.name, 'master') &&
45
- matrix.gemfile == 'ferrum-master')
41
+ matrix.gemfile != 'ferrum-master' ||
42
+ (matrix.gemfile == 'ferrum-master' &&
43
+ contains(github.event.pull_request.labels.*.name, 'master'))
46
44
47
45
- name : Archive artifacts
48
46
uses : actions/upload-artifact@v2
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ Gem::Specification.new do |s|
21
21
"homepage_uri" => "https://cuprite.rubycdp.com/" ,
22
22
"bug_tracker_uri" => "https://github.com/rubycdp/cuprite/issues" ,
23
23
"documentation_uri" => "https://github.com/rubycdp/cuprite/blob/master/README.md" ,
24
- "source_code_uri" => "https://github.com/rubycdp/cuprite"
24
+ "source_code_uri" => "https://github.com/rubycdp/cuprite" ,
25
+ "rubygems_mfa_required" => "true"
25
26
}
26
27
27
28
s . required_ruby_version = ">= 2.6.0"
Original file line number Diff line number Diff line change 5
5
6
6
module Capybara
7
7
module Cuprite
8
+ # rubocop:disable Metrics/ClassLength
8
9
class Driver < Capybara ::Driver ::Base
9
10
DEFAULT_MAXIMIZE_SCREEN_SIZE = [ 1366 , 768 ] . freeze
10
11
EXTENSION = File . expand_path ( "javascripts/index.js" , __dir__ )
@@ -418,5 +419,6 @@ def pdf?(path, options)
418
419
options [ :format ] . to_s == "pdf"
419
420
end
420
421
end
422
+ # rubocop:enable Metrics/ClassLength
421
423
end
422
424
end
Original file line number Diff line number Diff line change @@ -130,6 +130,9 @@ def title
130
130
131
131
private
132
132
133
+ # rubocop:disable Metrics/CyclomaticComplexity
134
+ # rubocop:disable Metrics/PerceivedComplexity
135
+ # rubocop:disable Style/GuardClause
133
136
def prepare_page
134
137
super
135
138
@@ -178,6 +181,9 @@ def prepare_page
178
181
command ( "Page.handleJavaScriptDialog" , **options )
179
182
end
180
183
end
184
+ # rubocop:enable Metrics/CyclomaticComplexity
185
+ # rubocop:enable Metrics/PerceivedComplexity
186
+ # rubocop:enable Style/GuardClause
181
187
182
188
def find_position ( node , **options )
183
189
node . find_position ( **options )
You can’t perform that action at this time.
0 commit comments