fb_adapter 0.5.8 → 0.5.9

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.
@@ -18,7 +18,8 @@ module ActiveRecord
18
18
  begin
19
19
  connection = db.connect
20
20
  rescue
21
- require 'pp'; pp config
21
+ require 'pp'
22
+ pp config
22
23
  connection = config[:create] ? db.create.connect : (raise ConnectionNotEstablished, "No Firebird connections established.")
23
24
  end
24
25
  ConnectionAdapters::FbAdapter.new(connection, logger, config)
@@ -28,7 +29,6 @@ module ActiveRecord
28
29
  module ConnectionAdapters
29
30
  class FbColumn < Column # :nodoc:
30
31
  def initialize(name, domain, type, sub_type, length, precision, scale, default_source, null_flag)
31
- #puts "*** #{type} ~~~ #{sub_type}"
32
32
  @firebird_type = Fb::SqlType.from_code(type, sub_type || 0)
33
33
  super(name.downcase, nil, @firebird_type, !null_flag)
34
34
  @default = parse_default(default_source) if default_source
@@ -247,7 +247,13 @@ module ActiveRecord
247
247
  end
248
248
 
249
249
  def quote_object(obj)
250
- return obj.respond_to?(:quoted_id) ? obj.quoted_id : "@#{Base64.encode64(obj.to_yaml).chop}@"
250
+ if obj.respond_to?(:quoted_id)
251
+ obj.quoted_id
252
+ elsif obj.respond_to?(:to_str)
253
+ "@#{Base64.encode64(obj.to_str).chop}@"
254
+ else
255
+ "@#{Base64.encode64(obj.to_yaml).chop}@"
256
+ end
251
257
  end
252
258
 
253
259
  def quote_column_name(column_name) # :nodoc:
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fb_adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 5
8
+ - 9
9
+ version: 0.5.9
5
10
  platform: ruby
6
11
  authors:
7
12
  - Brent Rowland
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-02-04 00:00:00 -07:00
17
+ date: 2010-03-01 00:00:00 -07:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -24,7 +29,9 @@ extra_rdoc_files: []
24
29
  files:
25
30
  - lib/active_record/connection_adapters/fb_adapter.rb
26
31
  has_rdoc: false
27
- homepage: http://www.rowlandresearch.com/ruby/
32
+ homepage: http://github.com/rowland/fb_adapter
33
+ licenses: []
34
+
28
35
  post_install_message:
29
36
  rdoc_options: []
30
37
 
@@ -34,20 +41,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
34
41
  requirements:
35
42
  - - ">="
36
43
  - !ruby/object:Gem::Version
44
+ segments:
45
+ - 0
37
46
  version: "0"
38
- version:
39
47
  required_rubygems_version: !ruby/object:Gem::Requirement
40
48
  requirements:
41
49
  - - ">="
42
50
  - !ruby/object:Gem::Version
51
+ segments:
52
+ - 0
43
53
  version: "0"
44
- version:
45
54
  requirements:
46
55
  - Firebird library fb
47
56
  rubyforge_project: fblib
48
- rubygems_version: 1.3.1
57
+ rubygems_version: 1.3.6
49
58
  signing_key:
50
- specification_version: 2
59
+ specification_version: 3
51
60
  summary: ActiveRecord Firebird Adapter
52
61
  test_files: []
53
62