rbbt-rest 1.4.7 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74d57e3e450bfc476f4744ed76407a6f4c77dfa6
|
4
|
+
data.tar.gz: 28df7c8ca43f059b5a37423219a8b958080b5769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e495dd72919cb6a1a050723057c631154559bf58b217a07dab6be104ffbd6e8102ab2ce86998fcaba4f12d2b0d376a1800916d58342550f430f636d7d784cef
|
7
|
+
data.tar.gz: 070398ee95b0ee17249771380e3f19a62c5be3fd388d8a1d2ed2e66c08dde3e730c6f45d3d454fea95b233480c773937474536a9445224cf45c5803be7f7c3d6
|
@@ -25,10 +25,11 @@ module RbbtRESTHelpers
|
|
25
25
|
check += consume_parameter(:_cache_check, params) || []
|
26
26
|
check.flatten!
|
27
27
|
|
28
|
+
orig_name = name
|
28
29
|
name += "_" << Misc.hash2md5(params) if params.any?
|
29
30
|
|
30
31
|
path = settings.cache_dir[name].find
|
31
|
-
task = Task.setup(:name =>
|
32
|
+
task = Task.setup(:name => orig_name, :result_type => :string, &block)
|
32
33
|
|
33
34
|
step = Step.new(path, task, nil, nil, self)
|
34
35
|
#last_modified File.mtime(step.path.find) if step.done?
|
@@ -92,7 +93,7 @@ module RbbtRESTHelpers
|
|
92
93
|
else
|
93
94
|
if File.exists?(fragment_file + '.error')
|
94
95
|
klass, _sep, message = Open.read(fragment_file + '.error').partition(": ")
|
95
|
-
raise Kernel.const_get(klass), message
|
96
|
+
raise Kernel.const_get(klass), message || "no message"
|
96
97
|
#halt 500, html_tag(:span, File.read(fragment_file + '.error'), :class => "message") +
|
97
98
|
# html_tag(:ul, File.read(fragment_file + '.backtrace').split("\n").collect{|l| html_tag(:li, l)} * "\n", :class => "backtrace")
|
98
99
|
else
|
@@ -7,10 +7,10 @@ module EntityRESTHelpers
|
|
7
7
|
def setup_entity(type, entity, params)
|
8
8
|
base_type, format = type.split ":"
|
9
9
|
entity_class = case
|
10
|
-
when Entity.formats.include?(format)
|
11
|
-
Entity.formats[format]
|
12
10
|
when Entity.formats.include?(base_type)
|
13
11
|
Entity.formats[base_type]
|
12
|
+
when Entity.formats.include?(format)
|
13
|
+
Entity.formats[format]
|
14
14
|
else
|
15
15
|
nil
|
16
16
|
end
|
@@ -204,13 +204,10 @@ module Sinatra
|
|
204
204
|
entities.each do |entity|
|
205
205
|
_matches_h = kb.neighbours(database, entity)
|
206
206
|
_matches_h.each do |key, _matches|
|
207
|
-
target_type =
|
208
|
-
|
209
|
-
_matches.target_entity_type
|
210
|
-
when :parents
|
211
|
-
_matches.source_entity_type
|
212
|
-
end
|
207
|
+
target_type = _matches.target_entity_type
|
208
|
+
|
213
209
|
_matches = acc[target_type].concat _matches if acc[target_type] and acc[target_type].any?
|
210
|
+
|
214
211
|
acc.merge!({ target_type => _matches }) if _matches and _matches.any?
|
215
212
|
end
|
216
213
|
end
|
@@ -70,7 +70,7 @@ module KnowledgeBaseRESTHelpers
|
|
70
70
|
TSV.open(tsv)
|
71
71
|
end
|
72
72
|
|
73
|
-
tsv = tsv.to_double{|v| v.split
|
73
|
+
tsv = tsv.to_double{|v| v.nil? ? nil : v.split(";;") } unless tsv.fields.nil? or tsv.fields.empty? or tsv.type == :double
|
74
74
|
|
75
75
|
tsv2html tsv, options
|
76
76
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
li.find
|
2
2
|
@media #{$only-large}
|
3
|
-
width:
|
3
|
+
width: 10em
|
4
4
|
margin-left: $indent
|
5
5
|
margin-right: $indent
|
6
6
|
@media #{$not-large}
|
@@ -25,6 +25,6 @@ li.find
|
|
25
25
|
@media #{$not-large}
|
26
26
|
display: none
|
27
27
|
position: absolute
|
28
|
-
|
28
|
+
top: 0px
|
29
29
|
right: 0
|
30
30
|
height: 2em
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|