rdf-ldp 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +34 -0
- data/VERSION +1 -1
- data/app/lamprey.rb +119 -40
- data/bin/lamprey +15 -1
- data/lib/rack/ldp.rb +18 -20
- data/lib/rdf/ldp.rb +3 -2
- data/lib/rdf/ldp/container.rb +15 -9
- data/lib/rdf/ldp/direct_container.rb +5 -3
- data/lib/rdf/ldp/indirect_container.rb +5 -3
- data/lib/rdf/ldp/interaction_model.rb +39 -29
- data/lib/rdf/ldp/non_rdf_source.rb +4 -2
- data/lib/rdf/ldp/resource.rb +20 -18
- data/lib/rdf/ldp/spec.rb +6 -0
- data/lib/rdf/ldp/spec/container.rb +337 -0
- data/lib/rdf/ldp/spec/direct_container.rb +245 -0
- data/lib/rdf/ldp/spec/indirect_container.rb +152 -0
- data/lib/rdf/ldp/spec/non_rdf_source.rb +138 -0
- data/lib/rdf/ldp/spec/rdf_source.rb +370 -0
- data/lib/rdf/ldp/spec/resource.rb +242 -0
- data/lib/rdf/ldp/storage_adapters/file_storage_adapter.rb +4 -4
- data/lib/rdf/ldp/version.rb +16 -3
- metadata +37 -2
@@ -63,7 +63,7 @@ module RDF::LDP
|
|
63
63
|
#
|
64
64
|
# @return [IO] an object conforming to the Ruby IO interface
|
65
65
|
def io(&block)
|
66
|
-
FileUtils.mkdir_p(path_dir) unless Dir.
|
66
|
+
FileUtils.mkdir_p(path_dir) unless Dir.exist?(path_dir)
|
67
67
|
FileUtils.touch(path) unless file_exists?
|
68
68
|
|
69
69
|
File.open(path, 'r+b', &block)
|
@@ -72,7 +72,7 @@ module RDF::LDP
|
|
72
72
|
##
|
73
73
|
# @return [Boolean] 1 if the file has been deleted, otherwise false
|
74
74
|
def delete
|
75
|
-
return false unless File.
|
75
|
+
return false unless File.exist?(path)
|
76
76
|
File.delete(path)
|
77
77
|
end
|
78
78
|
|
@@ -81,7 +81,7 @@ module RDF::LDP
|
|
81
81
|
##
|
82
82
|
# @return [Boolean]
|
83
83
|
def file_exists?
|
84
|
-
File.
|
84
|
+
File.exist?(path)
|
85
85
|
end
|
86
86
|
|
87
87
|
##
|
@@ -99,4 +99,4 @@ module RDF::LDP
|
|
99
99
|
end
|
100
100
|
end
|
101
101
|
end
|
102
|
-
end
|
102
|
+
end
|
data/lib/rdf/ldp/version.rb
CHANGED
@@ -1,4 +1,11 @@
|
|
1
1
|
module RDF::LDP
|
2
|
+
##
|
3
|
+
# Version Number
|
4
|
+
#
|
5
|
+
# @example getting a version string
|
6
|
+
# RDF::LDP::VERSION # or
|
7
|
+
# "#{RDF::LDP::VERSION}"
|
8
|
+
#
|
2
9
|
module VERSION
|
3
10
|
FILE = File.expand_path('../../../../VERSION', __FILE__)
|
4
11
|
MAJOR, MINOR, TINY, EXTRA = File.read(FILE).chomp.split('.')
|
@@ -6,14 +13,20 @@ module RDF::LDP
|
|
6
13
|
|
7
14
|
##
|
8
15
|
# @return [String]
|
9
|
-
def self.to_s
|
16
|
+
def self.to_s
|
17
|
+
STRING
|
18
|
+
end
|
10
19
|
|
11
20
|
##
|
12
21
|
# @return [String]
|
13
|
-
def self.to_str
|
22
|
+
def self.to_str
|
23
|
+
STRING
|
24
|
+
end
|
14
25
|
|
15
26
|
##
|
16
27
|
# @return [Array(Integer, Integer, Integer)]
|
17
|
-
def self.to_a
|
28
|
+
def self.to_a
|
29
|
+
[MAJOR, MINOR, TINY]
|
30
|
+
end
|
18
31
|
end
|
19
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-ldp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -226,6 +226,34 @@ dependencies:
|
|
226
226
|
- - "~>"
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: '3.0'
|
229
|
+
- !ruby/object:Gem::Dependency
|
230
|
+
name: rubocop
|
231
|
+
requirement: !ruby/object:Gem::Requirement
|
232
|
+
requirements:
|
233
|
+
- - "~>"
|
234
|
+
- !ruby/object:Gem::Version
|
235
|
+
version: '0.47'
|
236
|
+
type: :development
|
237
|
+
prerelease: false
|
238
|
+
version_requirements: !ruby/object:Gem::Requirement
|
239
|
+
requirements:
|
240
|
+
- - "~>"
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: '0.47'
|
243
|
+
- !ruby/object:Gem::Dependency
|
244
|
+
name: rubocop-rspec
|
245
|
+
requirement: !ruby/object:Gem::Requirement
|
246
|
+
requirements:
|
247
|
+
- - "~>"
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: '1.10'
|
250
|
+
type: :development
|
251
|
+
prerelease: false
|
252
|
+
version_requirements: !ruby/object:Gem::Requirement
|
253
|
+
requirements:
|
254
|
+
- - "~>"
|
255
|
+
- !ruby/object:Gem::Version
|
256
|
+
version: '1.10'
|
229
257
|
- !ruby/object:Gem::Dependency
|
230
258
|
name: rack-test
|
231
259
|
requirement: !ruby/object:Gem::Requirement
|
@@ -364,6 +392,13 @@ files:
|
|
364
392
|
- lib/rdf/ldp/non_rdf_source.rb
|
365
393
|
- lib/rdf/ldp/rdf_source.rb
|
366
394
|
- lib/rdf/ldp/resource.rb
|
395
|
+
- lib/rdf/ldp/spec.rb
|
396
|
+
- lib/rdf/ldp/spec/container.rb
|
397
|
+
- lib/rdf/ldp/spec/direct_container.rb
|
398
|
+
- lib/rdf/ldp/spec/indirect_container.rb
|
399
|
+
- lib/rdf/ldp/spec/non_rdf_source.rb
|
400
|
+
- lib/rdf/ldp/spec/rdf_source.rb
|
401
|
+
- lib/rdf/ldp/spec/resource.rb
|
367
402
|
- lib/rdf/ldp/storage_adapters/file_storage_adapter.rb
|
368
403
|
- lib/rdf/ldp/version.rb
|
369
404
|
homepage: http://ruby-rdf.github.com/
|