descartes 0.3.9 → 0.3.10
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/musicthoughts.rb +34 -0
- data/lib/descartes/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 844e4ad50eb4f64b97902486f66281c5bc5f32e2
|
4
|
+
data.tar.gz: ae57f2b8b6b6aa3a40e0b6e78c717f40f226f6da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd844a2e4d713565e41ec975289c344e020fc153e93c40f46c8c72d818bc007623fcac2c271315dd165887e8455ed5e140b1e7c4236bbce9a6b28f4bd89e0b60
|
7
|
+
data.tar.gz: 8a5633c23864dac0c99e1112aa1b332ed11a247a51099cedf254c6a0449f4c658800c08361f410601b3da2d75789875e6d6f2cfff20d6598d4b2827b6d811428
|
@@ -0,0 +1,34 @@
|
|
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
|
+
require 'open-uri'
|
16
|
+
require 'nokogiri'
|
17
|
+
|
18
|
+
class Descartes
|
19
|
+
class MusicToughts
|
20
|
+
include Cinch::Plugin
|
21
|
+
match 'music'
|
22
|
+
|
23
|
+
def execute(m)
|
24
|
+
lang = { 'Cookie' => 'lang=it' }
|
25
|
+
page = Nokogiri::HTML open('http://musicthoughts.com/t', lang)
|
26
|
+
|
27
|
+
quote = page.at_xpath('//blockquote//q').text.strip
|
28
|
+
author = page.at_xpath('//blockquote//cite').text.strip
|
29
|
+
|
30
|
+
m.reply quote
|
31
|
+
m.reply "- #{author}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
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.10
|
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-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cinch
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- lib/descartes/modules/crunchyroll.rb
|
106
106
|
- lib/descartes/modules/currency.rb
|
107
107
|
- lib/descartes/modules/google.rb
|
108
|
+
- lib/descartes/modules/musicthoughts.rb
|
108
109
|
- lib/descartes/modules/quotone.rb
|
109
110
|
- lib/descartes/modules/reply/replies.txt
|
110
111
|
- lib/descartes/modules/reply/sindaco.txt
|