semantic_naming 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -238,6 +238,11 @@ module N
238
238
  @labels[language]
239
239
  end
240
240
 
241
+ # to_uri just returns a clone of itself
242
+ def to_uri
243
+ self.clone
244
+ end
245
+
241
246
  private
242
247
 
243
248
  # Check if the ActiveRDF library is present.
@@ -206,6 +206,12 @@ class URITest < Test::Unit::TestCase
206
206
  assert_equal(nil, N::URI.new("http://iamnotanamespace/").namespace)
207
207
  end
208
208
 
209
+ def test_to_uri
210
+ uri = N::URI.new('http://someotheruri.com/test.pdf')
211
+ assert_equal(uri, uri.to_uri)
212
+ assert_not_same(uri, uri.to_uri)
213
+ end
214
+
209
215
  # Test rdf label
210
216
  def test_rdf_label
211
217
  uri = N::URI.new(N::RDFTEST::test1)
metadata CHANGED
@@ -1,64 +1,64 @@
1
1
  --- !ruby/object:Gem::Specification
2
- extensions: []
2
+ name: semantic_naming
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.5
5
+ platform: ruby
6
+ authors:
7
+ - Daniel Hahn
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
3
11
 
4
- homepage: http://talia.discovery-project.eu/
12
+ date: 2009-11-25 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: hahn@netseven.it
5
18
  executables: []
6
19
 
7
- version: !ruby/object:Gem::Version
8
- version: 2.0.4
9
- post_install_message:
10
- date: 2009-11-04 23:00:00 +00:00
11
- files:
12
- - lib/semantic_naming.rb
13
- - lib/semantic_naming/default_namespaces.rb
14
- - lib/semantic_naming/namespace.rb
15
- - lib/semantic_naming/predicate.rb
16
- - lib/semantic_naming/source_class.rb
17
- - lib/semantic_naming/uri.rb
18
- - README.rdoc
19
- rubygems_version: 1.3.5
20
- rdoc_options:
21
- - --charset=UTF-8
22
- signing_key:
23
- cert_chain: []
20
+ extensions: []
24
21
 
25
- name: semantic_naming
22
+ extra_rdoc_files:
23
+ - README.rdoc
24
+ files:
25
+ - lib/semantic_naming.rb
26
+ - lib/semantic_naming/default_namespaces.rb
27
+ - lib/semantic_naming/namespace.rb
28
+ - lib/semantic_naming/predicate.rb
29
+ - lib/semantic_naming/source_class.rb
30
+ - lib/semantic_naming/uri.rb
31
+ - README.rdoc
26
32
  has_rdoc: true
27
- platform: ruby
28
- summary: Semantic Naming Extensions for ActiveRDF, Talia and others
29
- default_executable:
30
- bindir: bin
33
+ homepage: http://talia.discovery-project.eu/
31
34
  licenses: []
32
35
 
33
- required_rubygems_version: !ruby/object:Gem::Requirement
34
- version:
35
- requirements:
36
- - - '>='
37
- - !ruby/object:Gem::Version
38
- version: "0"
36
+ post_install_message:
37
+ rdoc_options:
38
+ - --charset=UTF-8
39
+ require_paths:
40
+ - lib
39
41
  required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: "0"
40
46
  version:
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
41
48
  requirements:
42
- - - '>='
43
- - !ruby/object:Gem::Version
44
- version: "0"
45
- require_paths:
46
- - lib
47
- specification_version: 3
48
- test_files:
49
- - test/namespace_test.rb
50
- - test/predicate_test.rb
51
- - test/source_class_test.rb
52
- - test/uri_test.rb
53
- dependencies: []
54
-
55
- description:
56
- email: hahn@netseven.it
57
- authors:
58
- - Daniel Hahn
59
- extra_rdoc_files:
60
- - README.rdoc
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: "0"
52
+ version:
61
53
  requirements: []
62
54
 
63
55
  rubyforge_project:
64
- autorequire:
56
+ rubygems_version: 1.3.5
57
+ signing_key:
58
+ specification_version: 3
59
+ summary: Semantic Naming Extensions for ActiveRDF, Talia and others
60
+ test_files:
61
+ - test/namespace_test.rb
62
+ - test/predicate_test.rb
63
+ - test/source_class_test.rb
64
+ - test/uri_test.rb