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 +4 -4
- data/lib/descartes/modules/pigro.rb +3 -51
- data/lib/descartes/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3395622cd163fb36cc7efc3d54ea3742bf020832
|
4
|
+
data.tar.gz: 39d257f7d42d92d648eb593136fe8a6b6601316d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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: :
|
162
|
-
def
|
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
|
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|
|
data/lib/descartes/version.rb
CHANGED