descartes 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/descartes +10 -5
- data/lib/descartes/modules/crunchyroll.rb +1 -0
- data/lib/descartes/modules/quotone.rb +4 -4
- data/lib/descartes/utils.rb +16 -1
- 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: 270a6e5832ce2155ca5e586a273c36df53ce90a8
|
4
|
+
data.tar.gz: 5505af70d453c69daff179864040f0ce0ce17d91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28af8117d44c9faeeeb05fd61cb1c3bdad1f78e2c3a0170075d1efa65c6d407493735a1066f88f8381a55945e4b24d47b6ac46ac530282688c92edab19431b82
|
7
|
+
data.tar.gz: 6fe1c6ea411d76c5e50ab002e2cdb14bf19ed28fa6e0dc1ae1c35981959fd7898b7d743ea2b8c431f61a0493425c6f98dd9f872b58cd35e30117e74452fd1041
|
data/bin/descartes
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
2
3
|
##
|
3
4
|
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
4
5
|
# Version 2, December 2004
|
@@ -15,7 +16,7 @@
|
|
15
16
|
|
16
17
|
require 'descartes'
|
17
18
|
|
18
|
-
@@nickname = ARGV[0]
|
19
|
+
@@nickname = ARGV[0] || 'Descartes'
|
19
20
|
server = ARGV[1] || 'irc.rizon.net'
|
20
21
|
channels = ARGV[2..-1] || ['#aggvistnurummor']
|
21
22
|
plugins = Descartes.load
|
@@ -37,11 +38,15 @@ Cinch::Bot.new {
|
|
37
38
|
end
|
38
39
|
|
39
40
|
on :message, '!è' do |m|
|
40
|
-
m.reply
|
41
|
+
m.reply ?È
|
42
|
+
end
|
43
|
+
|
44
|
+
on :message, '!t' do |m|
|
45
|
+
m.reply ?~
|
41
46
|
end
|
42
47
|
|
43
48
|
on :message, '!"' do |m|
|
44
|
-
m.reply '
|
49
|
+
m.reply '“...”'
|
45
50
|
end
|
46
51
|
|
47
|
-
}.start
|
52
|
+
}.start
|
@@ -19,7 +19,7 @@ class Descartes
|
|
19
19
|
class Quotone
|
20
20
|
include Cinch::Plugin
|
21
21
|
|
22
|
-
match /quotone/
|
22
|
+
match /quotone( [0-9]+){0,1}/
|
23
23
|
|
24
24
|
def get(url)
|
25
25
|
open(url) { |f|
|
@@ -28,8 +28,8 @@ class Descartes
|
|
28
28
|
}
|
29
29
|
end
|
30
30
|
|
31
|
-
def execute(m)
|
32
|
-
m.reply get 'http://www.quotone.unsigned.it/api/random.json'
|
31
|
+
def execute(m, num = nil)
|
32
|
+
m.reply get(num ? "http://www.quotone.unsigned.it/api/get/#{num.to_i}.json" : 'http://www.quotone.unsigned.it/api/random.json')
|
33
33
|
end
|
34
34
|
end
|
35
|
-
end
|
35
|
+
end
|
data/lib/descartes/utils.rb
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
##
|
3
|
+
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
4
|
+
# Version 2, December 2004
|
5
|
+
#
|
6
|
+
# Everyone is permitted to copy and distribute verbatim or modified
|
7
|
+
# copies of this license document, and changing it is allowed as long
|
8
|
+
# as the name is changed.
|
9
|
+
#
|
10
|
+
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
11
|
+
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
12
|
+
#
|
13
|
+
# 0. You just DO WHAT THE FUCK YOU WANT TO.
|
14
|
+
##
|
15
|
+
|
1
16
|
class String
|
2
17
|
def to_ita
|
3
18
|
day_eng = [ 'Sundays', 'Mondays', 'Tuesdays', 'Wednesdays', 'Thursdays', 'Fridays', 'Saturdays' ]
|
@@ -20,4 +35,4 @@ class String
|
|
20
35
|
require 'htmlentities'
|
21
36
|
HTMLEntities.new.decode self
|
22
37
|
end
|
23
|
-
end
|
38
|
+
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.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Giovanni Capuano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cinch
|