ruby-lokalise-api 7.1.1 → 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: 9f195975b35421d2d4be87df71c5167fe34fc7143b580a1b79368a30d386e5cf
4
- data.tar.gz: f461a8e2069ad81f3dd618cfa7f46641bdd020dbf893eb639e1cb04a83e35221
3
+ metadata.gz: 9945f7943aac029086c1140f091b893f0ee19daad1658025d6bcf8df80a1b2ea
4
+ data.tar.gz: 15e487ca72e3bd5a06569885a7cb01082330ba4ccf68545e116873582596d918
5
5
  SHA512:
6
- metadata.gz: 01d5ef8819e3cdba05c651049a7c8fb4876d0e1b59b6fc3a87442ef3ec178c2ca2799ebbf145a94cba9cae37faac9fa0f8e4e6297023e88fab6aa5df19d6f627
7
- data.tar.gz: 57bd17227380725a5b0e7898f23714584e354ace578b7e09f9c7fb87ce973594d07954d6cfcad3f42fc4a28b1d07ce2e9c681570f8fbc4f0b5d675bea75a1e6a
6
+ metadata.gz: 66da1dc1844fa17b05d27416b2e0b2760cbb439cb0b9a22163f07d310127a9d1ca52d129d3b6c64249ef25c27501035c8c216f80b0605d45be62f744ccbe0d71
7
+ data.tar.gz: a9f471a3f5341c9ac99f50cb1222889d56cee9f26a57a867655f4a3c9d3bbed8f0df76efc0a3b8eaa76372deecc9e3d06b60f791baf4e1d8383c981bbc732920
@@ -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.1'
4
+ VERSION = '7.2.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: 7.1.1
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: 2023-01-03 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
@@ -368,7 +368,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
368
368
  - !ruby/object:Gem::Version
369
369
  version: '0'
370
370
  requirements: []
371
- rubygems_version: 3.4.2
371
+ rubygems_version: 3.4.3
372
372
  signing_key:
373
373
  specification_version: 4
374
374
  summary: Ruby interface to the Lokalise API