page_glimpse 0.0.2 → 0.0.3
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/README.rdoc +8 -0
- data/Rakefile +1 -0
- data/VERSION.yml +1 -1
- data/lib/page_glimpse.rb +21 -0
- data/page_glimpse.gemspec +2 -3
- metadata +1 -2
- data/.document +0 -5
data/README.rdoc
CHANGED
@@ -30,6 +30,14 @@ The following example shows how to use the PageGlimpse API:
|
|
30
30
|
# and then try back later ...
|
31
31
|
end
|
32
32
|
|
33
|
+
== Problems?
|
34
|
+
|
35
|
+
If you're having troubles with or questions about the Page Glimpse web
|
36
|
+
service, please email them to <tt>support [at] PageGlimpse.com</tt>.
|
37
|
+
|
38
|
+
If you're having issues with this Ruby library, specifically, please open a
|
39
|
+
(or update an existing!) ticket on {Lighthouse}[http://nathanielbibler.lighthouseapp.com/projects/31707-page_glimpse/overview].
|
40
|
+
|
33
41
|
== Contributing
|
34
42
|
|
35
43
|
To contribute to this library, fork it on
|
data/Rakefile
CHANGED
data/VERSION.yml
CHANGED
data/lib/page_glimpse.rb
CHANGED
@@ -30,6 +30,27 @@ module PageGlimpse
|
|
30
30
|
##
|
31
31
|
# Returns the binary data for the thumbnail requested.
|
32
32
|
#
|
33
|
+
# Valid options:
|
34
|
+
#
|
35
|
+
# [size]
|
36
|
+
# Sets the size of the graphic to get from Page Glimpse.
|
37
|
+
# Available options are:
|
38
|
+
# "<tt><b>small</b></tt>":: <b>150x108 px</b>
|
39
|
+
# "<tt>medium</tt>":: 280x202 px
|
40
|
+
# "<tt>large</tt>":: 430x310 px
|
41
|
+
#
|
42
|
+
# [nothumb]
|
43
|
+
# Indicates if the thumbnails for the domain root should be displayed.
|
44
|
+
# If set to "<tt>no</tt>", it will display the not found image, otherwise
|
45
|
+
# it will display the thumbnails for root domain page.
|
46
|
+
# Default value is "<tt>yes</tt>".
|
47
|
+
#
|
48
|
+
# [root]
|
49
|
+
# Indicates if the thumbnails for the domain root should be displayed.
|
50
|
+
# If set to "<tt>no</tt>", it will display the not found image, otherwise
|
51
|
+
# it will display the thumbnails for root domain page.
|
52
|
+
# Default value is "<tt>yes</tt>".
|
53
|
+
#
|
33
54
|
def self.get(url, options = {})
|
34
55
|
options[:url] = url
|
35
56
|
exist?(url, options) ? api.thumbnail(options) : nil
|
data/page_glimpse.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{page_glimpse}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Nathaniel Bibler"]
|
@@ -13,8 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
"README.rdoc"
|
14
14
|
]
|
15
15
|
s.files = [
|
16
|
-
".
|
17
|
-
".gitignore",
|
16
|
+
".gitignore",
|
18
17
|
"CHANGELOG.rdoc",
|
19
18
|
"LICENSE",
|
20
19
|
"README.rdoc",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: page_glimpse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathaniel Bibler
|
@@ -72,7 +72,6 @@ extra_rdoc_files:
|
|
72
72
|
- LICENSE
|
73
73
|
- README.rdoc
|
74
74
|
files:
|
75
|
-
- .document
|
76
75
|
- .gitignore
|
77
76
|
- CHANGELOG.rdoc
|
78
77
|
- LICENSE
|