caruby-scat 1.2.1
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.
- data/.gitignore +17 -0
- data/Gemfile +25 -0
- data/Gemfile.lock +158 -0
- data/History.md +9 -0
- data/LEGAL +4 -0
- data/LICENSE +22 -0
- data/README.md +131 -0
- data/Rakefile +41 -0
- data/bin/scat +7 -0
- data/bin/scatseed +10 -0
- data/caruby-scat.gemspec +30 -0
- data/conf/fields.yaml +22 -0
- data/conf/redis.conf +492 -0
- data/config.ru +15 -0
- data/features/edit.feature +29 -0
- data/features/step_definitions/scat_steps.rb +50 -0
- data/features/support/env.rb +18 -0
- data/features/support/seed.rb +2 -0
- data/lib/scat.rb +56 -0
- data/lib/scat/autocomplete.rb +74 -0
- data/lib/scat/cache.rb +90 -0
- data/lib/scat/configuration.rb +79 -0
- data/lib/scat/edit.rb +160 -0
- data/lib/scat/field.rb +99 -0
- data/lib/scat/version.rb +3 -0
- data/public/images/apple-touch-icon-114x114.png +0 -0
- data/public/images/apple-touch-icon-72x72.png +0 -0
- data/public/images/apple-touch-icon.png +0 -0
- data/public/images/favicon.ico +0 -0
- data/public/images/help.png +0 -0
- data/public/javascripts/tabs.js +29 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/base.css +342 -0
- data/public/stylesheets/layout.css +58 -0
- data/public/stylesheets/scat.css +64 -0
- data/public/stylesheets/skeleton.css +242 -0
- data/redis.rdb +0 -0
- data/spec/autocomplete_spec.rb +17 -0
- data/spec/edit_spec.rb +60 -0
- data/spec/spec_helper.rb +13 -0
- data/test/fixtures/seed.rb +25 -0
- data/views/edit.haml +12 -0
- data/views/layout.haml +40 -0
- metadata +216 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
require Bundler.environment.specs.detect { |s| s.name == 'caruby-tissue' }.full_gem_path + '/examples/galena/lib/galena/seed'
|
2
|
+
|
3
|
+
module Scat
|
4
|
+
# The Scat test protocol fixture.
|
5
|
+
module Seed
|
6
|
+
# @param [String] title the protocol title
|
7
|
+
# @return [CaTissue::CollectionProtocol] a new test protocol with one event and one frozen tissue requirement
|
8
|
+
def self.protocol_for(title)
|
9
|
+
# Borrow the Galena seed.
|
10
|
+
galena = Galena.administrative_objects
|
11
|
+
# the CP
|
12
|
+
pcl = CaTissue::CollectionProtocol.new(
|
13
|
+
:title => title,
|
14
|
+
:principal_investigator => galena.protocol.principal_investigator,
|
15
|
+
:sites => [galena.tissue_bank],
|
16
|
+
:coordinators => [galena.tissue_bank.coordinator]
|
17
|
+
)
|
18
|
+
# the sole event
|
19
|
+
cpe = CaTissue::CollectionProtocolEvent.new(:collection_protocol => pcl, :event_point => 1.0)
|
20
|
+
# the sole specimen requirement
|
21
|
+
CaTissue::TissueSpecimenRequirement.new(:collection_event => cpe, :specimen_type => 'Frozen Tissue')
|
22
|
+
pcl
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/views/edit.haml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
%form{ :method => 'post', :action => '/' }
|
2
|
+
- Scat::Edit.instance.fields.each do |field|
|
3
|
+
%div{ :id => field.name }
|
4
|
+
- if field.help then
|
5
|
+
%a{ :href => '#', :class => 'help' }
|
6
|
+
%img{ :src => '/images/help.png' }
|
7
|
+
%span= "<strong>#{field.label}:</strong> #{field.help}"
|
8
|
+
%label{ :for => field.input_id }= field.label
|
9
|
+
%input{ field.input_attributes(session[field.name.to_sym]) }
|
10
|
+
%input{ :type => :submit, :value => 'Save', :onclick => "document.getElementById('status_text').innerHTML='Saving the specimen...';" }
|
11
|
+
#status
|
12
|
+
%p{ :id => 'status_text' }= session[:status]
|
data/views/layout.haml
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
/[if lt IE 7]
|
2
|
+
%html{ :class => 'ie ie6', :lang => 'en' }
|
3
|
+
/[if IE 7]
|
4
|
+
%html{ :class => 'ie ie7', :lang => 'en' }
|
5
|
+
/[if IE 8]
|
6
|
+
%html{ :class => 'ie ie8', :lang => 'en' }
|
7
|
+
/[if gte IE 9|!(IE)]
|
8
|
+
%html{ :lang => 'en' }
|
9
|
+
|
10
|
+
%head
|
11
|
+
%meta{ :charset => 'utf-8' }
|
12
|
+
%meta{ :name => 'author', :content => 'OHSU' }
|
13
|
+
%meta{ :name => 'viewport', :content => 'width=device-width, initial-scale=1, maximum-scale=1' }
|
14
|
+
%title Scat
|
15
|
+
|
16
|
+
%link{ :rel => 'stylesheet', :type => 'text/css', :href => '/stylesheets/base.css' }
|
17
|
+
%link{ :rel => 'stylesheet', :type => 'text/css', :href => '/stylesheets/skeleton.css' }
|
18
|
+
%link{ :rel => 'stylesheet', :type => 'text/css', :href => '/stylesheets/layout.css' }
|
19
|
+
%link{ :rel => 'stylesheet', :type => 'text/css', :href => 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css' }
|
20
|
+
%link{ :rel => 'stylesheet', :type => 'text/css', :href => '/stylesheets/scat.css' }
|
21
|
+
|
22
|
+
/ Favicons
|
23
|
+
%link{ :rel => 'shortcut icon', :href => '/images/favicon.ico' }
|
24
|
+
%link{ :rel => 'apple-touch-icon', :href => '/images/apple-touch-icon.png' }
|
25
|
+
%link{ :rel => 'apple-touch-icon', :sizes => '72x72', :href => '/images/apple-touch-icon-72x72.png' }
|
26
|
+
%link{ :rel => 'apple-touch-icon', :sizes => '114x114', :href => '/images/apple-touch-icon-114x114.png' }
|
27
|
+
|
28
|
+
/[if lt IE 9]
|
29
|
+
%script{ :src => 'http://html5shim.googlecode.com/svn/trunk/html5.js' }
|
30
|
+
%script{ :src => 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js' }
|
31
|
+
%script{ :src => 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js' }
|
32
|
+
:javascript
|
33
|
+
$(document).ready(function() {
|
34
|
+
$("#diagnosis input").autocomplete({ minLength: 5, delay: 500, source: '/autocomplete/clinical_diagnosis' });
|
35
|
+
$("#tissue_site input").autocomplete({ minLength: 5, delay: 500, source: '/autocomplete/tissue_site' });
|
36
|
+
});
|
37
|
+
%body
|
38
|
+
.container
|
39
|
+
%h1{ :class => 'application' }= 'Scat'
|
40
|
+
#content= yield
|
metadata
ADDED
@@ -0,0 +1,216 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: caruby-scat
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 1.2.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- OHSU
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2012-07-17 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: bundler
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
type: :runtime
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: rack
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "0"
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: sinatra
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: "0"
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id003
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: haml
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: "0"
|
57
|
+
type: :runtime
|
58
|
+
version_requirements: *id004
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: redis
|
61
|
+
prerelease: false
|
62
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: "0"
|
68
|
+
type: :runtime
|
69
|
+
version_requirements: *id005
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: redis-store
|
72
|
+
prerelease: false
|
73
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: "0"
|
79
|
+
type: :runtime
|
80
|
+
version_requirements: *id006
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: jruby-openssl
|
83
|
+
prerelease: false
|
84
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: "0"
|
90
|
+
type: :runtime
|
91
|
+
version_requirements: *id007
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: caruby-small
|
94
|
+
prerelease: false
|
95
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: "0"
|
101
|
+
type: :runtime
|
102
|
+
version_requirements: *id008
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: yard
|
105
|
+
prerelease: false
|
106
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: "0"
|
112
|
+
type: :development
|
113
|
+
version_requirements: *id009
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: rake
|
116
|
+
prerelease: false
|
117
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: "0"
|
123
|
+
type: :development
|
124
|
+
version_requirements: *id010
|
125
|
+
description: Simple caTissue web application. See the home page for more information.
|
126
|
+
email: caruby.org@gmail.com
|
127
|
+
executables:
|
128
|
+
- scat
|
129
|
+
- scatseed
|
130
|
+
extensions: []
|
131
|
+
|
132
|
+
extra_rdoc_files: []
|
133
|
+
|
134
|
+
files:
|
135
|
+
- .gitignore
|
136
|
+
- Gemfile
|
137
|
+
- Gemfile.lock
|
138
|
+
- History.md
|
139
|
+
- LEGAL
|
140
|
+
- LICENSE
|
141
|
+
- README.md
|
142
|
+
- Rakefile
|
143
|
+
- bin/scat
|
144
|
+
- bin/scatseed
|
145
|
+
- caruby-scat.gemspec
|
146
|
+
- conf/fields.yaml
|
147
|
+
- conf/redis.conf
|
148
|
+
- config.ru
|
149
|
+
- ext/README.txt
|
150
|
+
- features/edit.feature
|
151
|
+
- features/step_definitions/scat_steps.rb
|
152
|
+
- features/support/env.rb
|
153
|
+
- features/support/seed.rb
|
154
|
+
- lib/scat.rb
|
155
|
+
- lib/scat/autocomplete.rb
|
156
|
+
- lib/scat/cache.rb
|
157
|
+
- lib/scat/configuration.rb
|
158
|
+
- lib/scat/edit.rb
|
159
|
+
- lib/scat/field.rb
|
160
|
+
- lib/scat/version.rb
|
161
|
+
- public/images/apple-touch-icon-114x114.png
|
162
|
+
- public/images/apple-touch-icon-72x72.png
|
163
|
+
- public/images/apple-touch-icon.png
|
164
|
+
- public/images/favicon.ico
|
165
|
+
- public/images/help.png
|
166
|
+
- public/javascripts/tabs.js
|
167
|
+
- public/robots.txt
|
168
|
+
- public/stylesheets/base.css
|
169
|
+
- public/stylesheets/layout.css
|
170
|
+
- public/stylesheets/scat.css
|
171
|
+
- public/stylesheets/skeleton.css
|
172
|
+
- redis.rdb
|
173
|
+
- spec/autocomplete_spec.rb
|
174
|
+
- spec/edit_spec.rb
|
175
|
+
- spec/spec_helper.rb
|
176
|
+
- test/fixtures/seed.rb
|
177
|
+
- views/edit.haml
|
178
|
+
- views/layout.haml
|
179
|
+
- ext/redis-server
|
180
|
+
homepage: https://github.com/caruby/scat
|
181
|
+
licenses:
|
182
|
+
- MIT
|
183
|
+
post_install_message:
|
184
|
+
rdoc_options: []
|
185
|
+
|
186
|
+
require_paths:
|
187
|
+
- lib
|
188
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
189
|
+
none: false
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: "0"
|
194
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
|
+
none: false
|
196
|
+
requirements:
|
197
|
+
- - ">="
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: "0"
|
200
|
+
requirements: []
|
201
|
+
|
202
|
+
rubyforge_project:
|
203
|
+
rubygems_version: 1.8.15
|
204
|
+
signing_key:
|
205
|
+
specification_version: 3
|
206
|
+
summary: Simple caTissue web application
|
207
|
+
test_files:
|
208
|
+
- features/edit.feature
|
209
|
+
- features/step_definitions/scat_steps.rb
|
210
|
+
- features/support/env.rb
|
211
|
+
- features/support/seed.rb
|
212
|
+
- spec/autocomplete_spec.rb
|
213
|
+
- spec/edit_spec.rb
|
214
|
+
- spec/spec_helper.rb
|
215
|
+
- test/fixtures/seed.rb
|
216
|
+
has_rdoc: yard
|