Skip to content

Commit

Permalink
Merge branch '1-3-stable'
Browse files Browse the repository at this point in the history
* 1-3-stable: (27 commits)
  tune release:do - use current branch and only cp actual version adapter gem
  prepare for 1.3.16 release
  [h2] allow jdbch2 adapter to use jdbc-h2 1.4 (fixes #639)
  [postgres] quote and type_cast should not be overriden on 4.2 (+ port the _ versions)
  add (failing) big_serial schema dump test from Rails 4.2
  some test code tuning/ports for PostgreSQL on AR 4.2
  [postgres] fix table column resolution (and slightly align it to our needs) on AR 4.2
  [postgres] re-arrange Column internals as some helpers end-up on Adapter in 4.2
  minor postres compatibility tunings - on AR 4.2 load the type map eagerly (like in Rails)
  unify arel_bind_param/new_bind_param helper in tests
  correct JRuby specific expected query count (since tables/table_exists? are using JDBC)
  [mysql] change_column table is redefined on AR 4.2 so that it uses _sql version
  fix ActiveRecordError refs in bulk_change_table.rb - make it more copy-paste friendly
  [mysql] more tuning/compatibility backports for AR 4.2 (working boolean emulation)
  less null: true warnings while testing against AR 4.2
  [mysql] type-map support copy-pasta from AR 4.2 (closer to full compatibility)
  introduce a AR40 helper constant for MySQL's adapter code
  missed a bundle update rake to 10.4.2
  fix quote method for Hashes and Jsonb columns in postgres adapter
  no need for `k.to_s` conversion will happen implicitly + use `AR4_COMPAT` constant
  ...
  • Loading branch information
kares committed Apr 13, 2015
2 parents 270251c + 366af30 commit 8db48e9
Show file tree
Hide file tree
Showing 39 changed files with 921 additions and 279 deletions.
14 changes: 14 additions & 0 deletions History.md
@@ -1,3 +1,17 @@
## 1.3.16 (04/13/15)

- [h2] allow jdbch2 adapter to use jdbc-h2 1.4 (#639)
- [postgres] quote and type_cast should not be overriden on 4.2
- [postgres] fix table column resolution (slightly align it to our needs) on 4.2
- [postgres] re-arrange Column internals as some helpers end-up on Adapter in 4.2
- [mysql] change_column table is redefined on AR 4.2 so that it uses _sql version
- [mysql] more tuning/compatibility backports for AR 4.2 (working booleans #626)
- [mysql] type-map support copy-pasta from AR 4.2 (closer to full compat) (#617)
- [postgres] improved support for Amazon Redshift (based on user feedback #403)
- fixed problem with create table statements with references in MySQL (#629)
- fix RecordNotUnique reference in ArJdbc::SQlite3 (#634)
- [postgres] add support for jsonb column type (#633 #635 #637)

## 1.3.15 (03/09/15)

- [informix] adapter undefined method 'column_types' with Rails 4.x (#622)
Expand Down
27 changes: 20 additions & 7 deletions Rakefile
Expand Up @@ -19,14 +19,25 @@ DRIVERS = %w[derby h2 hsqldb jtds mysql postgres sqlite3].map { |a| "jdbc-#{a}"
TARGETS = ( ADAPTERS + DRIVERS )

rake = lambda { |task| ruby "-S", "rake", task }
get_version = lambda { Bundler.load_gemspec('activerecord-jdbc-adapter.gemspec').version }
current_version = lambda { Bundler.load_gemspec('activerecord-jdbc-adapter.gemspec').version }

TARGETS.each do |target|
ADAPTERS.each do |target|
task :build do
version = current_version.call
Dir.chdir(target) { rake.call "build" }
cp FileList["#{target}/pkg/#{target}-#{version}.gem"], "pkg"
end
end
DRIVERS.each do |target|
namespace target do
task :build do
Dir.chdir(target) { rake.call "build" }
cp FileList["#{target}/pkg/#{target}-*.gem"], "pkg"
end
end
end
TARGETS.each do |target|
namespace target do
task :install do
Dir.chdir(target) { rake.call "install" }
end
Expand Down Expand Up @@ -65,19 +76,21 @@ task "release:adapters" => [ 'release' ] + ADAPTERS.map { |name| "#{name}:releas
task "adapters:release" => 'release:adapters'

task 'release:do' => 'build:adapters' do
version = get_version.call; version_tag = "v#{version}"
version = current_version.call; version_tag = "v#{version}"

sh("git diff --no-patch --exit-code") { |ok| fail "git working dir is not clean" unless ok }
sh("git diff-index --quiet --cached HEAD") { |ok| fail "git index is not clean" unless ok }

sh "git tag -a -m \"AR-JDBC #{version}\" #{version_tag}"
branch = `git rev-parse --abbrev-ref HEAD`.strip
puts "releasing from (current) branch #{branch.inspect}"
sh "for gem in `ls pkg/*-#{version}.gem`; do gem push $gem; done" do |ok|
sh "git push origin master --tags" if ok
sh "git push origin #{branch} --tags" if ok
end
end

task 'release:push' do
sh "for gem in `ls pkg/*-#{get_version.call}.gem`; do gem push $gem; done"
sh "for gem in `ls pkg/*-#{current_version.call}.gem`; do gem push $gem; done"
end

# ALL
Expand Down Expand Up @@ -166,7 +179,7 @@ if defined? JRUBY_VERSION
source_files = FileList[ 'src/java/**/*.java' ]

require 'tmpdir'

Dir.mktmpdir do |classes_dir|

javac = "javac -target #{target} -source #{source} #{args.join(' ')}"
Expand All @@ -189,4 +202,4 @@ else
task :jar do
puts "Run 'jar' with JRuby to re-compile the agent extension class"
end
end
end
Expand Up @@ -21,5 +21,5 @@ Gem::Specification.new do |gem|
gem.files = `git ls-files`.split("\n") # assuming . working directory

gem.add_dependency 'activerecord-jdbc-adapter', "~>#{version}"
gem.add_dependency 'jdbc-h2', '~> 1.3.0'
gem.add_dependency 'jdbc-h2', '~> 1.3'
end
2 changes: 1 addition & 1 deletion gemfiles/rails23.gemfile
Expand Up @@ -3,7 +3,7 @@
source "https://rubygems.org"

gem "thread_safe", :require=>nil
gem "rake", "~> 10.3.2", :require=>nil
gem "rake", "~> 10.4.2", :require=>nil
gem "appraisal", "~> 0.5.2", :require=>nil
gem "test-unit", "~> 2.5.4", :group=>:test
gem "test-unit-context", ">= 0.4.0", :group=>:test
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails23.gemfile.lock
Expand Up @@ -28,7 +28,7 @@ GEM
activeresource (= 2.3.18)
activesupport (= 2.3.18)
rake (>= 0.8.3)
rake (10.3.2)
rake (10.4.2)
simplecov (0.9.1)
docile (~> 1.1.0)
multi_json (~> 1.0)
Expand All @@ -50,7 +50,7 @@ DEPENDENCIES
mysql2
pg
rails (~> 2.3.18)
rake (~> 10.3.2)
rake (~> 10.4.2)
simplecov
sqlite3
test-unit (~> 2.5.4)
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails30.gemfile
Expand Up @@ -3,7 +3,7 @@
source "https://rubygems.org"

gem "thread_safe", :require=>nil
gem "rake", "~> 10.3.2", :require=>nil
gem "rake", "~> 10.4.2", :require=>nil
gem "appraisal", "~> 0.5.2", :require=>nil
gem "test-unit", "~> 2.5.4", :group=>:test
gem "test-unit-context", ">= 0.4.0", :group=>:test
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails30.gemfile.lock
Expand Up @@ -23,7 +23,7 @@ GEM
mocha (0.13.3)
metaclass (~> 0.0.1)
multi_json (1.10.1)
rake (10.3.2)
rake (10.4.2)
simplecov (0.9.1)
docile (~> 1.1.0)
multi_json (~> 1.0)
Expand All @@ -45,7 +45,7 @@ DEPENDENCIES
mocha (~> 0.13.1)
mysql2
pg
rake (~> 10.3.2)
rake (~> 10.4.2)
simplecov
sqlite3
test-unit (~> 2.5.4)
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails31.gemfile
Expand Up @@ -3,7 +3,7 @@
source "https://rubygems.org"

gem "thread_safe", :require=>nil
gem "rake", "~> 10.3.2", :require=>nil
gem "rake", "~> 10.4.2", :require=>nil
gem "appraisal", "~> 0.5.2", :require=>nil
gem "test-unit", "~> 2.5.4", :group=>:test
gem "test-unit-context", ">= 0.4.0", :group=>:test
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails31.gemfile.lock
Expand Up @@ -24,7 +24,7 @@ GEM
mocha (0.13.3)
metaclass (~> 0.0.1)
multi_json (1.10.1)
rake (10.3.2)
rake (10.4.2)
simplecov (0.9.1)
docile (~> 1.1.0)
multi_json (~> 1.0)
Expand All @@ -46,7 +46,7 @@ DEPENDENCIES
mocha (~> 0.13.1)
mysql2
pg
rake (~> 10.3.2)
rake (~> 10.4.2)
simplecov
sqlite3
test-unit (~> 2.5.4)
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails32.gemfile
Expand Up @@ -3,7 +3,7 @@
source "https://rubygems.org"

gem "thread_safe", :require=>nil
gem "rake", "~> 10.3.2", :require=>nil
gem "rake", "~> 10.4.2", :require=>nil
gem "appraisal", "~> 0.5.2", :require=>nil
gem "test-unit", "~> 2.5.4", :group=>:test
gem "test-unit-context", ">= 0.4.0", :group=>:test
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails32.gemfile.lock
Expand Up @@ -24,7 +24,7 @@ GEM
mocha (0.13.3)
metaclass (~> 0.0.1)
multi_json (1.10.1)
rake (10.3.2)
rake (10.4.2)
simplecov (0.9.1)
docile (~> 1.1.0)
multi_json (~> 1.0)
Expand All @@ -46,7 +46,7 @@ DEPENDENCIES
mocha (~> 0.13.1)
mysql2
pg
rake (~> 10.3.2)
rake (~> 10.4.2)
simplecov
sqlite3
test-unit (~> 2.5.4)
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails40.gemfile
Expand Up @@ -3,7 +3,7 @@
source "https://rubygems.org"

gem "thread_safe", :require=>nil
gem "rake", "~> 10.3.2", :require=>nil
gem "rake", "~> 10.4.2", :require=>nil
gem "appraisal", "~> 0.5.2", :require=>nil
gem "test-unit", "~> 2.5.4", :group=>:test
gem "test-unit-context", ">= 0.4.0", :group=>:test
Expand Down
20 changes: 10 additions & 10 deletions gemfiles/rails40.gemfile.lock
Expand Up @@ -9,7 +9,7 @@ GEM
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.13)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activerecord-deprecated_finders (1.0.4)
activesupport (4.0.13)
i18n (~> 0.6, >= 0.6.9)
minitest (~> 4.2)
Expand All @@ -28,18 +28,18 @@ GEM
minitest (4.7.5)
mocha (0.13.3)
metaclass (~> 0.0.1)
multi_json (1.10.1)
rake (10.3.2)
simplecov (0.9.1)
multi_json (1.11.0)
rake (10.4.2)
simplecov (0.9.2)
docile (~> 1.1.0)
multi_json (~> 1.0)
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
simplecov-html (~> 0.9.0)
simplecov-html (0.9.0)
test-unit (2.5.5)
test-unit-context (0.4.0)
test-unit-context (0.5.0)
test-unit (>= 2.4.0)
thread_safe (0.3.4-java)
tzinfo (0.3.42)
thread_safe (0.3.5-java)
tzinfo (0.3.43)

PLATFORMS
java
Expand All @@ -51,7 +51,7 @@ DEPENDENCIES
mocha (~> 0.13.1)
mysql2
pg
rake (~> 10.3.2)
rake (~> 10.4.2)
simplecov
sqlite3
test-unit (~> 2.5.4)
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails41.gemfile
Expand Up @@ -3,7 +3,7 @@
source "https://rubygems.org"

gem "thread_safe", :require=>nil
gem "rake", "~> 10.3.2", :require=>nil
gem "rake", "~> 10.4.2", :require=>nil
gem "appraisal", "~> 0.5.2", :require=>nil
gem "test-unit", "~> 2.5.4", :group=>:test
gem "test-unit-context", ">= 0.4.0", :group=>:test
Expand Down
28 changes: 14 additions & 14 deletions gemfiles/rails41.gemfile.lock
@@ -1,14 +1,14 @@
GEM
remote: https://rubygems.org/
specs:
activemodel (4.1.9)
activesupport (= 4.1.9)
activemodel (4.1.10)
activesupport (= 4.1.10)
builder (~> 3.1)
activerecord (4.1.9)
activemodel (= 4.1.9)
activesupport (= 4.1.9)
activerecord (4.1.10)
activemodel (= 4.1.10)
activesupport (= 4.1.10)
arel (~> 5.0.0)
activesupport (4.1.9)
activesupport (4.1.10)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
Expand All @@ -27,17 +27,17 @@ GEM
minitest (5.5.1)
mocha (0.13.3)
metaclass (~> 0.0.1)
multi_json (1.10.1)
rake (10.3.2)
simplecov (0.9.1)
multi_json (1.11.0)
rake (10.4.2)
simplecov (0.9.2)
docile (~> 1.1.0)
multi_json (~> 1.0)
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
simplecov-html (~> 0.9.0)
simplecov-html (0.9.0)
test-unit (2.5.5)
test-unit-context (0.4.0)
test-unit-context (0.5.0)
test-unit (>= 2.4.0)
thread_safe (0.3.4-java)
thread_safe (0.3.5-java)
tzinfo (1.2.2)
thread_safe (~> 0.1)

Expand All @@ -51,7 +51,7 @@ DEPENDENCIES
mocha (~> 0.13.1)
mysql2
pg
rake (~> 10.3.2)
rake (~> 10.4.2)
simplecov
sqlite3
test-unit (~> 2.5.4)
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails42.gemfile
Expand Up @@ -3,7 +3,7 @@
source "https://rubygems.org"

gem "thread_safe", :require=>nil
gem "rake", "~> 10.3.2", :require=>nil
gem "rake", "~> 10.4.2", :require=>nil
gem "appraisal", "~> 0.5.2", :require=>nil
gem "test-unit", "~> 2.5.4", :group=>:test
gem "test-unit-context", ">= 0.4.0", :group=>:test
Expand Down
28 changes: 14 additions & 14 deletions gemfiles/rails42.gemfile.lock
@@ -1,14 +1,14 @@
GEM
remote: https://rubygems.org/
specs:
activemodel (4.2.0)
activesupport (= 4.2.0)
activemodel (4.2.1)
activesupport (= 4.2.1)
builder (~> 3.1)
activerecord (4.2.0)
activemodel (= 4.2.0)
activesupport (= 4.2.0)
activerecord (4.2.1)
activemodel (= 4.2.1)
activesupport (= 4.2.1)
arel (~> 6.0)
activesupport (4.2.0)
activesupport (4.2.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
Expand All @@ -27,17 +27,17 @@ GEM
minitest (5.5.1)
mocha (0.13.3)
metaclass (~> 0.0.1)
multi_json (1.10.1)
rake (10.3.2)
simplecov (0.9.1)
multi_json (1.11.0)
rake (10.4.2)
simplecov (0.9.2)
docile (~> 1.1.0)
multi_json (~> 1.0)
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
simplecov-html (~> 0.9.0)
simplecov-html (0.9.0)
test-unit (2.5.5)
test-unit-context (0.4.0)
test-unit-context (0.5.0)
test-unit (>= 2.4.0)
thread_safe (0.3.4-java)
thread_safe (0.3.5-java)
tzinfo (1.2.2)
thread_safe (~> 0.1)

Expand All @@ -51,7 +51,7 @@ DEPENDENCIES
mocha (~> 0.13.1)
mysql2
pg
rake (~> 10.3.2)
rake (~> 10.4.2)
simplecov
sqlite3
test-unit (~> 2.5.4)
Expand Down

0 comments on commit 8db48e9

Please sign in to comment.