diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ce8ed1..47a7cb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/lib/ruby_lokalise_api/collections/base.rb b/lib/ruby_lokalise_api/collections/base.rb index d0cb375..7fbcbea 100644 --- a/lib/ruby_lokalise_api/collections/base.rb +++ b/lib/ruby_lokalise_api/collections/base.rb @@ -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 diff --git a/lib/ruby_lokalise_api/endpoints/base_endpoint.rb b/lib/ruby_lokalise_api/endpoints/base_endpoint.rb index 7293bb9..e315f80 100644 --- a/lib/ruby_lokalise_api/endpoints/base_endpoint.rb +++ b/lib/ruby_lokalise_api/endpoints/base_endpoint.rb @@ -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 diff --git a/lib/ruby_lokalise_api/endpoints/main_endpoint.rb b/lib/ruby_lokalise_api/endpoints/main_endpoint.rb index ff36274..0014e22 100644 --- a/lib/ruby_lokalise_api/endpoints/main_endpoint.rb +++ b/lib/ruby_lokalise_api/endpoints/main_endpoint.rb @@ -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 diff --git a/lib/ruby_lokalise_api/endpoints/oauth2/oauth2_endpoint.rb b/lib/ruby_lokalise_api/endpoints/oauth2/oauth2_endpoint.rb index 390d7fd..f340205 100644 --- a/lib/ruby_lokalise_api/endpoints/oauth2/oauth2_endpoint.rb +++ b/lib/ruby_lokalise_api/endpoints/oauth2/oauth2_endpoint.rb @@ -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 diff --git a/lib/ruby_lokalise_api/generics.rb b/lib/ruby_lokalise_api/generics.rb index fc500ff..6e08aa9 100644 --- a/lib/ruby_lokalise_api/generics.rb +++ b/lib/ruby_lokalise_api/generics.rb @@ -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 diff --git a/lib/ruby_lokalise_api/resources/base.rb b/lib/ruby_lokalise_api/resources/base.rb index bb0634d..dcf6c0c 100644 --- a/lib/ruby_lokalise_api/resources/base.rb +++ b/lib/ruby_lokalise_api/resources/base.rb @@ -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 @@ -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