lafcadio 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/lafcadio.rb CHANGED
@@ -16,7 +16,7 @@
16
16
  # http://lafcadio.rubyforge.org/tutorial.html.
17
17
 
18
18
  module Lafcadio
19
- Version = "0.8.2"
19
+ Version = "0.8.3"
20
20
 
21
21
  require 'lafcadio/depend'
22
22
  require 'lafcadio/domain'
data/lib/lafcadio.rb~ CHANGED
@@ -16,7 +16,7 @@
16
16
  # http://lafcadio.rubyforge.org/tutorial.html.
17
17
 
18
18
  module Lafcadio
19
- Version = "0.8.1"
19
+ Version = "0.8.2"
20
20
 
21
21
  require 'lafcadio/depend'
22
22
  require 'lafcadio/domain'
@@ -561,15 +561,16 @@ module Lafcadio
561
561
 
562
562
  def self.try_load_xml_parser
563
563
  require 'lafcadio/domain'
564
- dirName = LafcadioConfig.new['classDefinitionDir']
565
- xmlFileName = self.basename + '.xml'
566
- xmlPath = File.join( dirName, xmlFileName )
567
- xml = ''
568
- begin
569
- File.open( xmlPath ) { |file| xml = file.readlines.join }
570
- ClassDefinitionXmlParser.new( self, xml )
571
- rescue Errno::ENOENT
572
- # no xml file, so no @xmlParser
564
+ if ( dirName = LafcadioConfig.new['classDefinitionDir'] )
565
+ xmlFileName = self.basename + '.xml'
566
+ xmlPath = File.join( dirName, xmlFileName )
567
+ xml = ''
568
+ begin
569
+ File.open( xmlPath ) { |file| xml = file.readlines.join }
570
+ ClassDefinitionXmlParser.new( self, xml )
571
+ rescue Errno::ENOENT
572
+ # no xml file, so no @xmlParser
573
+ end
573
574
  end
574
575
  end
575
576
 
@@ -605,7 +605,7 @@ module Lafcadio
605
605
  @error_messages = []
606
606
  @fields = {}
607
607
  @fields_set = []
608
- @original_values = OriginalValuesHash.new( @fieldHash )
608
+ reset_original_values_hash @fieldHash
609
609
  check_fields = LafcadioConfig.new()['checkFields']
610
610
  verify if %w( onInstantiate onAllStates ).include?( check_fields )
611
611
  end
@@ -699,6 +699,10 @@ module Lafcadio
699
699
  def post_commit_trigger
700
700
  nil
701
701
  end
702
+
703
+ def reset_original_values_hash( f = @fields ) #:nodoc:
704
+ @original_values = OriginalValuesHash.new( f.clone )
705
+ end
702
706
 
703
707
  def set_field( field, value ) #:nodoc:
704
708
  if field.class <= DomainObjectField
metadata CHANGED
@@ -1,128 +1,123 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.6
2
+ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: lafcadio
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.8.2
7
- date: 2005-12-23
6
+ version: 0.8.3
7
+ date: 2006-03-21 00:00:00 -08:00
8
8
  summary: Lafcadio is an object-relational mapping layer
9
9
  require_paths:
10
- - lib
10
+ - lib
11
11
  email: sera@fhwang.net
12
12
  homepage: http://lafcadio.rubyforge.org/
13
13
  rubyforge_project:
14
- description: "Lafcadio is an object-relational mapping layer for Ruby and MySQL. It lets you
15
- treat database rows like first-class Ruby objects, minimizing the amount of time
16
- you have to spend thinking about MySQL vagaries so you can spend more time
17
- thinking about your program's logic. It also offers extensive support for
18
- unit-testing complex database logic without running cumbersome setup scripts."
14
+ description: Lafcadio is an object-relational mapping layer for Ruby and MySQL. It lets you treat database rows like first-class Ruby objects, minimizing the amount of time you have to spend thinking about MySQL vagaries so you can spend more time thinking about your program's logic. It also offers extensive support for unit-testing complex database logic without running cumbersome setup scripts.
19
15
  autorequire: lafcadio
20
16
  default_executable:
21
17
  bindir: bin
22
18
  has_rdoc: false
23
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
24
20
  requirements:
25
- -
26
- - ">"
27
- - !ruby/object:Gem::Version
28
- version: 0.0.0
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
29
24
  version:
30
25
  platform: ruby
26
+ signing_key:
27
+ cert_chain:
31
28
  authors:
32
- - Francis Hwang
29
+ - Francis Hwang
33
30
  files:
34
- - lib/lafcadio
35
- - lib/lafcadio.rb
36
- - lib/lafcadio.rb~
37
- - lib/lafcadio/depend.rb
38
- - lib/lafcadio/domain.rb
39
- - lib/lafcadio/domain.rb~
40
- - lib/lafcadio/mock.rb
41
- - lib/lafcadio/objectField.rb
42
- - lib/lafcadio/objectStore.rb
43
- - lib/lafcadio/objectStore.rb~
44
- - lib/lafcadio/query.rb
45
- - lib/lafcadio/query.rb~
46
- - lib/lafcadio/schema.rb
47
- - lib/lafcadio/test
48
- - lib/lafcadio/test.rb
49
- - lib/lafcadio/util.rb
50
- - lib/lafcadio/test/testconfig.dat
31
+ - lib/lafcadio
32
+ - lib/lafcadio.rb
33
+ - lib/lafcadio.rb~
34
+ - lib/lafcadio/depend.rb
35
+ - lib/lafcadio/domain.rb
36
+ - lib/lafcadio/domain.rb~
37
+ - lib/lafcadio/mock.rb
38
+ - lib/lafcadio/objectField.rb
39
+ - lib/lafcadio/objectStore.rb
40
+ - lib/lafcadio/objectStore.rb~
41
+ - lib/lafcadio/query.rb
42
+ - lib/lafcadio/query.rb~
43
+ - lib/lafcadio/schema.rb
44
+ - lib/lafcadio/test
45
+ - lib/lafcadio/test.rb
46
+ - lib/lafcadio/util.rb
47
+ - lib/lafcadio/test/testconfig.dat
51
48
  test_files: []
49
+
52
50
  rdoc_options: []
51
+
53
52
  extra_rdoc_files: []
53
+
54
54
  executables:
55
- - lafcadio_schema
55
+ - lafcadio_schema
56
56
  extensions: []
57
+
57
58
  requirements: []
59
+
58
60
  dependencies:
59
- - !ruby/object:Gem::Dependency
60
- name: contxtlservice
61
- version_requirement:
62
- version_requirements: !ruby/object:Gem::Version::Requirement
63
- requirements:
64
- -
65
- - ">"
66
- - !ruby/object:Gem::Version
67
- version: 0.0.0
68
- version:
69
- - !ruby/object:Gem::Dependency
70
- name: englishext
71
- version_requirement:
72
- version_requirements: !ruby/object:Gem::Version::Requirement
73
- requirements:
74
- -
75
- - ">"
76
- - !ruby/object:Gem::Version
77
- version: 0.0.0
78
- version:
79
- - !ruby/object:Gem::Dependency
80
- name: extensions
81
- version_requirement:
82
- version_requirements: !ruby/object:Gem::Version::Requirement
83
- requirements:
84
- -
85
- - ">"
86
- - !ruby/object:Gem::Version
87
- version: 0.0.0
88
- version:
89
- - !ruby/object:Gem::Dependency
90
- name: log4r
91
- version_requirement:
92
- version_requirements: !ruby/object:Gem::Version::Requirement
93
- requirements:
94
- -
95
- - ">"
96
- - !ruby/object:Gem::Version
97
- version: 0.0.0
98
- version:
99
- - !ruby/object:Gem::Dependency
100
- name: month
101
- version_requirement:
102
- version_requirements: !ruby/object:Gem::Version::Requirement
103
- requirements:
104
- -
105
- - ">"
106
- - !ruby/object:Gem::Version
107
- version: 0.0.0
108
- version:
109
- - !ruby/object:Gem::Dependency
110
- name: queuehash
111
- version_requirement:
112
- version_requirements: !ruby/object:Gem::Version::Requirement
113
- requirements:
114
- -
115
- - ">"
116
- - !ruby/object:Gem::Version
117
- version: 0.0.0
118
- version:
119
- - !ruby/object:Gem::Dependency
120
- name: uscommerce
121
- version_requirement:
122
- version_requirements: !ruby/object:Gem::Version::Requirement
123
- requirements:
124
- -
125
- - ">"
126
- - !ruby/object:Gem::Version
127
- version: 0.0.0
128
- version:
61
+ - !ruby/object:Gem::Dependency
62
+ name: contxtlservice
63
+ version_requirement:
64
+ version_requirements: !ruby/object:Gem::Version::Requirement
65
+ requirements:
66
+ - - ">"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.0.0
69
+ version:
70
+ - !ruby/object:Gem::Dependency
71
+ name: englishext
72
+ version_requirement:
73
+ version_requirements: !ruby/object:Gem::Version::Requirement
74
+ requirements:
75
+ - - ">"
76
+ - !ruby/object:Gem::Version
77
+ version: 0.0.0
78
+ version:
79
+ - !ruby/object:Gem::Dependency
80
+ name: extensions
81
+ version_requirement:
82
+ version_requirements: !ruby/object:Gem::Version::Requirement
83
+ requirements:
84
+ - - ">"
85
+ - !ruby/object:Gem::Version
86
+ version: 0.0.0
87
+ version:
88
+ - !ruby/object:Gem::Dependency
89
+ name: log4r
90
+ version_requirement:
91
+ version_requirements: !ruby/object:Gem::Version::Requirement
92
+ requirements:
93
+ - - ">"
94
+ - !ruby/object:Gem::Version
95
+ version: 0.0.0
96
+ version:
97
+ - !ruby/object:Gem::Dependency
98
+ name: month
99
+ version_requirement:
100
+ version_requirements: !ruby/object:Gem::Version::Requirement
101
+ requirements:
102
+ - - ">"
103
+ - !ruby/object:Gem::Version
104
+ version: 0.0.0
105
+ version:
106
+ - !ruby/object:Gem::Dependency
107
+ name: queuehash
108
+ version_requirement:
109
+ version_requirements: !ruby/object:Gem::Version::Requirement
110
+ requirements:
111
+ - - ">"
112
+ - !ruby/object:Gem::Version
113
+ version: 0.0.0
114
+ version:
115
+ - !ruby/object:Gem::Dependency
116
+ name: uscommerce
117
+ version_requirement:
118
+ version_requirements: !ruby/object:Gem::Version::Requirement
119
+ requirements:
120
+ - - ">"
121
+ - !ruby/object:Gem::Version
122
+ version: 0.0.0
123
+ version: