web_translate_it 1.8.2.1 → 1.8.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/bin/wti CHANGED
@@ -54,7 +54,10 @@ EOS
54
54
  opt :label, "Apply a label to the changes", :type => :string
55
55
  end
56
56
  when "add"
57
- Trollop::options { banner "Create and push a new master language file" }
57
+ Trollop::options do
58
+ banner "Create and push a new master language file"
59
+ opt :low_priority, "WTI will process this file with a low priority"
60
+ end
58
61
  when "addlocale"
59
62
  Trollop::options { banner "Add a new locale to the project" }
60
63
  when "server"
data/history.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Version 1.8.2.2 / 2011-11-05
2
+
3
+ * Add `--low-priority` option to `wti add` command.
4
+
1
5
  ## Version 1.8.2.1 / 2011-10-14
2
6
 
3
7
  * Fix frozen string bug on ruby 1.9.3 (thanks @mikian for the patch).
@@ -69,7 +69,7 @@ module WebTranslateIt
69
69
  WebTranslateIt::Util.http_connection do |http|
70
70
  parameters.each do |param|
71
71
  file = TranslationFile.new(nil, param, nil, configuration.api_key)
72
- file.create(http)
72
+ file.create(http, command_options.low_priority)
73
73
  end
74
74
  end
75
75
  puts StringUtil.success("Master file added.")
@@ -104,14 +104,15 @@ module WebTranslateIt
104
104
  # Note that the request might or might not eventually be acted upon, as it might be disallowed when processing
105
105
  # actually takes place. This is due to the fact that language file imports are handled by background processing.
106
106
  #
107
- def create(http_connection)
107
+ def create(http_connection, low_priority=false)
108
+ puts low_priority
108
109
  display = []
109
110
  display.push file_path
110
111
  display.push "#{StringUtil.checksumify(self.local_checksum.to_s)}..[ ]"
111
112
  if File.exists?(self.file_path)
112
113
  File.open(self.file_path) do |file|
113
114
  begin
114
- request = Net::HTTP::Post::Multipart.new(api_url_for_create, { "name" => self.file_path, "file" => UploadIO.new(file, "text/plain", file.path) })
115
+ request = Net::HTTP::Post::Multipart.new(api_url_for_create, { "name" => self.file_path, "file" => UploadIO.new(file, "text/plain", file.path), "low_priority" => low_priority })
115
116
  display.push Util.handle_response(http_connection.request(request))
116
117
  puts ArrayUtil.to_columns(display)
117
118
  rescue Timeout::Error
data/readme.md CHANGED
@@ -20,7 +20,7 @@ This gem provides:
20
20
  Installation
21
21
  ------------
22
22
 
23
- These instructions are for Linux and Mac OS X system. Follow [these instructions](http://help.webtranslateit.com/kb/tips/how-to-install-wti-on-windows) if you’re using Microsoft Windows.
23
+ You will need ruby to run wti. On Linux or a Mac, it’s already installed. Install [RubyInstaller](http://rubyinstaller.org/) if you’re using Windows.
24
24
 
25
25
  gem install web_translate_it
26
26
 
data/version.yml CHANGED
@@ -2,4 +2,4 @@
2
2
  :major: 1
3
3
  :minor: 8
4
4
  :tiny: 2
5
- :patch: 1
5
+ :patch: 2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web_translate_it
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2.1
4
+ version: 1.8.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-14 00:00:00.000000000 Z
12
+ date: 2011-11-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multipart-post
16
- requirement: &70362462653320 !ruby/object:Gem::Requirement
16
+ requirement: &70343270065620 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.1.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70362462653320
24
+ version_requirements: *70343270065620
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: trollop
27
- requirement: &70362462652660 !ruby/object:Gem::Requirement
27
+ requirement: &70343270065120 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.16.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70362462652660
35
+ version_requirements: *70343270065120
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sinatra
38
- requirement: &70362462651680 !ruby/object:Gem::Requirement
38
+ requirement: &70343270064660 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.2.6
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70362462651680
46
+ version_requirements: *70343270064660
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70362462649880 !ruby/object:Gem::Requirement
49
+ requirement: &70343270064200 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 2.6.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70362462649880
57
+ version_requirements: *70343270064200
58
58
  description:
59
59
  email: edouard@atelierconvivialite.com
60
60
  executables: