caruby-core 1.5.2 → 1.5.3
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/History.md +4 -0
- data/lib/caruby/cli/application.rb +1 -1
- data/lib/caruby/csv/csvio.rb +2 -2
- data/lib/caruby/database.rb +6 -7
- data/lib/caruby/database/persistable.rb +8 -9
- data/lib/caruby/database/persistence_service.rb +1 -1
- data/lib/caruby/database/reader.rb +1 -1
- data/lib/caruby/database/search_template_builder.rb +1 -1
- data/lib/caruby/database/store_template_builder.rb +6 -6
- data/lib/caruby/domain/attribute.rb +3 -3
- data/lib/caruby/domain/importer.rb +1 -1
- data/lib/caruby/domain/merge.rb +2 -2
- data/lib/caruby/domain/reference_visitor.rb +2 -2
- data/lib/caruby/migration/migratable.rb +4 -4
- data/lib/caruby/migration/migrator.rb +1 -1
- data/lib/caruby/resource.rb +9 -9
- data/lib/caruby/util/collection.rb +1 -1
- data/lib/caruby/version.rb +1 -1
- data/test/lib/caruby/test_case.rb +1 -1
- metadata +4 -4
data/History.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
This history lists major release themes. See the GitHub Commits (https://github.com/caruby/core)
|
2
2
|
for change details.
|
3
3
|
|
4
|
+
1.5.3 / 2011-07-08
|
5
|
+
------------------
|
6
|
+
* Clean up documentation.
|
7
|
+
|
4
8
|
1.5.2 / 2011-07-06
|
5
9
|
------------------
|
6
10
|
* Minor gem build improvement.
|
@@ -3,7 +3,7 @@ require 'caruby/util/log'
|
|
3
3
|
|
4
4
|
module CaRuby
|
5
5
|
module CLI
|
6
|
-
# Extends the standard Logger::Application to use the {
|
6
|
+
# Extends the standard Logger::Application to use the {Log} and add start
|
7
7
|
# functionality.
|
8
8
|
class Application < Logger::Application
|
9
9
|
# @param [String] appname the application name
|
data/lib/caruby/csv/csvio.rb
CHANGED
@@ -14,7 +14,7 @@ module CaRuby
|
|
14
14
|
# * allow one custom converter with different semantics: if the converter block
|
15
15
|
# call returns nil, then continue conversion, otherwise return the converter
|
16
16
|
# result. This differs from FasterCSV converter semantics which calls converters
|
17
|
-
# as long the result
|
17
|
+
# as long the result equals the input field value. The CsvIO converter semantics
|
18
18
|
# supports converters that intend a String result to be the converted result.
|
19
19
|
#
|
20
20
|
# CsvIO is Enumerable, but does not implement the complete Ruby IO interface.
|
@@ -38,7 +38,7 @@ module CaRuby
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
#
|
41
|
+
# Opens the given CSV file and calls {#each} with the given block.
|
42
42
|
#
|
43
43
|
# @param (see #initialize)
|
44
44
|
# @option (see #initialize)
|
data/lib/caruby/database.rb
CHANGED
@@ -24,9 +24,9 @@ module CaRuby
|
|
24
24
|
#
|
25
25
|
# Database strives to provide a simple WYEIWYG (What You Expect Is What You Get) API, consisting of
|
26
26
|
# the following workhorse methods:
|
27
|
-
# * {
|
28
|
-
# * {
|
29
|
-
# * {
|
27
|
+
# * {Reader#query} - fetch domain objects which match a template
|
28
|
+
# * {Reader#find} - fetch a specific domain object by key
|
29
|
+
# * {Writer#save} - if a domain object exists in the database, then update it, otherwise create it
|
30
30
|
#
|
31
31
|
# Any domain object can serve as a query argument. If an optional attribute path is specified, then
|
32
32
|
# that path is followed to the result, e.g.:
|
@@ -36,10 +36,10 @@ module CaRuby
|
|
36
36
|
# A domain object find argument must contain enough data to determine whether it exists in the database,
|
37
37
|
# i.e. the find argument has a database identifier or a complete secondary key.
|
38
38
|
#
|
39
|
-
# The {
|
39
|
+
# The {Writer#save} method creates or updates references as necessary to persist its argument domain object.
|
40
40
|
# It is not necessary to fetch references first or follow dependency ordering rules, which can be
|
41
41
|
# implicit and tortuous in caBIG applications. Build the object you want to persist and call the
|
42
|
-
# store method.
|
42
|
+
# store method. {Resource} sets reasonable default values, recognizes application dependencies and steers
|
43
43
|
# around caBIG idiosyncracies to the extent possible.
|
44
44
|
class Database
|
45
45
|
include Reader, Writer, Persistifier
|
@@ -92,8 +92,7 @@ module CaRuby
|
|
92
92
|
#
|
93
93
|
# This bug might be a low-level JRuby-Java-caCORE-Hibernate confusion where something in
|
94
94
|
# caCORE stomps on an existing JRuby object graph. To reproduce, move the appService call
|
95
|
-
# to the start_session method and run
|
96
|
-
# verify_save(:biopsy, BIOPSY_OPTS) line commented out.
|
95
|
+
# to the start_session method and run the +PSBIN::MigrationTest+ biopsy save test case.
|
97
96
|
#
|
98
97
|
# @param [String] service_name the name of the default {PersistenceService}
|
99
98
|
# @param [{Symbol => String}] opts access options
|
@@ -8,8 +8,7 @@ module CaRuby
|
|
8
8
|
# The Persistable mixin adds persistance capability. Every instance which includes Persistable
|
9
9
|
# must respond to an overrided {#database} method.
|
10
10
|
module Persistable
|
11
|
-
# @return [{Symbol => Object}] the content value hash at the point of the last
|
12
|
-
# call
|
11
|
+
# @return [{Symbol => Object}] the content value hash at the point of the last snapshot
|
13
12
|
attr_reader :snapshot
|
14
13
|
|
15
14
|
# @param [Resource, <Resource>, nil] obj the object(s) to check
|
@@ -198,8 +197,8 @@ module CaRuby
|
|
198
197
|
end
|
199
198
|
|
200
199
|
# Returns the attributes to load on demand. The base attribute list is given by the
|
201
|
-
# {Attributes#loadable_attributes} whose value is nil or empty.
|
202
|
-
# In addition, if this Persistable has more than one {Dependency#owner_attributes}
|
200
|
+
# {Domain::Attributes#loadable_attributes} whose value is nil or empty.
|
201
|
+
# In addition, if this Persistable has more than one {Domain::Dependency#owner_attributes}
|
203
202
|
# and one is non-nil, then none of the owner attributes are loaded on demand,
|
204
203
|
# since there can be at most one owner and ownership cannot change.
|
205
204
|
#
|
@@ -233,7 +232,7 @@ module CaRuby
|
|
233
232
|
end
|
234
233
|
|
235
234
|
# Returns this domain object's attributes which must be fetched to reflect the database state.
|
236
|
-
# This default implementation returns the {Attributes#autogenerated_logical_dependent_attributes}
|
235
|
+
# This default implementation returns the {Domain::Attributes#autogenerated_logical_dependent_attributes}
|
237
236
|
# if this domain object does not have an identifier, or an empty array otherwise.
|
238
237
|
# Subclasses can override to relax or restrict the condition.
|
239
238
|
#
|
@@ -262,11 +261,11 @@ module CaRuby
|
|
262
261
|
end
|
263
262
|
end
|
264
263
|
|
265
|
-
# Relaxes the {
|
264
|
+
# Relaxes the {#saved_fetch_attributes} condition for a SCG as follows:
|
266
265
|
# * If the SCG status was updated from +Pending+ to +Collected+, then fetch the saved SCG event parameters.
|
267
266
|
#
|
268
|
-
# @param (see
|
269
|
-
# @return (see
|
267
|
+
# @param (see #saved_fetch_attributes)
|
268
|
+
# @return (see #saved_fetch_attributes)
|
270
269
|
def autogenerated?(operation)
|
271
270
|
operation == :update && status_changed_to_complete? ? EVENT_PARAM_ATTRS : super
|
272
271
|
end
|
@@ -309,7 +308,7 @@ module CaRuby
|
|
309
308
|
ag_attrs.any? { |attr| not send(attr).nil_or_empty? }
|
310
309
|
end
|
311
310
|
|
312
|
-
# Sets the {Attributes#volatile_nondomain_attributes} to the other fetched value,
|
311
|
+
# Sets the {Domain::Attributes#volatile_nondomain_attributes} to the other fetched value,
|
313
312
|
# if different.
|
314
313
|
#
|
315
314
|
# @param [Resource] other the fetched domain object reflecting the database state
|
@@ -17,7 +17,7 @@ module CaRuby
|
|
17
17
|
# The service name.
|
18
18
|
attr_reader :name
|
19
19
|
|
20
|
-
# The {
|
20
|
+
# The {Stopwatch} which captures the time spent in database operations performed by the application service.
|
21
21
|
attr_reader :timer
|
22
22
|
|
23
23
|
# Creates a new PersistenceService with the specified application service name and options.
|
@@ -32,7 +32,7 @@ module CaRuby
|
|
32
32
|
# is a String, then the HQL statement String is executed.
|
33
33
|
#
|
34
34
|
# Otherwise, the query condition is determined by the values set in the template.
|
35
|
-
# The non-nil {Attributes#searchable_attributes} are used in the query.
|
35
|
+
# The non-nil {Domain::Attributes#searchable_attributes} are used in the query.
|
36
36
|
#
|
37
37
|
# The optional path arguments are attribute symbols from the template to the
|
38
38
|
# destination class, e.g.:
|
@@ -5,7 +5,7 @@ module CaRuby
|
|
5
5
|
# SearchTemplateBuilder builds a template suitable for a caCORE saarch database operation.
|
6
6
|
class SearchTemplateBuilder
|
7
7
|
# Returns a template for matching the domain object obj and the optional hash values.
|
8
|
-
# The default hash attributes are the {Attributes#searchable_attributes}.
|
8
|
+
# The default hash attributes are the {Domain::Attributes#searchable_attributes}.
|
9
9
|
# The template includes only the non-domain attributes of the hash references.
|
10
10
|
#
|
11
11
|
# @quirk caCORE Because of caCORE API limitations, the obj searchable attribute
|
@@ -7,7 +7,7 @@ module CaRuby
|
|
7
7
|
# the template are determined by the block given to this initializer, filtered as follows:
|
8
8
|
# * If the save operation is a create, then exclude the auto-generated attributes.
|
9
9
|
# * If the visited object has an identifier, then include only those attributes
|
10
|
-
# which {Attribute#cascade_update_to_create?} or have an identifier.
|
10
|
+
# which {Domain::Attribute#cascade_update_to_create?} or have an identifier.
|
11
11
|
#
|
12
12
|
# @param [Database] database the target database
|
13
13
|
# @yield [ref] the required selector block which determines which attributes are copied into the template
|
@@ -113,11 +113,11 @@ module CaRuby
|
|
113
113
|
|
114
114
|
# Returns the attributes to visit in building the template for the given
|
115
115
|
# domain object. The visitable attributes consist of the following:
|
116
|
-
# * The {Attributes#unproxied_savable_template_attributes} filtered as follows:
|
116
|
+
# * The {Domain::Attributes#unproxied_savable_template_attributes} filtered as follows:
|
117
117
|
# * If the database operation is a create, then exclude the cascaded attributes.
|
118
118
|
# * If the given object has an identifier, then exclude the attributes which
|
119
119
|
# have the the :no_cascade_update_to_create flag set.
|
120
|
-
# * The {Attributes#proxied_savable_template_attributes} are included if and
|
120
|
+
# * The {Domain::Attributes#proxied_savable_template_attributes} are included if and
|
121
121
|
# only if every referenced object has an identifier, and therefore does not
|
122
122
|
# need to be proxied.
|
123
123
|
#
|
@@ -139,7 +139,7 @@ module CaRuby
|
|
139
139
|
|
140
140
|
# Filters the given attributes, if necessary, to exclude attributes as follows:
|
141
141
|
# * If the save operation is a create, then exclude the
|
142
|
-
# {Attribute#autogenerated_on_create?} attributes.
|
142
|
+
# {Domain::Attribute#autogenerated_on_create?} attributes.
|
143
143
|
#
|
144
144
|
# @param [Resource] obj the visited domain object
|
145
145
|
# @param [Attributes::Filter] the savable attribute filter
|
@@ -155,7 +155,7 @@ module CaRuby
|
|
155
155
|
# Composes the given attributes, if necessary, to exclude attributes as follows:
|
156
156
|
# * If the save operation is a create, then exclude the auto-generated attributes.
|
157
157
|
# * If the visited object has an identifier, then include only those attributes
|
158
|
-
# which {Attribute#cascade_update_to_create?} or have an identifier.
|
158
|
+
# which {Domain::Attribute#cascade_update_to_create?} or have an identifier.
|
159
159
|
#
|
160
160
|
# @param (see #mergeable_attributes)
|
161
161
|
# @return (see #mergeable_attributes)
|
@@ -196,7 +196,7 @@ module CaRuby
|
|
196
196
|
# rather than the desired cascaded state. Play along with this bizarre
|
197
197
|
# mechanism by adding our own bizarre work-around mechanism to copy a
|
198
198
|
# proxied reference only if it has an identifier. This works only because
|
199
|
-
# another work-around in the #{
|
199
|
+
# another work-around in the #{Writer} updates proxied
|
200
200
|
# references via the proxy create before building the update template.
|
201
201
|
def copy_proxied_save_references(obj, template)
|
202
202
|
return unless obj.identifier
|
@@ -245,7 +245,7 @@ module CaRuby
|
|
245
245
|
@flags.include?(:autogenerated) or @flags.include?(:autogenerated_on_update)
|
246
246
|
end
|
247
247
|
|
248
|
-
# Returns whether the the subject attribute is #
|
248
|
+
# Returns whether the the subject attribute is {#autogenerated?} for create. An attribute is
|
249
249
|
# auto-generated for create if the +:autogenerate+ flag is set and the
|
250
250
|
# +:autogenerated_on_update+ flag is not set.
|
251
251
|
#
|
@@ -307,7 +307,7 @@ module CaRuby
|
|
307
307
|
|
308
308
|
# A Java attribute is an uncreated dependent if any of the following conditions hold:
|
309
309
|
# * the attribute is a {#logical?} dependent
|
310
|
-
# * the attribute is a #dependent? which is not {#creatable?}
|
310
|
+
# * the attribute is a {#dependent?} which is not {#creatable?}
|
311
311
|
#
|
312
312
|
# @return [Boolean] whether this attribute is saved in a create operation
|
313
313
|
def uncreated_dependent?
|
@@ -333,7 +333,7 @@ module CaRuby
|
|
333
333
|
cascaded? or @flags.include?(:include_in_save_template)
|
334
334
|
end
|
335
335
|
|
336
|
-
# Returns whether this attribute is #{#cascaded} and cascades a parent update to a child
|
336
|
+
# Returns whether this attribute is #{#cascaded?} and cascades a parent update to a child
|
337
337
|
# create. This corresponds to the Hibernate +save-update+ cascade style but not the Hibernate
|
338
338
|
# +all+ cascade style.
|
339
339
|
#
|
@@ -79,7 +79,7 @@ module CaRuby
|
|
79
79
|
end
|
80
80
|
|
81
81
|
# Configures this importer with the given options. This method is intended for use by the
|
82
|
-
#
|
82
|
+
# +extend_module+ method.
|
83
83
|
#
|
84
84
|
# @param [{Symbol => Object}] opts the extension options
|
85
85
|
# @option opts [String] :package the required Java package name
|
data/lib/caruby/domain/merge.rb
CHANGED
@@ -20,13 +20,13 @@ module CaRuby
|
|
20
20
|
#
|
21
21
|
# If other is not a Hash, then the other object's attributes values are merged into
|
22
22
|
# this object. The default attributes is this mergeable's class
|
23
|
-
# {Attributes#mergeable_attributes}.
|
23
|
+
# {Domain::Attributes#mergeable_attributes}.
|
24
24
|
#
|
25
25
|
# The merge is performed by calling {#merge_attribute} on each attribute with the matches
|
26
26
|
# and merger block given to this method.
|
27
27
|
#
|
28
28
|
# @param [Mergeable, {Symbol => Object}] other the source domain object or value hash to merge from
|
29
|
-
# @param [<Symbol>, nil] attributes the attributes to merge (default {Attributes#nondomain_attributes})
|
29
|
+
# @param [<Symbol>, nil] attributes the attributes to merge (default {Domain::Attributes#nondomain_attributes})
|
30
30
|
# @param [{Resource => Resource}, nil] the optional merge source => target reference matches
|
31
31
|
# @yield [attribute, oldval, newval] the optional merger block
|
32
32
|
# @yieldparam [Symbol] attribute the merge target attribute
|
@@ -21,7 +21,7 @@ module CaRuby
|
|
21
21
|
# Creates a new ReferenceVisitor on domain reference attributes.
|
22
22
|
#
|
23
23
|
# If a selector block is given to this initializer, then the reference attributes to visit
|
24
|
-
# are determined by calling the block. Otherwise, the {Attributes#saved_domain_attributes}
|
24
|
+
# are determined by calling the block. Otherwise, the {Domain::Attributes#saved_domain_attributes}
|
25
25
|
# are visited.
|
26
26
|
#
|
27
27
|
# @param options (see Visitor#initialize)
|
@@ -70,7 +70,7 @@ module CaRuby
|
|
70
70
|
end
|
71
71
|
|
72
72
|
# Adds a default matcher block if necessary and delegates to {Visitor#sync}. The default matcher block
|
73
|
-
# calls {
|
73
|
+
# calls {Resource#match_in} to match the candidate domain objects to visit.
|
74
74
|
#
|
75
75
|
# @yield [ref, others] matches ref in others (optional)
|
76
76
|
# @yieldparam [Resource] ref the domain object to match
|
@@ -79,8 +79,8 @@ module CaRuby
|
|
79
79
|
# Subclasses can modify this method to complete the migration. The overridden
|
80
80
|
# methods should call +super+ to pick up the superclass migration.
|
81
81
|
#
|
82
|
-
# @param [
|
83
|
-
# @param [
|
82
|
+
# @param [{Symbol => Object}] row the input row field => value hash
|
83
|
+
# @param [<Resource>] migrated the migrated instances, including this domain object
|
84
84
|
def migrate(row, migrated)
|
85
85
|
end
|
86
86
|
|
@@ -102,8 +102,8 @@ module CaRuby
|
|
102
102
|
# for the _attribute_ to modify.
|
103
103
|
#
|
104
104
|
# The migratable reference attributes consist of the non-collection
|
105
|
-
# {Attributes#saved_independent_attributes} and
|
106
|
-
# {Attributes#unidirectional_dependent_attributes} which don't already have a value.
|
105
|
+
# {Domain::Attributes#saved_independent_attributes} and
|
106
|
+
# {Domain::Attributes#unidirectional_dependent_attributes} which don't already have a value.
|
107
107
|
# For each such migratable attribute, if there is a single instance of the attribute
|
108
108
|
# type in the given migrated domain objects, then the attribute is set to that
|
109
109
|
# migrated instance.
|
@@ -27,7 +27,7 @@ module CaRuby
|
|
27
27
|
# Creates a new Migrator.
|
28
28
|
#
|
29
29
|
# @param [{Symbol => Object}] opts the migration options
|
30
|
-
# @option opts [String] :database required application {
|
30
|
+
# @option opts [String] :database required application {Database}
|
31
31
|
# @option opts [String] :target required target domain class
|
32
32
|
# @option opts [String] :mapping required input field => caTissue attribute mapping file
|
33
33
|
# @option opts [String] :defaults optional caTissue attribute => value default mapping file
|
data/lib/caruby/resource.rb
CHANGED
@@ -40,7 +40,7 @@ module CaRuby
|
|
40
40
|
|
41
41
|
# Sets the default attribute values for this domain object and its dependents. If this Resource
|
42
42
|
# does not have an identifier, then missing attributes are set to the values defined by
|
43
|
-
# {Attributes#add_attribute_defaults}.
|
43
|
+
# {Domain::Attributes#add_attribute_defaults}.
|
44
44
|
#
|
45
45
|
# Subclasses should override the private {#add_defaults_local} method rather than this method.
|
46
46
|
#
|
@@ -62,12 +62,12 @@ module CaRuby
|
|
62
62
|
add_defaults_recursive
|
63
63
|
end
|
64
64
|
|
65
|
-
# Validates this domain object and its #{Attributes
|
65
|
+
# Validates this domain object and its #{Domain::Attributes#unproxied_savable_template_attributes}
|
66
66
|
# for completeness prior to a database create operation.
|
67
67
|
# An object without an identifer is valid if it contains a non-nil value for each mandatory property.
|
68
68
|
# Objects which have an identifier or have already been validated are skipped.
|
69
69
|
#
|
70
|
-
# Subclasses should not override this method, but override the private {#
|
70
|
+
# Subclasses should not override this method, but override the private {#validate_local} instead.
|
71
71
|
#
|
72
72
|
# @return [Resource] this domain object
|
73
73
|
# @raise (see #validate_local)
|
@@ -120,7 +120,7 @@ module CaRuby
|
|
120
120
|
# Returns a new domain object with the given attributes copied from this domain object.
|
121
121
|
# The attributes argument consists of either attribute Symbols or a single Enumerable
|
122
122
|
# consisting of Symbols.
|
123
|
-
# The default attributes are the {Attributes#nondomain_attributes}.
|
123
|
+
# The default attributes are the {Domain::Attributes#nondomain_attributes}.
|
124
124
|
#
|
125
125
|
# @param [<Symbol>, (<Symbol>)] attributes the attributes to copy
|
126
126
|
# @return [Resource] a copy of this domain object
|
@@ -135,7 +135,7 @@ module CaRuby
|
|
135
135
|
end
|
136
136
|
|
137
137
|
# Clears the given attribute value. If the current value responds to the +clear+ method,
|
138
|
-
# then the current value is cleared. Otherwise, the value is set to {Metadata#empty_value}.
|
138
|
+
# then the current value is cleared. Otherwise, the value is set to {Domain::Metadata#empty_value}.
|
139
139
|
#
|
140
140
|
# @param [Symbol] attribute the attribute to clear
|
141
141
|
def clear_attribute(attribute)
|
@@ -213,7 +213,7 @@ module CaRuby
|
|
213
213
|
end
|
214
214
|
|
215
215
|
# Returns an attribute => value hash for the specified attributes with a non-nil, non-empty value.
|
216
|
-
# The default attributes are this domain object's class {Attributes#attributes}.
|
216
|
+
# The default attributes are this domain object's class {Domain::Attributes#attributes}.
|
217
217
|
# Only non-nil attributes defined by this Resource are included in the result hash.
|
218
218
|
#
|
219
219
|
# @param [<Symbol>, nil] attributes the attributes to merge
|
@@ -258,7 +258,7 @@ module CaRuby
|
|
258
258
|
end
|
259
259
|
|
260
260
|
# Returns the attributes which are required for save. This base implementation returns the
|
261
|
-
# class {Attributes#mandatory_attributes}. Subclasses can override this method
|
261
|
+
# class {Domain::Attributes#mandatory_attributes}. Subclasses can override this method
|
262
262
|
# for domain object state-specific refinements.
|
263
263
|
#
|
264
264
|
# @return [<Symbol>] the required attributes for a save operation
|
@@ -341,7 +341,7 @@ module CaRuby
|
|
341
341
|
end
|
342
342
|
|
343
343
|
# Returns the difference between this Persistable and the other Persistable for the
|
344
|
-
# given attributes. The default attributes are the {Attributes#nondomain_attributes}.
|
344
|
+
# given attributes. The default attributes are the {Domain::Attributes#nondomain_attributes}.
|
345
345
|
#
|
346
346
|
# @param [Resource] other the domain object to compare
|
347
347
|
# @param [<Symbol>, nil] attributes the attributes to compare
|
@@ -448,7 +448,7 @@ module CaRuby
|
|
448
448
|
|
449
449
|
# Prints this domain object's content and recursively prints the referenced content.
|
450
450
|
# The optional selector block determines the attributes to print. The default is the
|
451
|
-
# {Attributes#java_attributes}. The database lazy loader is disabled during
|
451
|
+
# {Domain::Attributes#java_attributes}. The database lazy loader is disabled during
|
452
452
|
# the execution of this method. Thus, the printed content reflects the transient
|
453
453
|
# in-memory object graph rather than the persistent content.
|
454
454
|
#
|
@@ -65,7 +65,7 @@ module Enumerable
|
|
65
65
|
end
|
66
66
|
|
67
67
|
# Returns a new Hash generated from this Enumerable with a block whose arguments include the enumerated item
|
68
|
-
# and its index. Every value which is
|
68
|
+
# and its index. Every value which is nil or empty is excluded.
|
69
69
|
#
|
70
70
|
# @example
|
71
71
|
# [1, 2, 3].to_compact_hash_with_index { |item, index| item + index } #=> { 1 => 1, 2 => 3, 3 => 5 }
|
data/lib/caruby/version.rb
CHANGED
@@ -35,7 +35,7 @@ module CaRuby
|
|
35
35
|
assert_nothing_raised(ValidationError, msg) { subject.validate }
|
36
36
|
end
|
37
37
|
|
38
|
-
# Tests saving the subject. Calls {Database#save} on the subject and verifies that subject and its
|
38
|
+
# Tests saving the subject. Calls {Database::Writer#save} on the subject and verifies that subject and its
|
39
39
|
# references were persisted.
|
40
40
|
#
|
41
41
|
# @param [Resource] subject the object to save
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caruby-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 1.5.
|
9
|
+
- 3
|
10
|
+
version: 1.5.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- OHSU
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-08 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|