crowdin-api 0.6.0 → 1.0.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: b76f37189de2a8cde395736ad317b4e8ef2bc269667991472947e77afc513f79
4
- data.tar.gz: 610af0f467d9872503d84b55444797549d9d1f7989c918d49ba489b4b1832d6e
3
+ metadata.gz: 65f8ac7742b9d609ae45c9f63c6772903990c3a4a853e8a2759e1401d82342cd
4
+ data.tar.gz: e1e2739d09730e35b083316b891b8e43d8d6a3cb7845e7200a4940d461fb80cd
5
5
  SHA512:
6
- metadata.gz: 6eacd28cfff8970ae14ac0658cc1605b9939684b5b52eec0b6eb3c064f198fe932ed61e45818c3e8b64ae1f88610893cdff621523ed6059e2b3da75c48cea038
7
- data.tar.gz: be4342ea720e23228001533357011923b46326ddf6e85e12cfe7777e62ea7433cc7b86164163f46d31eb798481661ca8ece3c4418702f8b40c670963602da722
6
+ metadata.gz: b204059241859851f34e3cb9a5e04109536aaac231a4b0bb5e08577974832dc29df7eed547844a9ccdf4e668281e97c731c3f913fc4ec3f671a04ef5bd5b770f
7
+ data.tar.gz: 7acb153132b0634bff479f0e5a038f1ef73281b19bb6700b723788d248f7e48f97e3bf216c6e53b89f788fb20b463982f1edcfc0c34d027d928d69c9f9f38f40
@@ -0,0 +1,30 @@
1
+ name: Build and Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '*'
7
+
8
+ jobs:
9
+ build-and-publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ packages: write
13
+ contents: read
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Set up Ruby 2.6
17
+ uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
18
+ with:
19
+ ruby-version: 2.6
20
+ - run: bundle install
21
+ - name: Publish to RubyGems
22
+ run: |
23
+ mkdir -p $HOME/.gem
24
+ touch $HOME/.gem/credentials
25
+ chmod 0600 $HOME/.gem/credentials
26
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
27
+ gem build *.gemspec
28
+ gem push *.gem
29
+ env:
30
+ GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_AUTH_TOKEN }}"
@@ -0,0 +1,31 @@
1
+ name: Test and Lint
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - '**'
7
+ pull_request:
8
+ branches: [ main ]
9
+
10
+ jobs:
11
+ test-and-lint:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ ruby-version: ['2.6', '2.7', '3.0']
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v2
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: ${{ matrix.ruby-version }}
23
+ bundler-cache: true
24
+ - name: Run tests and linter
25
+ run: |
26
+ bundle exec rubocop
27
+ bundle exec rake
28
+ - name: Publish code coverage report
29
+ uses: codecov/codecov-action@v1
30
+ with:
31
+ token: ${{ secrets.CODECOV_TOKEN }}
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ # Ruby logs
2
+ .ruby-version
3
+ .idea
4
+
5
+ # MacOS logs
6
+ .DS_Store
7
+
8
+ # Versioning
9
+ Gemfile.lock
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ AllCops:
4
+ SuggestExtensions: false
5
+ NewCops: enable
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,118 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2021-11-29 03:21:36 UTC using RuboCop version 1.23.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: Include.
12
+ # Include: **/*.gemspec
13
+ Gemspec/RequireMFA:
14
+ Exclude:
15
+ - 'crowdin-api.gemspec'
16
+
17
+ # Offense count: 1
18
+ # Configuration parameters: Include.
19
+ # Include: **/*.gemspec
20
+ Gemspec/RequiredRubyVersion:
21
+ Exclude:
22
+ - 'crowdin-api.gemspec'
23
+
24
+ # Offense count: 1
25
+ # Cop supports --auto-correct.
26
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
27
+ # SupportedStylesForExponentOperator: space, no_space
28
+ Layout/SpaceAroundOperators:
29
+ Exclude:
30
+ - 'crowdin-api.gemspec'
31
+
32
+ # Offense count: 1
33
+ Lint/MissingSuper:
34
+ Exclude:
35
+ - 'lib/crowdin-api/core/errors.rb'
36
+
37
+ # Offense count: 2
38
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
39
+ Metrics/AbcSize:
40
+ Max: 20
41
+
42
+ # Offense count: 4
43
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
44
+ Metrics/MethodLength:
45
+ Max: 14
46
+
47
+ # Offense count: 2
48
+ # Configuration parameters: CountComments, CountAsOne.
49
+ Metrics/ModuleLength:
50
+ Max: 205
51
+
52
+ # Offense count: 1
53
+ # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
54
+ Metrics/ParameterLists:
55
+ Max: 6
56
+
57
+ # Offense count: 1
58
+ Naming/AccessorMethodName:
59
+ Exclude:
60
+ - 'lib/crowdin-api/core/request.rb'
61
+
62
+ # Offense count: 3
63
+ # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
64
+ # CheckDefinitionPathHierarchyRoots: lib, spec, test, src
65
+ # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
66
+ Naming/FileName:
67
+ Exclude:
68
+ - 'lib/crowdin-api.rb'
69
+ - 'spec/core/config-instance_spec.rb'
70
+ - 'spec/crowdin-api_spec.rb'
71
+
72
+ # Offense count: 3
73
+ # Cop supports --auto-correct.
74
+ # Configuration parameters: PreferredName.
75
+ Naming/RescuedExceptionsVariableName:
76
+ Exclude:
77
+ - 'lib/crowdin-api/core/request.rb'
78
+
79
+ # Offense count: 7
80
+ # Cop supports --auto-correct.
81
+ # Configuration parameters: EnforcedStyle.
82
+ # SupportedStyles: separated, grouped
83
+ Style/AccessorGrouping:
84
+ Exclude:
85
+ - 'lib/crowdin-api/client/client.rb'
86
+ - 'lib/crowdin-api/client/configuration.rb'
87
+
88
+ # Offense count: 1
89
+ # Cop supports --auto-correct.
90
+ Style/CollectionCompact:
91
+ Exclude:
92
+ - 'lib/crowdin-api/core/payload.rb'
93
+
94
+ # Offense count: 11
95
+ # Configuration parameters: AllowedConstants.
96
+ Style/Documentation:
97
+ Exclude:
98
+ - 'spec/**/*'
99
+ - 'test/**/*'
100
+ - 'lib/crowdin-api/api-resources/languages.rb'
101
+ - 'lib/crowdin-api/api-resources/projects.rb'
102
+ - 'lib/crowdin-api/api-resources/source_files.rb'
103
+ - 'lib/crowdin-api/api-resources/storages.rb'
104
+ - 'lib/crowdin-api/api-resources/translation_status.rb'
105
+ - 'lib/crowdin-api/api-resources/translations.rb'
106
+ - 'lib/crowdin-api/client/client.rb'
107
+ - 'lib/crowdin-api/client/configuration.rb'
108
+ - 'lib/crowdin-api/core/errors.rb'
109
+ - 'lib/crowdin-api/core/payload.rb'
110
+ - 'lib/crowdin-api/core/request.rb'
111
+
112
+ # Offense count: 1
113
+ # Cop supports --auto-correct.
114
+ # Configuration parameters: EnforcedStyle.
115
+ # SupportedStyles: always, always_true, never
116
+ Style/FrozenStringLiteralComment:
117
+ Exclude:
118
+ - 'bin/crowdin-console'
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ support@crowdin.com.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,71 @@
1
+ # Contributing
2
+
3
+ :tada: First off, thanks for taking the time to contribute! :tada:
4
+
5
+ The following is a set of guidelines for contributing to Crowdin Ruby Client. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
6
+
7
+ This project and everyone participating in it are governed by the [Code of Conduct](/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
8
+
9
+ ## How can I contribute?
10
+
11
+ ### Star this repo
12
+
13
+ It's quick and goes a long way! :stars:
14
+
15
+ ### Reporting Bugs
16
+
17
+ This section guides you through submitting a bug report for Crowdin Ruby Client. Following these guidelines helps maintainers, and the community understand your report :pencil:, reproduce the behavior :computer:, and find related reports :mag_right:.
18
+
19
+ When you are creating a bug report, please include as many details as possible.
20
+
21
+ #### How Do I Submit a Bug Report?
22
+
23
+ Bugs are tracked as [GitHub issues](https://github.com/crowdin/crowdin-api-client-ruby/issues/).
24
+
25
+ Explain the problem and include additional details to help reproduce the problem:
26
+
27
+ * **Use a clear and descriptive title** for the issue to identify the problem.
28
+ * **Describe the exact steps which reproduce the problem** in as many details as possible. Don't just say what you did, but explain how you did it.
29
+ * **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
30
+ * **Explain which behavior you expected to see instead and why.**
31
+
32
+ Include details about your environment.
33
+
34
+ ### Suggesting Enhancements
35
+
36
+ This section guides you through submitting an enhancement suggestion for Crowdin Ruby Client. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:.
37
+
38
+ When you are creating an enhancement suggestion, please include as many details as possible.
39
+
40
+ #### How Do I Submit an Enhancement Suggestion?
41
+
42
+ Enhancement suggestions are tracked as [GitHub issues](https://github.com/crowdin/crowdin-api-client-ruby/issues/).
43
+
44
+ Create an issue on that repository and provide the following information:
45
+
46
+ * **Use a clear and descriptive title** for the issue to identify the suggestion.
47
+ * **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
48
+ * **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
49
+ * **Explain why this enhancement would be useful** to most Ruby Client users.
50
+
51
+ ### Your First Code Contribution
52
+
53
+ Unsure where to begin contributing to Crowdin Ruby Client? You can start by looking through these `good-first-issue` and `help-wanted` issues:
54
+
55
+ * [Good first issue](https://github.com/crowdin/crowdin-api-client-ruby/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - issues which should only require a small amount of code, and a test or two.
56
+ * [Help wanted](https://github.com/crowdin/crowdin-api-client-ruby/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) - issues which should be a bit more involved than `Good first issue` issues.
57
+
58
+ #### Pull Request Checklist
59
+
60
+ Before sending your pull requests, make sure you followed the list below:
61
+
62
+ - Read this guidelines.
63
+ - Read [Code of Conduct](/CODE_OF_CONDUCT.md).
64
+ - Ensure that your code adheres to standard conventions, as used in the rest of the project.
65
+ - Ensure that there are unit tests for your code.
66
+ - Run unit tests.
67
+
68
+ #### Philosophy of code contribution
69
+
70
+ - Include unit tests when you contribute new features, as they help to a) prove that your code works correctly, and b) guard against future breaking changes to lower the maintenance cost.
71
+ - Bug fixes also generally require unit tests, because the presence of bugs usually indicates insufficient test coverage.
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2012-2019 Anton Maminov
3
+ Copyright (c) 2021 Crowdin
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal