descartes 0.8.2 → 0.8.3.3

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
  SHA1:
3
- metadata.gz: 9fde5d438495d6be05885ffca91155325cdfaaff
4
- data.tar.gz: 5fa4dc848dc33e44cbdd3b303a5d270437bcc075
3
+ metadata.gz: 915aef4710a0de18aa5be55cedb3eb58fbb35dd0
4
+ data.tar.gz: 97d031f49233affaf25ed426b46049790b25fb7d
5
5
  SHA512:
6
- metadata.gz: bbd0dbaf5f17abe1ea0d79de76b28ff7ae5c173e3cafdc9622ea2d69a26cacc6d8b7082a1e08934e42741d681e5d1a148720db982dc44700e4fb622f2c2074de
7
- data.tar.gz: 1f1f27d7f379be6862345b5988d69119c85e616cc00b201955b3bde9f94b427d4b7b2ef37ae5117fca7d00c8520a51ce5f38cbd3f9069cd86ec2da99f3e0d556
6
+ metadata.gz: 019dc3b20930db41460b30c3dbc2abe49af85b572520a0cf574d9eb7be1248002b4131019c67c726fd8dc26d7891c3deedf01217dbe54135d6a3de361a0584f2
7
+ data.tar.gz: 81d1ff47e1aa811bb277783e221cc75d44de5fd74ff33ab4cfce278b6942eb5ab29b9edb5ca17ddf862abce976a6e16d1c342b69660f0038a75aa60546a23f45
@@ -168,13 +168,19 @@ class Descartes
168
168
 
169
169
  things = things.split ' '
170
170
  len = things.length
171
- status = things.pop
172
- field = things.pop
173
- episode = things.pop
174
- show = things.join ' '
175
171
 
176
- if len < 4 || !episode.numeric?
177
- m.reply 'usage: !pigro SHOW EPISODE FIELD STATUS'
172
+ if things.last.numeric?
173
+ m.reply 1
174
+ episode = things.pop
175
+ show = things.join ' '
176
+ elsif len >= 4
177
+ m.reply 2
178
+ status = things.pop
179
+ field = things.pop
180
+ episode = things.pop
181
+ show = things.join ' '
182
+ else
183
+ m.reply 'usage: !pigro SHOW EPISODE [FIELD] [STATUS]'
178
184
  return
179
185
  end
180
186
 
@@ -195,8 +201,16 @@ class Descartes
195
201
  if login['status'] == 'error'
196
202
  m.reply login['message']
197
203
  else
198
- episode = assonnato.episode.edit show, episode.to_i, { field.to_sym => status.to_sym }
199
- m.reply episode['message']
204
+ if !field || !status
205
+ [ :translation, :editing, :checking, :timing, :typesetting, :encoding, :qchecking ].each { |f|
206
+ ep = assonnato.episode.edit show, episode.to_i, { f => :done }
207
+ m.reply("#{f}: #{ep['message']}") if ep['status'] != 'success'
208
+ }
209
+ m.reply "The episode has been edited."
210
+ else
211
+ ep = assonnato.episode.edit show, episode.to_i, { field.to_sym => status.to_sym }
212
+ m.reply ep['message']
213
+ end
200
214
 
201
215
  assonnato.user.logout
202
216
  end
@@ -14,6 +14,6 @@
14
14
 
15
15
  class Descartes
16
16
  def self.version
17
- '0.8.2'
17
+ '0.8.3.3'
18
18
  end
19
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descartes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-18 00:00:00.000000000 Z
11
+ date: 2014-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cinch