cypress-rails 0.4.1 → 0.4.2

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: a14e87a5a70d81fe84303607d0927c51766fb088af7ec1939ba73e57319ecc8e
4
- data.tar.gz: 4afd968f15e3074ce55d7d24cedaa0362b9542d4661f061debc76fbd8ffa212e
3
+ metadata.gz: c66865f1f844c8e3bd6fc86a881db8059fe26db9ebe70b1eeb0fc05e6ace601a
4
+ data.tar.gz: b94c1d60432ba1cf738f43574ef5ee9a831a2420cfcc4091446d6c0837860b64
5
5
  SHA512:
6
- metadata.gz: 2fe07821acc26a46e1480caf536d03d69f77e400e53fe28672930ec16ae62e55ddda54d1f296f57f5e1535c75c06c74a6221a3ca87f5cbb239236f3e3b0850dc
7
- data.tar.gz: f3a026adf4ec214285eaf2fb004b9984d0bc2f1842495a7a6c6809e6363826ee951de8116380309e105ed887f541412aabe5a9c7980c4f2ce36e555ebcd567ee
6
+ metadata.gz: e8878b2be16bd34dbcb4994a0d2cec648dc1fdf41ea88dea4b51092d9e882d7e199dbd189dbc1873f96b3c5834f04df05b08a7592de55b71649cd8f7720e3c07
7
+ data.tar.gz: 1f200193af7bdddc8e4c56f9d3a3f9b38eeed17fef9e7cd5a26fa0c31b93eb6ba04a4e62b73ed42c5d7c79d6382d9883754311a5a946d4cf8ef00861d1c1d609
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.4.2
4
+
5
+ * Add support to Rails 6.1 ([#52](https://github.com/testdouble/cypress-rails/issue/52))
6
+
3
7
  ## 0.4.1
4
8
 
5
9
  * Add backcompat for Ruby 2.4
@@ -1,40 +1,40 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cypress-rails (0.4.1)
4
+ cypress-rails (0.4.2)
5
5
  puma (>= 3.8.0)
6
6
  railties (>= 5.2.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (6.0.3.4)
12
- actionview (= 6.0.3.4)
13
- activesupport (= 6.0.3.4)
14
- rack (~> 2.0, >= 2.0.8)
11
+ actionpack (6.1.0)
12
+ actionview (= 6.1.0)
13
+ activesupport (= 6.1.0)
14
+ rack (~> 2.0, >= 2.0.9)
15
15
  rack-test (>= 0.6.3)
16
16
  rails-dom-testing (~> 2.0)
17
17
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
- actionview (6.0.3.4)
19
- activesupport (= 6.0.3.4)
18
+ actionview (6.1.0)
19
+ activesupport (= 6.1.0)
20
20
  builder (~> 3.1)
21
21
  erubi (~> 1.4)
22
22
  rails-dom-testing (~> 2.0)
23
23
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
- activesupport (6.0.3.4)
24
+ activesupport (6.1.0)
25
25
  concurrent-ruby (~> 1.0, >= 1.0.2)
26
- i18n (>= 0.7, < 2)
27
- minitest (~> 5.1)
28
- tzinfo (~> 1.1)
29
- zeitwerk (~> 2.2, >= 2.2.2)
26
+ i18n (>= 1.6, < 2)
27
+ minitest (>= 5.1)
28
+ tzinfo (~> 2.0)
29
+ zeitwerk (~> 2.3)
30
30
  ast (2.4.1)
31
31
  builder (3.2.4)
32
32
  concurrent-ruby (1.1.7)
33
33
  crass (1.0.6)
34
- erubi (1.9.0)
34
+ erubi (1.10.0)
35
35
  i18n (1.8.5)
36
36
  concurrent-ruby (~> 1.0)
37
- loofah (2.7.0)
37
+ loofah (2.8.0)
38
38
  crass (~> 1.0.2)
39
39
  nokogiri (>= 1.5.9)
40
40
  method_source (1.0.0)
@@ -43,10 +43,10 @@ GEM
43
43
  nio4r (2.5.4)
44
44
  nokogiri (1.10.10)
45
45
  mini_portile2 (~> 2.4.0)
46
- parallel (1.19.2)
47
- parser (2.7.1.5)
46
+ parallel (1.20.1)
47
+ parser (2.7.2.0)
48
48
  ast (~> 2.4.1)
49
- puma (5.0.2)
49
+ puma (5.1.1)
50
50
  nio4r (~> 2.0)
51
51
  rack (2.2.3)
52
52
  rack-test (1.1.0)
@@ -56,42 +56,39 @@ GEM
56
56
  nokogiri (>= 1.6)
57
57
  rails-html-sanitizer (1.3.0)
58
58
  loofah (~> 2.3)
59
- railties (6.0.3.4)
60
- actionpack (= 6.0.3.4)
61
- activesupport (= 6.0.3.4)
59
+ railties (6.1.0)
60
+ actionpack (= 6.1.0)
61
+ activesupport (= 6.1.0)
62
62
  method_source
63
63
  rake (>= 0.8.7)
64
- thor (>= 0.20.3, < 2.0)
64
+ thor (~> 1.0)
65
65
  rainbow (3.0.0)
66
66
  rake (13.0.1)
67
- regexp_parser (1.8.1)
67
+ regexp_parser (2.0.0)
68
68
  rexml (3.2.4)
69
- rubocop (0.92.0)
69
+ rubocop (1.4.2)
70
70
  parallel (~> 1.10)
71
71
  parser (>= 2.7.1.5)
72
72
  rainbow (>= 2.2.2, < 4.0)
73
- regexp_parser (>= 1.7)
73
+ regexp_parser (>= 1.8)
74
74
  rexml
75
- rubocop-ast (>= 0.5.0)
75
+ rubocop-ast (>= 1.1.1)
76
76
  ruby-progressbar (~> 1.7)
77
77
  unicode-display_width (>= 1.4.0, < 2.0)
78
- rubocop-ast (0.7.0)
78
+ rubocop-ast (1.3.0)
79
79
  parser (>= 2.7.1.5)
80
- strscan (>= 1.0.0)
81
- rubocop-performance (1.8.1)
82
- rubocop (>= 0.87.0)
80
+ rubocop-performance (1.9.1)
81
+ rubocop (>= 0.90.0, < 2.0)
83
82
  rubocop-ast (>= 0.4.0)
84
83
  ruby-progressbar (1.10.1)
85
- standard (0.7)
86
- rubocop (= 0.92)
87
- rubocop-performance (= 1.8.1)
88
- strscan (1.0.3)
84
+ standard (0.10.2)
85
+ rubocop (= 1.4.2)
86
+ rubocop-performance (= 1.9.1)
89
87
  thor (1.0.1)
90
- thread_safe (0.3.6)
91
- tzinfo (1.2.7)
92
- thread_safe (~> 0.1)
88
+ tzinfo (2.0.4)
89
+ concurrent-ruby (~> 1.0)
93
90
  unicode-display_width (1.7.0)
94
- zeitwerk (2.4.0)
91
+ zeitwerk (2.4.2)
95
92
 
96
93
  PLATFORMS
97
94
  ruby
data/README.md CHANGED
@@ -138,9 +138,9 @@ This way, you can easily instruct the server to reset its test state from your
138
138
  Cypress tests like so:
139
139
 
140
140
  ```js
141
- beforeEach(() =>
141
+ beforeEach(() => {
142
142
  cy.request('/cypress_rails_reset_state')
143
- )
143
+ })
144
144
  ```
145
145
 
146
146
  (Remember, in Cypress, `before` is a before-all hook and `beforeEach` is run
@@ -172,6 +172,15 @@ preferred environment variables project-wide using a tool like
172
172
  * **CYPRESS_RAILS_CYPRESS_OPTS** (default: _none_) any options you want to
173
173
  forward to the Cypress CLI when running its `open` or `run` commands
174
174
 
175
+ #### Example: Running a single spec from the command line
176
+
177
+ It's a little verbose, but an example of using the above options to run a single
178
+ Cypress test would look like this:
179
+
180
+ ```
181
+ $ CYPRESS_RAILS_CYPRESS_OPTS="--spec cypress/integration/a_test.js" bin/rake cypress:run
182
+ ```
183
+
175
184
  ### Initializer hooks
176
185
 
177
186
  ### before_server_start
@@ -68,19 +68,7 @@ module CypressRails
68
68
  # need to share a connection pool so that the reading connection
69
69
  # can see data in the open transaction on the writing connection.
70
70
  def setup_shared_connection_pool
71
- return unless ActiveRecord::Base.respond_to?(:connection_handlers)
72
-
73
- writing_handler = ActiveRecord::Base.connection_handler
74
- ActiveRecord::Base.connection_handlers.values.each do |handler|
75
- if handler != writing_handler
76
- handler.connection_pool_list.each do |pool|
77
- name = pool.spec.name
78
- writing_connection = writing_handler.retrieve_connection_pool(name)
79
- return nil unless writing_connection
80
- handler.send(:owner_to_pool)[name] = writing_connection
81
- end
82
- end
83
- end
71
+ ActiveRecord::TestFixtures.instance_method(:setup_shared_connection_pool).bind(self).call
84
72
  end
85
73
  end
86
74
  end
@@ -1,3 +1,3 @@
1
1
  module CypressRails
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
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.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-13 00:00:00.000000000 Z
11
+ date: 2020-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties