rdf 0.3.9 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.9
1
+ 0.3.10
@@ -125,6 +125,8 @@ module RDF
125
125
 
126
126
  ##
127
127
  # Returns an enumerator for {#each_statement}.
128
+ # FIXME: enum_for doesn't seem to be working properly
129
+ # in JRuby 1.7, so specs are marked pending
128
130
  #
129
131
  # @return [Enumerator]
130
132
  # @see #each_statement
@@ -468,7 +470,7 @@ module RDF
468
470
  # @see #enum_context
469
471
  def contexts(options = {})
470
472
  if options[:unique] == false
471
- enum_statement.map(&:context).to_enum # TODO: optimize
473
+ enum_statement.map(&:context).compact.to_enum # TODO: optimize
472
474
  else
473
475
  enum_context
474
476
  end
@@ -151,8 +151,7 @@ module RDF
151
151
  # Returns all unique RDF contexts for this graph.
152
152
  #
153
153
  # @return [Enumerator<RDF::Resource>]
154
- # @note The next release, graphs will not be named, this be empty
155
- def contexts
154
+ def contexts(options = {})
156
155
  (named? ? [context] : []).to_enum.extend(RDF::Countable)
157
156
  end
158
157
 
@@ -67,6 +67,7 @@ module RDF
67
67
  ##
68
68
  # @param [#to_s] id
69
69
  def initialize(id = nil)
70
+ id = nil if id.to_s.empty?
70
71
  @id = (id || "g#{__id__.to_i.abs}").to_s
71
72
  end
72
73
 
@@ -483,9 +483,10 @@ module RDF
483
483
  ##
484
484
  # @return [String]
485
485
  def readline
486
- @line = @input.readline
487
- @line.chomp!
488
- @line.force_encoding(encoding) if @line.respond_to?(:force_encoding) # for Ruby 1.9+
486
+ @line = @line_rest || @input.readline
487
+ @line, @line_rest = @line.split("\r", 2)
488
+ @line = @line.to_s.chomp
489
+ @line.force_encoding(encoding) if @line.respond_to?(:force_encoding)
489
490
  @line
490
491
  end
491
492
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,72 +11,72 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-11-05 00:00:00.000000000 Z
14
+ date: 2012-11-22 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- version_requirements: !ruby/object:Gem::Requirement
17
+ name: addressable
18
+ requirement: !ruby/object:Gem::Requirement
19
+ none: false
18
20
  requirements:
19
21
  - - ! '>='
20
22
  - !ruby/object:Gem::Version
21
23
  version: 2.2.6
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
22
27
  none: false
23
- requirement: !ruby/object:Gem::Requirement
24
28
  requirements:
25
29
  - - ! '>='
26
30
  - !ruby/object:Gem::Version
27
31
  version: 2.2.6
28
- none: false
29
- name: addressable
30
- prerelease: false
31
- type: :runtime
32
32
  - !ruby/object:Gem::Dependency
33
- version_requirements: !ruby/object:Gem::Requirement
33
+ name: yard
34
+ requirement: !ruby/object:Gem::Requirement
35
+ none: false
34
36
  requirements:
35
37
  - - ! '>='
36
38
  - !ruby/object:Gem::Version
37
39
  version: 0.7.5
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
38
43
  none: false
39
- requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
45
  - - ! '>='
42
46
  - !ruby/object:Gem::Version
43
47
  version: 0.7.5
44
- none: false
45
- name: yard
46
- prerelease: false
47
- type: :development
48
48
  - !ruby/object:Gem::Dependency
49
- version_requirements: !ruby/object:Gem::Requirement
49
+ name: rdf-spec
50
+ requirement: !ruby/object:Gem::Requirement
51
+ none: false
50
52
  requirements:
51
53
  - - ~>
52
54
  - !ruby/object:Gem::Version
53
- version: 0.3.8
55
+ version: 0.3.10
56
+ type: :development
57
+ prerelease: false
58
+ version_requirements: !ruby/object:Gem::Requirement
54
59
  none: false
55
- requirement: !ruby/object:Gem::Requirement
56
60
  requirements:
57
61
  - - ~>
58
62
  - !ruby/object:Gem::Version
59
- version: 0.3.8
60
- none: false
61
- name: rdf-spec
62
- prerelease: false
63
- type: :development
63
+ version: 0.3.10
64
64
  - !ruby/object:Gem::Dependency
65
- version_requirements: !ruby/object:Gem::Requirement
65
+ name: rspec
66
+ requirement: !ruby/object:Gem::Requirement
67
+ none: false
66
68
  requirements:
67
69
  - - ! '>='
68
70
  - !ruby/object:Gem::Version
69
71
  version: 2.8.0
72
+ type: :development
73
+ prerelease: false
74
+ version_requirements: !ruby/object:Gem::Requirement
70
75
  none: false
71
- requirement: !ruby/object:Gem::Requirement
72
76
  requirements:
73
77
  - - ! '>='
74
78
  - !ruby/object:Gem::Version
75
79
  version: 2.8.0
76
- none: false
77
- name: rspec
78
- prerelease: false
79
- type: :development
80
80
  description: RDF.rb is a pure-Ruby library for working with Resource Description Framework
81
81
  (RDF) data.
82
82
  email: public-rdf-ruby@w3.org
@@ -93,19 +93,8 @@ files:
93
93
  - bin/rdf
94
94
  - etc/doap.nt
95
95
  - lib/df.rb
96
- - lib/rdf.rb
97
96
  - lib/rdf/cli.rb
98
97
  - lib/rdf/format.rb
99
- - lib/rdf/nquads.rb
100
- - lib/rdf/ntriples.rb
101
- - lib/rdf/query.rb
102
- - lib/rdf/reader.rb
103
- - lib/rdf/repository.rb
104
- - lib/rdf/transaction.rb
105
- - lib/rdf/util.rb
106
- - lib/rdf/version.rb
107
- - lib/rdf/vocab.rb
108
- - lib/rdf/writer.rb
109
98
  - lib/rdf/mixin/countable.rb
110
99
  - lib/rdf/mixin/durable.rb
111
100
  - lib/rdf/mixin/enumerable.rb
@@ -118,6 +107,16 @@ files:
118
107
  - lib/rdf/mixin/writable.rb
119
108
  - lib/rdf/model/graph.rb
120
109
  - lib/rdf/model/list.rb
110
+ - lib/rdf/model/literal/boolean.rb
111
+ - lib/rdf/model/literal/date.rb
112
+ - lib/rdf/model/literal/datetime.rb
113
+ - lib/rdf/model/literal/decimal.rb
114
+ - lib/rdf/model/literal/double.rb
115
+ - lib/rdf/model/literal/integer.rb
116
+ - lib/rdf/model/literal/numeric.rb
117
+ - lib/rdf/model/literal/time.rb
118
+ - lib/rdf/model/literal/token.rb
119
+ - lib/rdf/model/literal/xml.rb
121
120
  - lib/rdf/model/literal.rb
122
121
  - lib/rdf/model/node.rb
123
122
  - lib/rdf/model/resource.rb
@@ -125,17 +124,25 @@ files:
125
124
  - lib/rdf/model/term.rb
126
125
  - lib/rdf/model/uri.rb
127
126
  - lib/rdf/model/value.rb
127
+ - lib/rdf/nquads.rb
128
128
  - lib/rdf/ntriples/format.rb
129
129
  - lib/rdf/ntriples/reader.rb
130
130
  - lib/rdf/ntriples/writer.rb
131
+ - lib/rdf/ntriples.rb
131
132
  - lib/rdf/query/pattern.rb
132
133
  - lib/rdf/query/solution.rb
133
134
  - lib/rdf/query/solutions.rb
134
135
  - lib/rdf/query/variable.rb
136
+ - lib/rdf/query.rb
137
+ - lib/rdf/reader.rb
138
+ - lib/rdf/repository.rb
139
+ - lib/rdf/transaction.rb
135
140
  - lib/rdf/util/aliasing.rb
136
141
  - lib/rdf/util/cache.rb
137
142
  - lib/rdf/util/file.rb
138
143
  - lib/rdf/util/uuid.rb
144
+ - lib/rdf/util.rb
145
+ - lib/rdf/version.rb
139
146
  - lib/rdf/vocab/cc.rb
140
147
  - lib/rdf/vocab/cert.rb
141
148
  - lib/rdf/vocab/dc.rb
@@ -154,16 +161,9 @@ files:
154
161
  - lib/rdf/vocab/wot.rb
155
162
  - lib/rdf/vocab/xhtml.rb
156
163
  - lib/rdf/vocab/xsd.rb
157
- - lib/rdf/model/literal/boolean.rb
158
- - lib/rdf/model/literal/date.rb
159
- - lib/rdf/model/literal/datetime.rb
160
- - lib/rdf/model/literal/decimal.rb
161
- - lib/rdf/model/literal/double.rb
162
- - lib/rdf/model/literal/integer.rb
163
- - lib/rdf/model/literal/numeric.rb
164
- - lib/rdf/model/literal/time.rb
165
- - lib/rdf/model/literal/token.rb
166
- - lib/rdf/model/literal/xml.rb
164
+ - lib/rdf/vocab.rb
165
+ - lib/rdf/writer.rb
166
+ - lib/rdf.rb
167
167
  homepage: http://ruby-rdf.github.com/rdf
168
168
  licenses:
169
169
  - Public Domain
@@ -172,17 +172,20 @@ rdoc_options: []
172
172
  require_paths:
173
173
  - lib
174
174
  required_ruby_version: !ruby/object:Gem::Requirement
175
+ none: false
175
176
  requirements:
176
177
  - - ! '>='
177
178
  - !ruby/object:Gem::Version
178
179
  version: 1.8.1
179
- none: false
180
180
  required_rubygems_version: !ruby/object:Gem::Requirement
181
+ none: false
181
182
  requirements:
182
183
  - - ! '>='
183
184
  - !ruby/object:Gem::Version
184
185
  version: '0'
185
- none: false
186
+ segments:
187
+ - 0
188
+ hash: -3969937466314581252
186
189
  requirements: []
187
190
  rubyforge_project: rdf
188
191
  rubygems_version: 1.8.24