rubyfb 0.5.3-x86-mswin32-60 → 0.5.4-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/Rakefile +1 -1
- data/ext/extconf.rb +4 -4
- data/lib/active_record/connection_adapters/rubyfb_adapter.rb +11 -5
- data/lib/rubyfb_lib.so +0 -0
- data/rubyfb.gemspec +2 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
data/ext/extconf.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
ENV['ARCHFLAGS']='-arch '+`arch`.strip if
|
3
|
+
ENV['ARCHFLAGS']='-arch '+`arch`.strip if RUBY_PLATFORM.include?("darwin")
|
4
4
|
|
5
5
|
require 'mkmf'
|
6
6
|
|
7
7
|
# Add the framework link for Mac OS X.
|
8
|
-
if
|
8
|
+
if RUBY_PLATFORM.include?("darwin")
|
9
9
|
$LDFLAGS = $LDFLAGS + " -framework Firebird"
|
10
10
|
$CFLAGS = $CFLAGS + " -DOS_UNIX"
|
11
11
|
firebird_include="/Library/Frameworks/Firebird.framework/Headers"
|
12
12
|
firebird_lib="/Library/Frameworks/Firebird.framework/Libraries"
|
13
|
-
elsif
|
13
|
+
elsif RUBY_PLATFORM.include?("win32")
|
14
14
|
$LDFLAGS = $LDFLAGS + " fbclient_ms.lib"
|
15
15
|
$CFLAGS = "-MT #{$CFLAGS}".gsub!(/-MD\s*/, '') + " -DOS_WIN32"
|
16
16
|
dir_config("win32")
|
@@ -18,7 +18,7 @@ elsif PLATFORM.include?("win32")
|
|
18
18
|
dir_config("dotnet")
|
19
19
|
firebird_include="../mswin32fb"
|
20
20
|
firebird_lib="../mswin32fb"
|
21
|
-
elsif
|
21
|
+
elsif RUBY_PLATFORM.include?("linux")
|
22
22
|
$LDFLAGS = $LDFLAGS + " -lfbclient -lpthread"
|
23
23
|
$CFLAGS = $CFLAGS + " -DOS_UNIX"
|
24
24
|
end
|
@@ -66,7 +66,7 @@ module ActiveRecord
|
|
66
66
|
super(name.downcase, nil, @firebird_type, !null_flag)
|
67
67
|
|
68
68
|
@limit = decide_limit(length)
|
69
|
-
@domain, @sub_type, @precision, @scale = domain, sub_type, precision, scale.abs
|
69
|
+
@domain, @sub_type, @precision, @scale = domain, sub_type, precision, (scale.nil? ? 0 : scale.abs)
|
70
70
|
@type = simplified_type(@firebird_type)
|
71
71
|
@default = parse_default(default_source) if default_source
|
72
72
|
@default = type_cast(decide_default(connection)) if @default
|
@@ -124,7 +124,7 @@ module ActiveRecord
|
|
124
124
|
when /blob/i
|
125
125
|
@subtype == 1 ? :text : :binary
|
126
126
|
else
|
127
|
-
if @domain =~
|
127
|
+
if @domain =~ RubyfbAdapter.boolean_domain[:domain_pattern] || name =~ RubyfbAdapter.boolean_domain[:name_pattern]
|
128
128
|
:boolean
|
129
129
|
else
|
130
130
|
super
|
@@ -164,9 +164,15 @@ module ActiveRecord
|
|
164
164
|
#
|
165
165
|
# CREATE DOMAIN BOOLEAN AS CHAR(1) CHECK (VALUE IN ('T', 'F'));
|
166
166
|
#
|
167
|
-
# ...you can add the following
|
167
|
+
# ...you can add the following lines to your <tt>environment.rb</tt> file:
|
168
168
|
#
|
169
|
-
# ActiveRecord::ConnectionAdapters::RubyfbAdapter.boolean_domain
|
169
|
+
# ActiveRecord::ConnectionAdapters::RubyfbAdapter.boolean_domain[:true] = 'T'
|
170
|
+
# ActiveRecord::ConnectionAdapters::RubyfbAdapter.boolean_domain[:false] = 'F'
|
171
|
+
#
|
172
|
+
# Boolean columns are detected by name and domain name patterns configurable by:
|
173
|
+
#
|
174
|
+
# ActiveRecord::ConnectionAdapters::RubyfbAdapter.boolean_domain[:domain_pattern], default = /boolean/i
|
175
|
+
# ActiveRecord::ConnectionAdapters::RubyfbAdapter.boolean_domain[:name_pattern], default = /^is_/i
|
170
176
|
#
|
171
177
|
# === BLOB Elements
|
172
178
|
# The Firebird adapter currently provides only limited support for +BLOB+
|
@@ -276,7 +282,7 @@ module ActiveRecord
|
|
276
282
|
class RubyfbAdapter < AbstractAdapter
|
277
283
|
TEMP_COLUMN_NAME = 'AR$TEMP_COLUMN'
|
278
284
|
|
279
|
-
@@boolean_domain = { :name => "d_boolean", :type => "smallint", :true => 1, :false => 0 }
|
285
|
+
@@boolean_domain = { :name => "d_boolean", :type => "smallint", :true => 1, :false => 0, :domain_pattern=>/boolean/i, :name_pattern=>/^is_/i }
|
280
286
|
cattr_accessor :boolean_domain
|
281
287
|
|
282
288
|
def initialize(connection, logger, connection_params = nil)
|
data/lib/rubyfb_lib.so
CHANGED
Binary file
|
data/rubyfb.gemspec
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rubyfb}
|
5
|
-
s.version = "0.5.
|
5
|
+
s.version = "0.5.4"
|
6
6
|
s.platform = %q{x86-mswin32-60}
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.authors = ["George Georgiev"]
|
10
|
-
s.date = %q{2010-
|
10
|
+
s.date = %q{2010-10-15}
|
11
11
|
s.description = %q{Firebird SQL access library}
|
12
12
|
s.email = %q{georgiev@heatbs.com}
|
13
13
|
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "examples/example01.rb", "ext/extconf.rb", "lib/Connection.rb", "lib/ProcedureCall.rb", "lib/SQLType.rb", "lib/rubyfb.rb", "lib/src.rb"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyfb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: x86-mswin32-60
|
6
6
|
authors:
|
7
7
|
- George Georgiev
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-10-15 00:00:00 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|