instapi 1.0.0 → 1.1.0

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/instapi.rb +5 -1
  2. data/lib/instapi/version.rb +2 -2
  3. metadata +2 -2
data/lib/instapi.rb CHANGED
@@ -38,7 +38,11 @@ class Instapi
38
38
  end
39
39
 
40
40
  def text(url)
41
- Nokogiri::HTML(get("/text?u=#{url}")).css('#story').text
41
+ doc = Nokogiri::HTML(get("/text?u=#{url}"))
42
+ {
43
+ :title => doc.css('title').first.text,
44
+ :text => doc.css('#story').first.inner_html
45
+ }
42
46
  end
43
47
 
44
48
  def get(path, params = {})
@@ -1,3 +1,3 @@
1
- module Instapi
2
- VERSION = "1.0.0"
1
+ class Instapi
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: instapi
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.0
5
+ version: 1.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - jugyo
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-21 00:00:00 Z
13
+ date: 2012-01-23 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httpclient