lucky 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/lucky/version.rb +1 -1
  2. data/lib/lucky.rb +5 -3
  3. metadata +1 -1
data/lib/lucky/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lucky
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/lucky.rb CHANGED
@@ -1,10 +1,12 @@
1
1
  require "lucky/version"
2
- require "net/http"
3
- require "uri"
2
+
4
3
 
5
4
 
6
5
  module Lucky
7
6
 
7
+ require "net/http"
8
+ require "uri"
9
+
8
10
  def self.printname(name)
9
11
  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")
10
12
  #uri = URI.parse("http://www.ganeshaspeaks.com/taurus/taurus-daily-horoscope.action")
@@ -15,6 +17,6 @@ module Lucky
15
17
  #request.basic_auth username, password
16
18
  request["Content-Type"] = "application/xml"
17
19
  response = http.request(request)
18
- puts response.body
20
+ return response.body
19
21
  end
20
22
  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.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: