descartes 0.8.5 → 0.8.6.2

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: 9332abbe8541682e9b717d4df5cb3166344f15e9
4
- data.tar.gz: 8d6bcee8f442264d1c79c84c5526b6efb53c8d88
3
+ metadata.gz: 75bfebcdf24ae3c4ab530d5efec57517f55f0acc
4
+ data.tar.gz: 668ac6631f05b85703cf2756403c7b032ab97ff9
5
5
  SHA512:
6
- metadata.gz: 0044ee56a56a2424bf9b72ac50f25efeeb876b011369face7e69c61b07e299907111cd50231e2fab1eba580ba587199674346972a226826dc3ada5eb7f37fbcc
7
- data.tar.gz: 94528b6f23dc637b0d4970862252d1435cbf09729b333e70b1ce0cf515132c64feae9884926c2f3cb58b5739616a73bf70f0926d4b39a6c2110e19e43e66cdf0
6
+ metadata.gz: fd60d9ec9795875ed96f87f6342e67ee25c6b0e68d3549157050280ddbd1b20886a9e1913118f2109c1cf031b6dee378bc18b85aa47b002a0fbd324ad9f04f3d
7
+ data.tar.gz: 0b351294d480514d70b2c937de1d25aa24d4bbbabe0ad1a1c31632a2d80f5cb471c586eb29052cc8c7af41d4359ee12ec0aa4c484b4fac8ab72ac3b77f4af258
data/bin/descartes CHANGED
@@ -2,14 +2,14 @@
2
2
  ##
3
3
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
4
4
  # Version 2, December 2004
5
- #
5
+ #
6
6
  # Everyone is permitted to copy and distribute verbatim or modified
7
7
  # copies of this license document, and changing it is allowed as long
8
8
  # as the name is changed.
9
- #
9
+ #
10
10
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11
11
  # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12
- #
12
+ #
13
13
  # 0. You just DO WHAT THE FUCK YOU WANT TO.
14
14
  ##
15
15
 
@@ -78,9 +78,9 @@ Cinch::Bot.new {
78
78
  c.user = 'Descartes'
79
79
  c.server = options[:server]
80
80
  c.channels = options[:channels]
81
-
82
- c.plugins.plugins = [Cinch::Plugins::Login] + Descartes.load(options)
83
- c.plugins.options[Cinch::Plugins::Login] = { :password => options[:password] }
81
+
82
+ c.plugins.plugins = [Cinch::Plugins::Login] + Descartes.load(options)
83
+ c.plugins.options[Cinch::Plugins::Login] = { password: options[:password] }
84
84
  end
85
85
 
86
86
  on :message, '!help' do |m|
@@ -128,7 +128,15 @@ Cinch::Bot.new {
128
128
  m.reply ?`
129
129
  end
130
130
 
131
+ on :message, /!m/ do |m|
132
+ m.reply ?µ
133
+ end
134
+
131
135
  on :message, '!version' do |m|
132
- m.reply Descartes.version
136
+ m.reply Descartes::VERSION
137
+ end
138
+
139
+ on :message, '!modules' do |m|
140
+ m.reply Descartes.constants.join(', ')
133
141
  end
134
142
  }.start
data/lib/descartes.rb CHANGED
@@ -1,14 +1,14 @@
1
1
  ##
2
2
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  # Version 2, December 2004
4
- #
4
+ #
5
5
  # Everyone is permitted to copy and distribute verbatim or modified
6
6
  # copies of this license document, and changing it is allowed as long
7
7
  # as the name is changed.
8
- #
8
+ #
9
9
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- #
11
+ #
12
12
  # 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
 
@@ -18,4 +18,4 @@ require 'cinch/colorize'
18
18
 
19
19
  require 'descartes/utils'
20
20
  require 'descartes/descartes'
21
- require 'descartes/version'
21
+ require 'descartes/version'
@@ -1,28 +1,41 @@
1
1
  ##
2
2
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  # Version 2, December 2004
4
- #
4
+ #
5
5
  # Everyone is permitted to copy and distribute verbatim or modified
6
6
  # copies of this license document, and changing it is allowed as long
7
7
  # as the name is changed.
8
- #
8
+ #
9
9
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- #
11
+ #
12
12
  # 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
 
15
15
  class Descartes
16
- def self.load(options)
17
- $options = options
16
+ class << self
17
+ def load(options = {})
18
+ $options = options
19
+ $options[:exclude] ||= []
18
20
 
19
- Dir.glob(File.expand_path('../modules/*.rb', __FILE__)).each { |plugin|
20
- name = plugin.split(?/).last.split(?.).first.downcase
21
- require plugin unless $options[:exclude].include? name
22
- }
21
+ puts 'Importing modules..'
22
+ Dir.glob(File.expand_path('../modules/*.rb', __FILE__)).each do |plugin|
23
+ name = plugin.split(?/).last.split(?.).first.downcase
23
24
 
24
- return Descartes.constants.map { |p|
25
- "Descartes::#{p}".split('::').inject(Object) { |o, c| o.const_get c }
26
- }
25
+ if $options[:exclude].include?(name)
26
+ puts "- Skipping #{name}..."
27
+ else
28
+ print "- Loading #{name}..."
29
+ require plugin
30
+ puts ' done'
31
+ end
32
+ end
33
+
34
+ plugins = Descartes.constants.map do |p|
35
+ "Descartes::#{p}".split('::').inject(Object) { |o, c| o.const_get c }
36
+ end
37
+
38
+ plugins.select { |plugin| plugin.is_a?(Class) && plugin.include?(Cinch::Plugin) }
39
+ end
27
40
  end
28
- end
41
+ end
@@ -1,14 +1,14 @@
1
1
  ##
2
2
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  # Version 2, December 2004
4
- #
4
+ #
5
5
  # Everyone is permitted to copy and distribute verbatim or modified
6
6
  # copies of this license document, and changing it is allowed as long
7
7
  # as the name is changed.
8
- #
8
+ #
9
9
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- #
11
+ #
12
12
  # 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
  require 'arnaldo'
@@ -16,10 +16,10 @@ require 'arnaldo'
16
16
  class Descartes
17
17
  class Arnaldo
18
18
  include Cinch::Plugin
19
- match 'proverb'
20
19
 
20
+ match 'proverb'
21
21
  def execute(m)
22
22
  m.reply "“#{::Arnaldo.get}”".colorize
23
23
  end
24
24
  end
25
- end
25
+ end
@@ -1,22 +1,22 @@
1
1
  ##
2
2
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  ## Version 2, December 2004
4
- ##
4
+ ##
5
5
  ## Everyone is permitted to copy and distribute verbatim or modified
6
6
  ## copies of this license document, and changing it is allowed as long
7
7
  ## as the name is changed.
8
- ##
8
+ ##
9
9
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- ##
11
+ ##
12
12
  ## 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
 
15
15
  class Descartes
16
16
  class Azzone
17
17
  include Cinch::Plugin
18
- match /Azzone/i
19
18
 
19
+ match /Azzone/i
20
20
  def execute(m)
21
21
  file = File.join $options[:dotfiles], 'azzone.txt'
22
22
  m.reply [].tap { |ary|
@@ -24,4 +24,4 @@ class Descartes
24
24
  }.sample
25
25
  end
26
26
  end
27
- end
27
+ end
@@ -47,7 +47,7 @@ class Descartes
47
47
  m.reply "Sono stati già trasmessi: #{aired}." unless aired.empty?
48
48
  end
49
49
 
50
- match /\.cr (.+)/, use_prefix: false, method: :get
50
+ match /^\.cr (.+)$/, use_prefix: false, method: :get
51
51
  def get(m)
52
52
  series = Crunchyroll.get m.params[1].split('.cr ')[1]
53
53
 
@@ -1,14 +1,14 @@
1
1
  ##
2
2
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  # Version 2, December 2004
4
- #
4
+ #
5
5
  # Everyone is permitted to copy and distribute verbatim or modified
6
6
  # copies of this license document, and changing it is allowed as long
7
7
  # as the name is changed.
8
- #
8
+ #
9
9
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- #
11
+ #
12
12
  # 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
 
@@ -18,13 +18,13 @@ require 'nokogiri'
18
18
  class Descartes
19
19
  class Currency
20
20
  include Cinch::Plugin
21
- match /[0-9]+ [A-Za-z]+ to [A-Za-z]+/, use_prefix: false
22
21
 
22
+ match /[0-9]+ [A-Za-z]+ to [A-Za-z]+/, use_prefix: false
23
23
  def execute(m)
24
24
  amount = m.params[1].match(/[0-9]+/)
25
25
  from = m.params[1].match(/[A-Za-z]+ to/).to_s[0..-4]
26
26
  to = m.params[1].match(/to [A-Za-z]+/).to_s[3..-1]
27
-
27
+
28
28
  from = 'jpy' if from == 'yen'
29
29
  to = 'jpy' if to == 'yen'
30
30
 
@@ -2,14 +2,14 @@
2
2
  ##
3
3
  ### DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
4
4
  ### Version 2, December 2004
5
- ###
5
+ ###
6
6
  ### Everyone is permitted to copy and distribute verbatim or modified
7
7
  ### copies of this license document, and changing it is allowed as long
8
8
  ### as the name is changed.
9
- ###
9
+ ###
10
10
  ### DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11
11
  ### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12
- ###
12
+ ###
13
13
  ### 0. You just DO WHAT THE FUCK YOU WANT TO.
14
14
 
15
15
  require 'nokogiri'
@@ -20,7 +20,6 @@ class Descartes
20
20
  include Cinch::Plugin
21
21
 
22
22
  match /!dict ([a-zA-Z]+) ([a-zA-Z]+)/, use_prefix: false
23
-
24
23
  def execute(m, action, word)
25
24
  url = "http://www.wordreference.com/#{action}/#{word}"
26
25
  page = Nokogiri::HTML open(url)
@@ -1,14 +1,14 @@
1
1
  ##
2
2
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  # Version 2, December 2004
4
- #
4
+ #
5
5
  # Everyone is permitted to copy and distribute verbatim or modified
6
6
  # copies of this license document, and changing it is allowed as long
7
7
  # as the name is changed.
8
- #
8
+ #
9
9
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- #
11
+ #
12
12
  # 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
 
@@ -19,7 +19,18 @@ require 'cgi'
19
19
  class Descartes
20
20
  class Google
21
21
  include Cinch::Plugin
22
+
22
23
  match /google (.+)/
24
+ def execute(m, query)
25
+ res = search query
26
+
27
+ if res.empty?
28
+ # m.reply 'No results found.'
29
+ m.reply 'Nessun risultato.'
30
+ else
31
+ res[0..3].each { |r| m.reply "#{r[:title]} - #{r[:url]}" }
32
+ end
33
+ end
23
34
 
24
35
  def search(query)
25
36
  page = Nokogiri::HTML open("http://www.google.com/search?q=#{CGI.escape(query)}")
@@ -34,16 +45,5 @@ class Descartes
34
45
  }
35
46
  }
36
47
  end
37
-
38
- def execute(m, query)
39
- res = search query
40
-
41
- if res.empty?
42
- # m.reply 'No results found.'
43
- m.reply 'Nessun risultato.'
44
- else
45
- res[0..3].each { |r| m.reply "#{r[:title]} - #{r[:url]}" }
46
- end
47
- end
48
48
  end
49
- end
49
+ end
@@ -1,14 +1,14 @@
1
1
  ##
2
2
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  ## Version 2, December 2004
4
- ##
4
+ ##
5
5
  ## Everyone is permitted to copy and distribute verbatim or modified
6
6
  ## copies of this license document, and changing it is allowed as long
7
7
  ## as the name is changed.
8
- ##
8
+ ##
9
9
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- ##
11
+ ##
12
12
  ## 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
 
@@ -79,7 +79,7 @@ class Descartes
79
79
 
80
80
  get_lastfm_nicks_archive.each { |usernick, lastfmnick|
81
81
  if usernick_list.include? usernick
82
- found = true
82
+ found = true
83
83
  m.reply "#{usernick} is known as #{lastfmnick}."
84
84
  end
85
85
  }
@@ -1,14 +1,14 @@
1
1
  ##
2
2
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  # Version 2, December 2004
4
- #
4
+ #
5
5
  # Everyone is permitted to copy and distribute verbatim or modified
6
6
  # copies of this license document, and changing it is allowed as long
7
7
  # as the name is changed.
8
- #
8
+ #
9
9
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- #
11
+ #
12
12
  # 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
 
@@ -18,10 +18,10 @@ require 'nokogiri'
18
18
  class Descartes
19
19
  class MusicToughts
20
20
  include Cinch::Plugin
21
- match 'music'
22
21
 
22
+ match 'music'
23
23
  def execute(m)
24
- lang = { 'Cookie' => 'lang=it' }
24
+ lang = { 'Cookie' => 'lang=it' }
25
25
  page = Nokogiri::HTML open('http://musicthoughts.com/t', lang)
26
26
 
27
27
  quote = page.at_xpath('//blockquote//q').text.strip
@@ -31,4 +31,4 @@ class Descartes
31
31
  m.reply "- #{author}"
32
32
  end
33
33
  end
34
- end
34
+ end
@@ -1,14 +1,14 @@
1
1
  ##
2
2
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  ## Version 2, December 2004
4
- ##
4
+ ##
5
5
  ## Everyone is permitted to copy and distribute verbatim or modified
6
6
  ## copies of this license document, and changing it is allowed as long
7
7
  ## as the name is changed.
8
- ##
8
+ ##
9
9
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- ##
11
+ ##
12
12
  ## 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
 
@@ -20,7 +20,6 @@ class Descartes
20
20
  include Cinch::Plugin
21
21
 
22
22
  match /quotone( [0-9]+){0,1}/
23
-
24
23
  def get(url)
25
24
  open(url) { |f|
26
25
  quote = JSON.parse f.read
@@ -0,0 +1,37 @@
1
+ ##
2
+ # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
+ # Version 2, December 2004
4
+ #
5
+ # Everyone is permitted to copy and distribute verbatim or modified
6
+ # copies of this license document, and changing it is allowed as long
7
+ # as the name is changed.
8
+ #
9
+ # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
+ # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
+ #
12
+ # 0. You just DO WHAT THE FUCK YOU WANT TO.
13
+ ##
14
+
15
+ class Descartes
16
+ class Reminder
17
+ include Cinch::Plugin
18
+
19
+ @@active_threads = []
20
+
21
+ match /!rem ([0-1]?[0-9]|[2][0-3]):([0-5]?[0-9]) (.+)/, use_prefix: false
22
+ def execute(m, hour, min, msg)
23
+ time = Time.new(Time.now.year, Time.now.month, Time.now.day, hour, min, 0)
24
+
25
+ if Time.now < time
26
+ if @@active_threads.size < 10
27
+ @@active_threads << Thread.new { sleep (time - Time.now) ; m.reply "#{m.user.nick}: #{msg}" }
28
+ m.reply 'Will be done'
29
+ else
30
+ m.reply "Stop, please. It's not like I have an elephant memory"
31
+ end
32
+ else
33
+ m.reply "You can't remind in the past. Not yet."
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,24 +1,23 @@
1
1
  ##
2
2
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  ## Version 2, December 2004
4
- ##
4
+ ##
5
5
  ## Everyone is permitted to copy and distribute verbatim or modified
6
6
  ## copies of this license document, and changing it is allowed as long
7
7
  ## as the name is changed.
8
- ##
8
+ ##
9
9
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- ##
11
+ ##
12
12
  ## 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
 
15
15
  class Descartes
16
16
  class Reply
17
17
  include Cinch::Plugin
18
-
18
+
19
19
  set :prefix, lambda { |m| Regexp.new "(.*)#{m.bot.nick}(.*)" }
20
20
  match ??
21
-
22
21
  def execute(m)
23
22
  file = File.join $options[:dotfiles], 'replies.txt'
24
23
  m.reply [].tap { |ary|
@@ -26,4 +25,4 @@ class Descartes
26
25
  }.sample
27
26
  end
28
27
  end
29
- end
28
+ end
@@ -1,14 +1,14 @@
1
1
  ##
2
2
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  # Version 2, December 2004
4
- #
4
+ #
5
5
  # Everyone is permitted to copy and distribute verbatim or modified
6
6
  # copies of this license document, and changing it is allowed as long
7
7
  # as the name is changed.
8
- #
8
+ #
9
9
  # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- #
11
+ #
12
12
  # 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
 
@@ -46,4 +46,4 @@ class Descartes
46
46
  end
47
47
  end
48
48
  end
49
- end
49
+ end
@@ -1,24 +1,24 @@
1
1
  ##
2
2
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  ## Version 2, December 2004
4
- ##
4
+ ##
5
5
  ## Everyone is permitted to copy and distribute verbatim or modified
6
6
  ## copies of this license document, and changing it is allowed as long
7
7
  ## as the name is changed.
8
- ##
8
+ ##
9
9
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- ##
11
+ ##
12
12
  ## 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ###
14
14
 
15
15
  class Descartes
16
16
  class Shinbo
17
17
  include Cinch::Plugin
18
- match /shinbo/i, use_prefix: false
19
18
 
19
+ match /shinbo/i, use_prefix: false
20
20
  def execute(m)
21
21
  Target(m.channel).action 'headtilts'
22
22
  end
23
23
  end
24
- end
24
+ end
@@ -1,22 +1,22 @@
1
1
  ##
2
2
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
3
  ## Version 2, December 2004
4
- ##
4
+ ##
5
5
  ## Everyone is permitted to copy and distribute verbatim or modified
6
6
  ## copies of this license document, and changing it is allowed as long
7
7
  ## as the name is changed.
8
- ##
8
+ ##
9
9
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
10
10
  ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
11
- ##
11
+ ##
12
12
  ## 0. You just DO WHAT THE FUCK YOU WANT TO.
13
13
  ##
14
14
 
15
15
  class Descartes
16
16
  class Sindaco
17
17
  include Cinch::Plugin
18
- match /Sindaco/i
19
18
 
19
+ match /Sindaco/i
20
20
  def execute(m)
21
21
  file = File.join $options[:dotfiles], 'sindaco.txt'
22
22
  m.reply [].tap { |ary|
@@ -24,4 +24,4 @@ class Descartes
24
24
  }.sample
25
25
  end
26
26
  end
27
- end
27
+ end
@@ -2,14 +2,14 @@
2
2
  ##
3
3
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
4
4
  ## Version 2, December 2004
5
- ##
5
+ ##
6
6
  ## Everyone is permitted to copy and distribute verbatim or modified
7
7
  ## copies of this license document, and changing it is allowed as long
8
8
  ## as the name is changed.
9
- ##
9
+ ##
10
10
  ## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11
11
  ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12
- ##
12
+ ##
13
13
  ## 0. You just DO WHAT THE FUCK YOU WANT TO.
14
14
  ###
15
15
 
@@ -19,8 +19,8 @@ require 'nokogiri'
19
19
  class Descartes
20
20
  class Url
21
21
  include Cinch::Plugin
22
- match /http(s)?:\/\/(\S+)/, use_prefix: false
23
22
 
23
+ match /http(s)?:\/\/(\S+)/, use_prefix: false
24
24
  def execute(m, ssl, url)
25
25
  begin
26
26
  page = Nokogiri::HTML open("http#{ssl}://#{url}").read, nil, 'utf-8'
@@ -13,7 +13,5 @@
13
13
  ##
14
14
 
15
15
  class Descartes
16
- def self.version
17
- '0.8.5'
18
- end
16
+ VERSION ||= '0.8.6.2'
19
17
  end
metadata CHANGED
@@ -1,76 +1,79 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descartes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-14 00:00:00.000000000 Z
11
+ date: 2015-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cinch
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '2.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '2.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: cinch-login
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '0.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '0.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cinch-colorize
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '0.3'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '0.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: nokogiri
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '1.6'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '1.6'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: crunchyroll
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.9'
76
+ - - ">="
74
77
  - !ruby/object:Gem::Version
75
78
  version: 0.9.8
76
79
  type: :runtime
@@ -78,92 +81,95 @@ dependencies:
78
81
  version_requirements: !ruby/object:Gem::Requirement
79
82
  requirements:
80
83
  - - "~>"
84
+ - !ruby/object:Gem::Version
85
+ version: '0.9'
86
+ - - ">="
81
87
  - !ruby/object:Gem::Version
82
88
  version: 0.9.8
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: htmlentities
85
91
  requirement: !ruby/object:Gem::Requirement
86
92
  requirements:
87
- - - ">="
93
+ - - "~>"
88
94
  - !ruby/object:Gem::Version
89
- version: '0'
95
+ version: '4.3'
90
96
  type: :runtime
91
97
  prerelease: false
92
98
  version_requirements: !ruby/object:Gem::Requirement
93
99
  requirements:
94
- - - ">="
100
+ - - "~>"
95
101
  - !ruby/object:Gem::Version
96
- version: '0'
102
+ version: '4.3'
97
103
  - !ruby/object:Gem::Dependency
98
104
  name: json
99
105
  requirement: !ruby/object:Gem::Requirement
100
106
  requirements:
101
- - - ">="
107
+ - - "~>"
102
108
  - !ruby/object:Gem::Version
103
- version: '0'
109
+ version: '1.8'
104
110
  type: :runtime
105
111
  prerelease: false
106
112
  version_requirements: !ruby/object:Gem::Requirement
107
113
  requirements:
108
- - - ">="
114
+ - - "~>"
109
115
  - !ruby/object:Gem::Version
110
- version: '0'
116
+ version: '1.8'
111
117
  - !ruby/object:Gem::Dependency
112
118
  name: treccani
113
119
  requirement: !ruby/object:Gem::Requirement
114
120
  requirements:
115
- - - ">="
121
+ - - "~>"
116
122
  - !ruby/object:Gem::Version
117
- version: '0'
123
+ version: '0.3'
118
124
  type: :runtime
119
125
  prerelease: false
120
126
  version_requirements: !ruby/object:Gem::Requirement
121
127
  requirements:
122
- - - ">="
128
+ - - "~>"
123
129
  - !ruby/object:Gem::Version
124
- version: '0'
130
+ version: '0.3'
125
131
  - !ruby/object:Gem::Dependency
126
132
  name: rockstar
127
133
  requirement: !ruby/object:Gem::Requirement
128
134
  requirements:
129
- - - ">="
135
+ - - "~>"
130
136
  - !ruby/object:Gem::Version
131
- version: '0'
137
+ version: '0.8'
132
138
  type: :runtime
133
139
  prerelease: false
134
140
  version_requirements: !ruby/object:Gem::Requirement
135
141
  requirements:
136
- - - ">="
142
+ - - "~>"
137
143
  - !ruby/object:Gem::Version
138
- version: '0'
144
+ version: '0.8'
139
145
  - !ruby/object:Gem::Dependency
140
146
  name: assonnato
141
147
  requirement: !ruby/object:Gem::Requirement
142
148
  requirements:
143
- - - ">="
149
+ - - "~>"
144
150
  - !ruby/object:Gem::Version
145
- version: '0'
151
+ version: '0.8'
146
152
  type: :runtime
147
153
  prerelease: false
148
154
  version_requirements: !ruby/object:Gem::Requirement
149
155
  requirements:
150
- - - ">="
156
+ - - "~>"
151
157
  - !ruby/object:Gem::Version
152
- version: '0'
158
+ version: '0.8'
153
159
  - !ruby/object:Gem::Dependency
154
160
  name: arnaldo
155
161
  requirement: !ruby/object:Gem::Requirement
156
162
  requirements:
157
- - - ">="
163
+ - - "~>"
158
164
  - !ruby/object:Gem::Version
159
- version: '0'
165
+ version: '0.1'
160
166
  type: :runtime
161
167
  prerelease: false
162
168
  version_requirements: !ruby/object:Gem::Requirement
163
169
  requirements:
164
- - - ">="
170
+ - - "~>"
165
171
  - !ruby/object:Gem::Version
166
- version: '0'
172
+ version: '0.1'
167
173
  description: A serious modular ruby IRC bot.
168
174
  email: webmaster@giovannicapuano.net
169
175
  executables:
@@ -190,6 +196,7 @@ files:
190
196
  - lib/descartes/modules/musicthoughts.rb
191
197
  - lib/descartes/modules/pigro.rb
192
198
  - lib/descartes/modules/quotone.rb
199
+ - lib/descartes/modules/reminder.rb
193
200
  - lib/descartes/modules/reply.rb
194
201
  - lib/descartes/modules/rpn.rb
195
202
  - lib/descartes/modules/seen.rb