rbbt-rest 1.3.27 → 1.3.28
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ee101d0492e48680b0abec1e9087e59695bc35f
|
4
|
+
data.tar.gz: b5d1de6388c52f93f677197a936b2e2fb9e12493
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a032336cd44ebaa2f8f7bdfba3529739c1197d0a624cdf7d6a65322fd916342dc3f1e3c800b690d1a111b2b36f9651a1dbdbe29314b1bb92f7a0a41a0adfe1c
|
7
|
+
data.tar.gz: dcb22d712b035d08ba9862fbdc7eb47a2b1c20e626d0d322ef381313bdd0a7cec81247a15f01f75b2d784b2f05d21dd81cd4b06dd39e4580989b129829a2d0f4
|
@@ -5,14 +5,16 @@ module Link
|
|
5
5
|
|
6
6
|
def self.tsv_sort(v)
|
7
7
|
value = v.last
|
8
|
-
value = value.first if Array === value
|
9
|
-
if value and value.match(/<a [^>]*>([^>]*)<\/a>/)
|
8
|
+
value = value.first if Array === value and value.length == 1
|
9
|
+
if String === value and value.match(/<a [^>]*>([^>]*)<\/a>/)
|
10
10
|
val = $1
|
11
11
|
if val =~ /^\s*\d/
|
12
12
|
val.to_f
|
13
13
|
else
|
14
|
-
|
14
|
+
1
|
15
15
|
end
|
16
|
+
elsif Array === value
|
17
|
+
value.length
|
16
18
|
else
|
17
19
|
0
|
18
20
|
end
|
@@ -56,11 +56,11 @@ module EntityRESTHelpers
|
|
56
56
|
|
57
57
|
def find_all_entity_action_templates_from_resource(resource, entity)
|
58
58
|
if entity == "Default"
|
59
|
-
resource.entity["Default"].glob("*.haml")
|
59
|
+
resource.entity["Default"].glob("*.haml").sort
|
60
60
|
else
|
61
61
|
entity.annotation_types.collect do |annotation|
|
62
62
|
resource.entity[annotation].glob('*.haml')
|
63
|
-
end.compact.flatten
|
63
|
+
end.compact.flatten.sort
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
@@ -192,11 +192,11 @@ module EntityRESTHelpers
|
|
192
192
|
def find_all_entity_list_action_templates_from_resource(resource, entity)
|
193
193
|
|
194
194
|
if entity == "Default"
|
195
|
-
resource.entity_list["Default"].glob("*.haml")
|
195
|
+
resource.entity_list["Default"].glob("*.haml").sort
|
196
196
|
else
|
197
197
|
entity.annotation_types.collect do |annotation|
|
198
198
|
resource.entity_list[annotation].glob('*.haml')
|
199
|
-
end.compact.flatten
|
199
|
+
end.compact.flatten.sort
|
200
200
|
end
|
201
201
|
end
|
202
202
|
|
@@ -204,16 +204,17 @@ module Sinatra
|
|
204
204
|
_matches_h.each do |key, _matches|
|
205
205
|
target_type = case key
|
206
206
|
when :children
|
207
|
-
_matches.
|
207
|
+
_matches.target_entity_type
|
208
208
|
when :parents
|
209
|
-
_matches.
|
209
|
+
_matches.source_entity_type
|
210
210
|
end
|
211
211
|
_matches = acc[target_type].concat _matches if acc[target_type] and acc[target_type].any?
|
212
|
-
acc.merge!({ target_type => _matches}) if _matches and _matches.any?
|
212
|
+
acc.merge!({ target_type => _matches }) if _matches and _matches.any?
|
213
213
|
end
|
214
214
|
end
|
215
215
|
acc
|
216
216
|
}
|
217
|
+
|
217
218
|
case @format
|
218
219
|
when :tsv
|
219
220
|
content_type "text/tab-separated-values"
|
@@ -225,7 +226,7 @@ module Sinatra
|
|
225
226
|
content_type :json
|
226
227
|
_matches = {}
|
227
228
|
matches.each{|type,list|
|
228
|
-
_matches[type] = list.target
|
229
|
+
_matches[type] = list.target.uniq.sort
|
229
230
|
}
|
230
231
|
halt 200, _matches.to_json
|
231
232
|
else
|
@@ -46,10 +46,11 @@ module KnowledgeBaseRESTHelpers
|
|
46
46
|
|
47
47
|
TSV.traverse user_studies[user], :cpus => 10 do |study|
|
48
48
|
Study.setup(study)
|
49
|
-
study.sample_genes
|
50
|
-
end
|
49
|
+
study.sample_genes if study.has_genotypes?
|
50
|
+
end
|
51
51
|
|
52
52
|
user_studies[user].each do |study|
|
53
|
+
Study.setup(study)
|
53
54
|
kb.syndicate study.knowledge_base, study
|
54
55
|
end
|
55
56
|
|
@@ -7,9 +7,9 @@
|
|
7
7
|
%a.reload_action(href="#" title="Refresh action")
|
8
8
|
%i.general.fi-refresh
|
9
9
|
|
10
|
-
%li.
|
11
|
-
%a(href="#" title="
|
12
|
-
%i.general.fi-
|
10
|
+
%li.description
|
11
|
+
%a(href="#" title="View description")
|
12
|
+
%i.general.fi-book
|
13
13
|
|
14
14
|
%li.parameters
|
15
15
|
%a(href="#" title="Configure parameters")
|
@@ -19,14 +19,14 @@
|
|
19
19
|
%a(href="#" title="Make this configuration default")
|
20
20
|
%i.general.fi-paperclip
|
21
21
|
|
22
|
-
%li.
|
23
|
-
%a(href="#" title="
|
24
|
-
%i.general.fi-
|
22
|
+
%li.url
|
23
|
+
%a(href="#" title="Bookmark action")
|
24
|
+
%i.general.fi-bookmark
|
25
25
|
|
26
26
|
|
27
27
|
%ul.actions
|
28
28
|
- last_resource = nil
|
29
|
-
- controller.actions.
|
29
|
+
- controller.actions.each do |action, text, resource, params|
|
30
30
|
%li(class="#{last_resource and last_resource != resource ? "new_resource" : ""}" attr-resource="#{resource}")
|
31
31
|
- case
|
32
32
|
- when AnnotatedArray === entity
|
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.3.
|
4
|
+
version: 1.3.28
|
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-08-
|
11
|
+
date: 2014-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|