Skip to content

Commit b84e3c0

Browse files
committed
Merge master
2 parents e2a18d5 + b6151b9 commit b84e3c0

Some content is hidden

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

54 files changed

+1148
-794
lines changed

.github/workflows/ci.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
name: CI
3+
4+
on:
5+
- push
6+
- pull_request
7+
8+
jobs:
9+
rspec:
10+
runs-on: ubuntu-20.04
11+
12+
env:
13+
ORACLE_COOKIE: sqldev
14+
ORACLE_FILE: oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
15+
ORACLE_HOME: /u01/app/oracle/product/11.2.0/xe
16+
ORACLE_SID: XE
17+
18+
services:
19+
postgres:
20+
image: 'postgres:13'
21+
ports: ['5432:5432']
22+
env:
23+
POSTGRES_PASSWORD: postgres
24+
POSTGRES_DB: ajax_datatables_rails
25+
options: >-
26+
--health-cmd pg_isready
27+
--health-interval 10s
28+
--health-timeout 5s
29+
--health-retries 5
30+
31+
# Using docker image fails with
32+
# invalid reference format
33+
# mariadb:
34+
# image: 'mariadb:10.3'
35+
# ports: ['3306:3306']
36+
# env:
37+
# MYSQL_ROOT_PASSWORD: root
38+
# MYSQL_DATABASE: ajax_datatables_rails
39+
# options: >-
40+
# --health-cmd 'mysqladmin ping'
41+
# --health-interval 10s
42+
# --health-timeout 5s
43+
# --health-retries 3
44+
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
ruby:
49+
- '3.0'
50+
- '2.7'
51+
- '2.6'
52+
- '2.5'
53+
rails:
54+
- rails_5.2.4
55+
- rails_6.0.3
56+
- rails_6.1.0
57+
adapter:
58+
- sqlite3
59+
- postgresql
60+
- mysql2
61+
- oracle_enhanced
62+
exclude:
63+
- ruby: '3.0'
64+
rails: rails_5.2.4
65+
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v2
69+
70+
- name: Setup Ruby
71+
uses: ruby/setup-ruby@v1
72+
with:
73+
ruby-version: ${{ matrix.ruby }}
74+
75+
- name: Set DB Adapter
76+
env:
77+
RAILS_VERSION: ${{ matrix.rails }}
78+
DB_ADAPTER: ${{ matrix.adapter }}
79+
CUSTOM_ORACLE_FILE: ${{ secrets.CUSTOM_ORACLE_FILE }}
80+
81+
# See: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#mysql
82+
run: |
83+
if [ "${DB_ADAPTER}" = "mysql2" ]; then
84+
sudo systemctl start mysql.service
85+
mysql -u root -proot -e 'create database ajax_datatables_rails;'
86+
fi
87+
88+
if [ "${DB_ADAPTER}" = "oracle_enhanced" ]; then
89+
./spec/install_oracle.sh
90+
# Fix error : libnnz11.so: cannot open shared object file: No such file or directory
91+
sudo ln -s ${ORACLE_HOME}/lib/libnnz11.so /usr/lib/libnnz11.so
92+
fi
93+
94+
- name: Setup Ruby cache
95+
uses: actions/cache@v2
96+
with:
97+
path: vendor/bundle
98+
key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}-${{ matrix.adapter }}-${{ hashFiles('**/Gemfile.lock') }}
99+
restore-keys: |
100+
${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}-${{ matrix.adapter }}-
101+
102+
- name: Bundle
103+
env:
104+
RAILS_VERSION: ${{ matrix.rails }}
105+
DB_ADAPTER: ${{ matrix.adapter }}
106+
BUNDLE_GEMFILE: gemfiles/${{ matrix.rails }}.gemfile
107+
run: |
108+
gem install bundler
109+
bundle config path vendor/bundle
110+
bundle install --jobs 4 --retry 3
111+
112+
- name: RSpec & publish code coverage
113+
uses: paambaati/[email protected]
114+
env:
115+
RAILS_VERSION: ${{ matrix.rails }}
116+
DB_ADAPTER: ${{ matrix.adapter }}
117+
BUNDLE_GEMFILE: gemfiles/${{ matrix.rails }}.gemfile
118+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
119+
with:
120+
coverageCommand: bin/rake

.rubocop.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
AllCops:
2-
TargetRubyVersion: 2.4
2+
NewCops: enable
3+
SuggestExtensions: false
4+
TargetRubyVersion: 2.5
35
Exclude:
46
- bin/*
57
- lib/generators/**/*.rb

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

Appraisals

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
# frozen_string_literal: true
22

33
RAILS_VERSIONS = {
4-
'5.0.7' => {
5-
'activerecord-oracle_enhanced-adapter' => '~> 1.7.0',
6-
'sqlite3' => '~> 1.3.0',
7-
'mysql2' => '',
8-
'ruby-oci8' => '',
9-
},
10-
'5.1.7' => {
11-
'activerecord-oracle_enhanced-adapter' => '~> 1.8.0',
4+
'5.2.4' => {
5+
'activerecord-oracle_enhanced-adapter' => '~> 5.2.0',
126
'sqlite3' => '~> 1.3.0',
137
'mysql2' => '',
148
'ruby-oci8' => '',
159
},
16-
'5.2.3' => {
17-
'activerecord-oracle_enhanced-adapter' => '~> 5.2.0',
18-
'sqlite3' => '~> 1.3.0',
10+
'6.0.3' => {
11+
'activerecord-oracle_enhanced-adapter' => '~> 6.0.0',
12+
'sqlite3' => '~> 1.4.0',
1913
'mysql2' => '',
2014
'ruby-oci8' => '',
2115
},
22-
'6.0.1' => {
23-
'activerecord-oracle_enhanced-adapter' => '~> 6.0.0',
16+
'6.1.0' => {
17+
'activerecord-oracle_enhanced-adapter' => '~> 6.1.0',
2418
'sqlite3' => '~> 1.4.0',
2519
'mysql2' => '',
2620
'ruby-oci8' => '',

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
11
# CHANGELOG
22

3-
## 1.2.0 (to come)
3+
## 1.3.0 (to come)
4+
5+
* Drop support of Rails 5.0.x and 5.1.x
6+
* Drop support of Ruby 2.4
7+
* Add support of Rails 6.1
8+
* Add support of Ruby 3.0
9+
* Switch from Travis to Github Actions
10+
* Improve specs
11+
* Fix lib loading with JRuby (fixes [#371](https://github.com/jbox-web/ajax-datatables-rails/issues/371))
12+
* Raise an error when column's `cond:` setting is unknown
13+
* Make global search and column search work together (merge: [#350](https://github.com/jbox-web/ajax-datatables-rails/pull/350), fixes: [#258](https://github.com/jbox-web/ajax-datatables-rails/issues/258))
14+
* Fix: date_range doesn't support searching by a date greater than today (merge: [#351](https://github.com/jbox-web/ajax-datatables-rails/pull/351))
15+
* Fix: undefined method `fetch' for nil:NilClass (fix: [#307](https://github.com/jbox-web/ajax-datatables-rails/issues/307))
16+
17+
* `AjaxDatatablesRails.config` is removed with no replacement. The gem is now configless :)
18+
* `AjaxDatatablesRails.config.db_adapter=` is removed and is configured per datatable class now. It defaults to Rails DB adapter. (fixes [#364](https://github.com/jbox-web/ajax-datatables-rails/issues/364))
19+
* `AjaxDatatablesRails.config.nulls_last=` is removed and is configured per datatable class now (or by column). It defaults to false.
20+
21+
To mitigate this 3 changes see the [migration doc](/doc/migrate.md).
22+
23+
## 1.2.0 (2020-04-19)
424

525
* Drop support of Rails 4.x
626
* Drop support of Ruby 2.3
727
* Use [zeitwerk](https://github.com/fxn/zeitwerk) to load gem files
28+
* Add binstubs to ease development
29+
30+
This is the last version to support Rails 5.0.x, Rails 5.1.x and Ruby 2.4.x.
831

932
## 1.1.0 (2019-12-12)
1033

Guardfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# frozen_string_literal: true
2+
3+
guard :rspec, cmd: 'bundle exec rspec' do
4+
require 'guard/rspec/dsl'
5+
dsl = Guard::RSpec::Dsl.new(self)
6+
7+
# RSpec files
8+
rspec = dsl.rspec
9+
watch(rspec.spec_helper) { rspec.spec_dir }
10+
watch(rspec.spec_support) { rspec.spec_dir }
11+
watch(rspec.spec_files)
12+
13+
# Ruby files
14+
ruby = dsl.ruby
15+
dsl.watch_spec_files_for(ruby.lib_files)
16+
end

0 commit comments

Comments
 (0)