thumb_fu 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/Manifest +3 -2
- data/Rakefile +1 -1
- data/images/{not_ready.jpg → not_ready_100.jpg} +0 -0
- data/images/not_ready_200.jpg +0 -0
- data/lib/thumb_fu.rb +8 -4
- data/thumb_fu.gemspec +3 -3
- metadata +5 -4
data/CHANGELOG
CHANGED
data/Manifest
CHANGED
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
|
-
Echoe.new('thumb_fu', '0.1.
|
4
|
+
Echoe.new('thumb_fu', '0.1.3') do |p|
|
5
5
|
p.description = "Generate a page thumbnail using www.bitpixels.com"
|
6
6
|
p.url = "http://github.com/23ninja/thumb_fu"
|
7
7
|
p.author = "Iskander HAziev"
|
File without changes
|
Binary file
|
data/lib/thumb_fu.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'open-uri'
|
2
2
|
require 'digest/md5'
|
3
|
-
module ThumbFu
|
3
|
+
module ThumbFu
|
4
4
|
class Thumb
|
5
5
|
attr_accessor :url, :api_key, :width
|
6
6
|
|
7
7
|
def initialize(api_key, url, options = {})
|
8
8
|
@api_key = api_key
|
9
9
|
@url = url
|
10
|
-
@width = options[:width] ||
|
10
|
+
@width = options[:width] || 100
|
11
11
|
@image = nil
|
12
12
|
end
|
13
13
|
|
@@ -47,8 +47,12 @@ module ThumbFu
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def not_ready_hashsum
|
50
|
-
|
51
|
-
|
50
|
+
Digest::MD5.hexdigest(not_ready_image)
|
51
|
+
end
|
52
|
+
|
53
|
+
def not_ready_image
|
54
|
+
path = File.join(File.dirname(__FILE__), '..', 'images', "not_ready_#{@width}.jpg")
|
55
|
+
open(path).read
|
52
56
|
end
|
53
57
|
end
|
54
58
|
end
|
data/thumb_fu.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{thumb_fu}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = [%q{Iskander HAziev}]
|
9
|
-
s.date = %q{2011-06-
|
9
|
+
s.date = %q{2011-06-24}
|
10
10
|
s.description = %q{Generate a page thumbnail using www.bitpixels.com}
|
11
11
|
s.email = %q{gvalmon@gmail.com}
|
12
12
|
s.extra_rdoc_files = [%q{CHANGELOG}, %q{LICENSE}, %q{README}, %q{lib/thumb_fu.rb}]
|
13
|
-
s.files = [%q{CHANGELOG}, %q{LICENSE}, %q{
|
13
|
+
s.files = [%q{CHANGELOG}, %q{LICENSE}, %q{README}, %q{Rakefile}, %q{images/not_ready_100.jpg}, %q{images/not_ready_200.jpg}, %q{lib/thumb_fu.rb}, %q{Manifest}, %q{thumb_fu.gemspec}]
|
14
14
|
s.homepage = %q{http://github.com/23ninja/thumb_fu}
|
15
15
|
s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{Thumb_fu}, %q{--main}, %q{README}]
|
16
16
|
s.require_paths = [%q{lib}]
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: thumb_fu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Iskander HAziev
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-06-
|
13
|
+
date: 2011-06-24 00:00:00 Z
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description: Generate a page thumbnail using www.bitpixels.com
|
@@ -27,11 +27,12 @@ extra_rdoc_files:
|
|
27
27
|
files:
|
28
28
|
- CHANGELOG
|
29
29
|
- LICENSE
|
30
|
-
- Manifest
|
31
30
|
- README
|
32
31
|
- Rakefile
|
33
|
-
- images/
|
32
|
+
- images/not_ready_100.jpg
|
33
|
+
- images/not_ready_200.jpg
|
34
34
|
- lib/thumb_fu.rb
|
35
|
+
- Manifest
|
35
36
|
- thumb_fu.gemspec
|
36
37
|
homepage: http://github.com/23ninja/thumb_fu
|
37
38
|
licenses: []
|