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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82a9d3f3bc6cb77aca55dc375e88029182140befde29771ba0fb256af3bbb2ea
4
- data.tar.gz: 0463fdc3679a692952ee9f30e4b3001dfefdafd3c9466185ee3c53e54fc2c442
3
+ metadata.gz: 340bff5215842cc3afb419ff29bef8b977e573fdf5311711b4d0badaa05104d1
4
+ data.tar.gz: c720c43244302da09c9f63f416cba150926c0a6ef4cbf53bc2c418727dd3b87a
5
5
  SHA512:
6
- metadata.gz: 42f56ef58b0b3836a66a29b806013f1a07d4c324f8f874dc0e59be4e5bbf48858f2168782535f8c90fc6ff450ab5097f07566f55e187c0d2bc12ee729f1a1ced
7
- data.tar.gz: d24f8cdfca0d6cb6b3e509cca0db8a5acb3f695c5ff9e05b8c73d892af94ae52d19637b2c747314e5dacf1969c147f2b7e9a361c4a511e694fa4417eaabfa356
6
+ metadata.gz: bfb0b42e92ad4e5b576264b18ba035964823cc32b3717979edd127ca14b17f14639cf14083390c27daa1740b0302c0ba9c8b1ba53bb531ca72a03bdd9e9e0798
7
+ data.tar.gz: 78f57627a4eec8c0ccde58b24b1e6104fe8164e11375a46561a5cf8fbcce12a9536041e60c7be431a7c389a00b3132db679a13b93f49810069e8a6271f255864
@@ -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
@@ -1,5 +1,8 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.8.0.rc1
4
+ * Add compatibility with Rails 7.2
5
+
3
6
  ## 0.7.1
4
7
  * Add Rack 3.1 support [#163](https://github.com/testdouble/cypress-rails/pull/163)
5
8
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cypress-rails (0.7.1)
4
+ cypress-rails (0.8.0.rc1)
5
5
  puma (>= 3.8.0)
6
6
  railties (>= 5.2.0)
7
7
 
@@ -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(&:connection)
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
@@ -1,3 +1,3 @@
1
1
  module CypressRails
2
- VERSION = "0.7.1"
2
+ VERSION = "0.8.0.rc1"
3
3
  end
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
 
@@ -2,8 +2,6 @@
2
2
 
3
3
  set -e
4
4
 
5
- directory=$1
6
-
7
5
  cd example
8
6
  bundle
9
7
  yarn install
@@ -18,4 +16,3 @@ if ! bundle exec rake cypress:run CYPRESS_RAILS_CYPRESS_OPTS="-h" | grep -q "Usa
18
16
  echo "Failed to pass options to cypress run"
19
17
  exit 1
20
18
  fi
21
-
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.7.1
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-06 00:00:00.000000000 Z
11
+ date: 2024-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties