activerecord-jdbc-adapter 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +2 -2
- data/Gemfile +1 -1
- data/History.md +18 -0
- data/activerecord-jdbc-adapter.gemspec +2 -1
- data/lib/arel/visitors/firebird.rb +1 -1
- data/lib/arjdbc/derby/adapter.rb +1 -1
- data/lib/arjdbc/firebird/adapter.rb +6 -4
- data/lib/arjdbc/jdbc/adapter_java.jar +0 -0
- data/lib/arjdbc/jdbc/column.rb +1 -2
- data/lib/arjdbc/jdbc/driver.rb +3 -3
- data/lib/arjdbc/mysql/adapter.rb +1 -1
- data/lib/arjdbc/oracle/adapter.rb +1 -1
- data/lib/arjdbc/postgresql/adapter.rb +17 -6
- data/lib/arjdbc/postgresql/array_parser.rb +89 -0
- data/lib/arjdbc/postgresql/column.rb +63 -25
- data/lib/arjdbc/postgresql/connection_methods.rb +3 -1
- data/lib/arjdbc/tasks/databases.rake +1 -1
- data/lib/arjdbc/version.rb +1 -1
- data/src/java/arjdbc/jdbc/RubyJdbcConnection.java +6 -6
- data/src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java +42 -12
- metadata +3 -14
- data/gemfiles/rails23.gemfile +0 -18
- data/gemfiles/rails23.gemfile.lock +0 -63
- data/gemfiles/rails30.gemfile +0 -17
- data/gemfiles/rails30.gemfile.lock +0 -61
- data/gemfiles/rails31.gemfile +0 -17
- data/gemfiles/rails31.gemfile.lock +0 -59
- data/gemfiles/rails32.gemfile +0 -17
- data/gemfiles/rails32.gemfile.lock +0 -62
- data/gemfiles/rails40.gemfile +0 -17
- data/gemfiles/rails40.gemfile.lock +0 -59
- data/gemfiles/rails41.gemfile +0 -18
- data/gemfiles/rails41.gemfile.lock +0 -117
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 928b3af97782b45db074f63a7c5a3242e7223ea9
|
4
|
+
data.tar.gz: ad5a1f8133f58957d7ab2f9678367523b85c29a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be7f8bbb664f74030fc79097e8f6b673b5ed93acfc348271ccfe6fa9b1e3c3098f34afbb071d597bdb8dad561828c0912a443516848a43dfd56f19653fbe7c4a
|
7
|
+
data.tar.gz: 60516ac2d7c14bb124b8215400368152014ff00e32a8a9b4c7790cdbcb4eaf8fe9c3ffc3510d23e20277850469e9d41a2ab23d8e2640a0ba0206ea41e1bd81c4
|
data/Appraisals
CHANGED
@@ -12,12 +12,12 @@ appraise "rails31" do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
appraise "rails32" do
|
15
|
-
gem "activerecord", "~> 3.2.
|
15
|
+
gem "activerecord", "~> 3.2.16", :require => false
|
16
16
|
end
|
17
17
|
|
18
18
|
appraise "rails40" do
|
19
19
|
# NOTE: make sure you're using --1.9 with AR-4.0
|
20
|
-
gem "activerecord", "~> 4.0.
|
20
|
+
gem "activerecord", "~> 4.0.2", :require => false
|
21
21
|
end
|
22
22
|
|
23
23
|
appraise "rails41" do
|
data/Gemfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
3
|
gem 'activerecord', :require => nil
|
4
|
-
gem 'thread_safe', :require => nil
|
4
|
+
gem 'thread_safe', :require => nil # "optional" - we can roll without it
|
5
5
|
if defined?(JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
|
6
6
|
gem 'jruby-openssl', :platform => :jruby
|
7
7
|
end
|
data/History.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
## 1.3.4 (12/12/13)
|
2
|
+
|
3
|
+
- [postgres] unwrap connection instead of casting when adding custom types (#515)
|
4
|
+
- [postgres] allow returning string values for (JDBC) arrays with (#510)
|
5
|
+
- allow for symbol keys with custom JDBC properties in `config[:properties]`
|
6
|
+
- replacing use of AR::ConnectionFailed with AR::ConnectionNotEstablished (#513)
|
7
|
+
- [firebird] fix for missing args when visit_Arel_Nodes_SelectCore is called
|
8
|
+
- [postgres] better column compatibility with 3.x (avoid array/oid_type)
|
9
|
+
- [postgres] backport array-parser due `Column#extract_default` (#504)
|
10
|
+
- [postgres] backported "Correctly parse bigint defaults in PostgreSQL"
|
11
|
+
- [postgres] 4.0 compat - detect default_function just like on MRI
|
12
|
+
- [postgres] backport support for negative money values (in parenthesis)
|
13
|
+
- [postgres] support :login_timeout as a standalone config option
|
14
|
+
- [firebird] align `prefetch_primary_key?` with Oracle (only for simple PKs)
|
15
|
+
- [oracle] do not pre-fetch the primary key if multiple primary keys exist (#498)
|
16
|
+
|
17
|
+
Code Contributors: @andfx, Gavin Stark, Ray Zane, @chapmajs
|
18
|
+
|
1
19
|
## 1.3.3 (11/12/13)
|
2
20
|
|
3
21
|
- [mysql] allow encoding to be server-detected (using `encoding: false`)
|
@@ -24,7 +24,8 @@ Gem::Specification.new do |gem|
|
|
24
24
|
|
25
25
|
gem.files = `git ls-files`.split("\n").
|
26
26
|
reject { |f| f =~ /^(activerecord-jdbc[^-]|jdbc-)/ }. # gem directories
|
27
|
-
reject { |f| f =~ /^(bench|test)/ } # not sure if including tests is useful
|
27
|
+
reject { |f| f =~ /^(bench|test)/ }. # not sure if including tests is useful
|
28
|
+
reject { |f| f =~ /^(gemfiles)/ } # no tests - no Gemfile_s appraised ...
|
28
29
|
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
29
30
|
gem.test_files = gem.files.grep(%r{^test/})
|
30
31
|
|
@@ -11,7 +11,7 @@ module Arel
|
|
11
11
|
].compact.join(' ').strip
|
12
12
|
|
13
13
|
sql = [
|
14
|
-
o.cores.map { |x|
|
14
|
+
o.cores.map { |x| do_visit_select_core x, a }.join,
|
15
15
|
("ORDER BY #{o.orders.map { |x| do_visit x, a }.join(', ')}" unless o.orders.empty?),
|
16
16
|
].compact.join ' '
|
17
17
|
|
data/lib/arjdbc/derby/adapter.rb
CHANGED
@@ -96,7 +96,7 @@ module ArJdbc
|
|
96
96
|
md = jdbc_connection.meta_data
|
97
97
|
major_version = md.database_major_version; minor_version = md.database_minor_version
|
98
98
|
if major_version < 10 || (major_version == 10 && minor_version < 5)
|
99
|
-
raise ::ActiveRecord::
|
99
|
+
raise ::ActiveRecord::ConnectionNotEstablished, "Derby adapter requires Derby >= 10.5"
|
100
100
|
end
|
101
101
|
if major_version == 10 && minor_version < 8 # 10.8 ~ supports JDBC 4.1
|
102
102
|
config[:connection_alive_sql] ||=
|
@@ -166,11 +166,13 @@ module ArJdbc
|
|
166
166
|
end
|
167
167
|
|
168
168
|
# Should primary key values be selected from their corresponding
|
169
|
-
# sequence before the insert statement?
|
170
|
-
#
|
171
|
-
#
|
169
|
+
# sequence before the insert statement?
|
170
|
+
# @see #next_sequence_value
|
171
|
+
# @override
|
172
172
|
def prefetch_primary_key?(table_name = nil)
|
173
|
-
true
|
173
|
+
return true if table_name.nil?
|
174
|
+
table_name = table_name.to_s
|
175
|
+
columns(table_name).count { |column| column.primary } == 1
|
174
176
|
end
|
175
177
|
|
176
178
|
def default_sequence_name(table_name, column=nil)
|
Binary file
|
data/lib/arjdbc/jdbc/column.rb
CHANGED
@@ -16,8 +16,7 @@ module ActiveRecord
|
|
16
16
|
default = args.shift
|
17
17
|
else # for extending classes allow ignoring first argument :
|
18
18
|
if ! config.nil? && ! config.is_a?(Hash)
|
19
|
-
# initialize(name, default, *args)
|
20
|
-
default = name; name = config
|
19
|
+
default = name; name = config # initialize(name, default, *args)
|
21
20
|
else
|
22
21
|
default = args.shift
|
23
22
|
end
|
data/lib/arjdbc/jdbc/driver.rb
CHANGED
@@ -2,7 +2,7 @@ module ActiveRecord
|
|
2
2
|
module ConnectionAdapters
|
3
3
|
class JdbcDriver
|
4
4
|
attr_reader :name, :properties
|
5
|
-
|
5
|
+
|
6
6
|
def initialize(name, properties = {})
|
7
7
|
@name = name
|
8
8
|
@driver = driver_class.new
|
@@ -10,10 +10,10 @@ module ActiveRecord
|
|
10
10
|
@properties = properties # allow programmatically set properties
|
11
11
|
else
|
12
12
|
@properties = Java::JavaUtil::Properties.new
|
13
|
-
properties.each { |key, val| @properties[key] = val.to_s } if properties
|
13
|
+
properties.each { |key, val| @properties[key.to_s] = val.to_s } if properties
|
14
14
|
end
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def driver_class
|
18
18
|
@driver_class ||= begin
|
19
19
|
driver_class_const = (@name[0...1].capitalize + @name[1..@name.length]).gsub(/\./, '_')
|
data/lib/arjdbc/mysql/adapter.rb
CHANGED
@@ -20,7 +20,7 @@ module ArJdbc
|
|
20
20
|
def init_connection(jdbc_connection)
|
21
21
|
meta = jdbc_connection.meta_data
|
22
22
|
if meta.driver_major_version < 5
|
23
|
-
raise ::ActiveRecord::
|
23
|
+
raise ::ActiveRecord::ConnectionNotEstablished,
|
24
24
|
"MySQL adapter requires driver >= 5.0 got: '#{meta.driver_version}'"
|
25
25
|
elsif meta.driver_major_version == 5 && meta.driver_minor_version < 1
|
26
26
|
config[:connection_alive_sql] ||= 'SELECT 1' # need 5.1 for JDBC 4.0
|
@@ -508,7 +508,7 @@ module ArJdbc
|
|
508
508
|
def prefetch_primary_key?(table_name = nil)
|
509
509
|
return true if table_name.nil?
|
510
510
|
table_name = table_name.to_s
|
511
|
-
columns(table_name).
|
511
|
+
columns(table_name).count { |column| column.primary } == 1
|
512
512
|
end
|
513
513
|
|
514
514
|
# @override
|
@@ -147,7 +147,7 @@ module ArJdbc
|
|
147
147
|
end
|
148
148
|
|
149
149
|
def type_cast(value, column, array_member = false)
|
150
|
-
return super unless column
|
150
|
+
return super(value, nil) unless column
|
151
151
|
|
152
152
|
case value
|
153
153
|
when String
|
@@ -243,6 +243,7 @@ module ArJdbc
|
|
243
243
|
def prepare_column_options(column, types)
|
244
244
|
spec = super
|
245
245
|
spec[:array] = 'true' if column.respond_to?(:array) && column.array
|
246
|
+
spec[:default] = "\"#{column.default_function}\"" if column.default_function
|
246
247
|
spec
|
247
248
|
end if AR4_COMPAT
|
248
249
|
|
@@ -1237,16 +1238,25 @@ module ActiveRecord::ConnectionAdapters
|
|
1237
1238
|
include ::ArJdbc::PostgreSQL::Column
|
1238
1239
|
|
1239
1240
|
def initialize(name, default, oid_type = nil, sql_type = nil, null = true)
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1241
|
+
if oid_type.is_a?(Integer) then @oid_type = oid_type
|
1242
|
+
else # NOTE: AR <= 3.2 : (name, default, sql_type = nil, null = true)
|
1243
|
+
null, sql_type, oid_type = !! sql_type, oid_type, nil
|
1244
|
+
end
|
1245
|
+
if sql_type =~ /\[\]$/ && ArJdbc::PostgreSQL::AR4_COMPAT
|
1244
1246
|
@array = true if respond_to?(:array)
|
1245
1247
|
super(name, default, sql_type[0..sql_type.length - 3], null)
|
1246
1248
|
else
|
1247
1249
|
@array = false if respond_to?(:array)
|
1248
1250
|
super(name, default, sql_type, null)
|
1249
1251
|
end
|
1252
|
+
|
1253
|
+
@default_function = default if has_default_function?(@default, default)
|
1254
|
+
end
|
1255
|
+
|
1256
|
+
private
|
1257
|
+
|
1258
|
+
def has_default_function?(default_value, default)
|
1259
|
+
! default_value && ( %r{\w+\(.*\)} === default )
|
1250
1260
|
end
|
1251
1261
|
|
1252
1262
|
end
|
@@ -1344,7 +1354,7 @@ module ActiveRecord::ConnectionAdapters
|
|
1344
1354
|
|
1345
1355
|
def primary_key(name, type = :primary_key, options = {})
|
1346
1356
|
return super unless type == :uuid
|
1347
|
-
options[:default]
|
1357
|
+
options[:default] = options.fetch(:default, 'uuid_generate_v4()')
|
1348
1358
|
options[:primary_key] = true
|
1349
1359
|
column name, type, options
|
1350
1360
|
end if ActiveRecord::VERSION::MAJOR > 3 # 3.2 super expects (name)
|
@@ -1402,6 +1412,7 @@ module ActiveRecord::ConnectionAdapters
|
|
1402
1412
|
end
|
1403
1413
|
|
1404
1414
|
if ActiveRecord::VERSION::MAJOR < 4 # Rails 3.x compatibility
|
1415
|
+
PostgreSQLJdbcConnection.raw_array_type = true if PostgreSQLJdbcConnection.raw_array_type? == nil
|
1405
1416
|
PostgreSQLJdbcConnection.raw_hstore_type = true if PostgreSQLJdbcConnection.raw_hstore_type? == nil
|
1406
1417
|
end
|
1407
1418
|
|
@@ -0,0 +1,89 @@
|
|
1
|
+
module ArJdbc
|
2
|
+
module PostgreSQL
|
3
|
+
module ArrayParser
|
4
|
+
|
5
|
+
def parse_pg_array(string)
|
6
|
+
parse_data(string, 0)
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def parse_data(string, index)
|
12
|
+
local_index = index
|
13
|
+
array = []
|
14
|
+
while(local_index < string.length)
|
15
|
+
case string[local_index]
|
16
|
+
when '{'
|
17
|
+
local_index,array = parse_array_contents(array, string, local_index + 1)
|
18
|
+
when '}'
|
19
|
+
return array
|
20
|
+
end
|
21
|
+
local_index += 1
|
22
|
+
end
|
23
|
+
|
24
|
+
array
|
25
|
+
end
|
26
|
+
|
27
|
+
def parse_array_contents(array, string, index)
|
28
|
+
is_escaping = false
|
29
|
+
is_quoted = false
|
30
|
+
was_quoted = false
|
31
|
+
current_item = ''
|
32
|
+
|
33
|
+
local_index = index
|
34
|
+
while local_index
|
35
|
+
token = string[local_index]
|
36
|
+
if is_escaping
|
37
|
+
current_item << token
|
38
|
+
is_escaping = false
|
39
|
+
else
|
40
|
+
if is_quoted
|
41
|
+
case token
|
42
|
+
when '"'
|
43
|
+
is_quoted = false
|
44
|
+
was_quoted = true
|
45
|
+
when "\\"
|
46
|
+
is_escaping = true
|
47
|
+
else
|
48
|
+
current_item << token
|
49
|
+
end
|
50
|
+
else
|
51
|
+
case token
|
52
|
+
when "\\"
|
53
|
+
is_escaping = true
|
54
|
+
when ','
|
55
|
+
add_item_to_array(array, current_item, was_quoted)
|
56
|
+
current_item = ''
|
57
|
+
was_quoted = false
|
58
|
+
when '"'
|
59
|
+
is_quoted = true
|
60
|
+
when '{'
|
61
|
+
internal_items = []
|
62
|
+
local_index,internal_items = parse_array_contents(internal_items, string, local_index + 1)
|
63
|
+
array.push(internal_items)
|
64
|
+
when '}'
|
65
|
+
add_item_to_array(array, current_item, was_quoted)
|
66
|
+
return local_index,array
|
67
|
+
else
|
68
|
+
current_item << token
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
local_index += 1
|
74
|
+
end
|
75
|
+
return local_index,array
|
76
|
+
end
|
77
|
+
|
78
|
+
def add_item_to_array(array, current_item, quoted)
|
79
|
+
if current_item.length == 0
|
80
|
+
elsif !quoted && current_item == 'NULL'
|
81
|
+
array.push nil
|
82
|
+
else
|
83
|
+
array.push current_item
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -13,13 +13,27 @@ module ArJdbc
|
|
13
13
|
def self.included(base)
|
14
14
|
# NOTE: assumes a standalone PostgreSQLColumn class
|
15
15
|
class << base
|
16
|
-
|
16
|
+
|
17
17
|
attr_accessor :money_precision
|
18
|
+
|
19
|
+
# Loads pg_array_parser if available. String parsing can be
|
20
|
+
# performed quicker by a native extension, which will not create
|
21
|
+
# a large amount of Ruby objects that will need to be garbage
|
22
|
+
# collected. pg_array_parser has a C and Java extension
|
23
|
+
begin
|
24
|
+
require 'pg_array_parser'
|
25
|
+
include PgArrayParser
|
26
|
+
rescue LoadError
|
27
|
+
require 'arjdbc/postgresql/array_parser'
|
28
|
+
include ArrayParser
|
29
|
+
end if AR4_COMPAT
|
30
|
+
|
31
|
+
include Cast
|
32
|
+
|
18
33
|
end
|
19
34
|
end
|
20
35
|
|
21
|
-
attr_accessor :array
|
22
|
-
def array?; array; end # in case we remove the array reader
|
36
|
+
( attr_accessor :array; def array?; array; end ) if AR4_COMPAT
|
23
37
|
|
24
38
|
# Extracts the value from a PostgreSQL column default definition.
|
25
39
|
#
|
@@ -38,7 +52,7 @@ module ArJdbc
|
|
38
52
|
when /\A'(.*)'::(num|date|tstz|ts|int4|int8)range\z/m
|
39
53
|
$1
|
40
54
|
# Numeric types
|
41
|
-
when /\A\(?(-?\d+(\.\d*)?\)?)\z/
|
55
|
+
when /\A\(?(-?\d+(\.\d*)?\)?(::bigint)?)\z/
|
42
56
|
$1
|
43
57
|
# Character types
|
44
58
|
when /\A\(?'(.*)'::.*\b(?:character varying|bpchar|text)\z/m
|
@@ -90,16 +104,29 @@ module ArJdbc
|
|
90
104
|
end
|
91
105
|
|
92
106
|
# Casts value (which is a String) to an appropriate instance.
|
93
|
-
|
107
|
+
# @private
|
108
|
+
def type_cast(value) # AR < 4.0 version
|
109
|
+
return if value.nil?
|
110
|
+
return super if respond_to?(:encoded?) && encoded? # since AR-3.2
|
111
|
+
|
112
|
+
case sql_type
|
113
|
+
when 'money'
|
114
|
+
self.class.string_to_money(value)
|
115
|
+
else super
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# Casts value (which is a String) to an appropriate instance.
|
120
|
+
def type_cast(value, type = false) # AR >= 4.0 version
|
94
121
|
return if value.nil?
|
95
|
-
return super if encoded?
|
122
|
+
return super(value) if encoded?
|
96
123
|
|
97
124
|
# NOTE: we do not use OID::Type
|
98
125
|
# @oid_type.type_cast value
|
99
126
|
|
100
|
-
return value if array?
|
127
|
+
return self.class.string_to_array(value, self) if array? && type == false
|
101
128
|
|
102
|
-
case type
|
129
|
+
case type ||= self.type
|
103
130
|
when :hstore then self.class.string_to_hstore value
|
104
131
|
when :json then self.class.string_to_json value
|
105
132
|
when :cidr, :inet then self.class.string_to_cidr value
|
@@ -109,18 +136,7 @@ module ArJdbc
|
|
109
136
|
else
|
110
137
|
case sql_type
|
111
138
|
when 'money'
|
112
|
-
|
113
|
-
# are two cases to consider (note the decimal separators) :
|
114
|
-
# (1) $12,345,678.12
|
115
|
-
# (2) $12.345.678,12
|
116
|
-
case value
|
117
|
-
when /^-?\D+[\d,]+\.\d{2}$/ # (1)
|
118
|
-
value.gsub!(/[^-\d.]/, '')
|
119
|
-
when /^-?\D+[\d.]+,\d{2}$/ # (2)
|
120
|
-
value.gsub!(/[^-\d,]/, '')
|
121
|
-
value.sub!(/,/, '.')
|
122
|
-
end
|
123
|
-
self.class.value_to_decimal value
|
139
|
+
self.class.string_to_money(value)
|
124
140
|
when /^point/
|
125
141
|
value.is_a?(String) ? self.class.string_to_point(value) : value
|
126
142
|
when /^(bit|varbit)/
|
@@ -152,7 +168,7 @@ module ArJdbc
|
|
152
168
|
end
|
153
169
|
|
154
170
|
::Range.new(from, to, extracted[:exclude_end])
|
155
|
-
else super
|
171
|
+
else super(value)
|
156
172
|
end
|
157
173
|
end
|
158
174
|
end if AR4_COMPAT
|
@@ -299,6 +315,27 @@ module ArJdbc
|
|
299
315
|
# @note Based on *active_record/connection_adapters/postgresql/cast.rb* (4.0).
|
300
316
|
module Cast
|
301
317
|
|
318
|
+
def string_to_money(string)
|
319
|
+
return string unless String === string
|
320
|
+
|
321
|
+
# Because money output is formatted according to the locale, there
|
322
|
+
# are two cases to consider (note the decimal separators) :
|
323
|
+
# (1) $12,345,678.12
|
324
|
+
# (2) $12.345.678,12
|
325
|
+
# Negative values are represented as follows:
|
326
|
+
# (3) -$2.55
|
327
|
+
# (4) ($2.55)
|
328
|
+
string = string.sub(/^\((.+)\)$/, '-\1') # (4)
|
329
|
+
case string
|
330
|
+
when /^-?\D+[\d,]+\.\d{2}$/ # (1)
|
331
|
+
string.gsub!(/[^-\d.]/, '')
|
332
|
+
when /^-?\D+[\d.]+,\d{2}$/ # (2)
|
333
|
+
string.gsub!(/[^-\d,]/, '')
|
334
|
+
string.sub!(/,/, '.')
|
335
|
+
end
|
336
|
+
value_to_decimal string
|
337
|
+
end
|
338
|
+
|
302
339
|
def point_to_string(point)
|
303
340
|
"(#{point[0]},#{point[1]})"
|
304
341
|
end
|
@@ -416,10 +453,11 @@ module ArJdbc
|
|
416
453
|
end
|
417
454
|
end
|
418
455
|
|
419
|
-
#
|
420
|
-
|
421
|
-
|
422
|
-
|
456
|
+
# @note Only used for default values - we get a "parsed" array from JDBC.
|
457
|
+
def string_to_array(string, column)
|
458
|
+
return string unless String === string
|
459
|
+
parse_pg_array(string).map { |val| column.type_cast(val, column.type) }
|
460
|
+
end
|
423
461
|
|
424
462
|
private
|
425
463
|
|
@@ -19,7 +19,9 @@ ArJdbc::ConnectionMethods.module_eval do
|
|
19
19
|
# PG :connect_timeout - maximum time to wait for connection to succeed
|
20
20
|
if connect_timeout = ( config[:connect_timeout] || ENV['PGCONNECT_TIMEOUT'] )
|
21
21
|
properties['socketTimeout'] ||= connect_timeout
|
22
|
-
|
22
|
+
end
|
23
|
+
if login_timeout = config[:login_timeout]
|
24
|
+
properties['loginTimeout'] ||= login_timeout
|
23
25
|
end
|
24
26
|
sslmode = config.key?(:sslmode) ? config[:sslmode] : config[:requiressl]
|
25
27
|
# NOTE: makes not much sense since this needs some JVM options :
|
@@ -42,7 +42,7 @@ namespace :db do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
if defined? adapt_jdbc_config
|
45
|
-
puts "ArJdbc: double loading #{__FILE__} please delete lib/
|
45
|
+
puts "ArJdbc: double loading #{__FILE__} please delete lib/tasks/jdbc.rake if present!"
|
46
46
|
end
|
47
47
|
|
48
48
|
def adapt_jdbc_config(config)
|
data/lib/arjdbc/version.rb
CHANGED
@@ -444,7 +444,7 @@ public class RubyJdbcConnection extends RubyObject {
|
|
444
444
|
* @return connection
|
445
445
|
*/
|
446
446
|
@JRubyMethod(name = "init_connection")
|
447
|
-
public IRubyObject init_connection(final ThreadContext context) throws SQLException {
|
447
|
+
public synchronized IRubyObject init_connection(final ThreadContext context) throws SQLException {
|
448
448
|
final IRubyObject jdbcConnection = setConnection( newConnection() );
|
449
449
|
final IRubyObject adapter = callMethod("adapter"); // self.adapter
|
450
450
|
if ( ! adapter.isNil() ) {
|
@@ -482,7 +482,7 @@ public class RubyJdbcConnection extends RubyObject {
|
|
482
482
|
}
|
483
483
|
|
484
484
|
@JRubyMethod(name = "disconnect!")
|
485
|
-
public IRubyObject disconnect(final ThreadContext context) {
|
485
|
+
public synchronized IRubyObject disconnect(final ThreadContext context) {
|
486
486
|
// TODO: only here to try resolving multi-thread issues :
|
487
487
|
// https://github.com/jruby/activerecord-jdbc-adapter/issues/197
|
488
488
|
// https://github.com/jruby/activerecord-jdbc-adapter/issues/198
|
@@ -499,7 +499,7 @@ public class RubyJdbcConnection extends RubyObject {
|
|
499
499
|
}
|
500
500
|
|
501
501
|
@JRubyMethod(name = "reconnect!")
|
502
|
-
public IRubyObject reconnect(final ThreadContext context) {
|
502
|
+
public synchronized IRubyObject reconnect(final ThreadContext context) {
|
503
503
|
try {
|
504
504
|
final Connection connection = newConnection();
|
505
505
|
final IRubyObject result = setConnection( connection );
|
@@ -1162,7 +1162,7 @@ public class RubyJdbcConnection extends RubyObject {
|
|
1162
1162
|
String _tableName = caseConvertIdentifierForJdbc(connection, tableName);
|
1163
1163
|
String _schemaName = caseConvertIdentifierForJdbc(connection, schemaName);
|
1164
1164
|
final TableName table = extractTableName(connection, _schemaName, _tableName);
|
1165
|
-
|
1165
|
+
|
1166
1166
|
final List<RubyString> primaryKeys = primaryKeys(context, connection, table);
|
1167
1167
|
|
1168
1168
|
ResultSet indexInfoSet = null;
|
@@ -2662,7 +2662,7 @@ public class RubyJdbcConnection extends RubyObject {
|
|
2662
2662
|
}
|
2663
2663
|
|
2664
2664
|
protected Connection getConnection(boolean error) {
|
2665
|
-
final Connection connection = (Connection) dataGetStruct();
|
2665
|
+
final Connection connection = (Connection) dataGetStruct(); // synchronized
|
2666
2666
|
if ( connection == null && error ) {
|
2667
2667
|
final RubyClass errorClass = getConnectionNotEstablished( getRuntime() );
|
2668
2668
|
throw new RaiseException(getRuntime(), errorClass, "no connection available", false);
|
@@ -2670,7 +2670,7 @@ public class RubyJdbcConnection extends RubyObject {
|
|
2670
2670
|
return connection;
|
2671
2671
|
}
|
2672
2672
|
|
2673
|
-
private
|
2673
|
+
private IRubyObject setConnection(final Connection connection) {
|
2674
2674
|
close( getConnection(false) ); // close previously open connection if there is one
|
2675
2675
|
|
2676
2676
|
final IRubyObject rubyConnectionObject =
|
@@ -119,18 +119,22 @@ public class PostgreSQLRubyJdbcConnection extends arjdbc.jdbc.RubyJdbcConnection
|
|
119
119
|
}
|
120
120
|
|
121
121
|
@Override
|
122
|
-
protected
|
123
|
-
final Connection connection
|
124
|
-
final
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
122
|
+
protected Connection newConnection() throws SQLException {
|
123
|
+
final Connection connection = getConnectionFactory().newConnection();
|
124
|
+
final PGConnection pgConnection;
|
125
|
+
if ( connection instanceof PGConnection ) {
|
126
|
+
pgConnection = (PGConnection) connection;
|
127
|
+
}
|
128
|
+
else {
|
129
|
+
pgConnection = connection.unwrap(PGConnection.class);
|
130
|
+
}
|
131
|
+
pgConnection.addDataType("daterange", DateRangeType.class);
|
132
|
+
pgConnection.addDataType("tsrange", TsRangeType.class);
|
133
|
+
pgConnection.addDataType("tstzrange", TstzRangeType.class);
|
134
|
+
pgConnection.addDataType("int4range", Int4RangeType.class);
|
135
|
+
pgConnection.addDataType("int8range", Int8RangeType.class);
|
136
|
+
pgConnection.addDataType("numrange", NumRangeType.class);
|
137
|
+
return connection;
|
134
138
|
}
|
135
139
|
|
136
140
|
@Override // due statement.setNull(index, Types.BLOB) not working :
|
@@ -458,6 +462,9 @@ public class PostgreSQLRubyJdbcConnection extends arjdbc.jdbc.RubyJdbcConnection
|
|
458
462
|
protected IRubyObject arrayToRuby(final ThreadContext context,
|
459
463
|
final Ruby runtime, final ResultSet resultSet, final int column)
|
460
464
|
throws SQLException {
|
465
|
+
if ( rawArrayType == Boolean.TRUE ) { // pre AR 4.0 compatibility
|
466
|
+
return runtime.newString( resultSet.getString(column) );
|
467
|
+
}
|
461
468
|
// NOTE: avoid `finally { array.free(); }` on PostgreSQL due :
|
462
469
|
// java.sql.SQLFeatureNotSupportedException:
|
463
470
|
// Method org.postgresql.jdbc4.Jdbc4Array.free() is not yet implemented.
|
@@ -552,6 +559,29 @@ public class PostgreSQLRubyJdbcConnection extends arjdbc.jdbc.RubyJdbcConnection
|
|
552
559
|
return str.toString();
|
553
560
|
}
|
554
561
|
|
562
|
+
protected static Boolean rawArrayType;
|
563
|
+
static {
|
564
|
+
final String arrayRaw = System.getProperty("arjdbc.postgresql.array.raw");
|
565
|
+
if ( arrayRaw != null ) rawArrayType = Boolean.parseBoolean(arrayRaw);
|
566
|
+
}
|
567
|
+
|
568
|
+
@JRubyMethod(name = "raw_array_type?", meta = true)
|
569
|
+
public static IRubyObject useRawArrayType(final ThreadContext context, final IRubyObject self) {
|
570
|
+
if ( rawArrayType == null ) return context.getRuntime().getNil();
|
571
|
+
return context.getRuntime().newBoolean(rawArrayType);
|
572
|
+
}
|
573
|
+
|
574
|
+
@JRubyMethod(name = "raw_array_type=", meta = true)
|
575
|
+
public static IRubyObject setRawArrayType(final IRubyObject self, final IRubyObject value) {
|
576
|
+
if ( value instanceof RubyBoolean ) {
|
577
|
+
rawArrayType = ((RubyBoolean) value).isTrue() ? Boolean.TRUE : Boolean.FALSE;
|
578
|
+
}
|
579
|
+
else {
|
580
|
+
rawArrayType = value.isNil() ? null : Boolean.TRUE;
|
581
|
+
}
|
582
|
+
return value;
|
583
|
+
}
|
584
|
+
|
555
585
|
protected static Boolean rawHstoreType;
|
556
586
|
static {
|
557
587
|
final String hstoreRaw = System.getProperty("arjdbc.postgresql.hstore.raw");
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-jdbc-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sieger, Ola Bini and JRuby contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -50,18 +50,6 @@ files:
|
|
50
50
|
- Rakefile
|
51
51
|
- Rakefile.jdbc
|
52
52
|
- activerecord-jdbc-adapter.gemspec
|
53
|
-
- gemfiles/rails23.gemfile
|
54
|
-
- gemfiles/rails23.gemfile.lock
|
55
|
-
- gemfiles/rails30.gemfile
|
56
|
-
- gemfiles/rails30.gemfile.lock
|
57
|
-
- gemfiles/rails31.gemfile
|
58
|
-
- gemfiles/rails31.gemfile.lock
|
59
|
-
- gemfiles/rails32.gemfile
|
60
|
-
- gemfiles/rails32.gemfile.lock
|
61
|
-
- gemfiles/rails40.gemfile
|
62
|
-
- gemfiles/rails40.gemfile.lock
|
63
|
-
- gemfiles/rails41.gemfile
|
64
|
-
- gemfiles/rails41.gemfile.lock
|
65
53
|
- lib/active_record/connection_adapters/as400_adapter.rb
|
66
54
|
- lib/active_record/connection_adapters/db2_adapter.rb
|
67
55
|
- lib/active_record/connection_adapters/derby_adapter.rb
|
@@ -153,6 +141,7 @@ files:
|
|
153
141
|
- lib/arjdbc/oracle/connection_methods.rb
|
154
142
|
- lib/arjdbc/postgresql.rb
|
155
143
|
- lib/arjdbc/postgresql/adapter.rb
|
144
|
+
- lib/arjdbc/postgresql/array_parser.rb
|
156
145
|
- lib/arjdbc/postgresql/column.rb
|
157
146
|
- lib/arjdbc/postgresql/connection_methods.rb
|
158
147
|
- lib/arjdbc/postgresql/explain_support.rb
|
data/gemfiles/rails23.gemfile
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "thread_safe", :require=>nil
|
6
|
-
gem "rake", :require=>nil
|
7
|
-
gem "appraisal", :require=>nil
|
8
|
-
gem "test-unit", "2.5.4", :group=>:test
|
9
|
-
gem "test-unit-context", ">= 0.3.0", :group=>:test
|
10
|
-
gem "mocha", "~> 0.13.1", :require=>nil, :group=>:test
|
11
|
-
gem "simplecov", :require=>nil, :group=>:test
|
12
|
-
gem "bcrypt-ruby", "~> 3.0.0", :require=>nil, :group=>:test
|
13
|
-
gem "mysql2", :require=>nil, :platform=>:mri, :group=>:test
|
14
|
-
gem "pg", :require=>nil, :platform=>:mri, :group=>:test
|
15
|
-
gem "sqlite3", :require=>nil, :platform=>:mri, :group=>:test
|
16
|
-
gem "activerecord", "~> 2.3.18", :require=>false
|
17
|
-
gem "rails", "~> 2.3.18"
|
18
|
-
|
@@ -1,63 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
actionmailer (2.3.18)
|
5
|
-
actionpack (= 2.3.18)
|
6
|
-
actionpack (2.3.18)
|
7
|
-
activesupport (= 2.3.18)
|
8
|
-
rack (~> 1.1.0)
|
9
|
-
activerecord (2.3.18)
|
10
|
-
activesupport (= 2.3.18)
|
11
|
-
activeresource (2.3.18)
|
12
|
-
activesupport (= 2.3.18)
|
13
|
-
activesupport (2.3.18)
|
14
|
-
appraisal (0.5.2)
|
15
|
-
bundler
|
16
|
-
rake
|
17
|
-
atomic (1.1.10)
|
18
|
-
atomic (1.1.10-java)
|
19
|
-
bcrypt-ruby (3.0.1)
|
20
|
-
bcrypt-ruby (3.0.1-java)
|
21
|
-
metaclass (0.0.1)
|
22
|
-
mocha (0.13.3)
|
23
|
-
metaclass (~> 0.0.1)
|
24
|
-
multi_json (1.7.7)
|
25
|
-
rack (1.1.6)
|
26
|
-
rails (2.3.18)
|
27
|
-
actionmailer (= 2.3.18)
|
28
|
-
actionpack (= 2.3.18)
|
29
|
-
activerecord (= 2.3.18)
|
30
|
-
activeresource (= 2.3.18)
|
31
|
-
activesupport (= 2.3.18)
|
32
|
-
rake (>= 0.8.3)
|
33
|
-
rake (10.1.0)
|
34
|
-
simplecov (0.7.1)
|
35
|
-
multi_json (~> 1.0)
|
36
|
-
simplecov-html (~> 0.7.1)
|
37
|
-
simplecov-html (0.7.1)
|
38
|
-
test-unit (2.5.4)
|
39
|
-
test-unit-context (0.3.1)
|
40
|
-
test-unit (>= 2.4.0)
|
41
|
-
thread_safe (0.1.2)
|
42
|
-
atomic
|
43
|
-
thread_safe (0.1.2-java)
|
44
|
-
atomic
|
45
|
-
|
46
|
-
PLATFORMS
|
47
|
-
java
|
48
|
-
ruby
|
49
|
-
|
50
|
-
DEPENDENCIES
|
51
|
-
activerecord (~> 2.3.18)
|
52
|
-
appraisal
|
53
|
-
bcrypt-ruby (~> 3.0.0)
|
54
|
-
mocha (~> 0.13.1)
|
55
|
-
mysql2
|
56
|
-
pg
|
57
|
-
rails (~> 2.3.18)
|
58
|
-
rake
|
59
|
-
simplecov
|
60
|
-
sqlite3
|
61
|
-
test-unit (= 2.5.4)
|
62
|
-
test-unit-context (>= 0.3.0)
|
63
|
-
thread_safe
|
data/gemfiles/rails30.gemfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "thread_safe", :require=>nil
|
6
|
-
gem "rake", :require=>nil
|
7
|
-
gem "appraisal", :require=>nil
|
8
|
-
gem "test-unit", "2.5.4", :group=>:test
|
9
|
-
gem "test-unit-context", ">= 0.3.0", :group=>:test
|
10
|
-
gem "mocha", "~> 0.13.1", :require=>nil, :group=>:test
|
11
|
-
gem "simplecov", :require=>nil, :group=>:test
|
12
|
-
gem "bcrypt-ruby", "~> 3.0.0", :require=>nil, :group=>:test
|
13
|
-
gem "mysql2", :require=>nil, :platform=>:mri, :group=>:test
|
14
|
-
gem "pg", :require=>nil, :platform=>:mri, :group=>:test
|
15
|
-
gem "sqlite3", :require=>nil, :platform=>:mri, :group=>:test
|
16
|
-
gem "activerecord", "~> 3.0.20", :require=>false
|
17
|
-
|
@@ -1,61 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
activemodel (3.0.20)
|
5
|
-
activesupport (= 3.0.20)
|
6
|
-
builder (~> 2.1.2)
|
7
|
-
i18n (~> 0.5.0)
|
8
|
-
activerecord (3.0.20)
|
9
|
-
activemodel (= 3.0.20)
|
10
|
-
activesupport (= 3.0.20)
|
11
|
-
arel (~> 2.0.10)
|
12
|
-
tzinfo (~> 0.3.23)
|
13
|
-
activesupport (3.0.20)
|
14
|
-
appraisal (0.5.2)
|
15
|
-
bundler
|
16
|
-
rake
|
17
|
-
arel (2.0.10)
|
18
|
-
atomic (1.1.10)
|
19
|
-
atomic (1.1.10-java)
|
20
|
-
bcrypt-ruby (3.0.1)
|
21
|
-
bcrypt-ruby (3.0.1-java)
|
22
|
-
builder (2.1.2)
|
23
|
-
i18n (0.5.0)
|
24
|
-
metaclass (0.0.1)
|
25
|
-
mocha (0.13.3)
|
26
|
-
metaclass (~> 0.0.1)
|
27
|
-
multi_json (1.7.7)
|
28
|
-
mysql2 (0.3.13)
|
29
|
-
pg (0.16.0)
|
30
|
-
rake (10.1.0)
|
31
|
-
simplecov (0.7.1)
|
32
|
-
multi_json (~> 1.0)
|
33
|
-
simplecov-html (~> 0.7.1)
|
34
|
-
simplecov-html (0.7.1)
|
35
|
-
sqlite3 (1.3.8)
|
36
|
-
test-unit (2.5.4)
|
37
|
-
test-unit-context (0.3.1)
|
38
|
-
test-unit (>= 2.4.0)
|
39
|
-
thread_safe (0.1.2)
|
40
|
-
atomic
|
41
|
-
thread_safe (0.1.2-java)
|
42
|
-
atomic
|
43
|
-
tzinfo (0.3.37)
|
44
|
-
|
45
|
-
PLATFORMS
|
46
|
-
java
|
47
|
-
ruby
|
48
|
-
|
49
|
-
DEPENDENCIES
|
50
|
-
activerecord (~> 3.0.20)
|
51
|
-
appraisal
|
52
|
-
bcrypt-ruby (~> 3.0.0)
|
53
|
-
mocha (~> 0.13.1)
|
54
|
-
mysql2
|
55
|
-
pg
|
56
|
-
rake
|
57
|
-
simplecov
|
58
|
-
sqlite3
|
59
|
-
test-unit (= 2.5.4)
|
60
|
-
test-unit-context (>= 0.3.0)
|
61
|
-
thread_safe
|
data/gemfiles/rails31.gemfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "thread_safe", :require=>nil
|
6
|
-
gem "rake", :require=>nil
|
7
|
-
gem "appraisal", :require=>nil
|
8
|
-
gem "test-unit", "2.5.4", :group=>:test
|
9
|
-
gem "test-unit-context", ">= 0.3.0", :group=>:test
|
10
|
-
gem "mocha", "~> 0.13.1", :require=>nil, :group=>:test
|
11
|
-
gem "simplecov", :require=>nil, :group=>:test
|
12
|
-
gem "bcrypt-ruby", "~> 3.0.0", :require=>nil, :group=>:test
|
13
|
-
gem "mysql2", :require=>nil, :platform=>:mri, :group=>:test
|
14
|
-
gem "pg", :require=>nil, :platform=>:mri, :group=>:test
|
15
|
-
gem "sqlite3", :require=>nil, :platform=>:mri, :group=>:test
|
16
|
-
gem "activerecord", "~> 3.1.12", :require=>false
|
17
|
-
|
@@ -1,59 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
activemodel (3.1.12)
|
5
|
-
activesupport (= 3.1.12)
|
6
|
-
builder (~> 3.0.0)
|
7
|
-
i18n (~> 0.6)
|
8
|
-
activerecord (3.1.12)
|
9
|
-
activemodel (= 3.1.12)
|
10
|
-
activesupport (= 3.1.12)
|
11
|
-
arel (~> 2.2.3)
|
12
|
-
tzinfo (~> 0.3.29)
|
13
|
-
activesupport (3.1.12)
|
14
|
-
multi_json (~> 1.0)
|
15
|
-
appraisal (0.5.2)
|
16
|
-
bundler
|
17
|
-
rake
|
18
|
-
arel (2.2.3)
|
19
|
-
atomic (1.1.10)
|
20
|
-
atomic (1.1.10-java)
|
21
|
-
bcrypt-ruby (3.0.1)
|
22
|
-
bcrypt-ruby (3.0.1-java)
|
23
|
-
builder (3.0.4)
|
24
|
-
i18n (0.6.4)
|
25
|
-
metaclass (0.0.1)
|
26
|
-
mocha (0.13.3)
|
27
|
-
metaclass (~> 0.0.1)
|
28
|
-
multi_json (1.7.7)
|
29
|
-
rake (10.1.0)
|
30
|
-
simplecov (0.7.1)
|
31
|
-
multi_json (~> 1.0)
|
32
|
-
simplecov-html (~> 0.7.1)
|
33
|
-
simplecov-html (0.7.1)
|
34
|
-
test-unit (2.5.4)
|
35
|
-
test-unit-context (0.3.1)
|
36
|
-
test-unit (>= 2.4.0)
|
37
|
-
thread_safe (0.1.2)
|
38
|
-
atomic
|
39
|
-
thread_safe (0.1.2-java)
|
40
|
-
atomic
|
41
|
-
tzinfo (0.3.37)
|
42
|
-
|
43
|
-
PLATFORMS
|
44
|
-
java
|
45
|
-
ruby
|
46
|
-
|
47
|
-
DEPENDENCIES
|
48
|
-
activerecord (~> 3.1.12)
|
49
|
-
appraisal
|
50
|
-
bcrypt-ruby (~> 3.0.0)
|
51
|
-
mocha (~> 0.13.1)
|
52
|
-
mysql2
|
53
|
-
pg
|
54
|
-
rake
|
55
|
-
simplecov
|
56
|
-
sqlite3
|
57
|
-
test-unit (= 2.5.4)
|
58
|
-
test-unit-context (>= 0.3.0)
|
59
|
-
thread_safe
|
data/gemfiles/rails32.gemfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "thread_safe", :require=>nil
|
6
|
-
gem "rake", :require=>nil
|
7
|
-
gem "appraisal", :require=>nil
|
8
|
-
gem "test-unit", "2.5.4", :group=>:test
|
9
|
-
gem "test-unit-context", ">= 0.3.0", :group=>:test
|
10
|
-
gem "mocha", "~> 0.13.1", :require=>nil, :group=>:test
|
11
|
-
gem "simplecov", :require=>nil, :group=>:test
|
12
|
-
gem "bcrypt-ruby", "~> 3.0.0", :require=>nil, :group=>:test
|
13
|
-
gem "mysql2", :require=>nil, :platform=>:mri, :group=>:test
|
14
|
-
gem "pg", :require=>nil, :platform=>:mri, :group=>:test
|
15
|
-
gem "sqlite3", :require=>nil, :platform=>:mri, :group=>:test
|
16
|
-
gem "activerecord", "~> 3.2.15", :require=>false
|
17
|
-
|
@@ -1,62 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
activemodel (3.2.15)
|
5
|
-
activesupport (= 3.2.15)
|
6
|
-
builder (~> 3.0.0)
|
7
|
-
activerecord (3.2.15)
|
8
|
-
activemodel (= 3.2.15)
|
9
|
-
activesupport (= 3.2.15)
|
10
|
-
arel (~> 3.0.2)
|
11
|
-
tzinfo (~> 0.3.29)
|
12
|
-
activesupport (3.2.15)
|
13
|
-
i18n (~> 0.6, >= 0.6.4)
|
14
|
-
multi_json (~> 1.0)
|
15
|
-
appraisal (0.5.2)
|
16
|
-
bundler
|
17
|
-
rake
|
18
|
-
arel (3.0.2)
|
19
|
-
atomic (1.1.14)
|
20
|
-
atomic (1.1.14-java)
|
21
|
-
bcrypt-ruby (3.0.1)
|
22
|
-
bcrypt-ruby (3.0.1-java)
|
23
|
-
builder (3.0.4)
|
24
|
-
i18n (0.6.5)
|
25
|
-
metaclass (0.0.1)
|
26
|
-
mocha (0.13.3)
|
27
|
-
metaclass (~> 0.0.1)
|
28
|
-
multi_json (1.7.7)
|
29
|
-
mysql2 (0.3.13)
|
30
|
-
pg (0.16.0)
|
31
|
-
rake (10.1.0)
|
32
|
-
simplecov (0.7.1)
|
33
|
-
multi_json (~> 1.0)
|
34
|
-
simplecov-html (~> 0.7.1)
|
35
|
-
simplecov-html (0.7.1)
|
36
|
-
sqlite3 (1.3.8)
|
37
|
-
test-unit (2.5.4)
|
38
|
-
test-unit-context (0.3.1)
|
39
|
-
test-unit (>= 2.4.0)
|
40
|
-
thread_safe (0.1.3)
|
41
|
-
atomic
|
42
|
-
thread_safe (0.1.3-java)
|
43
|
-
atomic
|
44
|
-
tzinfo (0.3.38)
|
45
|
-
|
46
|
-
PLATFORMS
|
47
|
-
java
|
48
|
-
ruby
|
49
|
-
|
50
|
-
DEPENDENCIES
|
51
|
-
activerecord (~> 3.2.15)
|
52
|
-
appraisal
|
53
|
-
bcrypt-ruby (~> 3.0.0)
|
54
|
-
mocha (~> 0.13.1)
|
55
|
-
mysql2
|
56
|
-
pg
|
57
|
-
rake
|
58
|
-
simplecov
|
59
|
-
sqlite3
|
60
|
-
test-unit (= 2.5.4)
|
61
|
-
test-unit-context (>= 0.3.0)
|
62
|
-
thread_safe
|
data/gemfiles/rails40.gemfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "thread_safe", :require=>nil
|
6
|
-
gem "rake", :require=>nil
|
7
|
-
gem "appraisal", :require=>nil
|
8
|
-
gem "test-unit", "2.5.4", :group=>:test
|
9
|
-
gem "test-unit-context", ">= 0.3.0", :group=>:test
|
10
|
-
gem "mocha", "~> 0.13.1", :require=>nil, :group=>:test
|
11
|
-
gem "simplecov", :require=>nil, :group=>:test
|
12
|
-
gem "bcrypt-ruby", "~> 3.0.0", :require=>nil, :group=>:test
|
13
|
-
gem "mysql2", :require=>nil, :platform=>:mri, :group=>:test
|
14
|
-
gem "pg", :require=>nil, :platform=>:mri, :group=>:test
|
15
|
-
gem "sqlite3", :require=>nil, :platform=>:mri, :group=>:test
|
16
|
-
gem "activerecord", "~> 4.0.0", :require=>false
|
17
|
-
|
@@ -1,59 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
activemodel (4.0.0)
|
5
|
-
activesupport (= 4.0.0)
|
6
|
-
builder (~> 3.1.0)
|
7
|
-
activerecord (4.0.0)
|
8
|
-
activemodel (= 4.0.0)
|
9
|
-
activerecord-deprecated_finders (~> 1.0.2)
|
10
|
-
activesupport (= 4.0.0)
|
11
|
-
arel (~> 4.0.0)
|
12
|
-
activerecord-deprecated_finders (1.0.3)
|
13
|
-
activesupport (4.0.0)
|
14
|
-
i18n (~> 0.6, >= 0.6.4)
|
15
|
-
minitest (~> 4.2)
|
16
|
-
multi_json (~> 1.3)
|
17
|
-
thread_safe (~> 0.1)
|
18
|
-
tzinfo (~> 0.3.37)
|
19
|
-
appraisal (0.5.2)
|
20
|
-
bundler
|
21
|
-
rake
|
22
|
-
arel (4.0.1)
|
23
|
-
atomic (1.1.14-java)
|
24
|
-
bcrypt-ruby (3.0.1-java)
|
25
|
-
builder (3.1.4)
|
26
|
-
i18n (0.6.5)
|
27
|
-
metaclass (0.0.1)
|
28
|
-
minitest (4.7.5)
|
29
|
-
mocha (0.13.3)
|
30
|
-
metaclass (~> 0.0.1)
|
31
|
-
multi_json (1.8.2)
|
32
|
-
rake (10.1.0)
|
33
|
-
simplecov (0.7.1)
|
34
|
-
multi_json (~> 1.0)
|
35
|
-
simplecov-html (~> 0.7.1)
|
36
|
-
simplecov-html (0.7.1)
|
37
|
-
test-unit (2.5.4)
|
38
|
-
test-unit-context (0.3.1)
|
39
|
-
test-unit (>= 2.4.0)
|
40
|
-
thread_safe (0.1.3-java)
|
41
|
-
atomic
|
42
|
-
tzinfo (0.3.38)
|
43
|
-
|
44
|
-
PLATFORMS
|
45
|
-
java
|
46
|
-
|
47
|
-
DEPENDENCIES
|
48
|
-
activerecord (~> 4.0.0)
|
49
|
-
appraisal
|
50
|
-
bcrypt-ruby (~> 3.0.0)
|
51
|
-
mocha (~> 0.13.1)
|
52
|
-
mysql2
|
53
|
-
pg
|
54
|
-
rake
|
55
|
-
simplecov
|
56
|
-
sqlite3
|
57
|
-
test-unit (= 2.5.4)
|
58
|
-
test-unit-context (>= 0.3.0)
|
59
|
-
thread_safe
|
data/gemfiles/rails41.gemfile
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "thread_safe", :require=>nil
|
6
|
-
gem "rake", :require=>nil
|
7
|
-
gem "appraisal", :require=>nil
|
8
|
-
gem "test-unit", "2.5.4", :group=>:test
|
9
|
-
gem "test-unit-context", ">= 0.3.0", :group=>:test
|
10
|
-
gem "mocha", "~> 0.13.1", :require=>nil, :group=>:test
|
11
|
-
gem "simplecov", :require=>nil, :group=>:test
|
12
|
-
gem "bcrypt-ruby", "~> 3.0.0", :require=>nil, :group=>:test
|
13
|
-
gem "mysql2", :require=>nil, :platform=>:mri, :group=>:test
|
14
|
-
gem "pg", :require=>nil, :platform=>:mri, :group=>:test
|
15
|
-
gem "sqlite3", :require=>nil, :platform=>:mri, :group=>:test
|
16
|
-
gem "activerecord", :github=>"rails/rails", :branch=>"master", :require=>false
|
17
|
-
gem "rails", :github=>"rails/rails", :branch=>"master"
|
18
|
-
|
@@ -1,117 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: git://github.com/rails/rails.git
|
3
|
-
revision: 094e31ce6700993759c6f36db52afb0a43bfa71f
|
4
|
-
branch: master
|
5
|
-
specs:
|
6
|
-
actionmailer (4.1.0.beta)
|
7
|
-
actionpack (= 4.1.0.beta)
|
8
|
-
actionview (= 4.1.0.beta)
|
9
|
-
mail (~> 2.5.4)
|
10
|
-
actionpack (4.1.0.beta)
|
11
|
-
activesupport (= 4.1.0.beta)
|
12
|
-
rack (~> 1.5.2)
|
13
|
-
rack-test (~> 0.6.2)
|
14
|
-
actionview (4.1.0.beta)
|
15
|
-
activemodel (= 4.1.0.beta)
|
16
|
-
activesupport (= 4.1.0.beta)
|
17
|
-
builder (~> 3.1.0)
|
18
|
-
erubis (~> 2.7.0)
|
19
|
-
activemodel (4.1.0.beta)
|
20
|
-
activesupport (= 4.1.0.beta)
|
21
|
-
builder (~> 3.1.0)
|
22
|
-
activerecord (4.1.0.beta)
|
23
|
-
activemodel (= 4.1.0.beta)
|
24
|
-
activesupport (= 4.1.0.beta)
|
25
|
-
arel (~> 4.0.0)
|
26
|
-
activesupport (4.1.0.beta)
|
27
|
-
i18n (~> 0.6, >= 0.6.4)
|
28
|
-
json (~> 1.7)
|
29
|
-
minitest (~> 5.0)
|
30
|
-
thread_safe (~> 0.1)
|
31
|
-
tzinfo (~> 0.3.37)
|
32
|
-
rails (4.1.0.beta)
|
33
|
-
actionmailer (= 4.1.0.beta)
|
34
|
-
actionpack (= 4.1.0.beta)
|
35
|
-
actionview (= 4.1.0.beta)
|
36
|
-
activemodel (= 4.1.0.beta)
|
37
|
-
activerecord (= 4.1.0.beta)
|
38
|
-
activesupport (= 4.1.0.beta)
|
39
|
-
bundler (>= 1.3.0, < 2.0)
|
40
|
-
railties (= 4.1.0.beta)
|
41
|
-
sprockets-rails (~> 2.0.0)
|
42
|
-
railties (4.1.0.beta)
|
43
|
-
actionpack (= 4.1.0.beta)
|
44
|
-
activesupport (= 4.1.0.beta)
|
45
|
-
rake (>= 0.8.7)
|
46
|
-
thor (>= 0.18.1, < 2.0)
|
47
|
-
|
48
|
-
GEM
|
49
|
-
remote: https://rubygems.org/
|
50
|
-
specs:
|
51
|
-
appraisal (0.5.2)
|
52
|
-
bundler
|
53
|
-
rake
|
54
|
-
arel (4.0.1)
|
55
|
-
atomic (1.1.14-java)
|
56
|
-
bcrypt-ruby (3.0.1-java)
|
57
|
-
builder (3.1.4)
|
58
|
-
erubis (2.7.0)
|
59
|
-
hike (1.2.3)
|
60
|
-
i18n (0.6.5)
|
61
|
-
json (1.8.1-java)
|
62
|
-
mail (2.5.4)
|
63
|
-
mime-types (~> 1.16)
|
64
|
-
treetop (~> 1.4.8)
|
65
|
-
metaclass (0.0.1)
|
66
|
-
mime-types (1.25)
|
67
|
-
minitest (5.0.8)
|
68
|
-
mocha (0.13.3)
|
69
|
-
metaclass (~> 0.0.1)
|
70
|
-
multi_json (1.8.2)
|
71
|
-
polyglot (0.3.3)
|
72
|
-
rack (1.5.2)
|
73
|
-
rack-test (0.6.2)
|
74
|
-
rack (>= 1.0)
|
75
|
-
rake (10.1.0)
|
76
|
-
simplecov (0.7.1)
|
77
|
-
multi_json (~> 1.0)
|
78
|
-
simplecov-html (~> 0.7.1)
|
79
|
-
simplecov-html (0.7.1)
|
80
|
-
sprockets (2.10.0)
|
81
|
-
hike (~> 1.2)
|
82
|
-
multi_json (~> 1.0)
|
83
|
-
rack (~> 1.0)
|
84
|
-
tilt (~> 1.1, != 1.3.0)
|
85
|
-
sprockets-rails (2.0.1)
|
86
|
-
actionpack (>= 3.0)
|
87
|
-
activesupport (>= 3.0)
|
88
|
-
sprockets (~> 2.8)
|
89
|
-
test-unit (2.5.4)
|
90
|
-
test-unit-context (0.3.1)
|
91
|
-
test-unit (>= 2.4.0)
|
92
|
-
thor (0.18.1)
|
93
|
-
thread_safe (0.1.3-java)
|
94
|
-
atomic
|
95
|
-
tilt (1.4.1)
|
96
|
-
treetop (1.4.15)
|
97
|
-
polyglot
|
98
|
-
polyglot (>= 0.3.1)
|
99
|
-
tzinfo (0.3.38)
|
100
|
-
|
101
|
-
PLATFORMS
|
102
|
-
java
|
103
|
-
|
104
|
-
DEPENDENCIES
|
105
|
-
activerecord!
|
106
|
-
appraisal
|
107
|
-
bcrypt-ruby (~> 3.0.0)
|
108
|
-
mocha (~> 0.13.1)
|
109
|
-
mysql2
|
110
|
-
pg
|
111
|
-
rails!
|
112
|
-
rake
|
113
|
-
simplecov
|
114
|
-
sqlite3
|
115
|
-
test-unit (= 2.5.4)
|
116
|
-
test-unit-context (>= 0.3.0)
|
117
|
-
thread_safe
|