web_translate_it 2.7.4 → 2.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/history.md +9 -0
- data/lib/web_translate_it/command_line.rb +3 -3
- data/lib/web_translate_it/translation_file.rb +1 -1
- data/lib/web_translate_it.rb +0 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a436c9096b05eeedb453e204e6b8b0ed064d8ab1af97383b1feead324d181f1
|
4
|
+
data.tar.gz: b3a312fc0d408c4024592a5b3d5f764a103e4558ec3cc27482278094f29e78e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e89ce30242409de171037ec6909bf5c0d88eff803a4c724e20391ea9701d2ac28c798eadc1d5b9ed3406ccb1feabde54425f6d47216eea6f56c9d88b2b08a762
|
7
|
+
data.tar.gz: 5dff6abe4bec0d45d2a5b5c1f92b01b7a7d29658fefb50c99ae015f609bcb8d3376ef414c76e1d3fc67124372479c502b7093a92d1766f367ac285a93c030fdc
|
data/history.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## Version 2.7.6 / 2023-01-02
|
2
|
+
|
3
|
+
* Add ruby 3.2 to CI matrix.
|
4
|
+
* Dependencies upgrade and code refactoring.
|
5
|
+
|
6
|
+
## Version 2.7.5 / 2022-11-17
|
7
|
+
|
8
|
+
* wti now works with `multipart_post = 2.0.0` AND `multipart_post >= 2.2.0`.
|
9
|
+
|
1
10
|
## Version 2.7.4 / 2022-11-01
|
2
11
|
|
3
12
|
* Remove `low-priority` argument as in `wti push --low-priority` and `wti add --low-priority`. All the file imports in WebTranslateIt.com are now top priority.
|
@@ -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
|
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/
|
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 }.
|
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|
|
@@ -147,7 +147,7 @@ module WebTranslateIt
|
|
147
147
|
display.push "#{StringUtil.checksumify(local_checksum.to_s)}..[ ]"
|
148
148
|
if File.exist?(file_path)
|
149
149
|
File.open(file_path) do |file|
|
150
|
-
request = Net::HTTP::Post::Multipart.new(api_url_for_create, {'name' => file_path, 'file' => Multipart::Post::UploadIO.new(file, 'text/plain', file.path)})
|
150
|
+
request = ::Net::HTTP::Post::Multipart.new(api_url_for_create, {'name' => file_path, 'file' => Multipart::Post::UploadIO.new(file, 'text/plain', file.path)})
|
151
151
|
WebTranslateIt::Util.add_fields(request)
|
152
152
|
display.push Util.handle_response(http_connection.request(request))
|
153
153
|
puts ArrayUtil.to_columns(display)
|
data/lib/web_translate_it.rb
CHANGED
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.
|
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:
|
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.
|
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.
|