ranked-model 0.4.4 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.rspec +1 -0
- data/.travis.yml +32 -25
- data/Appraisals +40 -35
- data/Gemfile +12 -0
- data/Readme.mkd +61 -12
- data/gemfiles/rails_4_2.gemfile +8 -7
- data/gemfiles/rails_5_0.gemfile +8 -8
- data/gemfiles/rails_5_1.gemfile +8 -8
- data/gemfiles/rails_5_2.gemfile +7 -4
- data/gemfiles/rails_6_0.gemfile +22 -0
- data/gemfiles/rails_6_1.gemfile +22 -0
- data/lib/ranked-model/ranker.rb +356 -351
- data/lib/ranked-model/version.rb +1 -1
- data/lib/ranked-model.rb +1 -1
- data/ranked-model.gemspec +4 -4
- data/spec/duck-model/column_default_ducks_spec.rb +1 -1
- data/spec/duck-model/duck_spec.rb +84 -46
- data/spec/duck-model/lots_of_ducks_spec.rb +29 -33
- data/spec/ego-model/ego_spec.rb +3 -3
- data/spec/number-model/number_spec.rb +10 -2
- data/spec/player-model/records_already_exist_spec.rb +1 -1
- data/spec/ranked-model/ranker_spec.rb +18 -0
- data/spec/sti-model/element_spec.rb +24 -24
- data/spec/sti-model/vehicle_spec.rb +4 -4
- data/spec/support/active_record.rb +7 -5
- metadata +16 -16
- data/gemfiles/rails_4_1.gemfile +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '004680e8b292451d304375f3ae01d0100702db74867d93b2a713e7c908241d78'
|
4
|
+
data.tar.gz: cc831e2837ba8ad07c21f6b890959e071005824a4f53bd51c135c8055fb1904f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4494e9eede725ef30ecbd05006a4d91deb89f62aced56b96fa3be2f0f5732f41336d5a3d1c450e3f5d2c0f1821a15de096a1ee68732d8cb5d10a300008270ca
|
7
|
+
data.tar.gz: 04fa0d21ff8b2c6533ebc6705cc00c7258bd955c88a91636995d362136de9cf2a57c6e8ca49c43e112757e1209dc9a9fe3c2285b2bfde47639bcab90d2368fd4
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.travis.yml
CHANGED
@@ -1,49 +1,56 @@
|
|
1
|
-
sudo: false # use newer travis infrastructure
|
2
1
|
language: ruby
|
3
2
|
cache: bundler
|
4
3
|
before_install:
|
5
|
-
- gem
|
4
|
+
- gem update --system
|
5
|
+
- gem install bundler
|
6
6
|
before_script:
|
7
7
|
- mysql -e 'create database ranked_model_test;'
|
8
8
|
- psql -c 'create database ranked_model_test;' -U postgres
|
9
9
|
rvm:
|
10
|
-
-
|
11
|
-
- 2.
|
12
|
-
- 2.
|
13
|
-
- 2.
|
14
|
-
-
|
15
|
-
- 2.5.1
|
10
|
+
- 2.4
|
11
|
+
- 2.5
|
12
|
+
- 2.6
|
13
|
+
- 2.7
|
14
|
+
- 3.0
|
16
15
|
- jruby-9.1.17.0
|
17
|
-
- rbx-3.107
|
18
16
|
env:
|
19
17
|
- DB=sqlite
|
20
18
|
- DB=mysql
|
21
19
|
- DB=postgresql
|
20
|
+
services:
|
21
|
+
- mysql
|
22
|
+
- postgresql
|
22
23
|
gemfile:
|
23
|
-
- gemfiles/rails_4_1.gemfile
|
24
24
|
- gemfiles/rails_4_2.gemfile
|
25
25
|
- gemfiles/rails_5_0.gemfile
|
26
26
|
- gemfiles/rails_5_1.gemfile
|
27
27
|
- gemfiles/rails_5_2.gemfile
|
28
|
+
- gemfiles/rails_6_0.gemfile
|
29
|
+
- gemfiles/rails_6_1.gemfile
|
28
30
|
matrix:
|
29
31
|
exclude:
|
30
|
-
|
32
|
+
# Rails <6 does not support Ruby 3, see:
|
33
|
+
# https://github.com/rails/rails/issues/40938#issuecomment-751898275
|
34
|
+
- rvm: 3.0
|
35
|
+
gemfile: gemfiles/rails_4_2.gemfile
|
36
|
+
- rvm: 3.0
|
31
37
|
gemfile: gemfiles/rails_5_0.gemfile
|
32
|
-
- rvm:
|
38
|
+
- rvm: 3.0
|
33
39
|
gemfile: gemfiles/rails_5_1.gemfile
|
34
|
-
- rvm:
|
35
|
-
gemfile: gemfiles/rails_5_2.gemfile
|
36
|
-
- rvm: 2.1.10
|
37
|
-
gemfile: gemfiles/rails_5_0.gemfile
|
38
|
-
- rvm: 2.1.10
|
39
|
-
gemfile: gemfiles/rails_5_1.gemfile
|
40
|
-
- rvm: 2.1.10
|
40
|
+
- rvm: 3.0
|
41
41
|
gemfile: gemfiles/rails_5_2.gemfile
|
42
|
+
# Ruby ≥2.7 uses a `bigdecimal` version that doesn't support BigDecimal.new
|
43
|
+
# that Rails 4.2 uses. See also:
|
44
|
+
# https://github.com/ruby/bigdecimal#which-version-should-you-select
|
45
|
+
- rvm: 2.7
|
46
|
+
gemfile: gemfiles/rails_4_2.gemfile
|
42
47
|
- rvm: jruby-9.1.17.0
|
43
48
|
gemfile: gemfiles/rails_5_2.gemfile
|
44
|
-
- rvm: 2.4
|
45
|
-
gemfile: gemfiles/
|
46
|
-
- rvm:
|
47
|
-
gemfile: gemfiles/
|
48
|
-
- rvm:
|
49
|
-
gemfile: gemfiles/
|
49
|
+
- rvm: 2.4
|
50
|
+
gemfile: gemfiles/rails_6_0.gemfile
|
51
|
+
- rvm: jruby-9.1.17.0
|
52
|
+
gemfile: gemfiles/rails_6_0.gemfile
|
53
|
+
- rvm: 2.4
|
54
|
+
gemfile: gemfiles/rails_6_1.gemfile
|
55
|
+
- rvm: jruby-9.1.17.0
|
56
|
+
gemfile: gemfiles/rails_6_1.gemfile
|
data/Appraisals
CHANGED
@@ -1,81 +1,86 @@
|
|
1
|
-
appraise "rails-4-
|
1
|
+
appraise "rails-4-2" do
|
2
2
|
group :sqlite do
|
3
|
-
gem "sqlite3", "~> 1.3.13", platform: :ruby
|
4
3
|
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.24", platform: :jruby
|
5
4
|
end
|
6
5
|
group :mysql do
|
7
|
-
gem "mysql2", "~> 0.
|
6
|
+
gem "mysql2", "~> 0.4.0", platform: :ruby
|
7
|
+
gem "jdbc-mysql", "~> 5.1.47", platform: :jruby
|
8
8
|
gem "activerecord-jdbcmysql-adapter", "~> 1.3.24", platform: :jruby
|
9
9
|
end
|
10
10
|
group :postgresql do
|
11
|
-
gem "pg", "~> 0.18.
|
11
|
+
gem "pg", "~> 0.18.4", platform: :ruby
|
12
12
|
gem "activerecord-jdbcpostgresql-adapter", "~> 1.3.24", platform: :jruby
|
13
13
|
end
|
14
14
|
|
15
|
-
gem "activerecord", "~> 4.
|
15
|
+
gem "activerecord", "~> 4.2.0"
|
16
16
|
end
|
17
17
|
|
18
|
-
appraise "rails-
|
18
|
+
appraise "rails-5-0" do
|
19
19
|
group :sqlite do
|
20
|
-
gem "
|
21
|
-
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.24", platform: :jruby
|
20
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 50.0", platform: :jruby
|
22
21
|
end
|
23
22
|
group :mysql do
|
24
|
-
gem "
|
25
|
-
gem "activerecord-jdbcmysql-adapter", "~> 1.3.24", platform: :jruby
|
23
|
+
gem "activerecord-jdbcmysql-adapter", "~> 50.0", platform: :jruby
|
26
24
|
end
|
27
25
|
group :postgresql do
|
28
|
-
gem "
|
29
|
-
gem "activerecord-jdbcpostgresql-adapter", "~> 1.3.24", platform: :jruby
|
26
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 50.0", platform: :jruby
|
30
27
|
end
|
31
28
|
|
32
|
-
gem "activerecord", "~>
|
29
|
+
gem "activerecord", "~> 5.0.0"
|
33
30
|
end
|
34
31
|
|
35
|
-
appraise "rails-5-
|
32
|
+
appraise "rails-5-1" do
|
36
33
|
group :sqlite do
|
37
|
-
gem "
|
38
|
-
gem "activerecord-jdbcsqlite3-adapter", "~> 50.1", platform: :jruby
|
34
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 51.0", platform: :jruby
|
39
35
|
end
|
40
36
|
group :mysql do
|
41
|
-
gem "
|
42
|
-
gem "activerecord-jdbcmysql-adapter", "~> 50.1", platform: :jruby
|
37
|
+
gem "activerecord-jdbcmysql-adapter", "~> 51.0", platform: :jruby
|
43
38
|
end
|
44
39
|
group :postgresql do
|
45
|
-
gem "
|
46
|
-
gem "activerecord-jdbcpostgresql-adapter", "~> 50.1", platform: :jruby
|
40
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 51.0", platform: :jruby
|
47
41
|
end
|
48
42
|
|
49
|
-
gem "activerecord", "~> 5.0
|
43
|
+
gem "activerecord", "~> 5.1.0"
|
50
44
|
end
|
51
45
|
|
52
|
-
appraise "rails-5-
|
46
|
+
appraise "rails-5-2" do
|
53
47
|
group :sqlite do
|
54
|
-
gem "
|
55
|
-
gem "activerecord-jdbcsqlite3-adapter", "~> 51.1", platform: :jruby
|
48
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 52.0", platform: :jruby
|
56
49
|
end
|
57
50
|
group :mysql do
|
58
|
-
gem "
|
59
|
-
gem "activerecord-jdbcmysql-adapter", "~> 51.1", platform: :jruby
|
51
|
+
gem "activerecord-jdbcmysql-adapter", "~> 52.0", platform: :jruby
|
60
52
|
end
|
61
53
|
group :postgresql do
|
62
|
-
gem "
|
63
|
-
gem "activerecord-jdbcpostgresql-adapter", "~> 51.1", platform: :jruby
|
54
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 52.0", platform: :jruby
|
64
55
|
end
|
65
56
|
|
66
|
-
gem "activerecord", "~> 5.
|
57
|
+
gem "activerecord", "~> 5.2.0"
|
67
58
|
end
|
68
59
|
|
69
|
-
appraise "rails-
|
60
|
+
appraise "rails-6-0" do
|
70
61
|
group :sqlite do
|
71
|
-
gem "sqlite3", "~> 1.
|
62
|
+
gem "sqlite3", "~> 1.4", platform: :ruby
|
63
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 60.0", platform: :jruby
|
72
64
|
end
|
73
65
|
group :mysql do
|
74
|
-
gem "
|
66
|
+
gem "activerecord-jdbcmysql-adapter", "~> 60.0", platform: :jruby
|
75
67
|
end
|
76
68
|
group :postgresql do
|
77
|
-
gem "
|
69
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 60.0", platform: :jruby
|
78
70
|
end
|
71
|
+
gem "activerecord", "~> 6.0.0"
|
72
|
+
end
|
79
73
|
|
80
|
-
|
81
|
-
|
74
|
+
appraise "rails-6-1" do
|
75
|
+
group :sqlite do
|
76
|
+
gem "sqlite3", "~> 1.4", platform: :ruby
|
77
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 61.0", platform: :jruby
|
78
|
+
end
|
79
|
+
group :mysql do
|
80
|
+
gem "activerecord-jdbcmysql-adapter", "~> 61.0", platform: :jruby
|
81
|
+
end
|
82
|
+
group :postgresql do
|
83
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 61.0", platform: :jruby
|
84
|
+
end
|
85
|
+
gem "activerecord", "~> 6.1.0"
|
86
|
+
end
|
data/Gemfile
CHANGED
@@ -2,3 +2,15 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in ranked-model.gemspec
|
4
4
|
gemspec
|
5
|
+
|
6
|
+
group :sqlite do
|
7
|
+
gem "sqlite3", platform: :ruby
|
8
|
+
end
|
9
|
+
|
10
|
+
group :postgresql do
|
11
|
+
gem "pg", platform: :ruby
|
12
|
+
end
|
13
|
+
|
14
|
+
group :mysql do
|
15
|
+
gem "mysql2", platform: :ruby
|
16
|
+
end
|
data/Readme.mkd
CHANGED
@@ -1,13 +1,11 @@
|
|
1
|
-
**ranked-model** is a modern row sorting library built for Rails
|
1
|
+
**ranked-model** is a modern row sorting library built for Rails 4.2+. It uses ARel aggressively and is better optimized than most other libraries.
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/mixonic/ranked-model.png)](https://travis-ci.org/mixonic/ranked-model)
|
4
4
|
|
5
5
|
Installation
|
6
6
|
------------
|
7
7
|
|
8
|
-
ranked-model passes specs with Rails 4.
|
9
|
-
|
10
|
-
TL;DR, if you are using Rails 4 and up you are 100% good to go. Before Rails 4, be wary of Postgres.
|
8
|
+
ranked-model passes specs with Rails 4.2, 5.0, 5.1, 5.2, 6.0 and 6.1 for MySQL, Postgres, and SQLite on Ruby 2.4 through 3.0 (with exceptions, please check the CI setup for supported combinations), and jruby-9.1.17.0 where Rails supports the platform.
|
11
9
|
|
12
10
|
To install ranked-model, just add it to your `Gemfile`:
|
13
11
|
|
@@ -16,7 +14,7 @@ gem 'ranked-model'
|
|
16
14
|
|
17
15
|
# Or pin ranked-model to git
|
18
16
|
# gem 'ranked-model',
|
19
|
-
# :
|
17
|
+
# git: 'git@github.com:mixonic/ranked-model.git'
|
20
18
|
```
|
21
19
|
|
22
20
|
Then use `bundle install` to update your `Gemfile.lock`.
|
@@ -31,6 +29,18 @@ class Duck < ActiveRecord::Base
|
|
31
29
|
end
|
32
30
|
```
|
33
31
|
|
32
|
+
Give them an order (integer column):
|
33
|
+
|
34
|
+
```bash
|
35
|
+
rails g migration AddRowOrderToDucks row_order:integer
|
36
|
+
rails db:migrate
|
37
|
+
```
|
38
|
+
|
39
|
+
**IMPORTANT: The `_order` table column MUST allow null values. For the reason behind this requirement see [issue#167](https://github.com/mixonic/ranked-model/issues/167)**
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
34
44
|
Put your ducks in a row:
|
35
45
|
|
36
46
|
``` ruby
|
@@ -42,7 +52,7 @@ class Duck < ActiveRecord::Base
|
|
42
52
|
end
|
43
53
|
```
|
44
54
|
|
45
|
-
|
55
|
+
Order the Ducks by this order:
|
46
56
|
|
47
57
|
``` ruby
|
48
58
|
Duck.rank(:row_order).all
|
@@ -52,7 +62,7 @@ The ranking integers stored in the `row_order` column will be big and spaced apa
|
|
52
62
|
implement a sorting UI, just update the resource by appending the column name with `_position` and indicating the desired position:
|
53
63
|
|
54
64
|
``` ruby
|
55
|
-
@duck.
|
65
|
+
@duck.update row_order_position: 0 # or 1, 2, 37. :first, :last, :up and :down are also valid
|
56
66
|
```
|
57
67
|
|
58
68
|
**IMPORTANT: Note that you MUST append _position to the column name when setting a new position on an instance. This is a fake column that can take relative as well as absolute index-based values for position.**
|
@@ -92,19 +102,27 @@ class Duck < ActiveRecord::Base
|
|
92
102
|
include RankedModel
|
93
103
|
|
94
104
|
ranks :row_order, # Name this ranker, used with rank()
|
95
|
-
:
|
105
|
+
column: :sort_order # Override the default column, which defaults to the name
|
96
106
|
|
97
107
|
belongs_to :pond
|
98
108
|
ranks :swimming_order,
|
99
|
-
:
|
109
|
+
with_same: :pond_id # Ducks belong_to Ponds, make the ranker scoped to one pond
|
100
110
|
|
101
111
|
ranks :row_order,
|
102
|
-
:
|
112
|
+
with_same: [:pond_id, :breed] # Lets rank them by breed
|
103
113
|
|
104
|
-
scope :walking, where(:
|
114
|
+
scope :walking, where(walking: true )
|
105
115
|
ranks :walking_order,
|
106
|
-
:
|
116
|
+
scope: :walking # Narrow this ranker to a scope
|
117
|
+
|
118
|
+
belongs_to :parent, class_name: 'Duck', optional: true
|
119
|
+
ranks :child_order,
|
120
|
+
unless: :has_no_parent?, # Rank only ducks that have a parent. Alternatively a Proc or lambda can be passed, e.g. proc { parent.nil? }
|
121
|
+
with_same: :parent_id
|
107
122
|
|
123
|
+
def has_no_parent?
|
124
|
+
parent.nil?
|
125
|
+
end
|
108
126
|
end
|
109
127
|
```
|
110
128
|
|
@@ -172,6 +190,35 @@ truck.row_order
|
|
172
190
|
=> 4194304
|
173
191
|
```
|
174
192
|
|
193
|
+
Migrations for existing data
|
194
|
+
----------------------------
|
195
|
+
|
196
|
+
If you use `ranked_model` with existing data, the following migration (for Rails
|
197
|
+
6) can be a starting point. Make sure to declare `include RankedModel` and
|
198
|
+
`ranks :row_order` in your `Duck` before running the migration.
|
199
|
+
|
200
|
+
```bash
|
201
|
+
rails g migration AddRowOrderToDucks row_order:integer
|
202
|
+
```
|
203
|
+
|
204
|
+
Then, adjust the migration:
|
205
|
+
```ruby
|
206
|
+
# e.g. file db/migrate/20200325095038_add_row_order_to_ducks.rb
|
207
|
+
class AddRowOrderToDucks < ActiveRecord::Migration[6.0]
|
208
|
+
def change
|
209
|
+
add_column :ducks, :row_order, :integer
|
210
|
+
|
211
|
+
# Newest Duck shall rank "highest"" (be last).
|
212
|
+
Duck.update_all('row_order = EXTRACT(EPOCH FROM created_at)')
|
213
|
+
|
214
|
+
# Alternatively, implement any other sorting default
|
215
|
+
# Duck.order(created_at: :desc).each do |duck|
|
216
|
+
# duck.update!(row_order: duck.created_at.to_i + duck.age / 2)
|
217
|
+
# end
|
218
|
+
end
|
219
|
+
end
|
220
|
+
```
|
221
|
+
|
175
222
|
Internals
|
176
223
|
---------
|
177
224
|
|
@@ -189,6 +236,8 @@ Contributing
|
|
189
236
|
|
190
237
|
Fork, clone, write a test, write some code, commit, push, send a pull request. Github FTW!
|
191
238
|
|
239
|
+
The code is published under the [MIT License](LICENSE).
|
240
|
+
|
192
241
|
The specs can be run with sqlite, postgres, and mysql:
|
193
242
|
|
194
243
|
```
|
data/gemfiles/rails_4_2.gemfile
CHANGED
@@ -2,21 +2,22 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "activerecord", "~> 4.2.
|
5
|
+
gem "activerecord", "~> 4.2.0"
|
6
6
|
|
7
7
|
group :sqlite do
|
8
8
|
gem "sqlite3", "~> 1.3.13", platform: :ruby
|
9
9
|
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.24", platform: :jruby
|
10
10
|
end
|
11
11
|
|
12
|
-
group :mysql do
|
13
|
-
gem "mysql2", "~> 0.4.10", platform: :ruby
|
14
|
-
gem "activerecord-jdbcmysql-adapter", "~> 1.3.24", platform: :jruby
|
15
|
-
end
|
16
|
-
|
17
12
|
group :postgresql do
|
18
|
-
gem "pg", "~> 0.18.
|
13
|
+
gem "pg", "~> 0.18.4", platform: :ruby
|
19
14
|
gem "activerecord-jdbcpostgresql-adapter", "~> 1.3.24", platform: :jruby
|
20
15
|
end
|
21
16
|
|
17
|
+
group :mysql do
|
18
|
+
gem "mysql2", "~> 0.4.0", platform: :ruby
|
19
|
+
gem "jdbc-mysql", "~> 5.1.47", platform: :jruby
|
20
|
+
gem "activerecord-jdbcmysql-adapter", "~> 1.3.24", platform: :jruby
|
21
|
+
end
|
22
|
+
|
22
23
|
gemspec path: "../"
|
data/gemfiles/rails_5_0.gemfile
CHANGED
@@ -2,21 +2,21 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "activerecord", "~> 5.0.
|
5
|
+
gem "activerecord", "~> 5.0.0"
|
6
6
|
|
7
7
|
group :sqlite do
|
8
8
|
gem "sqlite3", "~> 1.3.13", platform: :ruby
|
9
|
-
gem "activerecord-jdbcsqlite3-adapter", "~> 50.
|
9
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 50.0", platform: :jruby
|
10
10
|
end
|
11
11
|
|
12
|
-
group :
|
13
|
-
gem "
|
14
|
-
gem "activerecord-
|
12
|
+
group :postgresql do
|
13
|
+
gem "pg", "~> 1.2.0", platform: :ruby
|
14
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 50.0", platform: :jruby
|
15
15
|
end
|
16
16
|
|
17
|
-
group :
|
18
|
-
gem "
|
19
|
-
gem "activerecord-
|
17
|
+
group :mysql do
|
18
|
+
gem "mysql2", "~> 0.5.0", platform: :ruby
|
19
|
+
gem "activerecord-jdbcmysql-adapter", "~> 50.0", platform: :jruby
|
20
20
|
end
|
21
21
|
|
22
22
|
gemspec path: "../"
|
data/gemfiles/rails_5_1.gemfile
CHANGED
@@ -2,21 +2,21 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "activerecord", "~> 5.1.
|
5
|
+
gem "activerecord", "~> 5.1.0"
|
6
6
|
|
7
7
|
group :sqlite do
|
8
8
|
gem "sqlite3", "~> 1.3.13", platform: :ruby
|
9
|
-
gem "activerecord-jdbcsqlite3-adapter", "~> 51.
|
9
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 51.0", platform: :jruby
|
10
10
|
end
|
11
11
|
|
12
|
-
group :
|
13
|
-
gem "
|
14
|
-
gem "activerecord-
|
12
|
+
group :postgresql do
|
13
|
+
gem "pg", "~> 1.2.0", platform: :ruby
|
14
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 51.0", platform: :jruby
|
15
15
|
end
|
16
16
|
|
17
|
-
group :
|
18
|
-
gem "
|
19
|
-
gem "activerecord-
|
17
|
+
group :mysql do
|
18
|
+
gem "mysql2", "~> 0.5.0", platform: :ruby
|
19
|
+
gem "activerecord-jdbcmysql-adapter", "~> 51.0", platform: :jruby
|
20
20
|
end
|
21
21
|
|
22
22
|
gemspec path: "../"
|
data/gemfiles/rails_5_2.gemfile
CHANGED
@@ -6,14 +6,17 @@ gem "activerecord", "~> 5.2.0"
|
|
6
6
|
|
7
7
|
group :sqlite do
|
8
8
|
gem "sqlite3", "~> 1.3.13", platform: :ruby
|
9
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 52.0", platform: :jruby
|
9
10
|
end
|
10
11
|
|
11
|
-
group :
|
12
|
-
gem "
|
12
|
+
group :postgresql do
|
13
|
+
gem "pg", "~> 1.2.0", platform: :ruby
|
14
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 52.0", platform: :jruby
|
13
15
|
end
|
14
16
|
|
15
|
-
group :
|
16
|
-
gem "
|
17
|
+
group :mysql do
|
18
|
+
gem "mysql2", "~> 0.5.0", platform: :ruby
|
19
|
+
gem "activerecord-jdbcmysql-adapter", "~> 52.0", platform: :jruby
|
17
20
|
end
|
18
21
|
|
19
22
|
gemspec path: "../"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "activerecord", "~> 6.0.0"
|
6
|
+
|
7
|
+
group :sqlite do
|
8
|
+
gem "sqlite3", "~> 1.4", platform: :ruby
|
9
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 60.0", platform: :jruby
|
10
|
+
end
|
11
|
+
|
12
|
+
group :postgresql do
|
13
|
+
gem "pg", "~> 1.2.0", platform: :ruby
|
14
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 60.0", platform: :jruby
|
15
|
+
end
|
16
|
+
|
17
|
+
group :mysql do
|
18
|
+
gem "mysql2", "~> 0.5.0", platform: :ruby
|
19
|
+
gem "activerecord-jdbcmysql-adapter", "~> 60.0", platform: :jruby
|
20
|
+
end
|
21
|
+
|
22
|
+
gemspec path: "../"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "activerecord", "~> 6.1.0"
|
6
|
+
|
7
|
+
group :sqlite do
|
8
|
+
gem "sqlite3", "~> 1.4", platform: :ruby
|
9
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 61.0", platform: :jruby
|
10
|
+
end
|
11
|
+
|
12
|
+
group :postgresql do
|
13
|
+
gem "pg", "~> 1.2.0", platform: :ruby
|
14
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 61.0", platform: :jruby
|
15
|
+
end
|
16
|
+
|
17
|
+
group :mysql do
|
18
|
+
gem "mysql2", "~> 0.5.0", platform: :ruby
|
19
|
+
gem "activerecord-jdbcmysql-adapter", "~> 61.0", platform: :jruby
|
20
|
+
end
|
21
|
+
|
22
|
+
gemspec path: "../"
|