web_translate_it 2.7.5 → 2.7.6

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: 9d28dda70be5e71eeb61a269cceedb3f1406640b4e5526bed6f33d239d1b8527
4
- data.tar.gz: 670de23342b5adbbe052373c918a5b757438d42051c51bd9e7b2dc97c23e78bf
3
+ metadata.gz: 0a436c9096b05eeedb453e204e6b8b0ed064d8ab1af97383b1feead324d181f1
4
+ data.tar.gz: b3a312fc0d408c4024592a5b3d5f764a103e4558ec3cc27482278094f29e78e2
5
5
  SHA512:
6
- metadata.gz: 4a7cc04fe367c0b4541b48f1dc08ecda4deedc9891dd4f92f1622060aac4f46cbe6cd0867791f319893e69f2ad50c604684a70c1071168f6b28fbe7d99631315
7
- data.tar.gz: 22800578ddbe6ccadd5231ede8fc6bdb9a743692eb17235eff3174c3c1d241a5cc1bcf7bf95096572ced08ac71308ed333625b08a700b657457380489b7f82ea
6
+ metadata.gz: e89ce30242409de171037ec6909bf5c0d88eff803a4c724e20391ea9701d2ac28c798eadc1d5b9ed3406ccb1feabde54425f6d47216eea6f56c9d88b2b08a762
7
+ data.tar.gz: 5dff6abe4bec0d45d2a5b5c1f92b01b7a7d29658fefb50c99ae015f609bcb8d3376ef414c76e1d3fc67124372479c502b7093a92d1766f367ac285a93c030fdc
data/history.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## Version 2.7.6 / 2023-01-02
2
+
3
+ * Add ruby 3.2 to CI matrix.
4
+ * Dependencies upgrade and code refactoring.
5
+
1
6
  ## Version 2.7.5 / 2022-11-17
2
7
 
3
8
  * wti now works with `multipart_post = 2.0.0` AND `multipart_post >= 2.2.0`.
@@ -57,7 +57,7 @@ module WebTranslateIt
57
57
  # Now actually pulling files
58
58
  time = Time.now
59
59
  threads = []
60
- n_threads = (files.size.to_f / 3).ceil >= 10 ? 10 : (files.size.to_f / 3).ceil
60
+ n_threads = [(files.size.to_f / 3).ceil, 10].min
61
61
  ArrayUtil.chunk(files, n_threads).each do |file_array|
62
62
  next if file_array.empty?
63
63
 
@@ -148,7 +148,7 @@ module WebTranslateIt
148
148
  end
149
149
  end
150
150
 
151
- def add # rubocop:todo Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/MethodLength, Metrics/PerceivedComplexity
151
+ def add # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
152
152
  complete_success = true
153
153
  $stdout.sync = true
154
154
  if parameters == []
@@ -157,7 +157,7 @@ module WebTranslateIt
157
157
  exit
158
158
  end
159
159
  WebTranslateIt::Connection.new(configuration.api_key) do |http|
160
- added = configuration.files.find_all { |file| file.locale == configuration.source_locale }.collect { |file| File.expand_path(file.file_path) }.to_set
160
+ added = configuration.files.find_all { |file| file.locale == configuration.source_locale }.to_set { |file| File.expand_path(file.file_path) }
161
161
  to_add = parameters.reject { |param| added.include?(File.expand_path(param)) }
162
162
  if to_add.any?
163
163
  to_add.each do |param|
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.7.5
4
+ version: 2.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edouard Briere
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-17 00:00:00.000000000 Z
11
+ date: 2023-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubygems_version: 3.3.21
117
+ rubygems_version: 3.3.26
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: A CLI tool to sync locale files with WebTranslateIt.com.