ruby-lokalise-api 9.6.0 → 9.7.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 +4 -4
- data/lib/ruby_lokalise_api/data/resource_attributes.yml +16 -1
- data/lib/ruby_lokalise_api/endpoints/users_endpoint.rb +15 -0
- data/lib/ruby_lokalise_api/error.rb +38 -14
- data/lib/ruby_lokalise_api/resources/user.rb +10 -0
- data/lib/ruby_lokalise_api/rest/users.rb +21 -0
- data/lib/ruby_lokalise_api/rest.rb +1 -0
- data/lib/ruby_lokalise_api/version.rb +1 -1
- data/ruby-lokalise-api.gemspec +7 -4
- metadata +11 -9
- data/.github/CODE_OF_CONDUCT.md +0 -46
- data/.github/CONTRIBUTING.md +0 -21
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -11
- data/Gemfile +0 -5
- data/Rakefile +0 -44
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 603b18d5ece4ad1e2483aff80f09ea8e4cd9ea288f7e042558bbfbcb3cc8c1db
|
|
4
|
+
data.tar.gz: a3caa4d938ffad1e7424007722d6dfeef0a59f56ae16d331485c9d183d5138f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa22f7154e90bcf43d7c87c1d81aab19f1346036bd25bc1065ff99dcf6a52899e26af9ae25685ac151324a8412ea123cef328714aec45116703a087fc4433532
|
|
7
|
+
data.tar.gz: 4afd33993a293925a2f87b643990601aa446f1a54713bacb132f19326403fed6717685d48229d6a6a9e5f2b159529bc1677bb7d2202c04819c30ca8649c3c58f
|
|
@@ -123,6 +123,7 @@ payment_card:
|
|
|
123
123
|
- created_at_timestamp
|
|
124
124
|
project:
|
|
125
125
|
- project_id
|
|
126
|
+
- uuid
|
|
126
127
|
- project_type
|
|
127
128
|
- name
|
|
128
129
|
- description
|
|
@@ -131,8 +132,11 @@ project:
|
|
|
131
132
|
- created_by
|
|
132
133
|
- created_by_email
|
|
133
134
|
- team_id
|
|
135
|
+
- team_uuid
|
|
134
136
|
- base_language_id
|
|
135
137
|
- base_language_iso
|
|
138
|
+
- base_project_language_id
|
|
139
|
+
- base_project_language_uuid
|
|
136
140
|
- settings
|
|
137
141
|
- statistics
|
|
138
142
|
project_language:
|
|
@@ -245,12 +249,18 @@ team:
|
|
|
245
249
|
- name
|
|
246
250
|
- created_at
|
|
247
251
|
- created_at_timestamp
|
|
248
|
-
-
|
|
252
|
+
- plan_name
|
|
253
|
+
- logo_url
|
|
254
|
+
- role
|
|
249
255
|
- quota_usage
|
|
250
256
|
- quota_allowed
|
|
257
|
+
- is_team_suspended
|
|
258
|
+
- is_end_of_trial_active
|
|
259
|
+
- trial_days_left
|
|
251
260
|
team_user:
|
|
252
261
|
- team_id
|
|
253
262
|
- user_id
|
|
263
|
+
- uuid
|
|
254
264
|
- email
|
|
255
265
|
- fullname
|
|
256
266
|
- created_at
|
|
@@ -308,6 +318,11 @@ translation_provider:
|
|
|
308
318
|
- description
|
|
309
319
|
- tiers
|
|
310
320
|
- pairs
|
|
321
|
+
user:
|
|
322
|
+
- id
|
|
323
|
+
- uuid
|
|
324
|
+
- email
|
|
325
|
+
- fullname
|
|
311
326
|
webhook:
|
|
312
327
|
- project_id
|
|
313
328
|
- branch
|
|
@@ -6,20 +6,44 @@ module RubyLokaliseApi
|
|
|
6
6
|
ClientError = Class.new(self)
|
|
7
7
|
ServerError = Class.new(self)
|
|
8
8
|
|
|
9
|
-
BadRequest
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
class BadRequest < ClientError
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
class Unauthorized < ClientError
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
class NotAcceptable < ClientError
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class NotFound < ClientError
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class Conflict < ClientError
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
class TooManyRequests < ClientError
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
class Forbidden < ClientError
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
class Locked < ClientError
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
class MethodNotAllowed < ClientError
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
class NotImplemented < ServerError
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
class BadGateway < ServerError
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
class ServiceUnavailable < ServerError
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
class GatewayTimeout < ServerError
|
|
46
|
+
end
|
|
23
47
|
|
|
24
48
|
ERRORS = {
|
|
25
49
|
400 => RubyLokaliseApi::Error::BadRequest,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RubyLokaliseApi
|
|
4
|
+
module Rest
|
|
5
|
+
module Users
|
|
6
|
+
using RubyLokaliseApi::Utils::Classes
|
|
7
|
+
|
|
8
|
+
# Returns basic user information
|
|
9
|
+
#
|
|
10
|
+
# @return [RubyLokaliseApi::Resources::SystUseremLanguages]
|
|
11
|
+
# @param user_id [String, Integer]
|
|
12
|
+
def user(user_id)
|
|
13
|
+
params = { query: user_id }
|
|
14
|
+
|
|
15
|
+
data = endpoint(name: 'Users', params: params).do_get
|
|
16
|
+
|
|
17
|
+
resource 'User', data
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/ruby-lokalise-api.gemspec
CHANGED
|
@@ -16,8 +16,7 @@ Gem::Specification.new do |spec|
|
|
|
16
16
|
|
|
17
17
|
spec.files = Dir['README.md', 'LICENSE',
|
|
18
18
|
'CHANGELOG.md', 'lib/**/*.rb', 'lib/ruby_lokalise_api/data/*.yml',
|
|
19
|
-
'ruby-lokalise-api.gemspec'
|
|
20
|
-
'Gemfile', 'Rakefile']
|
|
19
|
+
'ruby-lokalise-api.gemspec']
|
|
21
20
|
spec.extra_rdoc_files = ['README.md']
|
|
22
21
|
spec.require_paths = ['lib']
|
|
23
22
|
|
|
@@ -27,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
|
27
26
|
spec.add_dependency 'json', '~> 2'
|
|
28
27
|
spec.add_dependency 'zeitwerk', '~> 2.4'
|
|
29
28
|
|
|
30
|
-
spec.add_development_dependency 'base64', '~> 0.
|
|
29
|
+
spec.add_development_dependency 'base64', '~> 0.3.0'
|
|
31
30
|
spec.add_development_dependency 'dotenv', '~> 3.0'
|
|
32
31
|
spec.add_development_dependency 'oj', '~> 3.10'
|
|
33
32
|
spec.add_development_dependency 'rake', '~> 13.0'
|
|
@@ -40,6 +39,10 @@ Gem::Specification.new do |spec|
|
|
|
40
39
|
spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
|
|
41
40
|
spec.add_development_dependency 'webmock', '~> 3.14'
|
|
42
41
|
spec.metadata = {
|
|
43
|
-
'rubygems_mfa_required' => 'true'
|
|
42
|
+
'rubygems_mfa_required' => 'true',
|
|
43
|
+
'bug_tracker_uri' => 'https://github.com/lokalise/ruby-lokalise-api/issues',
|
|
44
|
+
'changelog_uri' => 'https://lokalise.github.io/ruby-lokalise-api/additional_info/changelog',
|
|
45
|
+
'documentation_uri' => 'https://github.com/lokalise/ruby-lokalise-api/blob/master/README.md',
|
|
46
|
+
'homepage_uri' => spec.homepage
|
|
44
47
|
}
|
|
45
48
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby-lokalise-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 9.
|
|
4
|
+
version: 9.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ilya Krukowski
|
|
@@ -91,14 +91,14 @@ dependencies:
|
|
|
91
91
|
requirements:
|
|
92
92
|
- - "~>"
|
|
93
93
|
- !ruby/object:Gem::Version
|
|
94
|
-
version: 0.
|
|
94
|
+
version: 0.3.0
|
|
95
95
|
type: :development
|
|
96
96
|
prerelease: false
|
|
97
97
|
version_requirements: !ruby/object:Gem::Requirement
|
|
98
98
|
requirements:
|
|
99
99
|
- - "~>"
|
|
100
100
|
- !ruby/object:Gem::Version
|
|
101
|
-
version: 0.
|
|
101
|
+
version: 0.3.0
|
|
102
102
|
- !ruby/object:Gem::Dependency
|
|
103
103
|
name: dotenv
|
|
104
104
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -262,14 +262,9 @@ extensions: []
|
|
|
262
262
|
extra_rdoc_files:
|
|
263
263
|
- README.md
|
|
264
264
|
files:
|
|
265
|
-
- ".github/CODE_OF_CONDUCT.md"
|
|
266
|
-
- ".github/CONTRIBUTING.md"
|
|
267
|
-
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
268
265
|
- CHANGELOG.md
|
|
269
|
-
- Gemfile
|
|
270
266
|
- LICENSE
|
|
271
267
|
- README.md
|
|
272
|
-
- Rakefile
|
|
273
268
|
- lib/ruby_lokalise_api.rb
|
|
274
269
|
- lib/ruby_lokalise_api/base_client.rb
|
|
275
270
|
- lib/ruby_lokalise_api/client.rb
|
|
@@ -334,6 +329,7 @@ files:
|
|
|
334
329
|
- lib/ruby_lokalise_api/endpoints/teams_endpoint.rb
|
|
335
330
|
- lib/ruby_lokalise_api/endpoints/translation_providers_endpoint.rb
|
|
336
331
|
- lib/ruby_lokalise_api/endpoints/translations_endpoint.rb
|
|
332
|
+
- lib/ruby_lokalise_api/endpoints/users_endpoint.rb
|
|
337
333
|
- lib/ruby_lokalise_api/endpoints/webhooks_endpoint.rb
|
|
338
334
|
- lib/ruby_lokalise_api/error.rb
|
|
339
335
|
- lib/ruby_lokalise_api/generics.rb
|
|
@@ -369,6 +365,7 @@ files:
|
|
|
369
365
|
- lib/ruby_lokalise_api/resources/team_user_group.rb
|
|
370
366
|
- lib/ruby_lokalise_api/resources/translation.rb
|
|
371
367
|
- lib/ruby_lokalise_api/resources/translation_provider.rb
|
|
368
|
+
- lib/ruby_lokalise_api/resources/user.rb
|
|
372
369
|
- lib/ruby_lokalise_api/resources/webhook.rb
|
|
373
370
|
- lib/ruby_lokalise_api/response.rb
|
|
374
371
|
- lib/ruby_lokalise_api/rest.rb
|
|
@@ -396,6 +393,7 @@ files:
|
|
|
396
393
|
- lib/ruby_lokalise_api/rest/teams.rb
|
|
397
394
|
- lib/ruby_lokalise_api/rest/translation_providers.rb
|
|
398
395
|
- lib/ruby_lokalise_api/rest/translations.rb
|
|
396
|
+
- lib/ruby_lokalise_api/rest/users.rb
|
|
399
397
|
- lib/ruby_lokalise_api/rest/webhooks.rb
|
|
400
398
|
- lib/ruby_lokalise_api/utils/attributes.rb
|
|
401
399
|
- lib/ruby_lokalise_api/utils/classes.rb
|
|
@@ -409,6 +407,10 @@ licenses:
|
|
|
409
407
|
- BSD-3-Clause
|
|
410
408
|
metadata:
|
|
411
409
|
rubygems_mfa_required: 'true'
|
|
410
|
+
bug_tracker_uri: https://github.com/lokalise/ruby-lokalise-api/issues
|
|
411
|
+
changelog_uri: https://lokalise.github.io/ruby-lokalise-api/additional_info/changelog
|
|
412
|
+
documentation_uri: https://github.com/lokalise/ruby-lokalise-api/blob/master/README.md
|
|
413
|
+
homepage_uri: https://github.com/lokalise/ruby-lokalise-api
|
|
412
414
|
rdoc_options: []
|
|
413
415
|
require_paths:
|
|
414
416
|
- lib
|
|
@@ -423,7 +425,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
423
425
|
- !ruby/object:Gem::Version
|
|
424
426
|
version: '0'
|
|
425
427
|
requirements: []
|
|
426
|
-
rubygems_version:
|
|
428
|
+
rubygems_version: 4.0.9
|
|
427
429
|
specification_version: 4
|
|
428
430
|
summary: Ruby interface to the Lokalise API
|
|
429
431
|
test_files: []
|
data/.github/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
6
|
-
|
|
7
|
-
## Our Standards
|
|
8
|
-
|
|
9
|
-
Examples of behavior that contributes to creating a positive environment include:
|
|
10
|
-
|
|
11
|
-
* Using welcoming and inclusive language
|
|
12
|
-
* Being respectful of differing viewpoints and experiences
|
|
13
|
-
* Gracefully accepting constructive criticism
|
|
14
|
-
* Focusing on what is best for the community
|
|
15
|
-
* Showing empathy towards other community members
|
|
16
|
-
|
|
17
|
-
Examples of unacceptable behavior by participants include:
|
|
18
|
-
|
|
19
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
|
20
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
21
|
-
* Public or private harassment
|
|
22
|
-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
|
23
|
-
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
24
|
-
|
|
25
|
-
## Our Responsibilities
|
|
26
|
-
|
|
27
|
-
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
|
28
|
-
|
|
29
|
-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
|
30
|
-
|
|
31
|
-
## Scope
|
|
32
|
-
|
|
33
|
-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
|
34
|
-
|
|
35
|
-
## Enforcement
|
|
36
|
-
|
|
37
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@lokalise.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
|
38
|
-
|
|
39
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
|
40
|
-
|
|
41
|
-
## Attribution
|
|
42
|
-
|
|
43
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
|
44
|
-
|
|
45
|
-
[homepage]: http://contributor-covenant.org
|
|
46
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/.github/CONTRIBUTING.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
1. [Fork the repository.][fork]
|
|
4
|
-
2. [Create a topic branch.][branch]
|
|
5
|
-
3. Implement your feature or bug fix.
|
|
6
|
-
4. Don't forget to add specs and make sure they pass by running `rspec .`.
|
|
7
|
-
5. Make sure your code complies with the style guide by running `rubocop`. `rubocop -a` can automatically fix most issues for you. Run `rubocop -A` to make it more aggressive.
|
|
8
|
-
6. If necessary, add documentation for your feature or bug fix.
|
|
9
|
-
7. Commit and push your changes.
|
|
10
|
-
8. [Submit a pull request.][pr]
|
|
11
|
-
|
|
12
|
-
[fork]: http://help.github.com/fork-a-repo/
|
|
13
|
-
[branch]: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-branches
|
|
14
|
-
[pr]: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests
|
|
15
|
-
|
|
16
|
-
## Previewing the docs locally
|
|
17
|
-
|
|
18
|
-
1. Clone the repo.
|
|
19
|
-
2. `cd docs`
|
|
20
|
-
3. `bundle exec jekyll serve --baseurl=''`.
|
|
21
|
-
4. Navigate to `http://localhost:4000` and observe the docs.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
### Summary
|
|
2
|
-
|
|
3
|
-
Provide a general description of the code changes in your pull
|
|
4
|
-
request. Were there any bugs you had fixed? If so, mention them. If
|
|
5
|
-
these bugs have open GitHub issues, be sure to tag them here as well,
|
|
6
|
-
to keep the conversation linked together.
|
|
7
|
-
|
|
8
|
-
### Other Information
|
|
9
|
-
|
|
10
|
-
If there's anything else that's important and relevant to your pull
|
|
11
|
-
request, mention that information here.
|
data/Gemfile
DELETED
data/Rakefile
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'rake'
|
|
4
|
-
require 'rake/clean'
|
|
5
|
-
require 'rspec/core/rake_task'
|
|
6
|
-
require 'rubocop/rake_task'
|
|
7
|
-
|
|
8
|
-
begin
|
|
9
|
-
require 'bundler/setup'
|
|
10
|
-
Bundler::GemHelper.install_tasks
|
|
11
|
-
rescue LoadError
|
|
12
|
-
puts 'although not required, bundler is recommened for running the tests'
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
RSpec::Core::RakeTask.new(:spec)
|
|
16
|
-
|
|
17
|
-
RuboCop::RakeTask.new do |task|
|
|
18
|
-
task.requires << 'rubocop-performance'
|
|
19
|
-
task.requires << 'rubocop-rspec'
|
|
20
|
-
task.requires << 'rubocop-rake'
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
CLOBBER.include(FileList['./*.gem'])
|
|
24
|
-
|
|
25
|
-
namespace :lokalise do
|
|
26
|
-
desc 'Updates RubyGems, installs dependencies'
|
|
27
|
-
task :install do
|
|
28
|
-
puts 'Running bundle install'
|
|
29
|
-
sh 'gem update --system'
|
|
30
|
-
sh 'bundle'
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
desc 'Builds the gem'
|
|
34
|
-
task :build do
|
|
35
|
-
puts 'Building'
|
|
36
|
-
sh 'gem build ruby-lokalise-api.gemspec'
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
task rubospec: %w[rubocop spec]
|
|
41
|
-
|
|
42
|
-
task full_build: %w[clobber lokalise:install lokalise:build]
|
|
43
|
-
|
|
44
|
-
task default: :full_build
|