cypress-rails 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/cypress-rails/launches_cypress.rb +26 -6
- data/lib/cypress-rails/rake.rb +1 -4
- data/lib/cypress-rails/version.rb +1 -1
- 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: 2044306eee0e5e184bd9c1166e2906648a05015c03a28290634374683ff49ff4
|
4
|
+
data.tar.gz: 3e3cc908007c231913778a3627864a40520edd6ef7e0de6a735d2fbf0597b820
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81bb4a5648105bf5660dd55f3c77fc7a2cbbd4a0fb82e1f6b6cbc563aa8baa57f2e29d8018418e6b3649decdb5e249e6f31f2164df5a79b3c35deed16d12bedb
|
7
|
+
data.tar.gz: 9c25c2109428646b925254e85f5c893db6ef9ca5993a7cb31568f176e42c4b01c45011875521845bf280b6c7822eed2b8e55a7798ba5d704257f21cbadeaa1e1
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -24,16 +24,36 @@ module CypressRails
|
|
24
24
|
transactional_server: config.transactional_server
|
25
25
|
)
|
26
26
|
bin = @finds_bin.call(config.dir)
|
27
|
-
|
28
|
-
|
29
|
-
@manages_transactions.rollback_transaction
|
30
|
-
end
|
31
|
-
@initializer_hooks.run(:before_server_stop)
|
32
|
-
end
|
27
|
+
|
28
|
+
set_exit_hooks!(config)
|
33
29
|
|
34
30
|
system <<~EXEC
|
35
31
|
CYPRESS_BASE_URL=http://#{server.host}:#{server.port} #{bin} #{command} --project "#{config.dir}" #{config.cypress_cli_opts}
|
36
32
|
EXEC
|
37
33
|
end
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
def set_exit_hooks!(config)
|
38
|
+
at_exit do
|
39
|
+
run_exit_hooks_if_necessary!(config)
|
40
|
+
end
|
41
|
+
Signal.trap("INT") do
|
42
|
+
puts "Exiting cypress-rails…"
|
43
|
+
exit
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def run_exit_hooks_if_necessary!(config)
|
48
|
+
@at_exit_hooks_have_fired ||= false # avoid warning
|
49
|
+
return if @at_exit_hooks_have_fired
|
50
|
+
|
51
|
+
if config.transactional_server
|
52
|
+
@manages_transactions.rollback_transaction
|
53
|
+
end
|
54
|
+
@initializer_hooks.run(:before_server_stop)
|
55
|
+
|
56
|
+
@at_exit_hooks_have_fired = true
|
57
|
+
end
|
38
58
|
end
|
39
59
|
end
|
data/lib/cypress-rails/rake.rb
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.1.
|
4
|
+
version: 0.1.3
|
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-03-
|
11
|
+
date: 2020-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|