web_translate_it 2.8.1 → 2.8.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: a0e54082c0439b780e3660717222784124f206b4852e8fb86b620dbf5f30d838
4
- data.tar.gz: 020f7410586d5c2b00719764fa363ca9b41855732f4c167835115fbaa5265141
3
+ metadata.gz: 90f545288c55ba7994137a77fe9c33a1f5ad9a0a9ef0e7e1fb55adabef34db04
4
+ data.tar.gz: 276e1a44adfb1dead4c72f7d3f66c520a2e75e64621b378756ca9e05f4924a91
5
5
  SHA512:
6
- metadata.gz: 35e1c48c7f05b38fe31dbb4c0c530379ed06e37926a82e117a89bc6a5721c9bcd38f4a22f3f550ec67cafa62a493c7ebe7398a7c9c3c801cdc57bccd63b94260
7
- data.tar.gz: 3f86840ec5d6fac566e341bbe2a0722d30950d0112dae8a903ad9e9c54ab35d34f7cdf409d8a1f8b966791cb1955465942573995e960b959314e04d766f46019
6
+ metadata.gz: 2cfc4cd709ec351d3581c896b5657144b94859519bb14a6d61f4873f11db880d199af20dcb733c460a90fe33456a57878ffa040c221f0e44735b15c143b92630
7
+ data.tar.gz: 2aea23da596406f7536d4b1c9e62005a1891fffd3ff89a5010a79efde5aee38adc84b3c0c38b203cc8d78aaa1c763c87c1f9779dc48a1b1417fe275fd8e2e6df
data/history.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## Version 2.8.2 / 2023-04-18
2
+
3
+ * Fix crash caused by use of API from older Multipart versions. #246 (@rogerluan)
4
+ * Relax dependency to `multipart_post` to `>=0`.
5
+
1
6
  ## Version 2.8.1 / 2023-03-13
2
7
 
3
8
  * Replace YAML API calls with JSON API calls. (#242)
@@ -96,7 +96,7 @@ module WebTranslateIt
96
96
  if File.exist?(file_path)
97
97
  if force || (remote_checksum != local_checksum)
98
98
  File.open(file_path) do |file|
99
- params = {'file' => ::Multipart::Post::UploadIO.new(file, 'text/plain', file.path), 'merge' => merge, 'ignore_missing' => ignore_missing, 'label' => label, 'minor_changes' => minor_changes}
99
+ params = {'file' => UploadIO.new(file, 'text/plain', file.path), 'merge' => merge, 'ignore_missing' => ignore_missing, 'label' => label, 'minor_changes' => minor_changes}
100
100
  params['name'] = destination_path unless destination_path.nil?
101
101
  params['rename_others'] = rename_others
102
102
  request = Net::HTTP::Put::Multipart.new(api_url, params)
@@ -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' => 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/readme.md CHANGED
@@ -272,4 +272,4 @@ fr: 100% translated, 100% completed.
272
272
 
273
273
  # License
274
274
 
275
- Copyright (c) 2009-2022 [WebTranslateIt Software S.L](https://webtranslateit.com), released under the MIT License.
275
+ Copyright (c) 2009-2023 [WebTranslateIt Software S.L](https://webtranslateit.com), 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.8.1
4
+ version: 2.8.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-03-13 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: multipart-post
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
@@ -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.4.6
117
+ rubygems_version: 3.4.10
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: A CLI tool to sync locale files with WebTranslateIt.com.