Skip to content

Commit

Permalink
test with ruby 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bodrovis committed Dec 26, 2023
1 parent 9d2d297 commit 82d72f1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- '3.0'
- 3.1
- 3.2
- '3.3.0-preview2'
- 3.3
runs-on: ${{ matrix.os }}
env:
LOKALISE_API_TOKEN: 123abc
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_lokalise_api/collections/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def reinit_endpoint(req_params: @self_endpoint.req_params, override_req_params:

def populate_common_attrs_from(response)
supported_attrs.each do |attrib|
instance_variable_set "@#{attrib}", response.content[attrib]
instance_variable_set :"@#{attrib}", response.content[attrib]
end

headers = response.headers
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_lokalise_api/endpoints/base_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def full_uri
# Creates methods like `do_post`, `do_get` that proxy calls to the
# corresponding methods in the `Request` module
HTTP_METHODS.each do |method_postfix|
define_method "do_#{method_postfix}" do
define_method :"do_#{method_postfix}" do
send method_postfix, self
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_lokalise_api/endpoints/main_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class MainEndpoint < BaseEndpoint
BASE_URL = 'https://api.lokalise.com/api2'

def initialize(client, params = {})
super client, params
super(client, params)

@uri = partial_uri(base_query(*@query_params))
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_lokalise_api/endpoints/oauth2/oauth2_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class OAuth2Endpoint < BaseEndpoint
PARTIAL_URI_TEMPLATE = '{/segments*}{?query*}'

def initialize(client, params = {})
super client, params
super(client, params)

@uri = partial_uri(base_query(*@query_params), params.fetch(:get, []))
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_lokalise_api/generics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Generics

def initialize(raw_data)
raw_data.each do |att, val|
instance_variable_set "@#{att}", val
instance_variable_set :"@#{att}", val

self.class.class_exec do
attr_reader att.to_sym
Expand Down
4 changes: 2 additions & 2 deletions lib/ruby_lokalise_api/resources/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def delegate_call(from, to = nil)

def read_main_params
self.class.const_get(:MAIN_PARAMS).to_array.map do |param|
instance_variable_get "@#{param}"
instance_variable_get :"@#{param}"
end
end

Expand All @@ -69,7 +69,7 @@ def populate_attrs_from(content)
content[attrib]
end

instance_variable_set "@#{attrib}", value
instance_variable_set :"@#{attrib}", value
end
end
end
Expand Down

0 comments on commit 82d72f1

Please sign in to comment.