uri-meta 0.9.2 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +13 -24
- data/VERSION +1 -1
- data/test/uri-meta_test.rb +31 -0
- data/uri-meta.gemspec +14 -11
- metadata +18 -8
data/Rakefile
CHANGED
@@ -4,16 +4,20 @@ require 'rake'
|
|
4
4
|
begin
|
5
5
|
require 'jeweler'
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name
|
8
|
-
gem.summary
|
7
|
+
gem.name = 'uri-meta'
|
8
|
+
gem.summary = 'Meta information for a URI'
|
9
9
|
gem.description = 'Retrieves meta information for a URI from the meturi.com service.'
|
10
|
-
gem.email
|
11
|
-
gem.homepage
|
12
|
-
gem.authors
|
13
|
-
|
14
|
-
gem.add_dependency '
|
15
|
-
gem.
|
10
|
+
gem.email = 'production@statelesssystems.com'
|
11
|
+
gem.homepage = 'http://www.metauri.com/'
|
12
|
+
gem.authors = ['Stateless Systems']
|
13
|
+
|
14
|
+
gem.add_dependency 'curb', '>= 0.5.4'
|
15
|
+
gem.add_dependency 'moneta', '>= 0.6.0'
|
16
|
+
|
17
|
+
gem.add_development_dependency 'shoulda', '>= 2.10.2'
|
18
|
+
gem.add_development_dependency 'gemcutter', '>= 0.1.5'
|
16
19
|
end
|
20
|
+
Jeweler::GemcutterTasks.new
|
17
21
|
rescue LoadError
|
18
22
|
puts 'Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler'
|
19
23
|
end
|
@@ -38,20 +42,5 @@ rescue LoadError
|
|
38
42
|
end
|
39
43
|
end
|
40
44
|
|
41
|
-
task :test
|
42
|
-
|
45
|
+
task :test => :check_dependencies
|
43
46
|
task :default => :test
|
44
|
-
|
45
|
-
require 'rake/rdoctask'
|
46
|
-
Rake::RDocTask.new do |rdoc|
|
47
|
-
if File.exist?('VERSION')
|
48
|
-
version = File.read('VERSION')
|
49
|
-
else
|
50
|
-
version = ''
|
51
|
-
end
|
52
|
-
|
53
|
-
rdoc.rdoc_dir = 'rdoc'
|
54
|
-
rdoc.title = "uri-meta #{version}"
|
55
|
-
rdoc.rdoc_files.include('README*')
|
56
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
57
|
-
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.4
|
data/test/uri-meta_test.rb
CHANGED
@@ -10,6 +10,7 @@ class UriMetaTest < Test::Unit::TestCase
|
|
10
10
|
'garbage',
|
11
11
|
'http://bit.ly/PBzu',
|
12
12
|
'http://bit.ly/rvQhW',
|
13
|
+
'http://digg.com/educational/Can_you_teach_men_who_pick_up_prostitutes_not_to_buy_sex',
|
13
14
|
'http://img11.yfrog.com/i/vaix.jpg/',
|
14
15
|
'http://rss.slashdot.org/Slashdot/slashdot',
|
15
16
|
'http://slashdot.org/',
|
@@ -84,6 +85,18 @@ class UriMetaTest < Test::Unit::TestCase
|
|
84
85
|
assert_nil @meta.headers
|
85
86
|
end
|
86
87
|
end
|
88
|
+
|
89
|
+
context '.content_type' do
|
90
|
+
should 'be text/html' do
|
91
|
+
assert_equal 'text/html', @meta.content_type
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
context '.charset' do
|
96
|
+
should 'be utf-8' do
|
97
|
+
assert_equal 'utf-8', @meta.charset
|
98
|
+
end
|
99
|
+
end
|
87
100
|
end
|
88
101
|
|
89
102
|
context '.meta(:headers => 1)' do
|
@@ -392,4 +405,22 @@ class UriMetaTest < Test::Unit::TestCase
|
|
392
405
|
|
393
406
|
should 'have a feed equal to itself'
|
394
407
|
end
|
408
|
+
|
409
|
+
context %Q(URI.parse('http://digg.com/educational/Can_you_teach_men_who_pick_up_prostitutes_not_to_buy_sex').meta) do
|
410
|
+
setup do
|
411
|
+
@meta = URI.parse('http://digg.com/educational/Can_you_teach_men_who_pick_up_prostitutes_not_to_buy_sex').meta
|
412
|
+
end
|
413
|
+
|
414
|
+
context '.content_type' do
|
415
|
+
should 'be text/html' do
|
416
|
+
assert_equal 'text/html', @meta.content_type
|
417
|
+
end
|
418
|
+
end
|
419
|
+
|
420
|
+
context '.charset' do
|
421
|
+
should 'be UTF-8' do
|
422
|
+
assert_equal 'UTF-8', @meta.charset
|
423
|
+
end
|
424
|
+
end
|
425
|
+
end
|
395
426
|
end
|
data/uri-meta.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{uri-meta}
|
8
|
-
s.version = "0.9.
|
8
|
+
s.version = "0.9.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Stateless Systems"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-17}
|
13
13
|
s.description = %q{Retrieves meta information for a URI from the meturi.com service.}
|
14
14
|
s.email = %q{production@statelesssystems.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -44,17 +44,20 @@ Gem::Specification.new do |s|
|
|
44
44
|
s.specification_version = 3
|
45
45
|
|
46
46
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
47
|
-
s.add_runtime_dependency(%q<
|
48
|
-
s.add_runtime_dependency(%q<
|
49
|
-
s.add_development_dependency(%q<
|
47
|
+
s.add_runtime_dependency(%q<curb>, [">= 0.5.4"])
|
48
|
+
s.add_runtime_dependency(%q<moneta>, [">= 0.6.0"])
|
49
|
+
s.add_development_dependency(%q<shoulda>, [">= 2.10.2"])
|
50
|
+
s.add_development_dependency(%q<gemcutter>, [">= 0.1.5"])
|
50
51
|
else
|
51
|
-
s.add_dependency(%q<
|
52
|
-
s.add_dependency(%q<
|
53
|
-
s.add_dependency(%q<
|
52
|
+
s.add_dependency(%q<curb>, [">= 0.5.4"])
|
53
|
+
s.add_dependency(%q<moneta>, [">= 0.6.0"])
|
54
|
+
s.add_dependency(%q<shoulda>, [">= 2.10.2"])
|
55
|
+
s.add_dependency(%q<gemcutter>, [">= 0.1.5"])
|
54
56
|
end
|
55
57
|
else
|
56
|
-
s.add_dependency(%q<
|
57
|
-
s.add_dependency(%q<
|
58
|
-
s.add_dependency(%q<
|
58
|
+
s.add_dependency(%q<curb>, [">= 0.5.4"])
|
59
|
+
s.add_dependency(%q<moneta>, [">= 0.6.0"])
|
60
|
+
s.add_dependency(%q<shoulda>, [">= 2.10.2"])
|
61
|
+
s.add_dependency(%q<gemcutter>, [">= 0.1.5"])
|
59
62
|
end
|
60
63
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uri-meta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stateless Systems
|
@@ -9,38 +9,48 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-17 00:00:00 +11:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
16
|
+
name: curb
|
17
17
|
type: :runtime
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
23
|
+
version: 0.5.4
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
26
|
+
name: moneta
|
27
27
|
type: :runtime
|
28
28
|
version_requirement:
|
29
29
|
version_requirements: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.6.0
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
36
|
+
name: shoulda
|
37
37
|
type: :development
|
38
38
|
version_requirement:
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 2.10.2
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: gemcutter
|
47
|
+
type: :development
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.1.5
|
44
54
|
version:
|
45
55
|
description: Retrieves meta information for a URI from the meturi.com service.
|
46
56
|
email: production@statelesssystems.com
|