ruby-lokalise-api 9.2.0 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69670957b958e42f7a92d8cd6f9b7a56e72a0ee82e83519aacebb247f39cef4d
4
- data.tar.gz: def7256b54391d38d2657cb816c8be7183f773617fdd5bfcc03b68d7a4656c89
3
+ metadata.gz: 5a734c5288ebac29f39891c5d83af1a5e183232bca6c163d308ea17fa2b40f71
4
+ data.tar.gz: cd8cf158d27398557b9b2d24e70a6b3c8cf845e9cc44065d22de24497a69d06a
5
5
  SHA512:
6
- metadata.gz: a887ca5c684958a890ed292b709675cd8f404eaf8c6257356b8bb9af8d0b5075f06b837f396ab19c7bc47d856dc442dcad31d17bc90184c057250ffc8956f81f
7
- data.tar.gz: a26be455d40924cc3c9efbb3ca84c4c5f14a19ce88ef8296610a4a2f371d146802dcea1b34e76da114ffe802363cd632d29ebe900eb8b8af4d6fa4ad3113edb0
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.0'
4
+ VERSION = '9.3.0'
5
5
  end
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_dependency 'addressable', '~> 2.5'
25
25
  spec.add_dependency 'faraday', '~> 2.0'
26
- spec.add_dependency 'faraday-gzip', '~> 2.0'
26
+ spec.add_dependency 'faraday-gzip', '>= 2', '< 4'
27
27
  spec.add_dependency 'json', '~> 2'
28
28
  spec.add_dependency 'zeitwerk', '~> 2.4'
29
29
 
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.0
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-10-15 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
@@ -42,16 +42,22 @@ dependencies:
42
42
  name: faraday-gzip
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '2.0'
47
+ version: '2'
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '4'
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
52
- - - "~>"
55
+ - - ">="
53
56
  - !ruby/object:Gem::Version
54
- version: '2.0'
57
+ version: '2'
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: '4'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: json
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -401,7 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
401
407
  - !ruby/object:Gem::Version
402
408
  version: '0'
403
409
  requirements: []
404
- rubygems_version: 3.5.21
410
+ rubygems_version: 3.5.23
405
411
  signing_key:
406
412
  specification_version: 4
407
413
  summary: Ruby interface to the Lokalise API