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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc616a48a2d57f44b088447a516715fc9404ebe5
4
- data.tar.gz: 49747ef59f9cbe448ada135dd49767ff57335292
3
+ metadata.gz: 270a6e5832ce2155ca5e586a273c36df53ce90a8
4
+ data.tar.gz: 5505af70d453c69daff179864040f0ce0ce17d91
5
5
  SHA512:
6
- metadata.gz: 48bf793d8ecc118c0e6710797b68f320ad86837378472589f90f3c025d7248fb410cd9adda48b9e65a16408fe1b4c5dd06171ff444039ce3edb37bb34939038b
7
- data.tar.gz: 8e9c4ebc012ff1b3a3226220a371fdb208658fab76ad1ded0a554da2c320f1b0bae542ea4e459c5745a79b2b79f23c0cc53202f0949896ff42887934d562b8fc
6
+ metadata.gz: 28af8117d44c9faeeeb05fd61cb1c3bdad1f78e2c3a0170075d1efa65c6d407493735a1066f88f8381a55945e4b24d47b6ac46ac530282688c92edab19431b82
7
+ data.tar.gz: 6fe1c6ea411d76c5e50ab002e2cdb14bf19ed28fa6e0dc1ae1c35981959fd7898b7d743ea2b8c431f61a0493425c6f98dd9f872b58cd35e30117e74452fd1041
data/bin/descartes CHANGED
@@ -1,4 +1,5 @@
1
- #! /usr/bin/env ruby
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] || 'Descartes'
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
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  ##
2
3
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
4
  # Version 2, December 2004
@@ -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
@@ -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
@@ -14,6 +14,6 @@
14
14
 
15
15
  class Descartes
16
16
  def self.version
17
- '0.3.8'
17
+ '0.3.9'
18
18
  end
19
19
  end
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.8
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-04 00:00:00.000000000 Z
11
+ date: 2013-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cinch