web_translate_it 3.0.0 → 3.0.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
  SHA256:
3
- metadata.gz: 1bc4b7dbcd64e3579d7c3e2e387318a225ec4ea022ffff11d5b0e75cd2e7d02c
4
- data.tar.gz: 7a8d7a94642bbdb7445b94960da05584e8f0c2f3c7a10fbb13ee44e60e727235
3
+ metadata.gz: 763173ab98c37816b9d03746034956391be47e7fc7520b329dc13e937e9cc0e2
4
+ data.tar.gz: d0c1deb5d3a520c5dd7a6bef110b6c0df01a2974c44f0ccadf396106d699cd29
5
5
  SHA512:
6
- metadata.gz: cc10adf1aff74638ec4e8109c5524d0f445b84eddded635fbd06ff03ecd262bcdbd2b519357bc4eb275eb7a92a62573c03eb48365ee3a2c1f3e6ba4989a1804c
7
- data.tar.gz: 9fae2edb938c720297b251ebe512442dfb75a06d04dcdc7012cc1989ea510ef9560453380a0eda9cd0590a366481515b8cbf5b95b03e9d6bcc4b9c65e5e6dc11
6
+ metadata.gz: c470dc6a13ce0dcb634c659db02eb0f9cedcb8f3951eaeed80be8361fd4320e77f4ca207d05180ef1304533fd86762e633e343315e34b03042f4ff80b24fdaf7
7
+ data.tar.gz: daac9b145567fa4123f3e1c3bd36319b7265fa4fc9814a60bd3144bda17fda7d0593d59b59ed3b1b2383fcc47d8e959a0d0ba46ff13a61484d500678b62e2886
data/history.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## Version 3.0.2 / 2024-01-08
2
+
3
+ * Fix: Limit the amount of threads used. #294
4
+
5
+ ## Version 3.0.1 / 2023-11-30
6
+
7
+ Fix frozen string literal bug happening when pulling long files names needing truncation. #288
8
+
1
9
  ## Version 3.0.0 / 2023-09-20
2
10
 
3
11
  * Remove dependency on `multipart_post`. #255
@@ -60,7 +60,7 @@ module WebTranslateIt
60
60
  time = Time.now
61
61
  threads = []
62
62
  n_threads = [(files.size.to_f / 3).ceil, 10].min
63
- files.each_slice(n_threads).each do |file_array|
63
+ files.each_slice((files.size.to_f / n_threads).round).each do |file_array|
64
64
  next if file_array.empty?
65
65
 
66
66
  threads << Thread.new(file_array) do |f_array|
@@ -3,7 +3,7 @@
3
3
  class StringUtil
4
4
 
5
5
  def self.backward_truncate(str)
6
- return '...' << str[str.length - 50 + 3..str.length] if str.length > 50
6
+ return "...#{str[str.length - 50 + 3..str.length]}" if str.length > 50
7
7
 
8
8
  spaces = ''
9
9
  (50 - str.length).times { spaces += ' ' }
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: 3.0.0
4
+ version: 3.0.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: 2023-09-20 00:00:00.000000000 Z
11
+ date: 2024-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubygems_version: 3.4.19
102
+ rubygems_version: 3.5.4
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: A CLI tool to sync locale files with WebTranslateIt.com.