Skip to content

Commit c133613

Browse files
authored
Fix file naming typo (#286)
* Fix file naming typo * Fix rubocop warnings * Fix tests
1 parent 024ad04 commit c133613

File tree

13 files changed

+26
-28
lines changed

13 files changed

+26
-28
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019-2021 Dmitry Vorotilin
3+
Copyright (c) 2019-2022 Dmitry Vorotilin
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

lib/ferrum/frame.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ def execution_id=(value)
6868
end
6969

7070
def inspect
71-
"#<#{self.class} "\
72-
"@id=#{@id.inspect} "\
73-
"@parent_id=#{@parent_id.inspect} "\
74-
"@name=#{@name.inspect} "\
75-
"@state=#{@state.inspect} "\
71+
"#<#{self.class} " \
72+
"@id=#{@id.inspect} " \
73+
"@parent_id=#{@parent_id.inspect} " \
74+
"@name=#{@name.inspect} " \
75+
"@state=#{@state.inspect} " \
7676
"@execution_id=#{@execution_id.inspect}>"
7777
end
7878
end

lib/ferrum/network.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Network
1414
RESOURCE_TYPES = %w[Document Stylesheet Image Media Font Script TextTrack
1515
XHR Fetch EventSource WebSocket Manifest
1616
SignedExchange Ping CSPViolationReport Other].freeze
17-
AUTHORIZE_BLOCK_MISSING = "Block is missing, call `authorize(...) { |r| r.continue } "\
17+
AUTHORIZE_BLOCK_MISSING = "Block is missing, call `authorize(...) { |r| r.continue } " \
1818
"or subscribe to `on(:request)` events before calling it"
1919
AUTHORIZE_TYPE_WRONG = ":type should be in #{AUTHORIZE_TYPE}"
2020
ALLOWED_CONNECTION_TYPE = %w[none cellular2g cellular3g cellular4g bluetooth ethernet wifi wimax other].freeze

lib/ferrum/network/auth_request.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ def referrer_policy
5656
end
5757

5858
def inspect
59-
"#<#{self.class} "\
60-
"@request_id=#{@request_id.inspect} "\
61-
"@frame_id=#{@frame_id.inspect} "\
62-
"@resource_type=#{@resource_type.inspect} "\
59+
"#<#{self.class} " \
60+
"@request_id=#{@request_id.inspect} " \
61+
"@frame_id=#{@frame_id.inspect} " \
62+
"@resource_type=#{@resource_type.inspect} " \
6363
"@request=#{@request.inspect}>"
6464
end
6565
end

lib/ferrum/network/exchange.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ def to_a
4343
end
4444

4545
def inspect
46-
"#<#{self.class} "\
47-
"@id=#{@id.inspect} "\
48-
"@intercepted_request=#{@intercepted_request.inspect} "\
49-
"@request=#{@request.inspect} "\
50-
"@response=#{@response.inspect} "\
46+
"#<#{self.class} " \
47+
"@id=#{@id.inspect} " \
48+
"@intercepted_request=#{@intercepted_request.inspect} " \
49+
"@request=#{@request.inspect} " \
50+
"@response=#{@response.inspect} " \
5151
"@error=#{@error.inspect}>"
5252
end
5353
end

lib/ferrum/network/intercepted_request.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ def referrer_policy
7575
end
7676

7777
def inspect
78-
"#<#{self.class} "\
79-
"@request_id=#{@request_id.inspect} "\
80-
"@frame_id=#{@frame_id.inspect} "\
81-
"@resource_type=#{@resource_type.inspect} "\
78+
"#<#{self.class} " \
79+
"@request_id=#{@request_id.inspect} " \
80+
"@frame_id=#{@frame_id.inspect} " \
81+
"@resource_type=#{@resource_type.inspect} " \
8282
"@request=#{@request.inspect}>"
8383
end
8484

lib/ferrum/page.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,9 @@ def window_id
167167
@browser.command("Browser.getWindowForTarget", targetId: @target_id)["windowId"]
168168
end
169169

170-
# rubocop:disable Naming/AccessorMethodName
171170
def set_window_bounds(bounds = {})
172171
@browser.command("Browser.setWindowBounds", windowId: window_id, bounds: bounds)
173172
end
174-
# rubocop:enable Naming/AccessorMethodName
175173

176174
def command(method, wait: 0, slowmoable: false, **params)
177175
iteration = @event.reset if wait.positive?

lib/ferrum/page/screenshot.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
require "ferrum/rbga"
3+
require "ferrum/rgba"
44

55
module Ferrum
66
class Page
File renamed without changes.

spec/network_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ module Ferrum
321321
expect do
322322
network.authorize(user: "login", password: "pass")
323323
end.to raise_exception(ArgumentError,
324-
"Block is missing, call `authorize(...) { |r| r.continue }"\
325-
" or subscribe to `on(:request)` events before calling it")
324+
"Block is missing, call `authorize(...) { |r| r.continue } " \
325+
"or subscribe to `on(:request)` events before calling it")
326326
end
327327

328328
it "raises no error when authorize is with block" do

0 commit comments

Comments
 (0)