crowdin-api 0.0.11 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 711091f239baf6c07fd3546143e48c42c1721c91
4
+ data.tar.gz: 101c3ad68a30ad38f1d7c12b40493b2458539de5
5
+ SHA512:
6
+ metadata.gz: 09053e23e21053d98d9a2d338fee3a0b8926e6c94b1fad3836671390247b6e146f1ced6ac4b8d55ff8295c2fbeca38ed3189781286f1ac727f96447698f2f7ea
7
+ data.tar.gz: 1ac06ab9ffd89a038343391fa494790b6a1286c17b4188c124e4a2aeda507300c910a03ce62180f4b4187dff59217a9981c4e49bb6e32e7b068bedc3ab8c80a4
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in crowdin-api.gemspec
4
+ # gem 'rest-client', :git => 'git://github.com/rest-client/rest-client.git'
4
5
  gem 'rest-client'
data/README.md CHANGED
@@ -4,6 +4,8 @@ The Crowdin Ruby Client is used to interact with the Crowdin API from Ruby.
4
4
 
5
5
  For more about the Crowdin API see <http://crowdin.net/page/api>.
6
6
 
7
+ > **WARNING**: This is a development version: It contains the latest changes, but may also have severe known issues, including crashes and data loss situations. In fact, it may not work at all.
8
+
7
9
  ## Installation
8
10
 
9
11
  Add this line to your application's Gemfile:
@@ -30,7 +32,7 @@ Start by creating a connection to Crowdin with your credentials:
30
32
  require 'crowdin-api'
31
33
  require 'logger'
32
34
 
33
- crowdin = Crowdin::API.new(:api_key => API_KEY, :project_id => PROJECT_ID, :account_key => ACCOUNT_KEY)
35
+ crowdin = Crowdin::API.new(api_key: API_KEY, project_id: PROJECT_ID, account_key: ACCOUNT_KEY)
34
36
  crowdin.log = Logger.new $stderr
35
37
  ```
36
38
 
@@ -38,6 +40,8 @@ Now you can make requests to the api.
38
40
 
39
41
  ### Add File
40
42
 
43
+ Add new file to Crowdin project.
44
+
41
45
  Documentation: <http://crowdin.net/page/api/add-file>.
42
46
 
43
47
  First parameter is array of files that should be added to Crowdin project.
@@ -58,6 +62,8 @@ crowdin.add_file(
58
62
 
59
63
  ### Update File
60
64
 
65
+ Upload fresh version of your localization file.
66
+
61
67
  Documentation <http://crowdin.net/page/api/update-file>
62
68
 
63
69
  First parameter is array of files that should be updated in Crowdin project.
@@ -78,14 +84,38 @@ crowdin.update_file(
78
84
 
79
85
  ### Delete File
80
86
 
87
+ Remove file from Crowdin project.
88
+
81
89
  Documentation <http://crowdin.net/page/api/delete-file>
82
90
 
83
91
  ```ruby
84
92
  crowdin.delete_file('strings.xml')
85
93
  ```
86
94
 
95
+ ### Create Directory
96
+
97
+ Create a new directory in Crowdin project.
98
+
99
+ Documentation: <http://crowdin.net/page/api/add-directory>
100
+
101
+ ```ruby
102
+ crowdin.add_directory('dirname')
103
+ ```
104
+
105
+ ### Delete Directory
106
+
107
+ Remove directory with nested files from Crowdin project.
108
+
109
+ Documentation: <http://crowdin.net/page/api/delete-directory>
110
+
111
+ ```ruby
112
+ crowdin.delete_directory('dirname')
113
+ ```
114
+
87
115
  ### Upload Translations
88
116
 
117
+ Upload translations made in a third party software or previously made translations.
118
+
89
119
  Documentation: <http://crowdin.net/page/api/upload-translation>
90
120
 
91
121
  First parameter is array of translated files that should be added to Crowdin project.
@@ -113,28 +143,48 @@ crowdin.upload_translation(
113
143
  )
114
144
  ```
115
145
 
146
+ ### Download Translations
147
+
148
+ Download last exported translation package (one target language or all languages as one zip file).
149
+
150
+ Documentation: <http://crowdin.net/page/api/download>
151
+
152
+ First parameter is the language of translation you need or download `all` of them at once.
153
+
154
+ ```ruby
155
+ crowdin.download_translation('ru', :output => '/path/to/download/ru_RU.zip')
156
+ ```
157
+
116
158
  ### Translation Status
117
159
 
118
- Documentation: <http://crowdin.net/page/api/status>
160
+ Track overall translation and proofreading progress of each target language.
119
161
 
120
- ### Project Info
162
+ Documentation: <http://crowdin.net/page/api/status>
121
163
 
122
- Documentation: <http://crowdin.net/page/api/info>
164
+ ```ruby
165
+ crowdin.translations_status
166
+ ```
123
167
 
124
- ### Download Translations
168
+ ### Project Info
125
169
 
126
- Documentation: <http://crowdin.net/page/api/download>
170
+ Shows project details and meta information (last translations date, currently uploaded files, target languages etc..).
127
171
 
128
- First parameter is the language of translation you need or download `all` of them at once.
172
+ Documentation: <http://crowdin.net/page/api/info>
129
173
 
130
174
  ```ruby
131
- crowdin.download_translation('ru', :output => '/path/to/download/ru_RU.zip')
175
+ crowdin.project_info
132
176
  ```
133
177
 
134
178
  ### Export Translations
135
179
 
180
+ Build ZIP archive with the latest translations.
181
+
136
182
  Documentation: <http://crowdin.net/page/api/export>
137
183
 
184
+ ```ruby
185
+ crowdin.export_translations
186
+ ```
187
+
138
188
  ### Account Projects
139
189
 
140
190
  Documentation: <http://crowdin.net/page/api/get-projects>
@@ -151,14 +201,6 @@ Documentation: <http://crowdin.net/page/api/edit-project>
151
201
 
152
202
  Documentation: <http://crowdin.net/page/api/delete-project>
153
203
 
154
- ### Create Directory
155
-
156
- Documentation: <http://crowdin.net/page/api/add-directory>
157
-
158
- ### Delete Directory
159
-
160
- Documentation: <http://crowdin.net/page/api/delete-directory>
161
-
162
204
  ### Download Glossary
163
205
 
164
206
  Documentation: <http://crowdin.net/page/api/download-glossary>
@@ -179,7 +221,6 @@ Documentation: <http://crowdin.net/page/api/upload-tm>
179
221
 
180
222
  Documentation: <http://crowdin.net/page/api/supported-languages>
181
223
 
182
-
183
224
  ## Supported Rubies
184
225
 
185
226
  Tested with the following Ruby versions:
@@ -201,4 +242,4 @@ Author: Anton Maminov (anton.maminov@gmail.com)
201
242
 
202
243
  Copyright: 2012-2013 [Crowdin.net](http://crowdin.net/)
203
244
 
204
- This library is distributed under the MIT license. Please see the LICENSE file.
245
+ This library is distributed under the MIT license. Please see the LICENSE file.
data/crowdin-api.gemspec CHANGED
@@ -1,19 +1,22 @@
1
- # -*- encoding: utf-8 -*-
1
+ # encoding: utf-8
2
+
2
3
  require File.expand_path('../lib/crowdin-api/version', __FILE__)
3
4
 
4
5
  Gem::Specification.new do |gem|
5
- gem.authors = ["Crowdin"]
6
- gem.email = ["support@crowdin.net"]
7
- gem.description = %q{The Crowdin Ruby Client is used to interact with the Crowdin API from Ruby}
8
- gem.summary = %q{The Crowdin Ruby Client is used to interact with the Crowdin API from Ruby}
9
- gem.homepage = "https://github.com/crowdin/crowdin-cli"
6
+ gem.name = 'crowdin-api'
7
+ gem.version = Crowdin::API::VERSION
8
+
9
+ gem.authors = ['Crowdin']
10
+ gem.email = ['support@crowdin.net']
11
+ gem.homepage = 'https://github.com/crowdin/crowdin-api/'
12
+ gem.description = 'Ruby Client for the Crowdin API'
13
+ gem.summary = 'Client library to manage translations on Crowdin'
14
+ gem.license = 'MIT'
10
15
 
11
16
  gem.files = `git ls-files`.split($\)
12
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
- gem.name = "crowdin-api"
15
- gem.require_paths = ["lib"]
16
- gem.version = Crowdin::API::VERSION
19
+ gem.require_paths = ['lib']
17
20
 
18
- gem.add_dependency('rest-client')
21
+ gem.add_dependency 'rest-client', '>= 1.6.7'
19
22
  end
data/examples/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
+ #gem 'rest-client', :git => 'git://github.com/rest-client/rest-client.git'
4
+ gem 'rest-client'
3
5
  gem 'crowdin-api', :path => '../'
data/lib/crowdin-api.rb CHANGED
@@ -6,7 +6,6 @@ require "crowdin-api/errors"
6
6
  require "crowdin-api/methods"
7
7
  require "crowdin-api/version"
8
8
 
9
-
10
9
  # The Crowdin::API library is used for interactions with a crowdin.net website.
11
10
  #
12
11
  # == Example
@@ -46,6 +45,7 @@ module Crowdin
46
45
  options = {
47
46
  :headers => {},
48
47
  :params => {},
48
+ :timeout => -1,
49
49
  :key => @api_key,
50
50
  :'account-key' => @account_key,
51
51
  :json => true
@@ -1,5 +1,5 @@
1
1
  module Crowdin
2
2
  class API
3
- VERSION = "0.0.11"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,34 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crowdin-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Crowdin
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-12 00:00:00.000000000 Z
11
+ date: 2013-09-23 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rest-client
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ">="
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
- version: '0'
19
+ version: 1.6.7
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ">="
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
- version: '0'
30
- description: The Crowdin Ruby Client is used to interact with the Crowdin API from
31
- Ruby
26
+ version: 1.6.7
27
+ description: Ruby Client for the Crowdin API
32
28
  email:
33
29
  - support@crowdin.net
34
30
  executables: []
@@ -41,34 +37,33 @@ files:
41
37
  - Rakefile
42
38
  - crowdin-api.gemspec
43
39
  - examples/Gemfile
44
- - examples/Gemfile.lock
45
40
  - examples/project_info.rb
46
41
  - lib/crowdin-api.rb
47
42
  - lib/crowdin-api/errors.rb
48
43
  - lib/crowdin-api/methods.rb
49
44
  - lib/crowdin-api/version.rb
50
- homepage: https://github.com/crowdin/crowdin-cli
51
- licenses: []
45
+ homepage: https://github.com/crowdin/crowdin-api/
46
+ licenses:
47
+ - MIT
48
+ metadata: {}
52
49
  post_install_message:
53
50
  rdoc_options: []
54
51
  require_paths:
55
52
  - lib
56
53
  required_ruby_version: !ruby/object:Gem::Requirement
57
- none: false
58
54
  requirements:
59
- - - ">="
55
+ - - '>='
60
56
  - !ruby/object:Gem::Version
61
57
  version: '0'
62
58
  required_rubygems_version: !ruby/object:Gem::Requirement
63
- none: false
64
59
  requirements:
65
- - - ">="
60
+ - - '>='
66
61
  - !ruby/object:Gem::Version
67
62
  version: '0'
68
63
  requirements: []
69
64
  rubyforge_project:
70
- rubygems_version: 1.8.24
65
+ rubygems_version: 2.0.3
71
66
  signing_key:
72
- specification_version: 3
73
- summary: The Crowdin Ruby Client is used to interact with the Crowdin API from Ruby
67
+ specification_version: 4
68
+ summary: Client library to manage translations on Crowdin
74
69
  test_files: []
@@ -1,19 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- crowdin-api (0.0.9)
5
- rest-client
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- mime-types (1.19)
11
- rest-client (1.6.7)
12
- mime-types (>= 1.16)
13
-
14
- PLATFORMS
15
- java
16
- ruby
17
-
18
- DEPENDENCIES
19
- crowdin-api!