web_translate_it 2.7.3 → 2.7.4

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: 92adb002b0df15870368f976f18aaaa8f360b456517ea5d9e7448c44bc82e455
4
- data.tar.gz: c2511b8b3f37936d476e2af8f0e23f5dfb60831466f7dad70de9d587fa174a3e
3
+ metadata.gz: 2cf961665ffe5011712709893326b9ec48a791ee3849bd06640dac2df96a5c70
4
+ data.tar.gz: ccfc17ed10d527814aba5a60b7452994a8b98465c5bea523a777834160105670
5
5
  SHA512:
6
- metadata.gz: 5f2085374587cbe5a78ded34b5675ee56d26658bd16529149268952fa93c606b39008d6bd73f96a77b7e5eb21c7058ac8ce864fb17d5dce9e022c856f2f162e5
7
- data.tar.gz: 40df440171537d90c6cf54a7ae3499b042a4727f28150c7817f9b24c814844b5e3e03177019d8140952bfd814cf7aa55df542b4b6bd665837468257daf55e4e7
6
+ metadata.gz: c4f2ae022af39cd0e30f4a1daa82f4e18d4134344f90e99f8dca0a16a4800a28898ac4bec67bb43358fc8c09bf5cfbeb30bd00ea19d38d37babc6fae2da041b0
7
+ data.tar.gz: 403d582ec95fc17fb8f464bfc046552fac0f0a572feb0e59bfd27687f8680978a662751fa1f57f6ccf4964924c446ebc59fb50a8857b1b404aba4478ac2ea212
data/bin/wti CHANGED
@@ -55,7 +55,7 @@ when 'push'
55
55
  opt :locale, 'ISO code of locale(s) to push, space-separated', type: :string
56
56
  opt :target, 'Upload all target files'
57
57
  opt :force, 'Force push (bypass conditional requests to WTI)'
58
- opt :low_priority, 'WTI will process this file with a low priority'
58
+ opt :low_priority, 'Deprecated: option to process this file with a low priority'
59
59
  opt :merge, 'Force WTI to merge this file'
60
60
  opt :ignore_missing, 'Force WTI to not obsolete missing strings'
61
61
  opt :minor, 'Minor Changes. When pushing a master file, prevents target translations to be flagged as `to_verify`.'
@@ -67,7 +67,7 @@ when 'push'
67
67
  when 'add'
68
68
  Optimist.options do
69
69
  banner 'wti add filename - Create and push a new master language file'
70
- opt :low_priority, 'WTI will process this file with a low priority'
70
+ opt :low_priority, 'Deprecated: option to process this file with a low priority'
71
71
  opt :config, 'Path to a configuration file', short: '-c', default: '.wti'
72
72
  opt :debug, 'Display debug information'
73
73
  end
data/history.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Version 2.7.4 / 2022-11-01
2
+
3
+ * 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.
4
+
1
5
  ## Version 2.7.3 / 2022-10-28
2
6
 
3
7
  * Relax dependency on `multipart_post`. Also made sure that wti works with `multipart_post >= 2.0.0 and < 2.3`.
@@ -101,6 +101,7 @@ module WebTranslateIt
101
101
  end
102
102
 
103
103
  def push # rubocop:todo Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/MethodLength, Metrics/PerceivedComplexity
104
+ puts 'The `--low-priority` option in `wti push --low-priority` was removed and does nothing' if command_options.low_priority
104
105
  complete_success = true
105
106
  $stdout.sync = true
106
107
  before_push_hook
@@ -115,7 +116,7 @@ module WebTranslateIt
115
116
  puts "Couldn't find any local files registered on WebTranslateIt to push."
116
117
  else
117
118
  files.each do |file|
118
- success = file.upload(http, command_options[:merge], command_options.ignore_missing, command_options.label, command_options.low_priority, command_options[:minor], command_options.force)
119
+ success = file.upload(http, command_options[:merge], command_options.ignore_missing, command_options.label, command_options[:minor], command_options.force)
119
120
  complete_success = false unless success
120
121
  end
121
122
  end
@@ -161,7 +162,7 @@ module WebTranslateIt
161
162
  if to_add.any?
162
163
  to_add.each do |param|
163
164
  file = TranslationFile.new(nil, param.gsub(/ /, '\\ '), nil, configuration.api_key)
164
- success = file.create(http, command_options.low_priority)
165
+ success = file.create(http)
165
166
  complete_success = false unless success
166
167
  end
167
168
  else
@@ -87,7 +87,7 @@ module WebTranslateIt
87
87
  # rubocop:todo Metrics/ParameterLists
88
88
  # rubocop:todo Metrics/MethodLength
89
89
  # rubocop:todo Metrics/AbcSize
90
- def upload(http_connection, merge = false, ignore_missing = false, label = nil, low_priority = false, minor_changes = false, force = false, rename_others = false, destination_path = nil) # rubocop:todo Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/MethodLength, Metrics/ParameterLists, Metrics/PerceivedComplexity
90
+ def upload(http_connection, merge = false, ignore_missing = false, label = nil, minor_changes = false, force = false, rename_others = false, destination_path = nil) # rubocop:todo Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/MethodLength, Metrics/ParameterLists, Metrics/PerceivedComplexity
91
91
  success = true
92
92
  tries ||= 3
93
93
  display = []
@@ -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, 'low_priority' => low_priority, 'minor_changes' => minor_changes}
99
+ params = {'file' => ::Multipart::Post::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)
@@ -139,7 +139,7 @@ module WebTranslateIt
139
139
  # Note that the request might or might not eventually be acted upon, as it might be disallowed when processing
140
140
  # actually takes place. This is due to the fact that language file imports are handled by background processing.
141
141
  #
142
- def create(http_connection, low_priority = false) # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
142
+ def create(http_connection) # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
143
143
  success = true
144
144
  tries ||= 3
145
145
  display = []
@@ -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), 'low_priority' => low_priority})
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/readme.md CHANGED
@@ -99,7 +99,6 @@ Append `--help` for each command for more information. For instance:
99
99
  -l, --locale=<s> ISO code of locale(s) to push
100
100
  -t, --target Upload all target files
101
101
  -f, --force Force push (bypass conditional requests to WTI)
102
- -o, --low-priority WTI will process this file with a low priority
103
102
  -m, --merge Force WTI to merge this file
104
103
  -i, --ignore-missing Force WTI to not obsolete missing strings
105
104
  -n, --minor Minor Changes. When pushing a master file, prevents
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.3
4
+ version: 2.7.4
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-10-28 00:00:00.000000000 Z
11
+ date: 2022-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json