rdf-tabular 0.2.1 → 0.4.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/VERSION +1 -1
- data/etc/earl.ttl +1579 -799
- data/lib/rdf/tabular.rb +0 -1
- data/lib/rdf/tabular/format.rb +16 -0
- data/lib/rdf/tabular/metadata.rb +251 -254
- data/lib/rdf/tabular/reader.rb +98 -146
- data/lib/rdf/tabular/uax35.rb +4 -4
- data/spec/format_spec.rb +34 -0
- data/spec/matchers.rb +3 -78
- data/spec/metadata_spec.rb +172 -105
- data/spec/reader_spec.rb +28 -25
- data/spec/spec_helper.rb +5 -3
- data/spec/suite_helper.rb +1 -1
- data/spec/suite_spec.rb +8 -9
- metadata +118 -55
- data/lib/rdf/tabular/utils.rb +0 -33
data/lib/rdf/tabular/utils.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
module RDF::Tabular
|
2
|
-
module Utils
|
3
|
-
# Add debug event to debug array, if specified
|
4
|
-
#
|
5
|
-
# param [String] message
|
6
|
-
# yieldreturn [String] appended to message, to allow for lazy-evaulation of message
|
7
|
-
def debug(*args)
|
8
|
-
options = args.last.is_a?(Hash) ? args.pop : {}
|
9
|
-
return unless options[:debug] || @options[:debug] || RDF::Tabular.debug?
|
10
|
-
depth = options[:depth] || @options[:depth]
|
11
|
-
d_str = depth > 100 ? ' ' * 100 + '+' : ' ' * depth
|
12
|
-
list = args
|
13
|
-
list << yield if block_given?
|
14
|
-
message = d_str + (list.empty? ? "" : list.join(": "))
|
15
|
-
options[:debug] << message if options[:debug].is_a?(Array)
|
16
|
-
@options[:debug] << message if @options[:debug].is_a?(Array)
|
17
|
-
$stderr.puts(message) if RDF::Tabular.debug? || @options[:debug] == TrueClass
|
18
|
-
end
|
19
|
-
module_function :debug
|
20
|
-
|
21
|
-
# Increase depth around a method invocation
|
22
|
-
# @yield
|
23
|
-
# Yields with no arguments
|
24
|
-
# @yieldreturn [Object] returns the result of yielding
|
25
|
-
# @return [Object]
|
26
|
-
def depth
|
27
|
-
@options[:depth] += 1
|
28
|
-
ret = yield
|
29
|
-
@options[:depth] -= 1
|
30
|
-
ret
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|