cypress-rails 0.7.1 → 0.8.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +6 -1
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/cypress-rails/manages_transactions.rb +8 -4
- data/lib/cypress-rails/version.rb +1 -1
- data/script/test +1 -5
- data/script/test_example_app +0 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 340bff5215842cc3afb419ff29bef8b977e573fdf5311711b4d0badaa05104d1
|
4
|
+
data.tar.gz: c720c43244302da09c9f63f416cba150926c0a6ef4cbf53bc2c418727dd3b87a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfb0b42e92ad4e5b576264b18ba035964823cc32b3717979edd127ca14b17f14639cf14083390c27daa1740b0302c0ba9c8b1ba53bb531ca72a03bdd9e9e0798
|
7
|
+
data.tar.gz: 78f57627a4eec8c0ccde58b24b1e6104fe8164e11375a46561a5cf8fbcce12a9536041e60c7be431a7c389a00b3132db679a13b93f49810069e8a6271f255864
|
data/.github/workflows/main.yml
CHANGED
@@ -9,6 +9,11 @@ jobs:
|
|
9
9
|
strategy:
|
10
10
|
matrix:
|
11
11
|
ruby-version: ['3.0', '3.3']
|
12
|
+
gemfile: ['Gemfile', 'Gemfile_rails71']
|
13
|
+
exclude:
|
14
|
+
# Rails 7.2 requires Ruby 3.1+
|
15
|
+
- ruby-version: '3.0'
|
16
|
+
gemfile: 'Gemfile'
|
12
17
|
|
13
18
|
steps:
|
14
19
|
- uses: actions/checkout@v4
|
@@ -18,4 +23,4 @@ jobs:
|
|
18
23
|
bundler-cache: true
|
19
24
|
|
20
25
|
- name: Run tests
|
21
|
-
run: ./script/test
|
26
|
+
run: ./script/test ${{matrix.gemfile}}
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -10,7 +10,6 @@ module CypressRails
|
|
10
10
|
@connections = gather_connections
|
11
11
|
@connections.each do |connection|
|
12
12
|
connection.begin_transaction joinable: false, _lazy: false
|
13
|
-
connection.pool.lock_thread = true
|
14
13
|
end
|
15
14
|
|
16
15
|
# When connections are established in the future, begin a transaction too
|
@@ -26,7 +25,6 @@ module CypressRails
|
|
26
25
|
|
27
26
|
if connection && !@connections.include?(connection)
|
28
27
|
connection.begin_transaction joinable: false, _lazy: false
|
29
|
-
connection.pool.lock_thread = true
|
30
28
|
@connections << connection
|
31
29
|
end
|
32
30
|
end
|
@@ -42,7 +40,6 @@ module CypressRails
|
|
42
40
|
|
43
41
|
@connections.each do |connection|
|
44
42
|
connection.rollback_transaction if connection.transaction_open?
|
45
|
-
connection.pool.lock_thread = false
|
46
43
|
end
|
47
44
|
@connections.clear
|
48
45
|
|
@@ -58,7 +55,14 @@ module CypressRails
|
|
58
55
|
def gather_connections
|
59
56
|
setup_shared_connection_pool
|
60
57
|
|
61
|
-
ActiveRecord::Base.connection_handler.connection_pool_list.map
|
58
|
+
ActiveRecord::Base.connection_handler.connection_pool_list.map do |pool|
|
59
|
+
# Rails 7.2+
|
60
|
+
if pool.respond_to?(:lease_connection)
|
61
|
+
pool.lease_connection
|
62
|
+
else
|
63
|
+
pool.connection
|
64
|
+
end
|
65
|
+
end
|
62
66
|
end
|
63
67
|
|
64
68
|
# Shares the writing connection pool with connections on
|
data/script/test
CHANGED
@@ -6,14 +6,10 @@ set -x
|
|
6
6
|
|
7
7
|
echo "---> Installing dependencies"
|
8
8
|
bundle
|
9
|
-
cd example
|
10
|
-
bundle
|
11
|
-
yarn
|
12
|
-
cd ..
|
13
9
|
|
14
10
|
echo "---> Running tests"
|
15
11
|
bundle exec rake
|
16
|
-
./script/test_example_app
|
12
|
+
BUNDLE_GEMFILE="${1-Gemfile}" ./script/test_example_app
|
17
13
|
|
18
14
|
bundle exec rake test
|
19
15
|
|
data/script/test_example_app
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cypress-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Searls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|