thumb_fu 0.1.2 → 0.1.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/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ v0.1.3. fixed not ready image
1
2
  v0.1.2. added README
2
3
  v0.1.1. fix thumb
3
4
  v0.1.0. first release
data/Manifest CHANGED
@@ -1,7 +1,8 @@
1
1
  CHANGELOG
2
2
  LICENSE
3
- Manifest
4
3
  README
5
4
  Rakefile
6
- images/not_ready.jpg
5
+ images/not_ready_100.jpg
6
+ images/not_ready_200.jpg
7
7
  lib/thumb_fu.rb
8
+ Manifest
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.2') do |p|
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] || 200
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
- image_path = File.join(File.dirname(__FILE__), '..', 'images', 'not_ready.jpg')
51
- Digest::MD5.hexdigest(open(image_path).read)
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.2"
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-23}
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{Manifest}, %q{README}, %q{Rakefile}, %q{images/not_ready.jpg}, %q{lib/thumb_fu.rb}, %q{thumb_fu.gemspec}]
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.2
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-23 00:00:00 Z
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/not_ready.jpg
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: []