descartes 0.8.10 → 0.8.11

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: 712ac18974d907ed0dbf58bc8ea64f3c61a51eec
4
- data.tar.gz: ccaed7f68e9e8940a815667e9f5e9517ce5d919a
3
+ metadata.gz: 3395622cd163fb36cc7efc3d54ea3742bf020832
4
+ data.tar.gz: 39d257f7d42d92d648eb593136fe8a6b6601316d
5
5
  SHA512:
6
- metadata.gz: 4136fa6c4a286e406459b4c997600f3464f738ddd7e0a248953267d901cd3442c166a19616ac7b8f2bb79a21ab159116801fdc79e395467a8cd7f2281090dd87
7
- data.tar.gz: 1be400ed852a2f31c876393505e2052cba88e531f2bc18c2479eb52bb085db55e13c18e30767e5d3829a948a52ed25dbe6e6878a68b31a3a9d40cf0165dd219b
6
+ metadata.gz: 0fc71fdc5f567c88409eaa40f56b9db766400fa8147ca5e7e07c72b72bb6bc5125b81cbe5bc6f54a8d381e4103375f31747ee65355579372a7a6b92295f0e693
7
+ data.tar.gz: de29cd9b9ceee06d2ceb18365c3b6810952ffdb0b7c9e0be7d21b7e78dc6a7646157e72b3c9d30122cf99d4d13d0dd390bc0d0311712f370efd5ab34fa27d964
@@ -158,8 +158,8 @@ class Descartes
158
158
  end
159
159
  end
160
160
 
161
- match /pigro (.+)/, method: :add_episode
162
- def add_episode(m, things)
161
+ match /pigro (.+)/, method: :episode
162
+ def episode(m, things)
163
163
  unless m.user.authed?
164
164
  m.reply 'You are not authorized to do this.'
165
165
  return
@@ -177,7 +177,7 @@ class Descartes
177
177
  episode = things.pop
178
178
  show = things.join ' '
179
179
  else
180
- m.reply 'usage: !pigro SHOW ADD'
180
+ m.reply 'usage: !pigro SHOW EPISODE [FIELD] [STATUS]'
181
181
  return
182
182
  end
183
183
 
@@ -199,55 +199,7 @@ class Descartes
199
199
  m.reply login['message']
200
200
  else
201
201
  ep = assonnato.episode.add show, episode.to_i
202
- m.reply ep['message']
203
-
204
- assonnato.user.logout
205
- end
206
- else
207
- m.reply 'You are not recognized.'
208
- end
209
- end
210
-
211
- match /pigro (.+)/, method: :edit_episode
212
- def edit_episode(m, things)
213
- unless m.user.authed?
214
- m.reply 'You are not authorized to do this.'
215
- return
216
- end
217
-
218
- things = things.split ' '
219
- len = things.length
220
-
221
- if things.last.numeric?
222
- episode = things.pop
223
- show = things.join ' '
224
- elsif len >= 4
225
- status = things.pop
226
- field = things.pop
227
- episode = things.pop
228
- show = things.join ' '
229
- else
230
- m.reply 'usage: !pigro SHOW EPISODE [FIELD] [STATUS]'
231
- return
232
- end
233
202
 
234
- host = get_host
235
- user = get_user m.user.nick
236
- assonnato = Assonnato.new host
237
-
238
- series = assonnato.show.search show
239
- if series.length != 1
240
- m.reply 'You should refine your search.'
241
- return
242
- else
243
- show = series.first.name
244
- end
245
-
246
- if user
247
- login = assonnato.user.login user['username'], user['password']
248
- if login['status'] == 'error'
249
- m.reply login['message']
250
- else
251
203
  if !field || !status
252
204
  fails = []
253
205
  [ :translation, :editing, :checking, :timing, :typesetting, :encoding, :qchecking ].each do |f|
@@ -13,5 +13,5 @@
13
13
  ##
14
14
 
15
15
  class Descartes
16
- VERSION ||= '0.8.10'
16
+ VERSION ||= '0.8.11'
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.10
4
+ version: 0.8.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano