descartes 0.7.5 → 0.7.6
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/crunchyroll.rb +18 -5
- data/lib/descartes/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a36a86990e396c36c4a52701705f388c0a249e91
|
4
|
+
data.tar.gz: d31c1fd9bf0bbb647f567f415b264317db92060d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fe92d70797c6473af7ce6c78334429a2927c3e7d9f09564ee392d186b057beb20f4d6ff93b253a81ed01c2781c5876e827595272a3c76230c592bfd0e0a7f1c
|
7
|
+
data.tar.gz: 30957bb4538fd40c361e8597f6ab94b50ca77614ccd1356cd7428d1468ad960192bf65c380ec4bc429a921e11c0cd385fc08fff2dd0da1fe18a434a24fe776c7
|
@@ -18,16 +18,29 @@ require 'crunchyroll'
|
|
18
18
|
class Descartes
|
19
19
|
class Crunchybot
|
20
20
|
include Cinch::Plugin
|
21
|
-
match /\.cr (.+)/, use_prefix: false
|
22
21
|
|
23
|
-
|
24
|
-
|
22
|
+
match /\.cr$/, use_prefix: false, method: :today
|
23
|
+
def today(m)
|
24
|
+
crunchyroll = Crunchyroll.today
|
25
|
+
not_aired = crunchyroll.reject { |r| r[:left].include? 'days' }
|
26
|
+
already_aired = (crunchyroll - not_aired).map { |r| r[:title].colorize }.flatten.join(', ')[0..-2]
|
27
|
+
|
28
|
+
m.reply "Gli anime di oggi su #{'Crunchyroll'.colorize}:"
|
29
|
+
|
30
|
+
not_aired.each { |series|
|
31
|
+
m.reply "#{series[:title].colorize} (tra #{series[:left].to_ita.colorize})."
|
32
|
+
}
|
33
|
+
|
34
|
+
m.reply "Sono stati già trasmessi: #{already_aired}."
|
35
|
+
end
|
36
|
+
|
37
|
+
match /\.cr (.+)/, use_prefix: false, method: :get
|
38
|
+
def get(m)
|
39
|
+
series = Crunchyroll.get m.params[1].split('.cr ')[1]
|
25
40
|
|
26
41
|
if series
|
27
|
-
# m.reply "#{series[:title].colorize} is a series airing on #{series[:where].colorize} at #{series[:day].colorize} #{series[:hour].colorize}:#{series[:min].colorize} which is in #{series[:left].colorize}."
|
28
42
|
m.reply "#{series[:title].colorize} è una serie trasmessa da #{series[:where].colorize} il #{series[:day].to_ita.colorize} alle #{series[:hour].colorize}:#{series[:min].colorize}, cioè tra #{series[:left].to_ita.colorize}."
|
29
43
|
else
|
30
|
-
# m.reply 'Anime not found'.colorize
|
31
44
|
m.reply 'Anime non trovato'.colorize
|
32
45
|
end
|
33
46
|
end
|
data/lib/descartes/version.rb
CHANGED
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.7.
|
4
|
+
version: 0.7.6
|
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-02-
|
11
|
+
date: 2014-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cinch
|