ruby-lokalise-api 6.1.0 → 6.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: 83ba3c3b7e6b33c712f31ef3e1d66daaed33604fd227b2fcef1cb8ed71fddd1c
4
- data.tar.gz: 78b7decbd94a6bdd45c5b684cb07a0ee50a21045a757b3b7e61ab5c10c8618c6
3
+ metadata.gz: 90b862c7994f5c977a2a3a71dac7877163d83c7051ea16b808a770f2b1c24f9e
4
+ data.tar.gz: ca1cb74e869faae115c85d59011bd254bf0f06e6738d81297de4239d73c4c8d9
5
5
  SHA512:
6
- metadata.gz: a8cd7b58cf1c83534cc2faad45fd998ba200102db25a6a191483dd6d4ecb15809ca4563bd9965f052082fac93257daf53e4668fae7d3696bf90a886dd5fe1c11
7
- data.tar.gz: '008fe8a740c7a1d3d53229367df62082b83b1a5665f97b6a6d03ac29fe863b8b970c5fb77eb7196c26690234ff07e62abb58e7f014a85ec1fde78ca32adb51ea'
6
+ metadata.gz: 98cba873be8c354d5de708493cbdf078bca3c1269b8587417044b3a7e5b2c8d235b83e09de84cb2d03279d3459074b1b150dc7b8a5e830be12332254d2f57cbf
7
+ data.tar.gz: 5ef019ca07ac5e515f31805ebc63dd962832e42df1c10de46bc6a053de8639d92831763687d8cd80289ec8fb755da9c6b15f8272c0ec50c00c0ce722be4ed30c
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  BSD 3 Clause
2
2
 
3
- Copyright 2021 Lokalise Group, Ilya Bodrov
3
+ Copyright 2021 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
@@ -5,7 +5,7 @@
5
5
  [![Test Coverage](https://codecov.io/gh/lokalise/ruby-lokalise-api/graph/badge.svg)](https://codecov.io/gh/lokalise/ruby-lokalise-api)
6
6
  ![Downloads total](https://img.shields.io/gem/dt/ruby-lokalise-api)
7
7
 
8
- Official opinionated Ruby interface for the [Lokalise API](https://app.lokalise.com/api2docs/curl/) that represents returned data as Ruby objects.
8
+ Official opinionated Ruby interface for the [Lokalise API](https://developers.lokalise.com/reference/lokalise-rest-api) that represents returned data as Ruby objects.
9
9
 
10
10
  Looking for a Rails integration? Try the [lokalise_rails gem](https://github.com/bodrovis/lokalise_rails). Also you can use a [lokalise_manager gem](https://github.com/bodrovis/lokalise_manager) which allows to exchange translation files between Lokalise and *any* Ruby script.
11
11
 
@@ -57,4 +57,4 @@ You can also check [this repo containing some usage examples](https://github.com
57
57
 
58
58
  This gem is licensed under the [BSD 3 Clause license](https://github.com/lokalise/ruby-lokalise-api/blob/master/LICENSE). Prior to version 4 the license type was MIT.
59
59
 
60
- Copyright (c) [Lokalise team](http://lokalise.co) and [Ilya Bodrov](http://bodrovis.tech)
60
+ Copyright (c) [Lokalise team](http://lokalise.co) and [Ilya Krukowski](http://bodrovis.tech)
@@ -27,6 +27,14 @@ module RubyLokaliseApi
27
27
  @path = infer_path_from response, endpoint_generator
28
28
  end
29
29
 
30
+ def [](raw_key_attr)
31
+ key_attr = raw_key_attr.to_s.to_sym
32
+
33
+ return nil unless self.instance_variables.include?(:"@#{key_attr}")
34
+
35
+ self.send key_attr
36
+ end
37
+
30
38
  class << self
31
39
  # Dynamically adds attribute readers for each inherited class.
32
40
  # Attributes are defined in the `data/attributes.json` file.
@@ -5,7 +5,7 @@ module RubyLokaliseApi
5
5
  module Branches
6
6
  # Returns all branches for the given project
7
7
  #
8
- # @see https://lokalise.com/api2docs/curl/#transition-list-all-branches-get
8
+ # @see https://developers.lokalise.com/reference/list-all-branches
9
9
  # @return [RubyLokaliseApi::Collection::Branch<RubyLokaliseApi::Resources::Branch>]
10
10
  # @param project_id [String]
11
11
  # @param params [Hash]
@@ -15,7 +15,7 @@ module RubyLokaliseApi
15
15
 
16
16
  # Creates a new branch inside the given project
17
17
  #
18
- # @see https://lokalise.com/api2docs/curl/#transition-create-a-branch-post
18
+ # @see https://developers.lokalise.com/reference/create-a-branch
19
19
  # @return [RubyLokaliseApi::Resources::Branch]
20
20
  # @param project_id [String]
21
21
  # @param params [Hash]
@@ -25,7 +25,7 @@ module RubyLokaliseApi
25
25
 
26
26
  # Returns a single branch for the given project
27
27
  #
28
- # @see https://lokalise.com/api2docs/curl/#transition-retrieve-a-branch-get
28
+ # @see https://developers.lokalise.com/reference/retrieve-a-branch
29
29
  # @return [RubyLokaliseApi::Resources::Branch]
30
30
  # @param project_id [String]
31
31
  # @param branch_id [String, Integer]
@@ -35,7 +35,7 @@ module RubyLokaliseApi
35
35
 
36
36
  # Updates the given branch inside the given project
37
37
  #
38
- # @see https://lokalise.com/api2docs/curl/#transition-update-a-branch-put
38
+ # @see https://developers.lokalise.com/reference/update-a-branch
39
39
  # @return [RubyLokaliseApi::Resources::Branch]
40
40
  # @param project_id [String]
41
41
  # @param branch_id [String, Integer]
@@ -46,7 +46,7 @@ module RubyLokaliseApi
46
46
 
47
47
  # Deletes branch inside the given project
48
48
  #
49
- # @see https://lokalise.com/api2docs/curl/#transition-delete-a-branch-delete
49
+ # @see https://developers.lokalise.com/reference/delete-a-branch
50
50
  # @return [Hash]
51
51
  # @param project_id [String]
52
52
  # @param branch_id [String, Integer]
@@ -56,7 +56,7 @@ module RubyLokaliseApi
56
56
 
57
57
  # Merges a branch in the project
58
58
  #
59
- # @see https://lokalise.com/api2docs/curl/#transition-merge-a-branch-post
59
+ # @see https://developers.lokalise.com/reference/merge-a-branch
60
60
  # @return [Hash]
61
61
  # @param project_id [String]
62
62
  # @param branch_id [String, Integer]
@@ -5,7 +5,7 @@ module RubyLokaliseApi
5
5
  module Orders
6
6
  # Returns all orders for the given team
7
7
  #
8
- # @see https://lokalise.co/api2docs/curl/#transition-list-all-orders-get
8
+ # @see https://developers.lokalise.com/reference/list-all-orders
9
9
  # @return [RubyLokaliseApi::Collection::Order<RubyLokaliseApi::Resources::Order>]
10
10
  # @param team_id [String]
11
11
  # @param params [Hash]
@@ -15,7 +15,7 @@ module RubyLokaliseApi
15
15
 
16
16
  # Returns a single order for the given team
17
17
  #
18
- # @see https://lokalise.co/api2docs/curl/#transition-retrieve-an-order-get
18
+ # @see https://developers.lokalise.com/reference/retrieve-an-order
19
19
  # @return [RubyLokaliseApi::Resources::Order]
20
20
  # @param team_id [String]
21
21
  # @param order_id [String, Integer]
@@ -25,7 +25,7 @@ module RubyLokaliseApi
25
25
 
26
26
  # Creates an order for the given team
27
27
  #
28
- # @see https://lokalise.co/api2docs/curl/#transition-create-an-order-post
28
+ # @see https://developers.lokalise.com/reference/create-an-order
29
29
  # @return [RubyLokaliseApi::Resources::Order]
30
30
  # @param team_id [String]
31
31
  # @param params [Hash]
@@ -23,7 +23,7 @@ module RubyLokaliseApi
23
23
 
24
24
  # Creates a payment card
25
25
  #
26
- # @see https://lokalise.co/api2docs/curl/#transition-create-a-card-post
26
+ # @see https://developers.lokalise.com/reference/create-a-card
27
27
  # @return [RubyLokaliseApi::Resources::PaymentCard]
28
28
  # @param params [Hash]
29
29
  def create_payment_card(params)
@@ -5,7 +5,7 @@ module RubyLokaliseApi
5
5
  module TeamUserGroups
6
6
  # Returns all team user groups for the given team
7
7
  #
8
- # @see https://lokalise.co/api2docs/curl/#transition-list-all-groups-get
8
+ # @see https://developers.lokalise.com/reference/list-all-team-users
9
9
  # @return [RubyLokaliseApi::Collection::TeamUserGroup<RubyLokaliseApi::Resources::TeamUserGroup>]
10
10
  # @param team_id [String]
11
11
  # @param params [Hash]
@@ -15,7 +15,7 @@ module RubyLokaliseApi
15
15
 
16
16
  # Returns team user from the given team
17
17
  #
18
- # @see https://lokalise.co/api2docs/curl/#transition-retrieve-a-group-get
18
+ # @see https://developers.lokalise.com/reference/retrieve-a-team-user
19
19
  # @return [RubyLokaliseApi::Resources::TeamUserGroup]
20
20
  # @param team_id [String]
21
21
  # @param group_id [String, Integer]
@@ -25,7 +25,7 @@ module RubyLokaliseApi
25
25
 
26
26
  # Creates team user group
27
27
  #
28
- # @see https://lokalise.co/api2docs/curl/#resource-team-user-groups
28
+ # @see https://developers.lokalise.com/reference/create-a-group
29
29
  # @return [RubyLokaliseApi::Resources::TeamUserGroup]
30
30
  # @param params [Hash]
31
31
  def create_team_user_group(team_id, params)
@@ -34,7 +34,7 @@ module RubyLokaliseApi
34
34
 
35
35
  # Updates team user group for the given team
36
36
  #
37
- # @see https://lokalise.co/api2docs/curl/#transition-update-a-group-put
37
+ # @see https://developers.lokalise.com/reference/update-a-group
38
38
  # @return [RubyLokaliseApi::Resources::TeamUserGroup]
39
39
  # @param team_id [String]
40
40
  # @param group_id [String, Integer]
@@ -45,7 +45,7 @@ module RubyLokaliseApi
45
45
 
46
46
  # Deletes team user group from the given team
47
47
  #
48
- # @see https://lokalise.co/api2docs/curl/#transition-delete-a-group-delete
48
+ # @see https://developers.lokalise.com/reference/delete-a-group
49
49
  # @return [RubyLokaliseApi::Resources::TeamUserGroup]
50
50
  # @param team_id [String]
51
51
  # @param group_id [String, Integer]
@@ -55,7 +55,7 @@ module RubyLokaliseApi
55
55
 
56
56
  # Adds projects to the given group
57
57
  #
58
- # @see https://lokalise.co/api2docs/curl/#transition-add-projects-to-group-put
58
+ # @see https://developers.lokalise.com/reference/add-projects-to-group
59
59
  # @return [RubyLokaliseApi::Resources::TeamUserGroup]
60
60
  # @param team_id [String]
61
61
  # @param group_id [String, Integer]
@@ -68,7 +68,7 @@ module RubyLokaliseApi
68
68
 
69
69
  # Removes projects from the given group
70
70
  #
71
- # @see https://lokalise.co/api2docs/curl/#transition-remove-projects-from-group-put
71
+ # @see https://developers.lokalise.com/reference/remove-projects-from-group
72
72
  # @return [RubyLokaliseApi::Resources::TeamUserGroup]
73
73
  # @param team_id [String]
74
74
  # @param group_id [String, Integer]
@@ -81,7 +81,7 @@ module RubyLokaliseApi
81
81
 
82
82
  # Adds users to the given group
83
83
  #
84
- # @see https://lokalise.co/api2docs/curl/#transition-add-members-to-group-put
84
+ # @see https://developers.lokalise.com/reference/add-members-to-group
85
85
  # @return [RubyLokaliseApi::Resources::TeamUserGroup]
86
86
  # @param team_id [String]
87
87
  # @param group_id [String, Integer]
@@ -94,7 +94,7 @@ module RubyLokaliseApi
94
94
 
95
95
  # Removes users from the given group
96
96
  #
97
- # @see https://lokalise.co/api2docs/curl/#transition-remove-members-from-group-put
97
+ # @see https://developers.lokalise.com/reference/remove-members-from-group
98
98
  # @return [RubyLokaliseApi::Resources::TeamUserGroup]
99
99
  # @param team_id [String]
100
100
  # @param group_id [String, Integer]
@@ -56,7 +56,7 @@ module RubyLokaliseApi
56
56
 
57
57
  # Regenerates secret for the given webhook
58
58
  #
59
- # @see https://lokalise.com/api2docs/curl/#transition-regenerate-a-webhook-secret-patch
59
+ # @see https://developers.lokalise.com/reference/regenerate-a-webhook-secret
60
60
  # @return [Hash]
61
61
  # @param project_id [String]
62
62
  # @param webhook_id [String, Integer]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyLokaliseApi
4
- VERSION = '6.1.0'
4
+ VERSION = '6.2.0'
5
5
  end
@@ -5,7 +5,7 @@ require File.expand_path('lib/ruby_lokalise_api/version', __dir__)
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'ruby-lokalise-api'
7
7
  spec.version = RubyLokaliseApi::VERSION
8
- spec.authors = ['Ilya Bodrov-Krukowski']
8
+ spec.authors = ['Ilya Krukowski']
9
9
  spec.email = ['golosizpru@gmail.com']
10
10
  spec.summary = 'Ruby interface to the Lokalise API'
11
11
  spec.description = 'Opinionated Ruby client for the Lokalise platform API allowing to work with translations, projects, users and other resources as with Ruby objects.'
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: 6.1.0
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
- - Ilya Bodrov-Krukowski
7
+ - Ilya Krukowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-27 00:00:00.000000000 Z
11
+ date: 2022-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
359
359
  - !ruby/object:Gem::Version
360
360
  version: '0'
361
361
  requirements: []
362
- rubygems_version: 3.3.17
362
+ rubygems_version: 3.3.19
363
363
  signing_key:
364
364
  specification_version: 4
365
365
  summary: Ruby interface to the Lokalise API