ruby-lokalise-api 7.1.0 → 7.2.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: 6f88c68ae7c24d90be54394259b2fc477eb52a485775be7292789ea743155556
4
- data.tar.gz: 0ce8f2d8db252f4e7fa44cb87b68786adfacd86849b16d10c60ab58d3b9e51b8
3
+ metadata.gz: 9945f7943aac029086c1140f091b893f0ee19daad1658025d6bcf8df80a1b2ea
4
+ data.tar.gz: 15e487ca72e3bd5a06569885a7cb01082330ba4ccf68545e116873582596d918
5
5
  SHA512:
6
- metadata.gz: bb4469e28faafba3f0c81f4fb27b5b2747055da3d93cca81cf4244a38d0962ba896770a5fa8d81e859ad26f6f67cdf549ad288073bd5c946c5dacc58a812a1e7
7
- data.tar.gz: fc41d966f5c55bbf900015ae3fa8f60f28cb9f1931b1f3172c247152e040dc0fab8b51eff7dcd107cd4423c73dca615b3db4f27e7e83acd963b37724d9251025
6
+ metadata.gz: 66da1dc1844fa17b05d27416b2e0b2760cbb439cb0b9a22163f07d310127a9d1ca52d129d3b6c64249ef25c27501035c8c216f80b0605d45be62f744ccbe0d71
7
+ data.tar.gz: a9f471a3f5341c9ac99f50cb1222889d56cee9f26a57a867655f4a3c9d3bbed8f0df76efc0a3b8eaa76372deecc9e3d06b60f791baf4e1d8383c981bbc732920
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  BSD 3 Clause
2
2
 
3
- Copyright 2021 Lokalise Group, Ilya Krukowski
3
+ Copyright 2023 Lokalise Group, Ilya Krukowski
4
4
 
5
5
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6
6
 
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  ![Gem](https://img.shields.io/gem/v/ruby-lokalise-api)
4
4
  ![CI](https://github.com/lokalise/ruby-lokalise-api/actions/workflows/ci.yml/badge.svg)
5
- [![Test Coverage](https://codecov.io/gh/lokalise/ruby-lokalise-api/graph/badge.svg)](https://codecov.io/gh/lokalise/ruby-lokalise-api)
6
5
  ![Downloads total](https://img.shields.io/gem/dt/ruby-lokalise-api)
7
6
 
8
7
  Official opinionated Ruby interface for the [Lokalise API](https://developers.lokalise.com/reference/lokalise-rest-api) that represents returned data as Ruby objects.
@@ -126,7 +126,11 @@ module RubyLokaliseApi
126
126
  data_key_singular = data_key_for model_class: model_class
127
127
  if content.key? data_key_singular
128
128
  data = content.delete data_key_singular
129
- content.merge! data
129
+ if data.is_a?(Hash)
130
+ content.merge! data
131
+ else
132
+ content[data_key_singular] = data
133
+ end
130
134
  end
131
135
 
132
136
  new response
@@ -4,8 +4,8 @@ module RubyLokaliseApi
4
4
  module Resources
5
5
  class Jwt < Base
6
6
  class << self
7
- def endpoint(*_args)
8
- path_from 'jwt-tokens': 'ota'
7
+ def endpoint(project_id, *_args)
8
+ path_from projects: project_id, tokens: ''
9
9
  end
10
10
  end
11
11
  end
@@ -5,10 +5,10 @@ module RubyLokaliseApi
5
5
  module Jwt
6
6
  # Returns a JWT that can be used to work with OTA
7
7
  #
8
- # @see https://developers.lokalise.com/reference/get-ota-jwt
8
+ # @see https://developers.lokalise.com/reference/create-service-jwt
9
9
  # @return [RubyLokaliseApi::Resources::Jwt]
10
- def jwt
11
- c_r RubyLokaliseApi::Resources::Jwt, :find, nil, {}
10
+ def jwt(project_id, params = {service: :ota})
11
+ c_r RubyLokaliseApi::Resources::Jwt, :create, project_id, params
12
12
  end
13
13
  end
14
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyLokaliseApi
4
- VERSION = '7.1.0'
4
+ VERSION = '7.2.0'
5
5
  end
@@ -23,11 +23,10 @@ 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', '~> 0.1'
26
+ spec.add_dependency 'faraday-gzip', '>= 0.1', '< 2.0'
27
27
  spec.add_dependency 'json', '~> 2'
28
28
  spec.add_dependency 'zeitwerk', '~> 2.4'
29
29
 
30
- spec.add_development_dependency 'codecov', '~> 0.1'
31
30
  spec.add_development_dependency 'dotenv', '~> 2.5'
32
31
  spec.add_development_dependency 'oj', '~> 3.10'
33
32
  spec.add_development_dependency 'rake', '~> 13.0'
@@ -36,7 +35,7 @@ Gem::Specification.new do |spec|
36
35
  spec.add_development_dependency 'rubocop-performance', '~> 1.5'
37
36
  spec.add_development_dependency 'rubocop-rake', '~> 0.6'
38
37
  spec.add_development_dependency 'rubocop-rspec', '~> 2.0'
39
- spec.add_development_dependency 'simplecov', '~> 0.16'
38
+ spec.add_development_dependency 'simplecov', '~> 0.21'
40
39
  spec.add_development_dependency 'vcr', '~> 6.0'
41
40
  spec.add_development_dependency 'webmock', '~> 3.14'
42
41
  spec.metadata = {
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: 7.1.0
4
+ version: 7.2.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: 2022-11-30 00:00:00.000000000 Z
11
+ date: 2023-01-11 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
47
  version: '0.1'
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '2.0'
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
57
  version: '0.1'
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: '2.0'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: json
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +86,6 @@ dependencies:
80
86
  - - "~>"
81
87
  - !ruby/object:Gem::Version
82
88
  version: '2.4'
83
- - !ruby/object:Gem::Dependency
84
- name: codecov
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '0.1'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '0.1'
97
89
  - !ruby/object:Gem::Dependency
98
90
  name: dotenv
99
91
  requirement: !ruby/object:Gem::Requirement
@@ -212,14 +204,14 @@ dependencies:
212
204
  requirements:
213
205
  - - "~>"
214
206
  - !ruby/object:Gem::Version
215
- version: '0.16'
207
+ version: '0.21'
216
208
  type: :development
217
209
  prerelease: false
218
210
  version_requirements: !ruby/object:Gem::Requirement
219
211
  requirements:
220
212
  - - "~>"
221
213
  - !ruby/object:Gem::Version
222
- version: '0.16'
214
+ version: '0.21'
223
215
  - !ruby/object:Gem::Dependency
224
216
  name: vcr
225
217
  requirement: !ruby/object:Gem::Requirement
@@ -376,7 +368,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
376
368
  - !ruby/object:Gem::Version
377
369
  version: '0'
378
370
  requirements: []
379
- rubygems_version: 3.3.26
371
+ rubygems_version: 3.4.3
380
372
  signing_key:
381
373
  specification_version: 4
382
374
  summary: Ruby interface to the Lokalise API