Skip to content

Commit a47d7e4

Browse files
author
Rob Widmer
committed
Merge branch '50-stable' into mssql-support
2 parents e30e103 + 135b4e2 commit a47d7e4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+454
-461
lines changed

.travis.yml

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
language: ruby
21
sudo: false
3-
branches:
4-
only:
5-
- master
6-
- /.*-stable$/
7-
- /^test-.*/
8-
- /maintenance|support/
9-
- /.*dev$/
10-
bundler_args: --without development
11-
script: bundle exec rake ${TEST_PREFIX}test_$DB
2+
dist: xenial
3+
4+
services:
5+
- mysql
6+
addons:
7+
postgresql: 9.4
8+
129
before_install:
1310
- unset _JAVA_OPTIONS
1411
- rvm @default,@global do gem uninstall bundler -a -x -I || true
1512
- gem install bundler -v "~>1.17.3"
13+
install:
14+
- bundle install --retry 3 --without development
15+
# to fix this issue: https://travis-ci.community/t/mariadb-10-1-fails-to-install-on-xenial/3151/3
16+
- mysql -u root -e 'CREATE USER IF NOT EXISTS travis@localhost; GRANT ALL ON *.* TO travis@localhost;' || true
17+
18+
language: ruby
19+
rvm:
20+
- jruby-9.1.16.0
21+
jdk:
22+
- openjdk8
23+
24+
script: bundle exec rake ${TEST_PREFIX}test_$DB
1625
before_script:
1726
- echo "JAVA_OPTS=$JAVA_OPTS"
1827
- export JRUBY_OPTS="-J-Xms64M -J-Xmx1024M"
@@ -38,10 +47,7 @@ before_script:
3847
psql -c "create database activerecord_unittest;" -U postgres && \
3948
psql -c "create database activerecord_unittest2;" -U postgres \
4049
|| true
41-
rvm:
42-
- jruby-9.1.16.0
43-
jdk:
44-
- openjdk8
50+
4551
env:
4652
- DB=mysql2 PREPARED_STATEMENTS=false
4753
- DB=mysql2 PREPARED_STATEMENTS=true
@@ -52,27 +58,27 @@ env:
5258
- DB=postgresql PREPARED_STATEMENTS=true INSERT_RETURNING=true
5359
- DB=sqlite3 PREPARED_STATEMENTS=false
5460
- DB=sqlite3 PREPARED_STATEMENTS=true
55-
#- DB=jndi PREPARED_STATEMENTS=false
56-
#- DB=jndi PREPARED_STATEMENTS=true
61+
- DB=jndi PREPARED_STATEMENTS=false
62+
- DB=jndi PREPARED_STATEMENTS=true
5763
matrix:
5864
allow_failures:
5965
- rvm: jruby-head
6066
include:
6167
# jruby-9.2
62-
- rvm: jruby-9.2.5.0
68+
- rvm: jruby-9.2.6.0
6369
env: DB=mysql2
64-
- rvm: jruby-9.2.5.0
70+
- rvm: jruby-9.2.6.0
6571
env: DB=postgresql
66-
- rvm: jruby-9.2.5.0
72+
- rvm: jruby-9.2.6.0
6773
env: DB=sqlite3
6874
# jruby-9.2 + Java 11
69-
- rvm: jruby-9.2.5.0
75+
- rvm: jruby-9.2.6.0
7076
env: DB=mysql2
7177
jdk: openjdk11
72-
- rvm: jruby-9.2.5.0
78+
- rvm: jruby-9.2.6.0
7379
env: DB=postgresql
7480
jdk: openjdk11
75-
- rvm: jruby-9.2.5.0
81+
- rvm: jruby-9.2.6.0
7682
env: DB=sqlite3
7783
jdk: openjdk11
7884
# jruby-head
@@ -84,10 +90,10 @@ matrix:
8490
env: DB=sqlite3
8591
# testing against MariaDB
8692
- addons:
87-
mariadb: '10.0'
93+
mariadb: 10.2
8894
env: DB=mariadb PREPARED_STATEMENTS=false
8995
- addons:
90-
mariadb: '10.1'
96+
mariadb: 10.3
9197
env: DB=mariadb PREPARED_STATEMENTS=true
9298
# Rails test-suite :
9399
- env: DB=mysql2 TEST_PREFIX="rails:" AR_VERSION="v5.0.7.1" # PS off by default

Rakefile

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
# Common usage
2+
#
3+
# rake build:adapters - to build all specific adapter gems and the base gem
4+
# rake release:do - build:adapters + git tag + push gems
5+
#
6+
# Environment variables used by this Rakefile:
7+
#
8+
# INCLUDE_JAR_IN_GEM [default task - false, other taks - true]:
9+
# Note: This is something you should not normally have to set.
10+
# For local development we always will end up including the jar file
11+
# in any task which generates our main gem. The wrinkle to this
12+
# is when we do a custom github link in bundler:
13+
#
14+
# gem 'ar-jdbc', github: '...'
15+
#
16+
# Because we stopped committing a .jar file for every change and so when
17+
# we include a gem like this it clones the repository and does a default
18+
# build in rake. This in turn will end up forcing a compile to generate
19+
# that jar (similar to how c-extensions compile at the time of install).
20+
# For shipped gems we do include the jar so that people do not require
21+
# this compile step.
22+
#
23+
# NOOP [release:do - false]
24+
#
25+
# No commands or gem pushing during a release.
26+
127
require 'rake/clean'
228

329
CLEAN.include 'derby*', 'test.db.*', '*test.sqlite3', 'test/reports'
@@ -38,7 +64,8 @@ rake = lambda { |task| ruby "-S", "rake", task }
3864

3965
desc "Build #{gem_name} gem into the pkg directory."
4066
task :build => :jar do
41-
sh("RELEASE=#{ENV['RELEASE']} gem build -V '#{gemspec_path}'") do
67+
include_jar = ENV['INCLUDE_JAR_IN_GEM'] || 'true'
68+
sh("INCLUDE_JAR_IN_GEM=#{include_jar} gem build -V '#{gemspec_path}'") do
4269
gem_path = built_gem_path.call
4370
file_name = File.basename(gem_path)
4471
FileUtils.mkdir_p(File.join(base_dir, 'pkg'))
@@ -58,7 +85,6 @@ end
5885

5986
desc "Releasing AR-JDBC gems (use NOOP=true to disable gem pushing)"
6087
task 'release:do' do
61-
ENV['RELEASE'] = 'true' # so that .gemspec is built with adapter_java.jar
6288
Rake::Task['build'].invoke
6389
Rake::Task['build:adapters'].invoke
6490

@@ -257,7 +283,7 @@ if defined? JRUBY_VERSION
257283
begin
258284
require 'arjdbc/version'
259285
rescue LoadError
260-
path = File.expand_path('../lib', File.dirname(__FILE__))
286+
path = File.expand_path('lib', File.dirname(__FILE__))
261287
unless $LOAD_PATH.include?(path)
262288
$LOAD_PATH << path; retry
263289
end
@@ -297,7 +323,7 @@ if defined? JRUBY_VERSION
297323
# class_files.gsub!('$', '\$') unless windows?
298324
# args = class_files.map { |path| [ "-C #{classes_dir}", path ] }.flatten
299325

300-
if ENV['RELEASE'] == 'true'; require 'tempfile'
326+
if ENV['INCLUDE_JAR_IN_GEM'] == 'true'; require 'tempfile'
301327
manifest = "Built-Time: #{Time.now.utc.strftime('%Y-%m-%d %H:%M:%S')}\n"
302328
manifest += "Built-JRuby: #{JRUBY_VERSION}\n"
303329
manifest += "Specification-Title: ActiveRecord-JDBC\n"

activerecord-jdbc-adapter.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Gem::Specification.new do |gem|
2727
reject { |f| f =~ /^(gemfiles)/ } # no tests - no Gemfile_s appraised ...
2828
gem.files += ['lib/arjdbc/jdbc/adapter_java.jar'] #if ENV['RELEASE'].eql?('true')
2929

30-
if ENV['RELEASE'] != 'true' # @see Rakefile
30+
if ENV['INCLUDE_JAR_IN_GEM'] != 'true' # @see Rakefile
3131
gem.extensions << 'Rakefile' # to support auto-building .jar with :git paths
3232

3333
#gem.add_runtime_dependency 'jar-dependencies', '~> 0.1' # development not enough!

activerecord-jdbcmysql-adapter/activerecord-jdbcmysql-adapter.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ Gem::Specification.new do |gem|
2020
gem.files = `git ls-files`.split("\n") # assuming . working directory
2121

2222
gem.add_dependency 'activerecord-jdbc-adapter', "#{version}"
23-
gem.add_dependency 'jdbc-mysql', '~> 5.1.36' #, '< 8'
23+
gem.add_dependency 'jdbc-mysql', '~> 5.1.36', '< 9'
2424
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Jdbc
22
module Postgres
3-
DRIVER_VERSION = '42.1.4'
3+
DRIVER_VERSION = '42.2.5'
44
VERSION = DRIVER_VERSION
55
end
66
end
-696 KB
Binary file not shown.
-692 KB
Binary file not shown.
-692 KB
Binary file not shown.
807 KB
Binary file not shown.
736 KB
Binary file not shown.

0 commit comments

Comments
 (0)