redlander 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Redlander
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redlander
3
3
  version: !ruby/object:Gem::Version
4
- hash: 2362275040882391270
4
+ hash: 2933854275357264005
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 2
10
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Slava Kravchenko
@@ -15,14 +15,16 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-13 00:00:00 +03:00
19
- default_executable:
18
+ date: 2011-11-13 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
- requirement: &id001 !ruby/object:Gem::Requirement
21
+ type: :runtime
22
+ prerelease: false
23
+ name: xml_schema
24
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
25
  none: false
24
26
  requirements:
25
- - - "="
27
+ - - ~>
26
28
  - !ruby/object:Gem::Version
27
29
  hash: 856480538658449761
28
30
  segments:
@@ -30,12 +32,12 @@ dependencies:
30
32
  - 0
31
33
  - 1
32
34
  version: 0.0.1
35
+ requirement: *id001
36
+ - !ruby/object:Gem::Dependency
33
37
  type: :runtime
34
- version_requirements: *id001
35
- name: xml_schema
36
38
  prerelease: false
37
- - !ruby/object:Gem::Dependency
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
+ name: ffi
40
+ version_requirements: &id002 !ruby/object:Gem::Requirement
39
41
  none: false
40
42
  requirements:
41
43
  - - ~>
@@ -45,12 +47,12 @@ dependencies:
45
47
  - 1
46
48
  - 0
47
49
  version: "1.0"
48
- type: :runtime
49
- version_requirements: *id002
50
- name: ffi
51
- prerelease: false
50
+ requirement: *id002
52
51
  - !ruby/object:Gem::Dependency
53
- requirement: &id003 !ruby/object:Gem::Requirement
52
+ type: :development
53
+ prerelease: false
54
+ name: rspec
55
+ version_requirements: &id003 !ruby/object:Gem::Requirement
54
56
  none: false
55
57
  requirements:
56
58
  - - ~>
@@ -59,10 +61,7 @@ dependencies:
59
61
  segments:
60
62
  - 1
61
63
  version: "1"
62
- type: :development
63
- version_requirements: *id003
64
- name: rspec
65
- prerelease: false
64
+ requirement: *id003
66
65
  description: " Advanced Redland bindings.\n"
67
66
  email: slava.kravchenko@gmail.com
68
67
  executables: []
@@ -72,15 +71,6 @@ extensions: []
72
71
  extra_rdoc_files:
73
72
  - README.rdoc
74
73
  files:
75
- - lib/redlander/uri.rb~
76
- - lib/redlander/stream.rb~
77
- - lib/redlander/stream_enumerator.rb~
78
- - lib/redlander/statement.rb
79
- - lib/redlander/storage.rb
80
- - lib/redlander/stream.rb
81
- - lib/redlander/stream_enumerator.rb
82
- - lib/redlander/uri.rb
83
- - lib/redlander/version.rb
84
74
  - lib/redlander/error_container.rb
85
75
  - lib/redlander/model.rb
86
76
  - lib/redlander/model_proxy.rb
@@ -88,19 +78,23 @@ files:
88
78
  - lib/redlander/parser.rb
89
79
  - lib/redlander/parser_proxy.rb
90
80
  - lib/redlander/serializer.rb
81
+ - lib/redlander/statement.rb
82
+ - lib/redlander/storage.rb
83
+ - lib/redlander/stream.rb
84
+ - lib/redlander/stream_enumerator.rb
85
+ - lib/redlander/uri.rb
86
+ - lib/redlander/version.rb
91
87
  - spec/spec.opts
92
88
  - spec/spec_helper.rb
89
+ - spec/integration/memory_leak_spec.rb
90
+ - spec/redlander/model_spec.rb
91
+ - spec/redlander/node_spec.rb
93
92
  - spec/redlander/parser_spec.rb
94
93
  - spec/redlander/serializer_spec.rb
95
- - spec/redlander/node_spec.rb
96
- - spec/redlander/model_spec.rb
97
94
  - spec/redlander/statement_spec.rb
98
- - spec/integration/memory_leak_spec.rb~
99
- - spec/integration/memory_leak_spec.rb
100
95
  - Rakefile
101
96
  - lib/redlander.rb
102
97
  - README.rdoc
103
- has_rdoc: true
104
98
  homepage: https://github.com/cordawyn/redlander
105
99
  licenses: []
106
100
 
@@ -130,17 +124,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
124
  requirements: []
131
125
 
132
126
  rubyforge_project:
133
- rubygems_version: 1.5.2
127
+ rubygems_version: 1.8.11
134
128
  signing_key:
135
129
  specification_version: 3
136
130
  summary: Advanced Redland bindings.
137
131
  test_files:
138
132
  - spec/spec.opts
139
133
  - spec/spec_helper.rb
134
+ - spec/integration/memory_leak_spec.rb
135
+ - spec/redlander/model_spec.rb
136
+ - spec/redlander/node_spec.rb
140
137
  - spec/redlander/parser_spec.rb
141
138
  - spec/redlander/serializer_spec.rb
142
- - spec/redlander/node_spec.rb
143
- - spec/redlander/model_spec.rb
144
139
  - spec/redlander/statement_spec.rb
145
- - spec/integration/memory_leak_spec.rb~
146
- - spec/integration/memory_leak_spec.rb
@@ -1,43 +0,0 @@
1
- module Redlander
2
- class Stream
3
- attr_reader :rdf_stream
4
-
5
- def initialize(source)
6
- @rdf_stream = case source
7
- when Statement
8
- Redland.librdf_model_find_statements(source.model.rdf_model, source.rdf_statement)
9
- when Model
10
- Redland.librdf_model_as_stream(source.rdf_model)
11
- else
12
- # TODO
13
- raise NotImplementedError.new
14
- end
15
- raise RedlandError.new("Failed to create a new stream") if @rdf_stream.null?
16
- ObjectSpace.define_finalizer(self, proc { Redland.librdf_free_stream(@rdf_stream) })
17
- end
18
-
19
- # End-of-stream?
20
- def eos?
21
- Redland.librdf_stream_end(@rdf_stream) != 0
22
- end
23
-
24
- def succ
25
- Redland.librdf_stream_next(@rdf_stream).zero?
26
- end
27
-
28
- def current
29
- Statement.new(self)
30
- end
31
-
32
- # Return all the remaining statements in the stream
33
- # from the current position.
34
- def tail
35
- [].tap do |all|
36
- while !eos?
37
- all << current
38
- succ
39
- end
40
- end
41
- end
42
- end
43
- end
@@ -1,15 +0,0 @@
1
- module Redlander
2
- module StreamEnumerator
3
- include Enumerable
4
-
5
- def each
6
- if block_given?
7
- reset_stream
8
- while !stream.eos?
9
- yield stream.current
10
- stream.succ
11
- end
12
- else
13
- raise ::LocalJumpError.new("no block given")
14
- end
15
- end
@@ -1,12 +0,0 @@
1
- module Redlander
2
- class Uri
3
- def initialize(uri)
4
- return nil if uri.nil?
5
- uri = uri.is_a?(URI) ? uri.to_s : uri
6
- @rdf_uri = Redland.librdf_new_uri(rdf_world, uri)
7
- raise RedlandError.new("Failed to create URI from '#{uri}'") if @rdf_uri.null?
8
- ObjectSpace.define_finalizer(self, proc { Redland.librdf_free_uri(@rdf_uri) })
9
- rdf_uri
10
- end
11
- end
12
- end
@@ -1,24 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "memory leak" do
4
- context "when calling Model#find twice" do
5
- before do
6
- @model = Model.new
7
- @model.statements.create(statement_attributes)
8
- end
9
-
10
- it "should not occur" do
11
-
12
- end
13
- end
14
-
15
- private
16
-
17
- def statement_attributes
18
- {
19
- :subject => URI.parse("http://example.com/subject"),
20
- :predicate => URI.parse("http://example.com/predicate"),
21
- :object => URI.parse("object!")
22
- }
23
- end
24
- end