caruby-tissue 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +11 -7
- data/lib/catissue/annotation/annotatable_class.rb +18 -1
- data/lib/catissue/annotation/annotation.rb +5 -0
- data/lib/catissue/annotation/annotation_class.rb +15 -3
- data/lib/catissue/annotation/proxy_class.rb +2 -1
- data/lib/catissue/database/annotation/annotation_service.rb +13 -6
- data/lib/catissue/database/annotation/annotator.rb +3 -1
- data/lib/catissue/database/annotation/entity_facade.rb +21 -29
- data/lib/catissue/database/annotation/integration_service.rb +6 -4
- data/lib/catissue/database.rb +2 -2
- data/lib/catissue/domain/abstract_domain_object.rb +1 -1
- data/lib/catissue/domain/abstract_position.rb +1 -1
- data/lib/catissue/domain/abstract_specimen.rb +1 -1
- data/lib/catissue/domain/abstract_specimen_collection_group.rb +1 -1
- data/lib/catissue/domain/address.rb +1 -1
- data/lib/catissue/domain/cancer_research_group.rb +1 -1
- data/lib/catissue/domain/capacity.rb +1 -1
- data/lib/catissue/domain/check_in_check_out_event_parameter.rb +1 -1
- data/lib/catissue/domain/collection_event_parameters.rb +1 -1
- data/lib/catissue/domain/collection_protocol.rb +1 -1
- data/lib/catissue/domain/collection_protocol_event.rb +1 -1
- data/lib/catissue/domain/collection_protocol_registration.rb +1 -1
- data/lib/catissue/domain/consent_tier_response.rb +1 -1
- data/lib/catissue/domain/consent_tier_status.rb +1 -1
- data/lib/catissue/domain/container.rb +1 -1
- data/lib/catissue/domain/container_position.rb +4 -2
- data/lib/catissue/domain/container_type.rb +1 -1
- data/lib/catissue/domain/department.rb +1 -1
- data/lib/catissue/domain/disposal_event_parameters.rb +1 -1
- data/lib/catissue/domain/embedded_event_parameters.rb +1 -1
- data/lib/catissue/domain/external_identifier.rb +1 -1
- data/lib/catissue/domain/frozen_event_parameters.rb +1 -1
- data/lib/catissue/domain/institution.rb +1 -1
- data/lib/catissue/domain/new_specimen_array_order_item.rb +1 -1
- data/lib/catissue/domain/order_details.rb +1 -1
- data/lib/catissue/domain/participant.rb +2 -2
- data/lib/catissue/domain/participant_medical_identifier.rb +1 -1
- data/lib/catissue/domain/password.rb +1 -1
- data/lib/catissue/domain/race.rb +1 -1
- data/lib/catissue/domain/received_event_parameters.rb +1 -1
- data/lib/catissue/domain/site.rb +1 -1
- data/lib/catissue/domain/specimen.rb +49 -40
- data/lib/catissue/domain/specimen_array.rb +1 -1
- data/lib/catissue/domain/specimen_array_content.rb +1 -1
- data/lib/catissue/domain/specimen_array_type.rb +1 -1
- data/lib/catissue/domain/specimen_characteristics.rb +1 -1
- data/lib/catissue/domain/specimen_collection_group.rb +7 -7
- data/lib/catissue/domain/specimen_event_parameters.rb +6 -6
- data/lib/catissue/domain/specimen_position.rb +1 -1
- data/lib/catissue/domain/specimen_protocol.rb +1 -1
- data/lib/catissue/domain/specimen_requirement.rb +13 -13
- data/lib/catissue/domain/storage_container.rb +1 -1
- data/lib/catissue/domain/storage_type.rb +1 -1
- data/lib/catissue/domain/transfer_event_parameters.rb +1 -1
- data/lib/catissue/domain/user.rb +1 -1
- data/lib/catissue/migration/migrator.rb +2 -2
- data/lib/catissue/version.rb +1 -1
- data/test/lib/catissue/domain/specimen_test.rb +241 -242
- data/test/lib/catissue/test_case.rb +11 -7
- metadata +3 -4
- data/examples/galena/lib/galena/cli/seed.rb +0 -22
@@ -124,13 +124,14 @@ module CaTissue
|
|
124
124
|
|
125
125
|
def verify_dependency(dependent)
|
126
126
|
return if dependent.class.owner_attribute.nil?
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
127
|
+
# kludge for annotation proxy nonsense (cf. Annotation#owner)
|
128
|
+
ownr = Annotation === dependent ? (dependent.hook or dependent.owner) : dependent.owner
|
129
|
+
assert_not_nil(ownr, "Owner missing for dependent: #{dependent}")
|
130
|
+
attribute = ownr.class.dependent_attribute(dependent.class)
|
131
|
+
assert_not_nil(attribute, "Dependent attribute missing for #{dependent} owner #{ownr}")
|
131
132
|
# a dependent collection reference must be refetched
|
132
|
-
if
|
133
|
-
verify_saved_dependent_collection_member(dependent,
|
133
|
+
if ownr.class.collection_attribute?(attribute) then
|
134
|
+
verify_saved_dependent_collection_member(dependent, ownr, attribute)
|
134
135
|
else
|
135
136
|
assert_not_nil(dependent.identifier, "Stored dependent #{dependent} identifier is not set")
|
136
137
|
end
|
@@ -138,9 +139,12 @@ module CaTissue
|
|
138
139
|
|
139
140
|
# Verifies that the given dependent has an identifier and that the given owner dependent attribute value
|
140
141
|
# contains the dependent.
|
142
|
+
#
|
143
|
+
# JRuby alert - Set include? incorrectly returns false in the OHSU PSR samples_test test_save_grade
|
144
|
+
# call to this method. Work around by using Set detect rather than include?.
|
141
145
|
def verify_saved_dependent_collection_member(dependent, owner, attribute)
|
142
146
|
deps = owner.send(attribute)
|
143
|
-
assert(deps.
|
147
|
+
assert(deps.detect { |dep| dep == dependent }, "Owner #{owner.qp} #{attribute} value #{deps.pp_s} does not contain #{dependent}")
|
144
148
|
assert_not_nil(dependent.identifier, "Identifier not set for stored owner #{owner.qp} #{attribute} dependent collection member #{dependent}")
|
145
149
|
end
|
146
150
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: caruby-tissue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.3.
|
5
|
+
version: 1.3.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- OHSU
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-03-04 00:00:00 -08:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -67,7 +67,6 @@ files:
|
|
67
67
|
- examples/galena/data/simple.csv
|
68
68
|
- examples/galena/data/small.csv
|
69
69
|
- examples/galena/lib/galena.rb
|
70
|
-
- examples/galena/lib/galena/cli/seed.rb
|
71
70
|
- examples/galena/lib/galena/migration/filter_shims.rb
|
72
71
|
- examples/galena/lib/galena/migration/frozen_shims.rb
|
73
72
|
- examples/galena/lib/galena/seed/defaults.rb
|
@@ -232,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
232
231
|
requirements: []
|
233
232
|
|
234
233
|
rubyforge_project: caruby
|
235
|
-
rubygems_version: 1.5.
|
234
|
+
rubygems_version: 1.5.3
|
236
235
|
signing_key:
|
237
236
|
specification_version: 3
|
238
237
|
summary: Ruby facade for caTissue.
|
@@ -1,22 +0,0 @@
|
|
1
|
-
#!/usr/bin/env jruby
|
2
|
-
#
|
3
|
-
|
4
|
-
# load the required gems
|
5
|
-
require 'rubygems'
|
6
|
-
begin
|
7
|
-
gem 'caruby-tissue'
|
8
|
-
rescue LoadError
|
9
|
-
# if the gem is not available, then try a local source
|
10
|
-
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
11
|
-
$:.unshift File.join(File.dirname(__FILE__), '..', 'examples', 'galena', 'lib')
|
12
|
-
end
|
13
|
-
|
14
|
-
# the default log file
|
15
|
-
DEF_LOG_FILE = 'log/migration.log'
|
16
|
-
|
17
|
-
require 'catissue'
|
18
|
-
require 'catissue/cli/command'
|
19
|
-
|
20
|
-
require 'galena/seed/defaults'
|
21
|
-
|
22
|
-
CaTissue::Command.new.execute { Galena::Seed.defaults.ensure_exists }
|