baza 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -7,6 +7,7 @@ gem "datet"
7
7
  gem "wref"
8
8
  gem "knjrbfw"
9
9
  gem "array_enumerator"
10
+ gem "string-cases"
10
11
 
11
12
  # Add dependencies to develop your gem here.
12
13
  # Include everything needed to run rake, tests, features, etc.
data/Gemfile.lock CHANGED
@@ -39,6 +39,7 @@ GEM
39
39
  tsafe
40
40
  wref
41
41
  sqlite3 (1.3.7)
42
+ string-cases (0.0.0)
42
43
  string-strtr (0.0.3)
43
44
  tsafe (0.0.11)
44
45
  wref (0.0.6)
@@ -56,4 +57,5 @@ DEPENDENCIES
56
57
  rdoc (~> 3.12)
57
58
  rspec (~> 2.8.0)
58
59
  sqlite3
60
+ string-cases
59
61
  wref
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
data/baza.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "baza"
8
- s.version = "0.0.8"
8
+ s.version = "0.0.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kasper Johansen"]
12
- s.date = "2013-04-18"
12
+ s.date = "2013-05-16"
13
13
  s.description = "A database abstraction layer, model framework and database framework."
14
14
  s.email = "kj@gfish.com"
15
15
  s.extra_rdoc_files = [
@@ -62,7 +62,7 @@ Gem::Specification.new do |s|
62
62
  s.homepage = "http://github.com/kaspernj/baza"
63
63
  s.licenses = ["MIT"]
64
64
  s.require_paths = ["lib"]
65
- s.rubygems_version = "1.8.25"
65
+ s.rubygems_version = "1.8.23"
66
66
  s.summary = "A database abstraction layer, model framework and database framework."
67
67
 
68
68
  if s.respond_to? :specification_version then
@@ -73,6 +73,7 @@ Gem::Specification.new do |s|
73
73
  s.add_runtime_dependency(%q<wref>, [">= 0"])
74
74
  s.add_runtime_dependency(%q<knjrbfw>, [">= 0"])
75
75
  s.add_runtime_dependency(%q<array_enumerator>, [">= 0"])
76
+ s.add_runtime_dependency(%q<string-cases>, [">= 0"])
76
77
  s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
77
78
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
78
79
  s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
@@ -84,6 +85,7 @@ Gem::Specification.new do |s|
84
85
  s.add_dependency(%q<wref>, [">= 0"])
85
86
  s.add_dependency(%q<knjrbfw>, [">= 0"])
86
87
  s.add_dependency(%q<array_enumerator>, [">= 0"])
88
+ s.add_dependency(%q<string-cases>, [">= 0"])
87
89
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
88
90
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
89
91
  s.add_dependency(%q<bundler>, [">= 1.0.0"])
@@ -96,6 +98,7 @@ Gem::Specification.new do |s|
96
98
  s.add_dependency(%q<wref>, [">= 0"])
97
99
  s.add_dependency(%q<knjrbfw>, [">= 0"])
98
100
  s.add_dependency(%q<array_enumerator>, [">= 0"])
101
+ s.add_dependency(%q<string-cases>, [">= 0"])
99
102
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
100
103
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
101
104
  s.add_dependency(%q<bundler>, [">= 1.0.0"])
@@ -7,7 +7,7 @@ class Baza::Driver::Sqlite3::Columns
7
7
  @args = args
8
8
  end
9
9
 
10
- DATA_SQL_ALLOWED_KEYS = [:name, :type, :maxlength, :autoincr, :primarykey, :null, :default, :default_func, :renames]
10
+ DATA_SQL_ALLOWED_KEYS = [:name, :type, :maxlength, :autoincr, :primarykey, :null, :default, :default_func, :renames, :after]
11
11
  #Returns SQL for a knjdb-compatible hash.
12
12
  def data_sql(data)
13
13
  data.each do |key, val|
data/include/model.rb CHANGED
@@ -184,6 +184,8 @@ class Baza::Model
184
184
  # ]
185
185
  # end
186
186
  def self.has_one(arr)
187
+ arr = [arr] if arr.is_a?(Symbol)
188
+
187
189
  arr.each do |val|
188
190
  methodname = nil
189
191
  colname = nil
@@ -880,4 +882,14 @@ class Baza::Model
880
882
 
881
883
  return attrs
882
884
  end
885
+
886
+ private
887
+
888
+ def str_snake_to_camel(str)
889
+
890
+ end
891
+
892
+ def str_camel_to_snake(str)
893
+
894
+ end
883
895
  end
@@ -1,4 +1,5 @@
1
1
  require "#{File.dirname(__FILE__)}/model_handler_sqlhelper.rb"
2
+ require "string-cases"
2
3
 
3
4
  class Baza::ModelHandler
4
5
  attr_reader :args, :events, :data, :ids_cache, :ids_cache_should
@@ -32,7 +33,6 @@ class Baza::ModelHandler
32
33
  raise "No class path given." if !@args[:class_path] and (@args[:require] or !@args.key?(:require))
33
34
 
34
35
  if args[:require_all]
35
- Knj.gem_require(:Php4r, "php4r")
36
36
  loads = []
37
37
 
38
38
  Dir.foreach(@args[:class_path]) do |file|
@@ -40,7 +40,7 @@ class Baza::ModelHandler
40
40
  file_parsed = file
41
41
  file_parsed.gsub!(@args[:class_pre], "") if @args.key?(:class_pre)
42
42
  file_parsed.gsub!(/\.rb$/, "")
43
- file_parsed = Php4r.ucwords(file_parsed)
43
+ file_parsed = StringCases.snake_to_camel(file_parsed)
44
44
 
45
45
  loads << file_parsed
46
46
  self.requireclass(file_parsed, {:load => false})
@@ -198,9 +198,6 @@ class Baza::ModelHandler
198
198
  end
199
199
 
200
200
  callback["block"].call(*callargs)
201
- elsif callback["callback"]
202
- require "php4r" if !Kernel.const_defined?(:Php4r)
203
- Php4r.call_user_func(callback["callback"], args)
204
201
  else
205
202
  raise "No valid callback given."
206
203
  end
@@ -211,6 +208,7 @@ class Baza::ModelHandler
211
208
  def requireclass(classname, args = {})
212
209
  classname = classname.to_sym
213
210
  return false if @objects.key?(classname)
211
+ classname_snake = StringCases.camel_to_snake(classname)
214
212
 
215
213
  @lock_require.synchronize do
216
214
  #Maybe the classname got required meanwhile the synchronized wait - check again.
@@ -232,8 +230,8 @@ class Baza::ModelHandler
232
230
  end
233
231
 
234
232
  if doreq
235
- filename = "#{@args[:class_path]}/#{@args[:class_pre]}#{classname.to_s.downcase}.rb"
236
- filename_req = "#{@args[:class_path]}/#{@args[:class_pre]}#{classname.to_s.downcase}"
233
+ filename = "#{@args[:class_path]}/#{@args[:class_pre]}#{classname_snake}.rb"
234
+ filename_req = "#{@args[:class_path]}/#{@args[:class_pre]}#{classname_snake}"
237
235
  raise "Class file could not be found: #{filename}." if !File.exists?(filename)
238
236
  require filename_req
239
237
  end
@@ -360,13 +358,7 @@ class Baza::ModelHandler
360
358
  end
361
359
 
362
360
  #Spawn object.
363
- if @args[:datarow] or @args[:custom]
364
- obj = @args[:module].const_get(classname).new(data, args)
365
- else
366
- pass_args = [data]
367
- pass_args = pass_args | @args[:extra_args] if @args[:extra_args]
368
- obj = @args[:module].const_get(classname).new(*pass_args)
369
- end
361
+ obj = @args[:module].const_get(classname).new(data, args)
370
362
 
371
363
  #Save object in cache.
372
364
  case @args[:cache]
@@ -414,6 +406,13 @@ class Baza::ModelHandler
414
406
  return false
415
407
  end
416
408
 
409
+ #Searches for an object with the given data. If not found it creates it. Returns the found or created object in the end.
410
+ def get_or_add(classname, data, args = nil)
411
+ obj = self.get_by(classname, data)
412
+ obj = self.add(classname, data) if !obj
413
+ return obj
414
+ end
415
+
417
416
  def get_try(obj, col_name, obj_name = nil)
418
417
  if !obj_name
419
418
  if match = col_name.to_s.match(/^(.+)_id$/)
@@ -445,14 +444,7 @@ class Baza::ModelHandler
445
444
  classob = @args[:module].const_get(classname)
446
445
 
447
446
  raise "list-function has not been implemented for '#{classname}'." if !classob.respond_to?("list")
448
-
449
- if @args[:datarow] or @args[:custom]
450
- ret = classob.list(Knj::Hash_methods.new(:args => args, :ob => self, :db => @args[:db]), &block)
451
- else
452
- realargs = [args]
453
- realargs = realargs | @args[:extra_args] if @args[:extra_args]
454
- ret = classob.list(*realargs, &block)
455
- end
447
+ ret = classob.list(Knj::Hash_methods.new(:args => args, :ob => self, :db => @args[:db]), &block)
456
448
 
457
449
  #If 'ret' is an array and a block is given then the list-method didnt return blocks. We emulate it instead with the following code.
458
450
  if block and ret.is_a?(Array)
@@ -655,7 +647,13 @@ class Baza::ModelHandler
655
647
  classname = classname.to_sym
656
648
  self.requireclass(classname)
657
649
 
658
- if @args[:datarow]
650
+ if @args[:custom]
651
+ classobj = @args[:module].const_get(classname)
652
+ retob = classobj.add(Knj::Hash_methods.new(
653
+ :ob => self,
654
+ :data => data
655
+ ))
656
+ else
659
657
  classobj = @args[:module].const_get(classname)
660
658
 
661
659
  #Run the class 'add'-method to check various data.
@@ -686,16 +684,6 @@ class Baza::ModelHandler
686
684
 
687
685
  #Spawn the object.
688
686
  retob = self.get(classname, ins_id, {:skip_reload => true})
689
- elsif @args[:custom]
690
- classobj = @args[:module].const_get(classname)
691
- retob = classobj.add(Knj::Hash_methods.new(
692
- :ob => self,
693
- :data => data
694
- ))
695
- else
696
- args = [data]
697
- args = args | @args[:extra_args] if @args[:extra_args]
698
- retob = @args[:module].const_get(classname).add(*args)
699
687
  end
700
688
 
701
689
  self.call("object" => retob, "signal" => "add")
@@ -708,31 +696,22 @@ class Baza::ModelHandler
708
696
  #===Examples
709
697
  # ob.adds(:User, [{:username => "User 1"}, {:username => "User 2"})
710
698
  def adds(classname, datas)
711
- if !@args[:datarow]
699
+ if @args[:module].const_get(classname).respond_to?(:add)
712
700
  datas.each do |data|
713
- @args[:module].const_get(classname).add(*args)
714
- self.call("object" => retob, "signal" => "add")
715
- end
716
- else
717
- if @args[:module].const_get(classname).respond_to?(:add)
718
- datas.each do |data|
719
- @args[:module].const_get(classname).add(Knj::Hash_methods.new(
720
- :ob => self,
721
- :db => self.db,
722
- :data => data
723
- ))
724
- end
701
+ @args[:module].const_get(classname).add(Knj::Hash_methods.new(
702
+ :ob => self,
703
+ :db => self.db,
704
+ :data => data
705
+ ))
725
706
  end
726
-
727
- db.insert_multi(classname, datas)
728
707
  end
729
708
 
709
+ db.insert_multi(classname, datas)
730
710
  self.cache_ids(classname)
731
711
  end
732
712
 
733
713
  #Calls a static method on a class. Passes the d-variable which contains the Objects-object, database-reference and more...
734
714
  def static(class_name, method_name, *args, &block)
735
- raise "Only available with datarow enabled." if !@args[:datarow] and !@args[:custom]
736
715
  class_name = class_name
737
716
  method_name = method_name
738
717
 
@@ -742,13 +721,7 @@ class Baza::ModelHandler
742
721
  #Sometimes this raises the exception but actually responds to the class? Therefore commented out. - knj
743
722
  #raise "The class '#{class_obj.name}' has no such method: '#{method_name}' (#{class_obj.methods.sort.join(", ")})." if !class_obj.respond_to?(method_name)
744
723
 
745
- pass_args = []
746
-
747
- if @args[:datarow]
748
- pass_args << Knj::Hash_methods.new(:ob => self, :db => self.db)
749
- else
750
- pass_args << Knj::Hash_methods.new(:ob => self)
751
- end
724
+ pass_args = [Knj::Hash_methods.new(:ob => self, :db => self.db)]
752
725
 
753
726
  args.each do |arg|
754
727
  pass_args << arg
@@ -805,52 +778,50 @@ class Baza::ModelHandler
805
778
  obj_id = object.id
806
779
  object.delete if object.respond_to?(:delete)
807
780
 
808
- if @args[:datarow]
809
- #If autodelete is set by 'has_many'-method, go through it and delete the various objects first.
810
- if autodelete_data = object.class.autodelete_data
811
- autodelete_data.each do |adel_data|
812
- self.list(adel_data[:classname], {adel_data[:colname].to_s => object.id}) do |obj_del|
813
- self.delete(obj_del, args)
814
- end
815
- end
816
- end
817
-
818
- #If depend is set by 'has_many'-method, check if any objects exists and raise error if so.
819
- if dep_datas = object.class.depending_data
820
- dep_datas.each do |dep_data|
821
- if obj = self.get_by(dep_data[:classname], {dep_data[:colname].to_s => object.id})
822
- raise "Cannot delete <#{object.class.name}:#{object.id}> because <#{obj.class.name}:#{obj.id}> depends on it."
823
- end
781
+ #If autodelete is set by 'has_many'-method, go through it and delete the various objects first.
782
+ if autodelete_data = object.class.autodelete_data
783
+ autodelete_data.each do |adel_data|
784
+ self.list(adel_data[:classname], {adel_data[:colname].to_s => object.id}) do |obj_del|
785
+ self.delete(obj_del, args)
824
786
  end
825
787
  end
826
-
827
- #If autozero is set by 'has_many'-method, check if any objects exists and set the ID to zero.
828
- if autozero_datas = object.class.autozero_data
829
- autozero_datas.each do |zero_data|
830
- self.list(zero_data[:classname], {zero_data[:colname].to_s => object.id}) do |obj_zero|
831
- obj_zero[zero_data[:colname].to_sym] = 0
832
- end
788
+ end
789
+
790
+ #If depend is set by 'has_many'-method, check if any objects exists and raise error if so.
791
+ if dep_datas = object.class.depending_data
792
+ dep_datas.each do |dep_data|
793
+ if obj = self.get_by(dep_data[:classname], {dep_data[:colname].to_s => object.id})
794
+ raise "Cannot delete <#{object.class.name}:#{object.id}> because <#{obj.class.name}:#{obj.id}> depends on it."
833
795
  end
834
796
  end
835
-
836
- #Delete any translations that has been set on the object by 'has_translation'-method.
837
- if object.class.translations
838
- begin
839
- _hb.trans_del(object)
840
- rescue NameError
841
- _kas.trans_del(object)
797
+ end
798
+
799
+ #If autozero is set by 'has_many'-method, check if any objects exists and set the ID to zero.
800
+ if autozero_datas = object.class.autozero_data
801
+ autozero_datas.each do |zero_data|
802
+ self.list(zero_data[:classname], {zero_data[:colname].to_s => object.id}) do |obj_zero|
803
+ obj_zero[zero_data[:colname].to_sym] = 0
842
804
  end
843
805
  end
844
-
845
-
846
- #If a buffer is given in arguments, then use that to delete the object.
847
- if args and buffer = args[:db_buffer]
848
- buffer.delete(object.table, {:id => obj_id})
849
- else
850
- @args[:db].delete(object.table, {:id => obj_id})
806
+ end
807
+
808
+ #Delete any translations that has been set on the object by 'has_translation'-method.
809
+ if object.class.translations
810
+ begin
811
+ _hb.trans_del(object)
812
+ rescue NameError
813
+ _kas.trans_del(object)
851
814
  end
852
815
  end
853
816
 
817
+
818
+ #If a buffer is given in arguments, then use that to delete the object.
819
+ if args and buffer = args[:db_buffer]
820
+ buffer.delete(object.table, {:id => obj_id})
821
+ else
822
+ @args[:db].delete(object.table, {:id => obj_id})
823
+ end
824
+
854
825
  @ids_cache[classname].delete(obj_id.to_i) if @ids_cache_should.key?(classname)
855
826
  self.call("object" => object, "signal" => "delete")
856
827
  object.destroy
@@ -859,38 +830,32 @@ class Baza::ModelHandler
859
830
 
860
831
  #Deletes several objects as one. If running datarow-mode it checks all objects before it starts to actually delete them. Its faster than deleting every single object by itself...
861
832
  def deletes(objs)
862
- if !@args[:datarow]
833
+ tables = {}
834
+
835
+ begin
863
836
  objs.each do |obj|
864
- self.delete(obj)
865
- end
866
- else
867
- tables = {}
868
-
869
- begin
870
- objs.each do |obj|
871
- next if obj.deleted?
872
- tablen = obj.table
873
-
874
- if !tables.key?(tablen)
875
- tables[tablen] = []
876
- end
877
-
878
- tables[tablen] << obj.id
879
- obj.delete if obj.respond_to?(:delete)
880
-
881
- #Remove from ID-cache.
882
- classname = obj.class.classname.to_sym
883
- @ids_cache[classname].delete(obj.id.to_i) if @ids_cache_should.key?(classname)
884
-
885
- #Unset any data on the object, so it seems deleted.
886
- obj.destroy
837
+ next if obj.deleted?
838
+ tablen = obj.table
839
+
840
+ if !tables.key?(tablen)
841
+ tables[tablen] = []
887
842
  end
888
- ensure
889
- #An exception may occur, and we should make sure, that objects that has gotten 'delete' called also are deleted from their tables.
890
- tables.each do |table, ids|
891
- ids.each_slice(1000) do |ids_slice|
892
- @args[:db].delete(table, {:id => ids_slice})
893
- end
843
+
844
+ tables[tablen] << obj.id
845
+ obj.delete if obj.respond_to?(:delete)
846
+
847
+ #Remove from ID-cache.
848
+ classname = obj.class.classname.to_sym
849
+ @ids_cache[classname].delete(obj.id.to_i) if @ids_cache_should.key?(classname)
850
+
851
+ #Unset any data on the object, so it seems deleted.
852
+ obj.destroy
853
+ end
854
+ ensure
855
+ #An exception may occur, and we should make sure, that objects that has gotten 'delete' called also are deleted from their tables.
856
+ tables.each do |table, ids|
857
+ ids.each_slice(1000) do |ids_slice|
858
+ @args[:db].delete(table, {:id => ids_slice})
894
859
  end
895
860
  end
896
861
  end
@@ -219,7 +219,7 @@ class Baza::ModelHandler
219
219
 
220
220
  sql_where << " AND #{table}`#{db.esc_col(key)}` = '#{db.esc(realval)}'"
221
221
  found = true
222
- elsif args[:cols].key?(key)
222
+ elsif args[:cols].key?(key.to_s)
223
223
  if val.is_a?(Array)
224
224
  if val.empty? and db.opts[:type].to_s == "mysql"
225
225
  sql_where << " AND false"
data/include/revision.rb CHANGED
@@ -42,6 +42,7 @@ class Baza::Revision
42
42
 
43
43
  schema = args[:schema]
44
44
  db = args[:db]
45
+ raise "No 'db' was given." if !db
45
46
 
46
47
  schema.each do |key, val|
47
48
  raise "Invalid key for schema: '#{key}' (#{key.class.name})." unless INIT_DB_SCHEMA_ALLOWED_ARGS.include?(key)
@@ -241,7 +242,7 @@ class Baza::Revision
241
242
 
242
243
  if table_data[:indexes]
243
244
  table_data[:indexes].each do |index_data|
244
- if index_data.is_a?(String)
245
+ if index_data.is_a?(String) or index_data.is_a?(Symbol)
245
246
  index_data = {:name => index_data, :columns => [index_data]}
246
247
  end
247
248
 
metadata CHANGED
@@ -1,171 +1,187 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baza
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
5
4
  prerelease:
5
+ version: 0.0.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kasper Johansen
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-18 00:00:00.000000000 Z
12
+ date: 2013-05-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: datet
16
- requirement: !ruby/object:Gem::Requirement
15
+ version_requirements: !ruby/object:Gem::Requirement
17
16
  none: false
18
17
  requirements:
19
18
  - - ! '>='
20
19
  - !ruby/object:Gem::Version
21
20
  version: '0'
21
+ name: datet
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
24
+ requirement: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
30
  - !ruby/object:Gem::Dependency
31
- name: wref
32
- requirement: !ruby/object:Gem::Requirement
31
+ version_requirements: !ruby/object:Gem::Requirement
33
32
  none: false
34
33
  requirements:
35
34
  - - ! '>='
36
35
  - !ruby/object:Gem::Version
37
36
  version: '0'
37
+ name: wref
38
38
  type: :runtime
39
39
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
40
+ requirement: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
46
  - !ruby/object:Gem::Dependency
47
- name: knjrbfw
48
- requirement: !ruby/object:Gem::Requirement
47
+ version_requirements: !ruby/object:Gem::Requirement
49
48
  none: false
50
49
  requirements:
51
50
  - - ! '>='
52
51
  - !ruby/object:Gem::Version
53
52
  version: '0'
53
+ name: knjrbfw
54
54
  type: :runtime
55
55
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
56
+ requirement: !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
59
  - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  - !ruby/object:Gem::Dependency
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
63
69
  name: array_enumerator
70
+ type: :runtime
71
+ prerelease: false
64
72
  requirement: !ruby/object:Gem::Requirement
65
73
  none: false
66
74
  requirements:
67
75
  - - ! '>='
68
76
  - !ruby/object:Gem::Version
69
77
  version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ none: false
81
+ requirements:
82
+ - - ! '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ name: string-cases
70
86
  type: :runtime
71
87
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
88
+ requirement: !ruby/object:Gem::Requirement
73
89
  none: false
74
90
  requirements:
75
91
  - - ! '>='
76
92
  - !ruby/object:Gem::Version
77
93
  version: '0'
78
94
  - !ruby/object:Gem::Dependency
79
- name: rspec
80
- requirement: !ruby/object:Gem::Requirement
95
+ version_requirements: !ruby/object:Gem::Requirement
81
96
  none: false
82
97
  requirements:
83
98
  - - ~>
84
99
  - !ruby/object:Gem::Version
85
100
  version: 2.8.0
101
+ name: rspec
86
102
  type: :development
87
103
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
104
+ requirement: !ruby/object:Gem::Requirement
89
105
  none: false
90
106
  requirements:
91
107
  - - ~>
92
108
  - !ruby/object:Gem::Version
93
109
  version: 2.8.0
94
110
  - !ruby/object:Gem::Dependency
95
- name: rdoc
96
- requirement: !ruby/object:Gem::Requirement
111
+ version_requirements: !ruby/object:Gem::Requirement
97
112
  none: false
98
113
  requirements:
99
114
  - - ~>
100
115
  - !ruby/object:Gem::Version
101
116
  version: '3.12'
117
+ name: rdoc
102
118
  type: :development
103
119
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
120
+ requirement: !ruby/object:Gem::Requirement
105
121
  none: false
106
122
  requirements:
107
123
  - - ~>
108
124
  - !ruby/object:Gem::Version
109
125
  version: '3.12'
110
126
  - !ruby/object:Gem::Dependency
111
- name: bundler
112
- requirement: !ruby/object:Gem::Requirement
127
+ version_requirements: !ruby/object:Gem::Requirement
113
128
  none: false
114
129
  requirements:
115
130
  - - ! '>='
116
131
  - !ruby/object:Gem::Version
117
132
  version: 1.0.0
133
+ name: bundler
118
134
  type: :development
119
135
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
136
+ requirement: !ruby/object:Gem::Requirement
121
137
  none: false
122
138
  requirements:
123
139
  - - ! '>='
124
140
  - !ruby/object:Gem::Version
125
141
  version: 1.0.0
126
142
  - !ruby/object:Gem::Dependency
127
- name: jeweler
128
- requirement: !ruby/object:Gem::Requirement
143
+ version_requirements: !ruby/object:Gem::Requirement
129
144
  none: false
130
145
  requirements:
131
146
  - - ~>
132
147
  - !ruby/object:Gem::Version
133
148
  version: 1.8.4
149
+ name: jeweler
134
150
  type: :development
135
151
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
152
+ requirement: !ruby/object:Gem::Requirement
137
153
  none: false
138
154
  requirements:
139
155
  - - ~>
140
156
  - !ruby/object:Gem::Version
141
157
  version: 1.8.4
142
158
  - !ruby/object:Gem::Dependency
143
- name: sqlite3
144
- requirement: !ruby/object:Gem::Requirement
159
+ version_requirements: !ruby/object:Gem::Requirement
145
160
  none: false
146
161
  requirements:
147
162
  - - ! '>='
148
163
  - !ruby/object:Gem::Version
149
164
  version: '0'
165
+ name: sqlite3
150
166
  type: :development
151
167
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
168
+ requirement: !ruby/object:Gem::Requirement
153
169
  none: false
154
170
  requirements:
155
171
  - - ! '>='
156
172
  - !ruby/object:Gem::Version
157
173
  version: '0'
158
174
  - !ruby/object:Gem::Dependency
159
- name: mysql2
160
- requirement: !ruby/object:Gem::Requirement
175
+ version_requirements: !ruby/object:Gem::Requirement
161
176
  none: false
162
177
  requirements:
163
178
  - - ! '>='
164
179
  - !ruby/object:Gem::Version
165
180
  version: '0'
181
+ name: mysql2
166
182
  type: :development
167
183
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
184
+ requirement: !ruby/object:Gem::Requirement
169
185
  none: false
170
186
  requirements:
171
187
  - - ! '>='
@@ -232,10 +248,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
232
248
  requirements:
233
249
  - - ! '>='
234
250
  - !ruby/object:Gem::Version
235
- version: '0'
236
251
  segments:
237
252
  - 0
238
- hash: 3231877095185720850
253
+ hash: -33240531491757229
254
+ version: '0'
239
255
  required_rubygems_version: !ruby/object:Gem::Requirement
240
256
  none: false
241
257
  requirements:
@@ -244,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
260
  version: '0'
245
261
  requirements: []
246
262
  rubyforge_project:
247
- rubygems_version: 1.8.25
263
+ rubygems_version: 1.8.23
248
264
  signing_key:
249
265
  specification_version: 3
250
266
  summary: A database abstraction layer, model framework and database framework.