thumbnailer-ruby 0.1.0 → 0.1.1

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.md CHANGED
@@ -24,22 +24,23 @@ What is Idiotic Artificial Intelligence?
24
24
  Probably nothing.
25
25
 
26
26
  here is an example:
27
- module Thumbnailer
28
- class VideoGoogle < Thumbnailer::Base
29
- def initialize(uri)
30
- begin
31
- params = CGI.parse(uri.query)
32
- doc = open("http://video.google.com/videofeed?docid=#{params['docid']}").read
33
- doc = XML::Parser.string(doc).parse.find("//channel/item/media:group/media:thumbnail")
34
-
35
- @thumb_image = doc[0]['url']
36
- @small_thumb_image = @thumb_image
37
- @embed_url = "#{uri.scheme}://#{uri.host}/googleplayer.swf?docId=#{params['docid']}"
38
- rescue
27
+
28
+ module Thumbnailer
29
+ class VideoGoogle < Thumbnailer::Base
30
+ def initialize(uri)
31
+ begin
32
+ params = CGI.parse(uri.query)
33
+ doc = open("http://video.google.com/videofeed?docid=#{params['docid']}").read
34
+ doc = XML::Parser.string(doc).parse.find("//channel/item/media:group/media:thumbnail")
35
+
36
+ @thumb_image = doc[0]['url']
37
+ @small_thumb_image = @thumb_image
38
+ @embed_url = "#{uri.scheme}://#{uri.host}/googleplayer.swf?docId=#{params['docid']}"
39
+ rescue
40
+ end
39
41
  end
40
42
  end
41
43
  end
42
- end
43
44
 
44
45
  Download
45
46
  --------
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/lib/constants.rb CHANGED
@@ -1,5 +1,5 @@
1
- unless defined? RAILS_ROOT
2
- conf_file = "#{File.dirname($0)}/thumbnailer.yml"
1
+ unless defined? Rails
2
+ conf_file = File.join(File.dirname($0),"thumbnailer.yml")
3
3
  begin
4
4
  config = YAML.load_file(conf_file)
5
5
  rescue
@@ -7,11 +7,11 @@ unless defined? RAILS_ROOT
7
7
  end
8
8
 
9
9
  else
10
- conf_file = "#{RAILS_ROOT}/config/thumbnailer.yml"
10
+ conf_file = File.join("config", "thumbnailer.yml")
11
11
  begin
12
12
  config = YAML.load_file(conf_file)
13
13
  rescue
14
- raise "Please create and set config/thumbnailer.yml file"
14
+ raise "Please create and set #{conf_file} file"
15
15
  end
16
16
  end
17
17
 
@@ -0,0 +1,59 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{thumbnailer-ruby}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Yalcin ACIKYILDIZ"]
12
+ s.date = %q{2010-06-13}
13
+ s.description = %q{thumbnailer is a Ruby library for getting thumbnail images from various sites with idiotic artificial intelligence.}
14
+ s.email = %q{yalcin}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".gitignore",
21
+ "LICENSE",
22
+ "README.md",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "lib/constants.rb",
26
+ "lib/thumbnailer.rb",
27
+ "lib/thumbnailer/base.rb",
28
+ "lib/thumbnailer/fetcher.rb",
29
+ "lib/thumbnailer/parser.rb",
30
+ "lib/thumbnailer/sites/dailymotion.rb",
31
+ "lib/thumbnailer/sites/flickr.rb",
32
+ "lib/thumbnailer/sites/twitpic.rb",
33
+ "lib/thumbnailer/sites/video_google.rb",
34
+ "lib/thumbnailer/sites/vimeo.rb",
35
+ "lib/thumbnailer/sites/websnapr.rb",
36
+ "lib/thumbnailer/sites/youtube.rb",
37
+ "thumbnailer-ruby.gemspec",
38
+ "thumbnailer.gemspec"
39
+ ]
40
+ s.homepage = %q{http://github.com/yalcin/thumbnailer}
41
+ s.rdoc_options = ["--charset=UTF-8"]
42
+ s.require_paths = ["lib"]
43
+ s.rubygems_version = %q{1.3.7}
44
+ s.summary = %q{Get thumbnails from various sites}
45
+
46
+ if s.respond_to? :specification_version then
47
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
48
+ s.specification_version = 3
49
+
50
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
51
+ s.add_runtime_dependency(%q<libxml-ruby>, [">= 0"])
52
+ else
53
+ s.add_dependency(%q<libxml-ruby>, [">= 0"])
54
+ end
55
+ else
56
+ s.add_dependency(%q<libxml-ruby>, [">= 0"])
57
+ end
58
+ end
59
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thumbnailer-ruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Yalcin ACIKYILDIZ
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-12 00:00:00 +03:00
18
+ date: 2010-06-13 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -59,6 +59,7 @@ files:
59
59
  - lib/thumbnailer/sites/vimeo.rb
60
60
  - lib/thumbnailer/sites/websnapr.rb
61
61
  - lib/thumbnailer/sites/youtube.rb
62
+ - thumbnailer-ruby.gemspec
62
63
  - thumbnailer.gemspec
63
64
  has_rdoc: true
64
65
  homepage: http://github.com/yalcin/thumbnailer