Skip to content

Commit 3c2d268

Browse files
committed
Revert "Rubocop autocorrections"
This reverts commit 6a044fc.
1 parent 663561f commit 3c2d268

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

lib/open_weather/connection.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def connection
1919

2020
options[:headers]['User-Agent'] = user_agent if user_agent
2121
options[:proxy] = proxy if proxy
22-
options[:ssl] = { ca_path:, ca_file: } if ca_path || ca_file
22+
options[:ssl] = { ca_path: ca_path, ca_file: ca_file } if ca_path || ca_file
2323

2424
request_options = {}
2525
request_options[:timeout] = timeout if timeout

lib/open_weather/endpoints/current.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ module OpenWeather
44
module Endpoints
55
module Current
66
def current_zip(code, country = nil, options = {})
7-
options = code.is_a?(Hash) ? options.merge(code) : options.merge(zip: code, country:)
7+
options = code.is_a?(Hash) ? options.merge(code) : options.merge(zip: code, country: country)
88
current_weather(options)
99
end
1010

1111
def current_geo(lat, lon = nil, options = {})
12-
options = lat.is_a?(Hash) ? options.merge(lat) : options.merge(lat:, lon:)
12+
options = lat.is_a?(Hash) ? options.merge(lat) : options.merge(lat: lat, lon: lon)
1313
current_weather(options)
1414
end
1515

1616
def current_city(name, state = nil, country = nil, options = {})
17-
options = name.is_a?(Hash) ? options.merge(name) : options.merge(city: name, state:, country:)
17+
options = name.is_a?(Hash) ? options.merge(name) : options.merge(city: name, state: state, country: country)
1818
current_weather(options)
1919
end
2020

2121
def current_city_id(id, options = {})
22-
options = id.is_a?(Hash) ? options.merge(id) : options.merge(id:)
22+
options = id.is_a?(Hash) ? options.merge(id) : options.merge(id: id)
2323
current_weather(options)
2424
end
2525

lib/open_weather/endpoints/one_call.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module OpenWeather
44
module Endpoints
55
module OneCall
66
def one_call(lat, lon = nil, options = {})
7-
options = lat.is_a?(Hash) ? options.merge(lat) : options.merge(lat:, lon:)
7+
options = lat.is_a?(Hash) ? options.merge(lat) : options.merge(lat: lat, lon: lon)
88
options[:exclude] = options[:exclude].join(',') if options[:exclude].is_a?(Array)
99
options[:dt] = options[:dt].to_i if options[:dt].is_a?(Time)
1010
path = options.key?(:dt) ? '3.0/onecall/timemachine' : '3.0/onecall'

lib/open_weather/raise_error.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def on_complete(env)
1010
when 407
1111
# mimic the behavior that we get with proxy requests with HTTPS
1212
raise Faraday::ConnectionFailed, %(407 "Proxy Authentication Required ")
13-
when (400...600)
13+
when (400...600).freeze
1414
raise OpenWeather::Errors::Fault, response_values(env)
1515
end
1616
end

spec/lib/open_weather/models/station_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
.with(id)
6161
.and_call_original
6262

63-
model = OpenWeather::Models::Station.new(id:)
63+
model = OpenWeather::Models::Station.new(id: id)
6464
result = model.delete!
6565
expect(result).to be_nil
6666
end

0 commit comments

Comments
 (0)