descartes 0.8.11 → 0.8.12

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: 3395622cd163fb36cc7efc3d54ea3742bf020832
4
- data.tar.gz: 39d257f7d42d92d648eb593136fe8a6b6601316d
3
+ metadata.gz: c8bd496d45169b4c524932428682e9a356eabd19
4
+ data.tar.gz: 3df27e83b837f97e804495436d596563a9c0a76a
5
5
  SHA512:
6
- metadata.gz: 0fc71fdc5f567c88409eaa40f56b9db766400fa8147ca5e7e07c72b72bb6bc5125b81cbe5bc6f54a8d381e4103375f31747ee65355579372a7a6b92295f0e693
7
- data.tar.gz: de29cd9b9ceee06d2ceb18365c3b6810952ffdb0b7c9e0be7d21b7e78dc6a7646157e72b3c9d30122cf99d4d13d0dd390bc0d0311712f370efd5ab34fa27d964
6
+ metadata.gz: 7e92f300f91aec951f1d8846fcaadd5dd0270f079a848b396aed4423f717cf1792f44a65b227b9caf4bf82eb37cb0cd10de00154327d99e88917b5842b394eba
7
+ data.tar.gz: 3dd4987142b918a84fb561055793e1fff7901104601eede1fb0de380db3a5142d5c23eb3bf5a12beeb07ddbb095af6c87b144caa11221e864feac6caf3e121db
@@ -145,7 +145,7 @@ class Descartes
145
145
  else
146
146
  staff << 'Already released. '
147
147
  end
148
- staff << "#{'Download'.colorize}: #{ep.download}" unless ep.download.strip.empty?
148
+ staff << "#{'Download'.colorize}: #{ep.download}" if ep.download && !ep.download.strip.empty?
149
149
  }
150
150
  }
151
151
  elsif n_ep.to_i > show.tot_episodes
@@ -198,24 +198,28 @@ class Descartes
198
198
  if login['status'] == 'error'
199
199
  m.reply login['message']
200
200
  else
201
- ep = assonnato.episode.add show, episode.to_i
202
-
203
- if !field || !status
204
- fails = []
205
- [ :translation, :editing, :checking, :timing, :typesetting, :encoding, :qchecking ].each do |f|
206
- ep = assonnato.episode.edit show, episode.to_i, { f => :done }
207
- fails << [f, ep['message']] if ep['status'] != 'success'
208
- end
209
-
210
- if fails.length == 7
211
- m.reply "The episode has not been edited. Maybe it doesn't exist yet?"
212
- elsif fails.any?
213
- fails.each { |field, error| m.reply("#{field}: #{ep['message']}") }
201
+ ep = assonnato.episode.add show, episode.to_i, {}
202
+
203
+ if ep['status'] == 'error' # already exists
204
+ if !field || !status
205
+ fails = []
206
+ [ :translation, :editing, :checking, :timing, :typesetting, :encoding, :qchecking ].each do |f|
207
+ ep = assonnato.episode.edit show, episode.to_i, { f => :done }
208
+ fails << [f, ep['message']] if ep['status'] != 'success'
209
+ end
210
+
211
+ if fails.length == 7
212
+ m.reply "The episode has not been edited. Maybe it doesn't exist yet?"
213
+ elsif fails.any?
214
+ fails.each { |field, error| m.reply("#{field}: #{ep['message']}") }
215
+ else
216
+ m.reply "The episode has been edited."
217
+ end
214
218
  else
215
- m.reply "The episode has been edited."
219
+ ep = assonnato.episode.edit show, episode.to_i, { field.to_sym => status.to_sym }
220
+ m.reply ep['message']
216
221
  end
217
222
  else
218
- ep = assonnato.episode.edit show, episode.to_i, { field.to_sym => status.to_sym }
219
223
  m.reply ep['message']
220
224
  end
221
225
 
@@ -13,5 +13,5 @@
13
13
  ##
14
14
 
15
15
  class Descartes
16
- VERSION ||= '0.8.11'
16
+ VERSION ||= '0.8.12'
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descartes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.11
4
+ version: 0.8.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano