grimen-page_glimpse 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +1 -1
- data/lib/page_glimpse.rb +2 -2
- metadata +2 -2
data/README.textile
CHANGED
@@ -46,7 +46,7 @@ Get thumbnail (PNG image) for a webpage:
|
|
46
46
|
|
47
47
|
Save thumbnail into a file (PNG image) for a webpage:
|
48
48
|
|
49
|
-
<pre>snapper.save!('http://techcrunch.com', :size => :large) # => true/false</pre>
|
49
|
+
<pre>snapper.save!('http://techcrunch.com', '/Users/kid_icarus/techcrunch_thumbnail.png', :size => :large) # => true/false</pre>
|
50
50
|
|
51
51
|
h2. More?
|
52
52
|
|
data/lib/page_glimpse.rb
CHANGED
@@ -48,12 +48,12 @@ class PageGlimpse
|
|
48
48
|
@root = valid_root_value(options[:root])
|
49
49
|
@nothumb = options[:nothumb]
|
50
50
|
|
51
|
-
query_url = generate_url('thumbnails')
|
51
|
+
query_url = PG_API_URL + generate_url('thumbnails')
|
52
52
|
end
|
53
53
|
|
54
54
|
# Get single thumbnail image (PNG).
|
55
55
|
def thumbnail(url, options = {})
|
56
|
-
response = self.class.get(thumbnail_url(url, options))
|
56
|
+
response = self.class.get(thumbnail_url(url, options).gsub(PG_API_URL, ''))
|
57
57
|
handle_response(response)
|
58
58
|
response.body
|
59
59
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grimen-page_glimpse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Grimfelt
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-08-
|
12
|
+
date: 2009-08-20 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|