openehr-rails 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +46 -0
- data/.rspec +1 -0
- data/.travis.yml +4 -0
- data/Gemfile +3 -0
- data/Guardfile +15 -0
- data/README.rdoc +21 -0
- data/Rakefile +33 -0
- data/db/seeds.rb +7 -0
- data/doc/README_FOR_APP +2 -0
- data/lib/assets/.gitkeep +0 -0
- data/lib/generators/openehr/controller/controller_generator.rb +16 -0
- data/lib/generators/openehr/controller/templates/controller.rb +13 -0
- data/lib/generators/openehr/i18n/i18n_generator.rb +53 -0
- data/lib/generators/openehr/i18n/templates/i18n.rb +6 -0
- data/lib/generators/openehr/i18n/templates/language.yml +10 -0
- data/lib/generators/openehr/install/install_generator.rb +18 -0
- data/lib/generators/openehr/install/templates/i18n.rb +8 -0
- data/lib/generators/openehr/migration/migration_generator.rb +17 -0
- data/lib/generators/openehr/model/model_generator.rb +16 -0
- data/lib/generators/openehr/scaffold/scaffold_generator.rb +149 -0
- data/lib/generators/openehr/scaffold/templates/_form.html.erb +19 -0
- data/lib/generators/openehr/scaffold/templates/application_controller.rb +2 -0
- data/lib/generators/openehr/scaffold/templates/edit.html.erb +6 -0
- data/lib/generators/openehr/scaffold/templates/index.html.erb +28 -0
- data/lib/generators/openehr/scaffold/templates/new.html.erb +0 -0
- data/lib/generators/openehr/scaffold/templates/route.rb +2 -0
- data/lib/generators/openehr/scaffold/templates/routes.rb +2 -0
- data/lib/generators/openehr/scaffold/templates/show.html.erb +6 -0
- data/lib/generators/openehr.rb +71 -0
- data/lib/openehr/rails.rb +1 -0
- data/lib/openehr-rails/version.rb +5 -0
- data/lib/openehr-rails.rb +7 -0
- data/lib/rcomponents.rb +48 -0
- data/openehr-rails.gemspec +36 -0
- data/spec/generators/openehr/archetyped_base_spec.rb +47 -0
- data/spec/generators/openehr/controller/controller_generator_spec.rb +9 -0
- data/spec/generators/openehr/i18n/i18n_generator_spec.rb +62 -0
- data/spec/generators/openehr/install/install_generator_spec.rb +15 -0
- data/spec/generators/openehr/migration/migration_generator_spec.rb +16 -0
- data/spec/generators/openehr/scaffold/scaffold_generator_spec.rb +70 -0
- data/spec/generators/templates/openEHR-EHR-OBSERVATION.blood_pressure.v1.adl +1021 -0
- data/spec/rcomponents/relement_spec.rb +21 -0
- data/spec/rcomponents/robservation_spec.rb +21 -0
- data/spec/spec_helper.rb +18 -0
- metadata +257 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rcomponents'
|
3
|
+
|
4
|
+
describe OpenEHR::RComponents::RElement do
|
5
|
+
before(:each) do
|
6
|
+
@relement =
|
7
|
+
OpenEHR::RComponents::RElement.new(:node_id => 'at0004', :path => '/data[at0004]', :rm_type_name => "ELEMENT")
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should be an instance of RElement' do
|
11
|
+
@relement.should be_an_instance_of OpenEHR::RComponents::RElement
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'node_id is at0004' do
|
15
|
+
@relement.node_id.should eq 'at0004'
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'path is /data[at0004]' do
|
19
|
+
@relement.path.should eq '/data[at0004]'
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rcomponents'
|
3
|
+
|
4
|
+
describe OpenEHR::RComponents::RObservation do
|
5
|
+
before(:each) do
|
6
|
+
@robservation =
|
7
|
+
OpenEHR::RComponents::RObservation.new(node_id: double('node_id'),
|
8
|
+
path: double('path'),
|
9
|
+
rm_type_name: 'OBSERVATION',
|
10
|
+
protocol: 'dummy protocol',
|
11
|
+
state: 'dummy state')
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'protocol is properly assigned' do
|
15
|
+
@robservation.protocol.should eq 'dummy protocol'
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'state is properly assigned' do
|
19
|
+
@robservation.state.should eq 'dummy state'
|
20
|
+
end
|
21
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rails/all'
|
2
|
+
require 'ammeter/init'
|
3
|
+
require 'spork'
|
4
|
+
|
5
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
6
|
+
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
7
|
+
require 'openehr/rails'
|
8
|
+
|
9
|
+
require 'simplecov'
|
10
|
+
|
11
|
+
Spork.prefork do
|
12
|
+
SimpleCov.start
|
13
|
+
end
|
14
|
+
|
15
|
+
Spork.each_run do
|
16
|
+
|
17
|
+
end
|
18
|
+
|
metadata
ADDED
@@ -0,0 +1,257 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: openehr-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Shinji KOBAYASHI
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-07-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: openehr
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.2.14
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.2.14
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 4.0.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 4.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: ammeter
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-rails
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: guard
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: guard-rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard-spork
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: listen
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - '='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.6'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.6'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: libnotify
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - '>='
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
description: This product is a Rails extansion for openEHR
|
182
|
+
email: skoba@moss.gr.jp
|
183
|
+
executables: []
|
184
|
+
extensions: []
|
185
|
+
extra_rdoc_files:
|
186
|
+
- README.rdoc
|
187
|
+
files:
|
188
|
+
- .gitignore
|
189
|
+
- .rspec
|
190
|
+
- .travis.yml
|
191
|
+
- Gemfile
|
192
|
+
- Guardfile
|
193
|
+
- README.rdoc
|
194
|
+
- Rakefile
|
195
|
+
- db/seeds.rb
|
196
|
+
- doc/README_FOR_APP
|
197
|
+
- lib/assets/.gitkeep
|
198
|
+
- lib/generators/openehr.rb
|
199
|
+
- lib/generators/openehr/controller/controller_generator.rb
|
200
|
+
- lib/generators/openehr/controller/templates/controller.rb
|
201
|
+
- lib/generators/openehr/i18n/i18n_generator.rb
|
202
|
+
- lib/generators/openehr/i18n/templates/i18n.rb
|
203
|
+
- lib/generators/openehr/i18n/templates/language.yml
|
204
|
+
- lib/generators/openehr/install/install_generator.rb
|
205
|
+
- lib/generators/openehr/install/templates/i18n.rb
|
206
|
+
- lib/generators/openehr/migration/migration_generator.rb
|
207
|
+
- lib/generators/openehr/model/model_generator.rb
|
208
|
+
- lib/generators/openehr/scaffold/scaffold_generator.rb
|
209
|
+
- lib/generators/openehr/scaffold/templates/_form.html.erb
|
210
|
+
- lib/generators/openehr/scaffold/templates/application_controller.rb
|
211
|
+
- lib/generators/openehr/scaffold/templates/edit.html.erb
|
212
|
+
- lib/generators/openehr/scaffold/templates/index.html.erb
|
213
|
+
- lib/generators/openehr/scaffold/templates/new.html.erb
|
214
|
+
- lib/generators/openehr/scaffold/templates/route.rb
|
215
|
+
- lib/generators/openehr/scaffold/templates/routes.rb
|
216
|
+
- lib/generators/openehr/scaffold/templates/show.html.erb
|
217
|
+
- lib/openehr-rails.rb
|
218
|
+
- lib/openehr-rails/version.rb
|
219
|
+
- lib/openehr/rails.rb
|
220
|
+
- lib/rcomponents.rb
|
221
|
+
- openehr-rails.gemspec
|
222
|
+
- spec/generators/openehr/archetyped_base_spec.rb
|
223
|
+
- spec/generators/openehr/controller/controller_generator_spec.rb
|
224
|
+
- spec/generators/openehr/i18n/i18n_generator_spec.rb
|
225
|
+
- spec/generators/openehr/install/install_generator_spec.rb
|
226
|
+
- spec/generators/openehr/migration/migration_generator_spec.rb
|
227
|
+
- spec/generators/openehr/scaffold/scaffold_generator_spec.rb
|
228
|
+
- spec/generators/templates/openEHR-EHR-OBSERVATION.blood_pressure.v1.adl
|
229
|
+
- spec/rcomponents/relement_spec.rb
|
230
|
+
- spec/rcomponents/robservation_spec.rb
|
231
|
+
- spec/spec_helper.rb
|
232
|
+
homepage: http://openehr.jp
|
233
|
+
licenses:
|
234
|
+
- Apache 2.0
|
235
|
+
metadata: {}
|
236
|
+
post_install_message:
|
237
|
+
rdoc_options: []
|
238
|
+
require_paths:
|
239
|
+
- lib
|
240
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
241
|
+
requirements:
|
242
|
+
- - '>='
|
243
|
+
- !ruby/object:Gem::Version
|
244
|
+
version: '0'
|
245
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
246
|
+
requirements:
|
247
|
+
- - '>='
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: '0'
|
250
|
+
requirements: []
|
251
|
+
rubyforge_project:
|
252
|
+
rubygems_version: 2.0.6
|
253
|
+
signing_key:
|
254
|
+
specification_version: 4
|
255
|
+
summary: Rails extension for the openEHR archetypes
|
256
|
+
test_files: []
|
257
|
+
has_rdoc:
|