sequel-rails 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +28 -5
- data/History.md +15 -0
- data/README.md +3 -3
- data/Rakefile +3 -0
- data/ci/rails-7.2.gemfile +27 -0
- data/ci/rails-8.0.gemfile +27 -0
- data/lib/sequel_rails/railtie.rb +5 -3
- data/lib/sequel_rails/railties/database.rake +1 -0
- data/lib/sequel_rails/version.rb +1 -1
- data/spec/internal/Rakefile +4 -0
- data/spec/spec_helper.rb +3 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 397a879b8562aed5908b6e658f965ecb57870c0a64613cd1752e157f2604fb32
|
4
|
+
data.tar.gz: 9702cb1002a2b451bd7954b12e3bece2b4322795f2efe75c850ad35854ecbc10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84addb7863682b82c8c30a8ae6ead3946b98446802ef103c88ded1ac78d78d4528e519904ec65cc92dbffbd9e904531ab5643a7e8dd134d90a520e1a899ca797
|
7
|
+
data.tar.gz: b3831bd1ab2e4af54cfa762269f91fbae3fd80358230fffb5e5a576e2e57ba58dc0dd6ab123cfa380e2fbd917fda800a17505323f9c80c0ac078be15d577a2ad
|
data/.github/workflows/ci.yml
CHANGED
@@ -2,9 +2,9 @@ name: CI
|
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
branches: [
|
5
|
+
branches: [master]
|
6
6
|
pull_request:
|
7
|
-
branches: [
|
7
|
+
branches: ["**"]
|
8
8
|
|
9
9
|
jobs:
|
10
10
|
tests:
|
@@ -15,7 +15,7 @@ jobs:
|
|
15
15
|
POSTGRES_USER: postgres
|
16
16
|
POSTGRES_PASSWORD: postgres
|
17
17
|
ports:
|
18
|
-
|
18
|
+
- 5432
|
19
19
|
options: >-
|
20
20
|
--health-cmd pg_isready
|
21
21
|
--health-interval 10s
|
@@ -27,7 +27,7 @@ jobs:
|
|
27
27
|
env:
|
28
28
|
MYSQL_ROOT_PASSWORD: root
|
29
29
|
ports:
|
30
|
-
|
30
|
+
- 3306
|
31
31
|
options: >-
|
32
32
|
--health-cmd="mysqladmin ping"
|
33
33
|
--health-interval=10s
|
@@ -42,6 +42,8 @@ jobs:
|
|
42
42
|
- "6.1"
|
43
43
|
- "7.0"
|
44
44
|
- "7.1"
|
45
|
+
- "7.2"
|
46
|
+
- "8.0"
|
45
47
|
sequel:
|
46
48
|
- "~> 5.0"
|
47
49
|
ruby:
|
@@ -50,6 +52,7 @@ jobs:
|
|
50
52
|
- "3.0"
|
51
53
|
- "3.1"
|
52
54
|
- "3.2"
|
55
|
+
- "3.3"
|
53
56
|
# - "jruby"
|
54
57
|
include:
|
55
58
|
- ruby: "2.6"
|
@@ -66,6 +69,8 @@ jobs:
|
|
66
69
|
rails: "6.1"
|
67
70
|
- ruby: "3.2"
|
68
71
|
rails: "6.1"
|
72
|
+
- ruby: "3.3"
|
73
|
+
rails: "6.1"
|
69
74
|
- ruby: "2.6"
|
70
75
|
rails: "7.0"
|
71
76
|
- ruby: "jruby"
|
@@ -74,7 +79,25 @@ jobs:
|
|
74
79
|
rails: "7.1"
|
75
80
|
- ruby: "jruby"
|
76
81
|
rails: "7.1"
|
77
|
-
|
82
|
+
- ruby: "2.6"
|
83
|
+
rails: "7.2"
|
84
|
+
- ruby: "2.7"
|
85
|
+
rails: "7.2"
|
86
|
+
- ruby: "3.0"
|
87
|
+
rails: "7.2"
|
88
|
+
- ruby: "jruby"
|
89
|
+
rails: "7.2"
|
90
|
+
- ruby: "2.6"
|
91
|
+
rails: "8.0"
|
92
|
+
- ruby: "2.7"
|
93
|
+
rails: "8.0"
|
94
|
+
- ruby: "3.0"
|
95
|
+
rails: "8.0"
|
96
|
+
- ruby: "3.1"
|
97
|
+
rails: "8.0"
|
98
|
+
- ruby: "jruby"
|
99
|
+
rails: "8.0"
|
100
|
+
name: Rails ${{ matrix.rails }}, Ruby ${{ matrix.ruby }}, Sequel ${{ matrix.sequel }}
|
78
101
|
|
79
102
|
env:
|
80
103
|
SEQUEL: "${{ matrix.sequel }}"
|
data/History.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
1.2.4 (2025-03-06)
|
2
|
+
==================
|
3
|
+
|
4
|
+
* Disconnect database connections before attempting to drop database (@rolftimmermans)
|
5
|
+
[#204](https://github.com/TalentBox/sequel-rails/pull/204)
|
6
|
+
* Configure CI to include tests for Rails ~> 8.0.0 (Jonathan Tron)
|
7
|
+
|
8
|
+
1.2.3 (2024-09-15)
|
9
|
+
==================
|
10
|
+
|
11
|
+
* Allow to use commands db:test:prepare, db:setup without created DB (@artofhuman)
|
12
|
+
[#203](https://github.com/TalentBox/sequel-rails/pull/203)
|
13
|
+
* Update CI to run on Ruby 3.3 (@PikachuEXE)
|
14
|
+
[#202](https://github.com/TalentBox/sequel-rails/pull/202)
|
15
|
+
|
1
16
|
1.2.2 (2023-12-18)
|
2
17
|
==================
|
3
18
|
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
This gem provides the railtie that allows
|
11
11
|
[sequel](http://github.com/jeremyevans/sequel) to hook into
|
12
|
-
[Rails (5.2.x, 6.x, 7.x)](http://github.com/rails/rails) and thus behave like a
|
12
|
+
[Rails (5.2.x, 6.x, 7.x, 8.x)](http://github.com/rails/rails) and thus behave like a
|
13
13
|
rails framework component. Just like activerecord does in rails,
|
14
14
|
[sequel-rails](http://github.com/talentbox/sequel-rails) uses the railtie API to
|
15
15
|
hook into rails. The two are actually hooked into rails almost identically.
|
@@ -27,7 +27,7 @@ Since January 2013, we've become the official maintainers of the gem after
|
|
27
27
|
Using sequel-rails
|
28
28
|
==================
|
29
29
|
|
30
|
-
Using sequel with Rails (5.2.x, 6.x, 7.x) requires a few minor changes.
|
30
|
+
Using sequel with Rails (5.2.x, 6.x, 7.x, 8.x) requires a few minor changes.
|
31
31
|
|
32
32
|
First, add the following to your Gemfile (after the `Rails` lines):
|
33
33
|
|
@@ -377,7 +377,7 @@ Once you do that, you will see the following rake tasks among others. These are
|
|
377
377
|
```bash
|
378
378
|
rake db:create[env] # Create the database defined in config/database.yml for the current Rails.env
|
379
379
|
rake db:create:all # Create all the local databases defined in config/database.yml
|
380
|
-
rake db:drop[env] #
|
380
|
+
rake db:drop[env] # Drop the database defined in config/database.yml for the current Rails.env
|
381
381
|
rake db:drop:all # Drops all the local databases defined in config/database.yml
|
382
382
|
rake db:force_close_open_connections # Forcibly close any open connections to the test database
|
383
383
|
rake db:migrate # Migrate the database to the latest version
|
data/Rakefile
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'railties', '~> 7.2.0'
|
4
|
+
gem 'activemodel', '~> 7.2.0'
|
5
|
+
gem 'actionpack', '~> 7.2.0'
|
6
|
+
|
7
|
+
gemspec :path => '../'
|
8
|
+
|
9
|
+
gem 'sequel', "#{ENV['SEQUEL']}"
|
10
|
+
|
11
|
+
gem 'fakefs', '>= 1.8.0', :require => 'fakefs/safe'
|
12
|
+
|
13
|
+
gem 'rspec-rails', '~> 5.0'
|
14
|
+
|
15
|
+
# MRI/Rubinius Adapter Dependencies
|
16
|
+
platform :ruby do
|
17
|
+
gem 'pg'
|
18
|
+
gem 'mysql2'
|
19
|
+
gem 'sqlite3'
|
20
|
+
end
|
21
|
+
|
22
|
+
# JRuby Adapter Dependencies
|
23
|
+
platform :jruby do
|
24
|
+
gem 'jdbc-sqlite3'
|
25
|
+
gem 'jdbc-mysql'
|
26
|
+
gem 'jdbc-postgres'
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'railties', '~> 8.0.0'
|
4
|
+
gem 'activemodel', '~> 8.0.0'
|
5
|
+
gem 'actionpack', '~> 8.0.0'
|
6
|
+
|
7
|
+
gemspec :path => '../'
|
8
|
+
|
9
|
+
gem 'sequel', "#{ENV['SEQUEL']}"
|
10
|
+
|
11
|
+
gem 'fakefs', '>= 1.8.0', :require => 'fakefs/safe'
|
12
|
+
|
13
|
+
gem 'rspec-rails', '~> 5.0'
|
14
|
+
|
15
|
+
# MRI/Rubinius Adapter Dependencies
|
16
|
+
platform :ruby do
|
17
|
+
gem 'pg'
|
18
|
+
gem 'mysql2'
|
19
|
+
gem 'sqlite3'
|
20
|
+
end
|
21
|
+
|
22
|
+
# JRuby Adapter Dependencies
|
23
|
+
platform :jruby do
|
24
|
+
gem 'jdbc-sqlite3'
|
25
|
+
gem 'jdbc-mysql'
|
26
|
+
gem 'jdbc-postgres'
|
27
|
+
end
|
data/lib/sequel_rails/railtie.rb
CHANGED
@@ -108,15 +108,17 @@ module SequelRails
|
|
108
108
|
end
|
109
109
|
|
110
110
|
def check_skip_connect_conditions(app)
|
111
|
-
app.config.sequel[:skip_connect] ||=
|
111
|
+
app.config.sequel[:skip_connect] ||= skip_db_connect?
|
112
112
|
end
|
113
113
|
|
114
114
|
def database_connection_required?(app)
|
115
115
|
!app.config.sequel[:skip_connect]
|
116
116
|
end
|
117
117
|
|
118
|
-
def
|
119
|
-
|
118
|
+
def skip_db_connect?
|
119
|
+
Rake.application.top_level_tasks.any? do |task|
|
120
|
+
task.match?(/^db:create|db:test:prepare|^db:drop|db:setup/)
|
121
|
+
end
|
120
122
|
end
|
121
123
|
end
|
122
124
|
end
|
@@ -206,6 +206,7 @@ namespace sequel_rails_namespace do
|
|
206
206
|
desc "Prepare test database (ensure all migrations ran, drop and re-create database then load schema). This task can be run in the same invocation as other task (eg: rake #{sequel_rails_namespace}:migrate #{sequel_rails_namespace}:test:prepare)."
|
207
207
|
task :prepare => "#{sequel_rails_namespace}:abort_if_pending_migrations" do
|
208
208
|
previous_env, Rails.env = Rails.env, 'test'
|
209
|
+
Sequel::DATABASES.each(&:disconnect)
|
209
210
|
Rake::Task["#{sequel_rails_namespace}:drop"].execute
|
210
211
|
Rake::Task["#{sequel_rails_namespace}:create"].execute
|
211
212
|
Rake::Task["#{sequel_rails_namespace}:load"].execute
|
data/lib/sequel_rails/version.rb
CHANGED
data/spec/internal/Rakefile
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
+
# So loading rails via combustion doesn't crash on some older versions
|
2
|
+
require 'logger'
|
3
|
+
|
1
4
|
begin
|
2
5
|
require 'bundler/setup'
|
3
6
|
rescue LoadError
|
4
7
|
warn 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
8
|
end
|
9
|
+
|
6
10
|
Bundler.require :default, :development, :test
|
7
11
|
|
8
12
|
Combustion.path = ''
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brasten Sager (brasten)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2025-03-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -224,6 +224,8 @@ files:
|
|
224
224
|
- ci/rails-6.1.gemfile
|
225
225
|
- ci/rails-7.0.gemfile
|
226
226
|
- ci/rails-7.1.gemfile
|
227
|
+
- ci/rails-7.2.gemfile
|
228
|
+
- ci/rails-8.0.gemfile
|
227
229
|
- config.ru
|
228
230
|
- lib/action_dispatch/middleware/session/sequel_store.rb
|
229
231
|
- lib/generators/sequel.rb
|
@@ -307,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
307
309
|
- !ruby/object:Gem::Version
|
308
310
|
version: 1.8.11
|
309
311
|
requirements: []
|
310
|
-
rubygems_version: 3.
|
312
|
+
rubygems_version: 3.5.22
|
311
313
|
signing_key:
|
312
314
|
specification_version: 4
|
313
315
|
summary: Use Sequel with Rails (3.x and 4.x)
|