comedy 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/comedy +3 -0
- data/lib/comedy/version.rb +1 -1
- data/lib/comedy.rb +0 -2
- metadata +7 -6
data/bin/comedy
ADDED
data/lib/comedy/version.rb
CHANGED
data/lib/comedy.rb
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
require 'launchy'
|
|
2
2
|
require 'mechanize'
|
|
3
3
|
module Comedy
|
|
4
|
-
#require '
|
|
5
4
|
def self.laugh_with(star)
|
|
6
5
|
agent = Mechanize.new
|
|
7
6
|
page = agent.get("http://www.youtube.com/results?search_query=comedy+#{star}").links_with(:href => /watch/)
|
|
8
7
|
link = page[rand(page.length)].uri.to_s
|
|
9
8
|
Launchy.open("http://www.youtube.com/#{link}")
|
|
10
9
|
end
|
|
11
|
-
|
|
12
10
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: comedy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 25
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.1.1
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- anand9
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2012-12-
|
|
18
|
+
date: 2012-12-19 00:00:00 +05:30
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -53,8 +53,8 @@ dependencies:
|
|
|
53
53
|
description: Brings comedy for you :)
|
|
54
54
|
email:
|
|
55
55
|
- anandvasudevan9@gmail.com
|
|
56
|
-
executables:
|
|
57
|
-
|
|
56
|
+
executables:
|
|
57
|
+
- comedy
|
|
58
58
|
extensions: []
|
|
59
59
|
|
|
60
60
|
extra_rdoc_files: []
|
|
@@ -62,6 +62,7 @@ extra_rdoc_files: []
|
|
|
62
62
|
files:
|
|
63
63
|
- lib/comedy/version.rb
|
|
64
64
|
- lib/comedy.rb
|
|
65
|
+
- bin/comedy
|
|
65
66
|
has_rdoc: true
|
|
66
67
|
homepage: http://github.com/anand9/comedy
|
|
67
68
|
licenses: []
|