web_translate_it 2.4.1 → 2.4.2

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
  SHA1:
3
- metadata.gz: b5bf66d9d2ae8463b5997268e75ecd5d6b23d32b
4
- data.tar.gz: fb24e325ce76b78d6557b2338992a230cc086958
3
+ metadata.gz: b358db77a727ebddc92751e671eac692adf3348d
4
+ data.tar.gz: ab8494b3d39af3826f8b93aa63d4cf26d8dd02d9
5
5
  SHA512:
6
- metadata.gz: eb2515c6f83fdf6d527d0e4c54aefddb00fd8b1f52e99303a89fa98fab7bf25618d8ef53645d57f4296f2a5d493e3e40b291ebb5148ddc5c19411aa3b2ee5e41
7
- data.tar.gz: fba20f019782ee68f269486c5bfccb6c81b413623530c7f455741978a7800105fda1bd5b43722743ce8a4208a1cb4505c2268f6bcf14a2d8830f3c359907cd8e
6
+ metadata.gz: b3c92b61cf1d149f800b64dc7865a0c30753ac995aaf973bb62a754ae243446e3579082f3c0b6aa9bffe79928a31ff02fe502bc6c4b24220689c8aa48fd7c72e
7
+ data.tar.gz: c6635ebcfdab4c2487f947f9a01e3c512ad916eccab0d60e3b5fd1594255a4a57b8a29b5e7231520096e4218c3362d9d235a283925d1ad06bdbc1ff30b87b1a5
data/history.md CHANGED
@@ -1,10 +1,14 @@
1
+ ## Version 2.4.2 / 2017-09-28
2
+
3
+ * Fixed an issue where a file would not be created if its content was empty.
4
+
1
5
  ## Version 2.4.1 / 2016-02-03
2
6
 
3
7
  * `wti status` now returns a status code when a project is not 100% translated or not 100% proofread. #127
4
8
  Status codes are:
5
9
  - 100 if not 100% translated,
6
10
  - 101 if not 100% proofread,
7
- - 1 if project is 100% translated and proofread.
11
+ - 0 if project is 100% translated and proofread.
8
12
  * `wti init` now returns a successful status code. #126
9
13
 
10
14
  ## Version 2.4.0 / 2015-08-10
@@ -50,7 +50,7 @@ module WebTranslateIt
50
50
  FileUtils.mkpath(self.file_path.split('/')[0..-2].join('/')) unless File.exist?(self.file_path) or self.file_path.split('/')[0..-2].join('/') == ""
51
51
  begin
52
52
  response = http_connection.request(request)
53
- File.open(self.file_path, 'wb'){ |file| file << response.body } if response.code.to_i == 200 and response.body != ''
53
+ File.open(self.file_path, 'wb'){ |file| file << response.body } if response.code.to_i == 200
54
54
  display.push Util.handle_response(response)
55
55
  rescue Timeout::Error
56
56
  puts StringUtil.failure("Request timeout. Will retry in 5 seconds.")
data/readme.md CHANGED
@@ -161,6 +161,10 @@ Append `--help` for each command for more information. For instance:
161
161
  <td>wti pull --all</td>
162
162
  <td>Download all language files, including source</td>
163
163
  </tr>
164
+ <tr>
165
+ <td>wti pull path/to/files/*</td>
166
+ <td>Download all files in path/to/files</td>
167
+ </tr>
164
168
  <tr>
165
169
  <td>wti pull --force</td>
166
170
  <td>Force pull (to bypass WebTranslateIt’s HTTP caching)</td>
@@ -212,20 +216,49 @@ Since version 1.4.0 `wti` returns exit codes on failure. The exit code is `0` if
212
216
  config/locales/app/fr.yml | 29f8c9d..da39a3e OK
213
217
  config/locales/defaults/fr.yml | aca123e..aca123e Skipped
214
218
  Pulled 8 files at 7 files/sec, using 3 threads.
219
+
215
220
  ~/code/webtranslateit.com[master]% echo $?
216
221
  0
222
+
217
223
  ~/code/webtranslateit.com[master]% wti pull
218
224
  # Pulling files on WebTranslateIt
219
225
  config/locales/translation_validator/en.yml | e82e044..e82e044 Error
220
226
  config/locales/app/en.yml | f2ca86c..f2ca86c Skipped
221
227
  config/locales/defaults/fr.yml | aca123e..aca123e Skipped
222
228
  Pulled 3 files at 3 files/sec, using 3 threads.
229
+
223
230
  ~/code/webtranslateit.com[master]% echo $?
224
231
  1
225
232
  ```
226
233
 
227
- Since version 2.4.1 the `wti status` command also returns meaningfull codes. It will exit with `0` if the project is 100% translated and proofread, `100` if the project is not 100% translated and `101` if the project is not 100% proofread. This allows you to check if a project is 100% translated or completed before deploying a project, for instance.
234
+ Since version 2.4.1 the `wti status` command also returns meaningful codes. It will exit with `0` if the project is 100% translated and proofread, `100` if the project is not 100% translated and `101` if the project is not 100% proofread. This could allow you to check if a project is 100% translated or completed before deploying a project.
235
+
236
+ ``` zsh
237
+ ~/Desktop/test% wti status
238
+ # Gathering information on test ts
239
+ fr: 40% translated, 40% completed.
240
+ en: 90% translated, 0% completed.
241
+
242
+ ~/Desktop/test% echo $?
243
+ 100
244
+
245
+ ~/Desktop/test% wti status
246
+ # Gathering information on test ts
247
+ en: 100% translated, 0% completed.
248
+ fr: 100% translated, 100% completed.
249
+
250
+ ~/Desktop/test% echo $?
251
+ 101
252
+
253
+ ~/Desktop/test% wti status
254
+ # Gathering information on test ts
255
+ en: 100% translated, 100% completed.
256
+ fr: 100% translated, 100% completed.
257
+
258
+ ~/Desktop/test% echo $?
259
+ 0
260
+ ```
228
261
 
229
262
  # License
230
263
 
231
- Copyright (c) 2009-2015 Atelier Convivialité, released under the MIT License.
264
+ Copyright (c) 2009-2016 Atelier Convivialité, released under the MIT License.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web_translate_it
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edouard Briere
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-03 00:00:00.000000000 Z
11
+ date: 2017-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multipart-post
@@ -143,14 +143,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  requirements: []
145
145
  rubyforge_project:
146
- rubygems_version: 2.5.1
146
+ rubygems_version: 2.6.10
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: A CLI to sync locale files with WebTranslateIt.com.
150
150
  test_files:
151
- - spec/examples/config/translation.yml
152
- - spec/examples/en.yml
153
- - spec/spec_helper.rb
154
151
  - spec/web_translate_it/auto_fetch_spec.rb
155
- - spec/web_translate_it/string_spec.rb
156
152
  - spec/web_translate_it/term_spec.rb
153
+ - spec/web_translate_it/string_spec.rb
154
+ - spec/spec_helper.rb
155
+ - spec/examples/config/translation.yml
156
+ - spec/examples/en.yml