simple_record 1.1.71 → 1.1.72

Sign up to get free protection for your applications and to get access to all the features.
data/lib/simple_record.rb CHANGED
@@ -570,7 +570,8 @@ module SimpleRecord
570
570
  attvalue = value.nil? ? nil : value.id
571
571
  else
572
572
  attname = name.to_s
573
- attvalue = att_meta.init_value(value)
573
+ # attvalue = att_meta.init_value(value)
574
+ attvalue = value
574
575
  #puts 'converted ' + value.inspect + ' to ' + attvalue.inspect
575
576
  end
576
577
  end
@@ -1,8 +1,8 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../lib/simple_record")
2
-
3
- class MyBaseModel < SimpleRecord::Base
4
-
5
- has_strings :base_string
6
-
7
-
1
+ require File.expand_path(File.dirname(__FILE__) + "/../lib/simple_record")
2
+
3
+ class MyBaseModel < SimpleRecord::Base
4
+
5
+ has_strings :base_string
6
+
7
+
8
8
  end
@@ -1,35 +1,35 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../lib/simple_record")
2
- require 'my_model'
3
-
4
- class MyChildModel < SimpleRecord::Base
5
- belongs_to :my_model
6
- belongs_to :x, :class_name=>"MyModel"
7
- has_attributes :name, :child_attr
8
-
9
- end
10
-
11
-
12
- =begin
13
-
14
-
15
- puts 'word'
16
-
17
- mm = MyModel.new
18
- puts 'word2'
19
-
20
- mcm = MyChildModel.new
21
-
22
- puts 'mcm instance methods=' + MyChildModel.instance_methods(true).inspect
23
- #puts 'mcm=' + mcm.instance_methods(false)
24
- puts 'mcm class vars = ' + mcm.class.class_variables.inspect
25
- puts mcm.class == MyChildModel
26
- puts 'saved? ' + mm.save.to_s
27
- puts mm.errors.inspect
28
-
29
- puts "mm attributes=" + MyModel.defined_attributes.inspect
30
- puts "mcm attributes=" + MyChildModel.defined_attributes.inspect
31
-
32
- mcm2 = MyChildModel.new
33
- puts "mcm2 attributes=" + MyChildModel.defined_attributes.inspect
34
-
35
- =end
1
+ require File.expand_path(File.dirname(__FILE__) + "/../lib/simple_record")
2
+ require 'my_model'
3
+
4
+ class MyChildModel < SimpleRecord::Base
5
+ belongs_to :my_model
6
+ belongs_to :x, :class_name=>"MyModel"
7
+ has_attributes :name, :child_attr
8
+
9
+ end
10
+
11
+
12
+ =begin
13
+
14
+
15
+ puts 'word'
16
+
17
+ mm = MyModel.new
18
+ puts 'word2'
19
+
20
+ mcm = MyChildModel.new
21
+
22
+ puts 'mcm instance methods=' + MyChildModel.instance_methods(true).inspect
23
+ #puts 'mcm=' + mcm.instance_methods(false)
24
+ puts 'mcm class vars = ' + mcm.class.class_variables.inspect
25
+ puts mcm.class == MyChildModel
26
+ puts 'saved? ' + mm.save.to_s
27
+ puts mm.errors.inspect
28
+
29
+ puts "mm attributes=" + MyModel.defined_attributes.inspect
30
+ puts "mcm attributes=" + MyChildModel.defined_attributes.inspect
31
+
32
+ mcm2 = MyChildModel.new
33
+ puts "mcm2 attributes=" + MyChildModel.defined_attributes.inspect
34
+
35
+ =end
@@ -1,15 +1,15 @@
1
-
2
- require File.expand_path(File.dirname(__FILE__) + "/../lib/results_array")
3
-
4
- array = SimpleRecord::ResultsArray.new()
5
- #array.extend(ResultsArray)
6
-
7
- 500.times do |i|
8
- array << "_ob_" + i.to_s
9
- end
10
-
11
- array.each do |v|
12
- puts v.to_s
13
- end
14
-
1
+
2
+ require File.expand_path(File.dirname(__FILE__) + "/../lib/results_array")
3
+
4
+ array = SimpleRecord::ResultsArray.new()
5
+ #array.extend(ResultsArray)
6
+
7
+ 500.times do |i|
8
+ array << "_ob_" + i.to_s
9
+ end
10
+
11
+ array.each do |v|
12
+ puts v.to_s
13
+ end
14
+
15
15
  puts array[10]
metadata CHANGED
@@ -1,12 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_record
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 1
8
- - 71
9
- version: 1.1.71
4
+ version: 1.1.72
10
5
  platform: ruby
11
6
  authors:
12
7
  - Travis Reeder
@@ -16,21 +11,19 @@ autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
13
 
19
- date: 2010-03-22 00:00:00 -07:00
14
+ date: 2010-03-23 00:00:00 -07:00
20
15
  default_executable:
21
16
  dependencies:
22
17
  - !ruby/object:Gem::Dependency
23
18
  name: aws
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
19
+ type: :runtime
20
+ version_requirement:
21
+ version_requirements: !ruby/object:Gem::Requirement
26
22
  requirements:
27
23
  - - ">="
28
24
  - !ruby/object:Gem::Version
29
- segments:
30
- - 0
31
25
  version: "0"
32
- type: :runtime
33
- version_requirements: *id001
26
+ version:
34
27
  description: Drop in replacement for ActiveRecord to Amazon SimpleDB instead.
35
28
  email: travis@appoxy.com
36
29
  executables: []
@@ -63,35 +56,33 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
56
  requirements:
64
57
  - - ">="
65
58
  - !ruby/object:Gem::Version
66
- segments:
67
- - 0
68
59
  version: "0"
60
+ version:
69
61
  required_rubygems_version: !ruby/object:Gem::Requirement
70
62
  requirements:
71
63
  - - ">="
72
64
  - !ruby/object:Gem::Version
73
- segments:
74
- - 0
75
65
  version: "0"
66
+ version:
76
67
  requirements: []
77
68
 
78
69
  rubyforge_project:
79
- rubygems_version: 1.3.6
70
+ rubygems_version: 1.3.5
80
71
  signing_key:
81
72
  specification_version: 3
82
73
  summary: Drop in replacement for ActiveRecord to Amazon SimpleDB instead.
83
74
  test_files:
84
- - test/conversions.rb
75
+ - test/test_global_options.rb
76
+ - test/temp_test.rb
77
+ - test/test_dirty.rb
85
78
  - test/model_with_enc.rb
86
- - test/my_base_model.rb
87
- - test/my_child_model.rb
79
+ - test/test_base.rb
88
80
  - test/my_model.rb
81
+ - test/my_base_model.rb
89
82
  - test/paging_array_test.rb
90
- - test/temp_test.rb
91
- - test/test_base.rb
92
- - test/test_dirty.rb
83
+ - test/test_simple_record.rb
93
84
  - test/test_encodings.rb
94
- - test/test_global_options.rb
95
85
  - test/test_helpers.rb
86
+ - test/my_child_model.rb
96
87
  - test/test_results_array.rb
97
- - test/test_simple_record.rb
88
+ - test/conversions.rb