lucky 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lucky/version.rb +1 -1
- data/lib/lucky.rb +10 -1
- metadata +2 -2
data/lib/lucky/version.rb
CHANGED
data/lib/lucky.rb
CHANGED
@@ -3,6 +3,15 @@ require "lucky/version"
|
|
3
3
|
module Lucky
|
4
4
|
|
5
5
|
def self.printname(name)
|
6
|
-
|
6
|
+
uri = URI.parse("http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%20%3D%20%22http%3A%2F%2Fwww.ganeshaspeaks.com%2Faries%2Faries-daily-horoscope.action%22%20and%20xpath%3D%22%2F%2Fdiv%5B%40class%3D'gs_txt_box_1'%5D%22&diagnostics=true")
|
7
|
+
#uri = URI.parse("http://www.ganeshaspeaks.com/taurus/taurus-daily-horoscope.action")
|
8
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
9
|
+
#http.use_ssl = true
|
10
|
+
#http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
11
|
+
request = Net::HTTP::Get.new(uri.request_uri)
|
12
|
+
#request.basic_auth username, password
|
13
|
+
request["Content-Type"] = "application/xml"
|
14
|
+
response = http.request(request)
|
15
|
+
puts response.body
|
7
16
|
end
|
8
17
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lucky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: test gem
|
15
15
|
email:
|