rbbt-rest 1.2.30 → 1.2.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/rbbt/rest/common/cache.rb +10 -6
- data/lib/rbbt/rest/common/render.rb +2 -3
- data/lib/rbbt/rest/common/table.rb +3 -3
- data/lib/rbbt/rest/entity.rb +6 -4
- data/share/views/compass/solarized.sass +0 -22
- data/share/views/entity_partials/entity_list_card.haml +3 -0
- data/share/views/layout.haml +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWMyY2U0NDU1YWMxYzA1ZjNiZmViMjRkMjk1OGMzMjk2NWRhNWVhNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWYzMjRiNzE1ZTIyYzMwMTZjMThkMTYzYWYxMDhhNDhjMjJmMmU0Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTRkZmQ3MGFiMDU3NDA1OGMzNjc0Mjk4ZWMzMmJmMDI5MzEzNTBkMzVkNDM3
|
10
|
+
OGNkZjYzZmVkZWExZDM2YmU4YWVhODM1Mzk0M2Q0YTIyMTVkYzhkYWNkODRj
|
11
|
+
NTQyMzRmNDQ2MGZkYWZhZmI0NjRjZWFiN2MwYjVhZDZhOGZmNjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2ZjM2JhOTMyMjBjYWJjNWQ4OWY5YzM0MWY3NzQzZWNlODBkZTBmYjUyZGY3
|
14
|
+
YmYzY2RmYzg1NTVmNGU3NjAwMGViZWFhN2U3YzRmMzE5ZTQzZjQxNjMzODQ3
|
15
|
+
YzkyYjcyY2Q1OWNlMTQ3ZWQ1NGU2NzE1ZGU2NDE1OWQyMWE3ODM=
|
@@ -80,7 +80,7 @@ module RbbtRESTHelpers
|
|
80
80
|
content_type "text/html"
|
81
81
|
data = nil
|
82
82
|
excel_file = TmpFile.tmp_file
|
83
|
-
tsv.excel(excel_file, :name => @excel_use_name
|
83
|
+
tsv.excel(excel_file, :name => @excel_use_name, :sort_by => @excel_sort_by, :sort_by_cast => @excel_sort_by_cast, :name => true)
|
84
84
|
send_file excel_file, :type => 'application/vnd.ms-excel', :filename => 'table.xls'
|
85
85
|
else
|
86
86
|
send_file fragment_file
|
@@ -99,8 +99,8 @@ module RbbtRESTHelpers
|
|
99
99
|
|
100
100
|
if old_cache(step.path, check) or update == :reload
|
101
101
|
begin
|
102
|
-
pid = step.info[:pid]
|
103
|
-
step.abort if pid and Misc.pid_exists? pid
|
102
|
+
pid = step.info[:pid]
|
103
|
+
step.abort if pid and Misc.pid_exists?(pid) and not pid == Process.pid
|
104
104
|
step.pid = nil
|
105
105
|
rescue Exception
|
106
106
|
Log.medium{$!.message}
|
@@ -109,10 +109,14 @@ module RbbtRESTHelpers
|
|
109
109
|
end
|
110
110
|
|
111
111
|
# Issue
|
112
|
-
|
113
|
-
|
112
|
+
if not step.started?
|
113
|
+
if cache_type == :synchronous or cache_type == :sync
|
114
|
+
step.run
|
115
|
+
else
|
116
|
+
step.fork
|
117
|
+
end
|
118
|
+
end
|
114
119
|
|
115
|
-
step.join if cache_type == :synchronous or cache_type == :sync
|
116
120
|
|
117
121
|
if update == :reload
|
118
122
|
url = request.url
|
@@ -71,7 +71,7 @@ module RbbtRESTHelpers
|
|
71
71
|
def fragment(link = nil, &block)
|
72
72
|
fragment_code, link = [link.to_s, nil] if link and not link.to_s[0] == '<'
|
73
73
|
if block_given?
|
74
|
-
if defined? @step and cache_type == :asynchronous or cache_type == :async
|
74
|
+
if defined? @step and (@cache_type == :asynchronous or @cache_type == :async)
|
75
75
|
fragment_code ||= (rand * 100000).to_i.to_s
|
76
76
|
fragment_file = @step.file(fragment_code)
|
77
77
|
|
@@ -100,8 +100,7 @@ module RbbtRESTHelpers
|
|
100
100
|
end
|
101
101
|
end
|
102
102
|
else
|
103
|
-
|
104
|
-
nil
|
103
|
+
capture_haml &block
|
105
104
|
end
|
106
105
|
else
|
107
106
|
if link =~ / class=/
|
@@ -14,7 +14,7 @@ module Link
|
|
14
14
|
val
|
15
15
|
end
|
16
16
|
else
|
17
|
-
|
17
|
+
0
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -125,9 +125,9 @@ module RbbtRESTHelpers
|
|
125
125
|
|
126
126
|
object.with_unnamed do
|
127
127
|
if entity and entity.respond_to? :tsv_sort
|
128
|
-
object.page(num, size, field,
|
128
|
+
object.page(num, size, field, false, reverse, &entity.method(:tsv_sort))
|
129
129
|
else
|
130
|
-
object.page(num, size, field,
|
130
|
+
object.page(num, size, field, false, reverse)
|
131
131
|
end
|
132
132
|
end
|
133
133
|
end
|
data/lib/rbbt/rest/entity.rb
CHANGED
@@ -164,11 +164,13 @@ module Sinatra
|
|
164
164
|
content_type "text/plain"
|
165
165
|
halt 200, list * "\n"
|
166
166
|
when :name
|
167
|
-
|
168
|
-
|
167
|
+
name = list.name
|
168
|
+
a = name.list_link :length, list_id.sub(/ \(format:.*?\)|$/, " (format: Name)"), :ensembl => false
|
169
|
+
redirect to(a.match(/href=(["'])(.*?)\1/)[2])
|
169
170
|
when :ensembl
|
170
|
-
|
171
|
-
|
171
|
+
ensembl = list.ensembl
|
172
|
+
a = ensembl.list_link :length, list_id.sub(/ \(format:.*?\)|$/, " (format: Ensembl)")
|
173
|
+
redirect to(a.match(/href=(["'])(.*?)\1/)[2])
|
172
174
|
else
|
173
175
|
entity_list_render(list, list_id)
|
174
176
|
end
|
@@ -32,25 +32,3 @@ $green: #859900
|
|
32
32
|
color: $accent1
|
33
33
|
h1,h2,h3,h4,h5,h6
|
34
34
|
color: $accent2
|
35
|
-
|
36
|
-
|
37
|
-
//@mixin rebase($rebase03,$rebase02,$rebase01,$rebase00,$rebase0,$rebase1,$rebase2,$rebase3)
|
38
|
-
//{
|
39
|
-
// background-color:$rebase03;
|
40
|
-
// color:$rebase0;
|
41
|
-
// * { color:$rebase0; }
|
42
|
-
// h1,h2,h3,h4,h5,h6 { color:$rebase1; border-color: $rebase0; }
|
43
|
-
// a, a:active, a:visited { color: $rebase1; }
|
44
|
-
//}
|
45
|
-
//@mixin accentize($accent) {
|
46
|
-
// a, a:active, a:visited, code.url { color: $accent; }
|
47
|
-
// h1,h2,h3,h4,h5,h6 {color:$accent}
|
48
|
-
//}
|
49
|
-
///* light is default mode, so pair with general html definition */
|
50
|
-
//html, .light { @include rebase($base3,$base2,$base1,$base0,$base00,$base01,$base02,$base03)}
|
51
|
-
//.dark { @include rebase($base03,$base02,$base01,$base00,$base0,$base1,$base2,$base3)}
|
52
|
-
//html * {
|
53
|
-
// color-profile: sRGB;
|
54
|
-
// rendering-intent: auto;
|
55
|
-
//}
|
56
|
-
//
|
@@ -21,12 +21,15 @@
|
|
21
21
|
%a.compare_list(href="#" data-reveal-id='modal1') Compare
|
22
22
|
%li
|
23
23
|
%a.list_list(href="#{request.path_info + "?_format=list"}") List
|
24
|
+
|
24
25
|
- if list.respond_to? :name
|
25
26
|
%li
|
26
27
|
%a.name_list(href="#{request.path_info + "?_format=name"}") Name
|
28
|
+
|
27
29
|
- if list.respond_to? :ensembl
|
28
30
|
%li
|
29
31
|
%a.ensembl_list(href="#{request.path_info + "?_format=ensembl"}") Ensembl
|
32
|
+
|
30
33
|
%li
|
31
34
|
%a.download_list(href="#{request.path_info + "?_format=raw"}") Raw
|
32
35
|
%li
|
data/share/views/layout.haml
CHANGED
@@ -25,13 +25,17 @@
|
|
25
25
|
|
26
26
|
// Thid party frameworks
|
27
27
|
|
28
|
+
-# record_js '/plugins/json/json2.js'
|
28
29
|
- record_js "/plugins/underscore/js/underscore.js"
|
30
|
+
|
29
31
|
= serve_js
|
32
|
+
|
30
33
|
- %w(jquery-2.0.0 jquery.cookie jquery.form).each do |jquery_file|
|
31
34
|
- record_js File.join('/plugins/jquery/js/', jquery_file)
|
32
35
|
|
33
36
|
- record_js '/plugins/jquery-ui/js/jquery-ui-1.8.14.custom.min.js'
|
34
37
|
|
38
|
+
|
35
39
|
-# %w(foundation foundation.cookie foundation.reveal foundation.dropdown foundation.section foundation.topbar custom.modernizr).each do |file|
|
36
40
|
- record_js "/js/#{ file }"
|
37
41
|
|
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.2.
|
4
|
+
version: 1.2.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|