ruby-lokalise-api 9.2.1 → 9.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2dec4243f98c519d1dfb8d66de1d6d7cb6794d97e6ed1f7e8962d72ad141af1f
4
- data.tar.gz: b2a1468269686f8e2fada398cbd19cb69e92e243aa968d5c70beec61fc43fb6f
3
+ metadata.gz: 5a734c5288ebac29f39891c5d83af1a5e183232bca6c163d308ea17fa2b40f71
4
+ data.tar.gz: cd8cf158d27398557b9b2d24e70a6b3c8cf845e9cc44065d22de24497a69d06a
5
5
  SHA512:
6
- metadata.gz: 4398fd7dfcde203df5e13af5c60fff8d22870c28b19bf97ffae1368123e531fbf4b843cbd8a67222de9ec37d507ff117bebb2c44004621102b85544884e1abcd
7
- data.tar.gz: bd21d0e1072fd0dbda803c0eb93040de9c3a5e4c30f7684b31146c7a412994eb86d877f3c85b83014ce85bc9a7e6ca79acec3e4a9cfb37889f0568149a9022f5
6
+ metadata.gz: 7f005996fb4ee75f9dc7b1b9064897aa3574e3dbf4afc2faad78f9bba09d088c560628ea798f3b8f5acc577596342c06b521bb233d6037c319fd901ca8694733
7
+ data.tar.gz: b4327dc17efb6ffa8b05cfad19d63a6eccc652cc0167afd152863509bf5a7a8b415dfc955901b5586a6f020e067096dd4b920b43b7d759209e07e7687e3634f8
@@ -2,11 +2,11 @@
2
2
 
3
3
  module RubyLokaliseApi
4
4
  # This class contains the base client. Inherited by Client (regular API client)
5
- # and OAuth2Client (used for OAuth-2 based authentication)
5
+ # and OAuth2Client (used for OAuth2-based authentication)
6
6
  class BaseClient
7
7
  include RubyLokaliseApi::Rest
8
8
 
9
- attr_reader :token, :token_header
9
+ attr_reader :token, :token_header, :api_host
10
10
  attr_accessor :timeout, :open_timeout
11
11
 
12
12
  def initialize(token, params = {})
@@ -14,6 +14,7 @@ module RubyLokaliseApi
14
14
  @timeout = params.fetch(:timeout, nil)
15
15
  @open_timeout = params.fetch(:open_timeout, nil)
16
16
  @token_header = ''
17
+ @api_host = params.fetch(:api_host, nil)
17
18
  end
18
19
  end
19
20
  end
@@ -54,7 +54,7 @@ module RubyLokaliseApi
54
54
  accept: 'application/json',
55
55
  user_agent: "ruby-lokalise-api gem/#{RubyLokaliseApi::VERSION}"
56
56
  },
57
- url: endpoint.base_url
57
+ url: (endpoint.client.api_host || endpoint.base_url)
58
58
  }
59
59
  end
60
60
 
@@ -4,7 +4,7 @@ module RubyLokaliseApi
4
4
  module OAuth2
5
5
  # This class defines OAuth2 flow
6
6
  class Auth
7
- attr_reader :client_id, :client_secret, :timeout, :open_timeout
7
+ attr_reader :client_id, :client_secret, :timeout, :open_timeout, :api_host
8
8
 
9
9
  OAUTH2_ENDPOINT = RubyLokaliseApi::Endpoints::OAuth2::OAuth2Endpoint
10
10
 
@@ -13,6 +13,7 @@ module RubyLokaliseApi
13
13
  @client_secret = client_secret
14
14
  @timeout = params[:timeout]
15
15
  @open_timeout = params[:open_timeout]
16
+ @api_host = params[:api_host]
16
17
  end
17
18
 
18
19
  # Returns OAuth2 endpoint URI
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyLokaliseApi
4
- VERSION = '9.2.1'
4
+ VERSION = '9.3.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lokalise-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.2.1
4
+ version: 9.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Krukowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-01 00:00:00.000000000 Z
11
+ date: 2024-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -407,7 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
407
407
  - !ruby/object:Gem::Version
408
408
  version: '0'
409
409
  requirements: []
410
- rubygems_version: 3.5.22
410
+ rubygems_version: 3.5.23
411
411
  signing_key:
412
412
  specification_version: 4
413
413
  summary: Ruby interface to the Lokalise API