persistence 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/persistence.rb +0 -1
- data/lib/persistence/adapter/abstract.rb +1 -1
- data/lib/persistence/adapter/abstract/enable_disable.rb +1 -1
- data/lib/persistence/adapter/abstract/primary_key/id_property_string.rb +1 -1
- data/lib/persistence/adapter/abstract/primary_key/simple.rb +1 -1
- data/lib/persistence/adapter/mock/bucket/index/index_interface.rb +1 -1
- data/lib/persistence/cursor/atomic.rb +2 -2
- data/lib/persistence/object.rb +1 -1
- data/lib/persistence/object/autodetermine.rb +5 -4
- data/lib/persistence/object/class_instance.rb +12 -8
- data/lib/persistence/object/complex.rb +4 -4
- data/lib/persistence/object/complex/array.rb +6 -4
- data/lib/persistence/object/complex/array/class_instance.rb +1 -1
- data/lib/persistence/object/complex/array/object_instance.rb +1 -1
- data/lib/persistence/object/complex/attributes/attributes_array.rb +1 -1
- data/lib/persistence/object/complex/hash.rb +6 -4
- data/lib/persistence/object/complex/hash/class_instance.rb +1 -1
- data/lib/persistence/object/complex/hash/object_instance.rb +1 -1
- data/lib/persistence/object/complex/object_instance.rb +3 -3
- data/lib/persistence/object/flat.rb +6 -5
- data/lib/persistence/object/flat/class_instance.rb +2 -2
- data/lib/persistence/object/flat/file.rb +4 -3
- data/lib/persistence/object/flat/file/class_instance.rb +23 -30
- data/lib/persistence/object/flat/file/file_persistence.rb +4 -53
- data/lib/persistence/object/flat/file/object_instance.rb +21 -42
- data/lib/persistence/object/index.rb +0 -1
- data/lib/persistence/object/index_hash.rb +1 -1
- data/lib/persistence/object/object_instance.rb +11 -11
- data/lib/persistence/object/parse_persistence_args.rb +2 -108
- data/lib/persistence/object/parse_persistence_args/class_instance.rb +124 -0
- data/lib/persistence/object/parse_persistence_args/object_instance.rb +124 -0
- data/lib/persistence/port/bucket/bucket_interface.rb +0 -18
- data/lib/persistence/port/port_interface.rb +1 -19
- data/lib/requires.rb +10 -9
- data/spec/persistence/object/complex/attributes_spec.rb +1 -140
- data/spec/persistence/object/flat/bignum_spec.rb +12 -4
- data/spec/persistence/object/flat/class_spec.rb +9 -4
- data/spec/persistence/object/flat/file/class_instance_spec.rb +0 -1
- data/spec/persistence/object/flat/file_spec.rb +6 -9
- data/spec/persistence/object/indexes/block_index_spec.rb +1 -1
- data/spec/persistence/object/parse_persistence_args/class_instance_spec.rb +61 -0
- data/spec/persistence/object/parse_persistence_args/object_instance_spec.rb +63 -0
- data/spec/persistence/object_spec.rb +48 -82
- data/spec/persistence/port/bucket/index/bucket_index_spec.rb +1 -0
- data/spec/{Persistence_spec.rb → persistence_spec.rb} +0 -0
- metadata +8 -5
- data/spec/persistence/object/parse_persistence_args_spec.rb +0 -65
@@ -0,0 +1,124 @@
|
|
1
|
+
|
2
|
+
###
|
3
|
+
# @private
|
4
|
+
#
|
5
|
+
# Object-specific implementation for parsing persistence args.
|
6
|
+
#
|
7
|
+
# Internal helper for parsing args of the format: method, method( global_id ), method( index_name, value ),
|
8
|
+
# method( index_instance, value ), method( index_name => value ), method( index_instance => value ).
|
9
|
+
#
|
10
|
+
module ::Persistence::Object::ParsePersistenceArgs::ObjectInstance
|
11
|
+
|
12
|
+
include ::Persistence::Object::ParsePersistenceArgs
|
13
|
+
|
14
|
+
################################################
|
15
|
+
# parse_object_args_for_index_value_no_value #
|
16
|
+
################################################
|
17
|
+
|
18
|
+
###
|
19
|
+
# Parse *args for index, key_value, no_value.
|
20
|
+
#
|
21
|
+
# @param args [Array] An array of args of the format: method, method( global_id ), method( index_name, value ),
|
22
|
+
# method( index_instance, value ), method( index_name => value ), method( index_instance => value ).
|
23
|
+
#
|
24
|
+
# @param require_value [true,false] Whether key value must be provided; will throw exception if true and
|
25
|
+
# key value is not provided.
|
26
|
+
#
|
27
|
+
# @return [Array] Array containing index instance, key value, whether key value was provided.
|
28
|
+
#
|
29
|
+
def parse_object_args_for_index_value_no_value( args, require_value = false )
|
30
|
+
|
31
|
+
# * nil
|
32
|
+
# - Cursor to primary bucket
|
33
|
+
# * :index
|
34
|
+
# - Cursor to index
|
35
|
+
# * :index => persistence_key
|
36
|
+
# - Object(s) for indexed key value
|
37
|
+
|
38
|
+
index = nil
|
39
|
+
key_value = nil
|
40
|
+
no_value = nil
|
41
|
+
case args.count
|
42
|
+
|
43
|
+
when 0
|
44
|
+
|
45
|
+
no_value = true
|
46
|
+
if require_value
|
47
|
+
raise ::Persistence::Exception::KeyValueRequired,
|
48
|
+
'Key value required.'
|
49
|
+
end
|
50
|
+
|
51
|
+
when 1
|
52
|
+
|
53
|
+
index_or_id = args[ 0 ]
|
54
|
+
|
55
|
+
case index_or_id
|
56
|
+
|
57
|
+
when ::Symbol, ::String
|
58
|
+
|
59
|
+
index = self.class.index( index_or_id, true )
|
60
|
+
no_value = true
|
61
|
+
|
62
|
+
when ::Hash
|
63
|
+
|
64
|
+
key_value = index_or_id.values[ 0 ]
|
65
|
+
index_name = index_or_id.keys[ 0 ]
|
66
|
+
|
67
|
+
case index_name
|
68
|
+
|
69
|
+
when ::Symbol, ::String
|
70
|
+
|
71
|
+
index = self.class.index( index_name, true )
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
no_value = false
|
76
|
+
|
77
|
+
else
|
78
|
+
|
79
|
+
if index_or_id.respond_to?( :index_object )
|
80
|
+
|
81
|
+
index = index_or_id
|
82
|
+
no_value = true
|
83
|
+
|
84
|
+
else
|
85
|
+
|
86
|
+
# persistence_id - anything other than Symbol, String, Hash
|
87
|
+
key_value = args[ 0 ]
|
88
|
+
no_value = false
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
when 2
|
95
|
+
|
96
|
+
index_or_name = args[ 0 ]
|
97
|
+
|
98
|
+
|
99
|
+
if index_or_name.respond_to?( :index_object )
|
100
|
+
index = index_or_name
|
101
|
+
elsif index_or_name
|
102
|
+
index = self.class.index( index_or_name, true )
|
103
|
+
end
|
104
|
+
|
105
|
+
key_value = args[ 1 ]
|
106
|
+
|
107
|
+
no_value = false
|
108
|
+
|
109
|
+
else
|
110
|
+
|
111
|
+
raise 'Unexpected arguments ' << args.inspect + '.'
|
112
|
+
|
113
|
+
end
|
114
|
+
|
115
|
+
# if we have a file we need to persist it like we would a sub-object
|
116
|
+
if key_value.is_a?( ::File )
|
117
|
+
key_value = process_file_key( key_value )
|
118
|
+
end
|
119
|
+
|
120
|
+
return index, key_value, no_value
|
121
|
+
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
@@ -536,24 +536,6 @@ module ::Persistence::Port::Bucket::BucketInterface
|
|
536
536
|
|
537
537
|
end
|
538
538
|
|
539
|
-
#####################################
|
540
|
-
# persists_file_paths_as_objects? #
|
541
|
-
#####################################
|
542
|
-
|
543
|
-
def persists_file_paths_as_objects?
|
544
|
-
|
545
|
-
persists_file_paths_as_objects = nil
|
546
|
-
|
547
|
-
persists_file_paths_as_objects = super
|
548
|
-
|
549
|
-
if persists_file_paths_as_objects.nil?
|
550
|
-
persists_file_paths_as_objects = parent_port.persists_file_paths_as_objects?
|
551
|
-
end
|
552
|
-
|
553
|
-
return persists_file_paths_as_objects
|
554
|
-
|
555
|
-
end
|
556
|
-
|
557
539
|
#####################################
|
558
540
|
# persists_file_paths_as_strings? #
|
559
541
|
#####################################
|
@@ -22,7 +22,7 @@ module ::Persistence::Port::PortInterface
|
|
22
22
|
|
23
23
|
@buckets = { }
|
24
24
|
|
25
|
-
@instances = ::
|
25
|
+
@instances = ::Array::Unique.new
|
26
26
|
|
27
27
|
@name = port_name
|
28
28
|
@adapter = adapter_instance
|
@@ -378,24 +378,6 @@ module ::Persistence::Port::PortInterface
|
|
378
378
|
|
379
379
|
end
|
380
380
|
|
381
|
-
#####################################
|
382
|
-
# persists_file_paths_as_objects? #
|
383
|
-
#####################################
|
384
|
-
|
385
|
-
def persists_file_paths_as_objects?
|
386
|
-
|
387
|
-
persists_file_paths_as_objects = nil
|
388
|
-
|
389
|
-
persists_file_paths_as_objects = super
|
390
|
-
|
391
|
-
if persists_file_paths_as_objects.nil?
|
392
|
-
persists_file_paths_as_objects = ::Persistence.persists_file_paths_as_objects?
|
393
|
-
end
|
394
|
-
|
395
|
-
return persists_file_paths_as_objects
|
396
|
-
|
397
|
-
end
|
398
|
-
|
399
381
|
#####################################
|
400
382
|
# persists_file_paths_as_strings? #
|
401
383
|
#####################################
|
data/lib/requires.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
require 'module-cluster'
|
2
1
|
|
3
|
-
require '
|
4
|
-
|
2
|
+
begin ; require 'development' ; rescue ::LoadError ; end
|
3
|
+
|
4
|
+
require 'module/cluster'
|
5
|
+
require 'cascading_configuration'
|
5
6
|
|
6
7
|
basepath = 'persistence'
|
7
8
|
|
@@ -35,6 +36,8 @@ files.concat [
|
|
35
36
|
files.concat [
|
36
37
|
|
37
38
|
'object/parse_persistence_args',
|
39
|
+
'object/parse_persistence_args/class_instance',
|
40
|
+
'object/parse_persistence_args/object_instance',
|
38
41
|
|
39
42
|
'object/index',
|
40
43
|
|
@@ -47,9 +50,6 @@ files.concat [
|
|
47
50
|
|
48
51
|
'object/flat/file/file_persistence',
|
49
52
|
|
50
|
-
'object/flat/file/contents',
|
51
|
-
'object/flat/file/path',
|
52
|
-
|
53
53
|
'object/flat/file/class_instance',
|
54
54
|
'object/flat/file/object_instance',
|
55
55
|
|
@@ -84,8 +84,11 @@ files.concat [
|
|
84
84
|
'object/flat',
|
85
85
|
'object/flat/file',
|
86
86
|
|
87
|
+
'object/flat/file/contents',
|
88
|
+
'object/flat/file/path',
|
89
|
+
|
87
90
|
'object/autodetermine',
|
88
|
-
'object'
|
91
|
+
'object'
|
89
92
|
|
90
93
|
]
|
91
94
|
|
@@ -146,5 +149,3 @@ files.concat [
|
|
146
149
|
files.each do |this_file|
|
147
150
|
require_relative( File.join( basepath, this_file ) + '.rb' )
|
148
151
|
end
|
149
|
-
|
150
|
-
require_relative( basepath + '.rb' )
|
@@ -1199,13 +1199,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1199
1199
|
atomic_attribute?( :some_other_reader ).should == false
|
1200
1200
|
atomic_attribute?( :some_other_writer ).should == false
|
1201
1201
|
|
1202
|
-
atomic_attribute?( :some_accessor ).should == true
|
1203
|
-
atomic_attribute?( :some_reader ).should == true
|
1204
|
-
atomic_attribute?( :some_writer ).should == true
|
1205
|
-
atomic_attribute?( :some_other_accessor ).should == false
|
1206
|
-
atomic_attribute?( :some_other_reader ).should == false
|
1207
|
-
atomic_attribute?( :some_other_writer ).should == false
|
1208
|
-
|
1209
1202
|
end
|
1210
1203
|
end
|
1211
1204
|
|
@@ -1229,13 +1222,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1229
1222
|
atomic_attribute_accessor?( :some_other_reader ).should == false
|
1230
1223
|
atomic_attribute_accessor?( :some_other_writer ).should == false
|
1231
1224
|
|
1232
|
-
atomic_attribute_accessor?( :some_accessor ).should == true
|
1233
|
-
atomic_attribute_accessor?( :some_reader ).should == false
|
1234
|
-
atomic_attribute_accessor?( :some_writer ).should == false
|
1235
|
-
atomic_attribute_accessor?( :some_other_accessor ).should == false
|
1236
|
-
atomic_attribute_accessor?( :some_other_reader ).should == false
|
1237
|
-
atomic_attribute_accessor?( :some_other_writer ).should == false
|
1238
|
-
|
1239
1225
|
end
|
1240
1226
|
end
|
1241
1227
|
|
@@ -1259,13 +1245,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1259
1245
|
atomic_attribute_reader?( :some_other_reader ).should == false
|
1260
1246
|
atomic_attribute_reader?( :some_other_writer ).should == false
|
1261
1247
|
|
1262
|
-
atomic_attribute_reader?( :some_accessor ).should == true
|
1263
|
-
atomic_attribute_reader?( :some_reader ).should == true
|
1264
|
-
atomic_attribute_reader?( :some_writer ).should == false
|
1265
|
-
atomic_attribute_reader?( :some_other_accessor ).should == false
|
1266
|
-
atomic_attribute_reader?( :some_other_reader ).should == false
|
1267
|
-
atomic_attribute_reader?( :some_other_writer ).should == false
|
1268
|
-
|
1269
1248
|
end
|
1270
1249
|
end
|
1271
1250
|
|
@@ -1289,13 +1268,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1289
1268
|
atomic_attribute_writer?( :some_other_reader ).should == false
|
1290
1269
|
atomic_attribute_writer?( :some_other_writer ).should == false
|
1291
1270
|
|
1292
|
-
atomic_attribute_writer?( :some_accessor ).should == true
|
1293
|
-
atomic_attribute_writer?( :some_reader ).should == false
|
1294
|
-
atomic_attribute_writer?( :some_writer ).should == true
|
1295
|
-
atomic_attribute_writer?( :some_other_accessor ).should == false
|
1296
|
-
atomic_attribute_writer?( :some_other_reader ).should == false
|
1297
|
-
atomic_attribute_writer?( :some_other_writer ).should == false
|
1298
|
-
|
1299
1271
|
end
|
1300
1272
|
end
|
1301
1273
|
|
@@ -1311,13 +1283,7 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1311
1283
|
atomic_attributes[ :some_writer ] = :writer
|
1312
1284
|
end
|
1313
1285
|
::Persistence::Object::Complex::Attributes::AtomicAttributeStatus.new.instance_eval do
|
1314
|
-
|
1315
|
-
atomic_attribute_status( :some_accessor ).should == :accessor
|
1316
|
-
atomic_attribute_status( :some_reader ).should == :reader
|
1317
|
-
atomic_attribute_status( :some_writer ).should == :writer
|
1318
|
-
atomic_attribute_status( :some_other_accessor ).should == nil
|
1319
|
-
atomic_attribute_status( :some_other_reader ).should == nil
|
1320
|
-
atomic_attribute_status( :some_other_writer ).should == nil
|
1286
|
+
$blah = true
|
1321
1287
|
|
1322
1288
|
atomic_attribute_status( :some_accessor ).should == :accessor
|
1323
1289
|
atomic_attribute_status( :some_reader ).should == :reader
|
@@ -1349,13 +1315,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1349
1315
|
non_atomic_attribute?( :some_other_reader ).should == false
|
1350
1316
|
non_atomic_attribute?( :some_other_writer ).should == false
|
1351
1317
|
|
1352
|
-
non_atomic_attribute?( :some_accessor ).should == true
|
1353
|
-
non_atomic_attribute?( :some_reader ).should == true
|
1354
|
-
non_atomic_attribute?( :some_writer ).should == true
|
1355
|
-
non_atomic_attribute?( :some_other_accessor ).should == false
|
1356
|
-
non_atomic_attribute?( :some_other_reader ).should == false
|
1357
|
-
non_atomic_attribute?( :some_other_writer ).should == false
|
1358
|
-
|
1359
1318
|
end
|
1360
1319
|
end
|
1361
1320
|
|
@@ -1379,13 +1338,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1379
1338
|
non_atomic_attribute_accessor?( :some_other_reader ).should == false
|
1380
1339
|
non_atomic_attribute_accessor?( :some_other_writer ).should == false
|
1381
1340
|
|
1382
|
-
non_atomic_attribute_accessor?( :some_accessor ).should == true
|
1383
|
-
non_atomic_attribute_accessor?( :some_reader ).should == false
|
1384
|
-
non_atomic_attribute_accessor?( :some_writer ).should == false
|
1385
|
-
non_atomic_attribute_accessor?( :some_other_accessor ).should == false
|
1386
|
-
non_atomic_attribute_accessor?( :some_other_reader ).should == false
|
1387
|
-
non_atomic_attribute_accessor?( :some_other_writer ).should == false
|
1388
|
-
|
1389
1341
|
end
|
1390
1342
|
end
|
1391
1343
|
|
@@ -1409,13 +1361,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1409
1361
|
non_atomic_attribute_reader?( :some_other_reader ).should == false
|
1410
1362
|
non_atomic_attribute_reader?( :some_other_writer ).should == false
|
1411
1363
|
|
1412
|
-
non_atomic_attribute_reader?( :some_accessor ).should == true
|
1413
|
-
non_atomic_attribute_reader?( :some_reader ).should == true
|
1414
|
-
non_atomic_attribute_reader?( :some_writer ).should == false
|
1415
|
-
non_atomic_attribute_reader?( :some_other_accessor ).should == false
|
1416
|
-
non_atomic_attribute_reader?( :some_other_reader ).should == false
|
1417
|
-
non_atomic_attribute_reader?( :some_other_writer ).should == false
|
1418
|
-
|
1419
1364
|
end
|
1420
1365
|
end
|
1421
1366
|
|
@@ -1439,13 +1384,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1439
1384
|
non_atomic_attribute_writer?( :some_other_reader ).should == false
|
1440
1385
|
non_atomic_attribute_writer?( :some_other_writer ).should == false
|
1441
1386
|
|
1442
|
-
non_atomic_attribute_writer?( :some_accessor ).should == true
|
1443
|
-
non_atomic_attribute_writer?( :some_reader ).should == false
|
1444
|
-
non_atomic_attribute_writer?( :some_writer ).should == true
|
1445
|
-
non_atomic_attribute_writer?( :some_other_accessor ).should == false
|
1446
|
-
non_atomic_attribute_writer?( :some_other_reader ).should == false
|
1447
|
-
non_atomic_attribute_writer?( :some_other_writer ).should == false
|
1448
|
-
|
1449
1387
|
end
|
1450
1388
|
end
|
1451
1389
|
|
@@ -1469,13 +1407,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1469
1407
|
non_atomic_attribute_status( :some_other_reader ).should == nil
|
1470
1408
|
non_atomic_attribute_status( :some_other_writer ).should == nil
|
1471
1409
|
|
1472
|
-
non_atomic_attribute_status( :some_accessor ).should == :accessor
|
1473
|
-
non_atomic_attribute_status( :some_reader ).should == :reader
|
1474
|
-
non_atomic_attribute_status( :some_writer ).should == :writer
|
1475
|
-
non_atomic_attribute_status( :some_other_accessor ).should == nil
|
1476
|
-
non_atomic_attribute_status( :some_other_reader ).should == nil
|
1477
|
-
non_atomic_attribute_status( :some_other_writer ).should == nil
|
1478
|
-
|
1479
1410
|
end
|
1480
1411
|
end
|
1481
1412
|
|
@@ -1502,20 +1433,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1502
1433
|
persistent_attribute?( :some_non_atomic_other_reader ).should == false
|
1503
1434
|
persistent_attribute?( :some_non_atomic_other_writer ).should == false
|
1504
1435
|
|
1505
|
-
persistent_attribute?( :some_non_atomic_accessor ).should == true
|
1506
|
-
persistent_attribute?( :some_non_atomic_reader ).should == true
|
1507
|
-
persistent_attribute?( :some_non_atomic_writer ).should == true
|
1508
|
-
persistent_attribute?( :some_non_atomic_other_accessor ).should == false
|
1509
|
-
persistent_attribute?( :some_non_atomic_other_reader ).should == false
|
1510
|
-
persistent_attribute?( :some_non_atomic_other_writer ).should == false
|
1511
|
-
|
1512
|
-
persistent_attribute?( :some_atomic_accessor ).should == true
|
1513
|
-
persistent_attribute?( :some_atomic_reader ).should == true
|
1514
|
-
persistent_attribute?( :some_atomic_writer ).should == true
|
1515
|
-
persistent_attribute?( :some_atomic_other_accessor ).should == false
|
1516
|
-
persistent_attribute?( :some_atomic_other_reader ).should == false
|
1517
|
-
persistent_attribute?( :some_atomic_other_writer ).should == false
|
1518
|
-
|
1519
1436
|
persistent_attribute?( :some_atomic_accessor ).should == true
|
1520
1437
|
persistent_attribute?( :some_atomic_reader ).should == true
|
1521
1438
|
persistent_attribute?( :some_atomic_writer ).should == true
|
@@ -1549,20 +1466,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1549
1466
|
persistent_attribute_accessor?( :some_non_atomic_other_reader ).should == false
|
1550
1467
|
persistent_attribute_accessor?( :some_non_atomic_other_writer ).should == false
|
1551
1468
|
|
1552
|
-
persistent_attribute_accessor?( :some_non_atomic_accessor ).should == true
|
1553
|
-
persistent_attribute_accessor?( :some_non_atomic_reader ).should == false
|
1554
|
-
persistent_attribute_accessor?( :some_non_atomic_writer ).should == false
|
1555
|
-
persistent_attribute_accessor?( :some_non_atomic_other_accessor ).should == false
|
1556
|
-
persistent_attribute_accessor?( :some_non_atomic_other_reader ).should == false
|
1557
|
-
persistent_attribute_accessor?( :some_non_atomic_other_writer ).should == false
|
1558
|
-
|
1559
|
-
persistent_attribute_accessor?( :some_atomic_accessor ).should == true
|
1560
|
-
persistent_attribute_accessor?( :some_atomic_reader ).should == false
|
1561
|
-
persistent_attribute_accessor?( :some_atomic_writer ).should == false
|
1562
|
-
persistent_attribute_accessor?( :some_atomic_other_accessor ).should == false
|
1563
|
-
persistent_attribute_accessor?( :some_atomic_other_reader ).should == false
|
1564
|
-
persistent_attribute_accessor?( :some_atomic_other_writer ).should == false
|
1565
|
-
|
1566
1469
|
persistent_attribute_accessor?( :some_atomic_accessor ).should == true
|
1567
1470
|
persistent_attribute_accessor?( :some_atomic_reader ).should == false
|
1568
1471
|
persistent_attribute_accessor?( :some_atomic_writer ).should == false
|
@@ -1596,20 +1499,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1596
1499
|
persistent_attribute_reader?( :some_non_atomic_other_reader ).should == false
|
1597
1500
|
persistent_attribute_reader?( :some_non_atomic_other_writer ).should == false
|
1598
1501
|
|
1599
|
-
persistent_attribute_reader?( :some_non_atomic_accessor ).should == true
|
1600
|
-
persistent_attribute_reader?( :some_non_atomic_reader ).should == true
|
1601
|
-
persistent_attribute_reader?( :some_non_atomic_writer ).should == false
|
1602
|
-
persistent_attribute_reader?( :some_non_atomic_other_accessor ).should == false
|
1603
|
-
persistent_attribute_reader?( :some_non_atomic_other_reader ).should == false
|
1604
|
-
persistent_attribute_reader?( :some_non_atomic_other_writer ).should == false
|
1605
|
-
|
1606
|
-
persistent_attribute_reader?( :some_atomic_accessor ).should == true
|
1607
|
-
persistent_attribute_reader?( :some_atomic_reader ).should == true
|
1608
|
-
persistent_attribute_reader?( :some_atomic_writer ).should == false
|
1609
|
-
persistent_attribute_reader?( :some_atomic_other_accessor ).should == false
|
1610
|
-
persistent_attribute_reader?( :some_atomic_other_reader ).should == false
|
1611
|
-
persistent_attribute_reader?( :some_atomic_other_writer ).should == false
|
1612
|
-
|
1613
1502
|
persistent_attribute_reader?( :some_atomic_accessor ).should == true
|
1614
1503
|
persistent_attribute_reader?( :some_atomic_reader ).should == true
|
1615
1504
|
persistent_attribute_reader?( :some_atomic_writer ).should == false
|
@@ -1643,20 +1532,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1643
1532
|
persistent_attribute_writer?( :some_non_atomic_other_reader ).should == false
|
1644
1533
|
persistent_attribute_writer?( :some_non_atomic_other_writer ).should == false
|
1645
1534
|
|
1646
|
-
persistent_attribute_writer?( :some_non_atomic_accessor ).should == true
|
1647
|
-
persistent_attribute_writer?( :some_non_atomic_reader ).should == false
|
1648
|
-
persistent_attribute_writer?( :some_non_atomic_writer ).should == true
|
1649
|
-
persistent_attribute_writer?( :some_non_atomic_other_accessor ).should == false
|
1650
|
-
persistent_attribute_writer?( :some_non_atomic_other_reader ).should == false
|
1651
|
-
persistent_attribute_writer?( :some_non_atomic_other_writer ).should == false
|
1652
|
-
|
1653
|
-
persistent_attribute_writer?( :some_atomic_accessor ).should == true
|
1654
|
-
persistent_attribute_writer?( :some_atomic_reader ).should == false
|
1655
|
-
persistent_attribute_writer?( :some_atomic_writer ).should == true
|
1656
|
-
persistent_attribute_writer?( :some_atomic_other_accessor ).should == false
|
1657
|
-
persistent_attribute_writer?( :some_atomic_other_reader ).should == false
|
1658
|
-
persistent_attribute_writer?( :some_atomic_other_writer ).should == false
|
1659
|
-
|
1660
1535
|
persistent_attribute_writer?( :some_atomic_accessor ).should == true
|
1661
1536
|
persistent_attribute_writer?( :some_atomic_reader ).should == false
|
1662
1537
|
persistent_attribute_writer?( :some_atomic_writer ).should == true
|
@@ -1690,20 +1565,6 @@ describe ::Persistence::Object::Complex::Attributes do
|
|
1690
1565
|
persistent_attribute_status( :some_non_atomic_other_reader ).should == nil
|
1691
1566
|
persistent_attribute_status( :some_non_atomic_other_writer ).should == nil
|
1692
1567
|
|
1693
|
-
persistent_attribute_status( :some_non_atomic_accessor ).should == :accessor
|
1694
|
-
persistent_attribute_status( :some_non_atomic_reader ).should == :reader
|
1695
|
-
persistent_attribute_status( :some_non_atomic_writer ).should == :writer
|
1696
|
-
persistent_attribute_status( :some_non_atomic_other_accessor ).should == nil
|
1697
|
-
persistent_attribute_status( :some_non_atomic_other_reader ).should == nil
|
1698
|
-
persistent_attribute_status( :some_non_atomic_other_writer ).should == nil
|
1699
|
-
|
1700
|
-
persistent_attribute_status( :some_atomic_accessor ).should == :accessor
|
1701
|
-
persistent_attribute_status( :some_atomic_reader ).should == :reader
|
1702
|
-
persistent_attribute_status( :some_atomic_writer ).should == :writer
|
1703
|
-
persistent_attribute_status( :some_atomic_other_accessor ).should == nil
|
1704
|
-
persistent_attribute_status( :some_atomic_other_reader ).should == nil
|
1705
|
-
persistent_attribute_status( :some_atomic_other_writer ).should == nil
|
1706
|
-
|
1707
1568
|
persistent_attribute_status( :some_atomic_accessor ).should == :accessor
|
1708
1569
|
persistent_attribute_status( :some_atomic_reader ).should == :reader
|
1709
1570
|
persistent_attribute_status( :some_atomic_writer ).should == :writer
|