cypress-rails 0.9.1 → 0.9.2
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/CHANGELOG.md +6 -0
- data/lib/cypress-rails/init.rb +7 -4
- data/lib/cypress-rails/rake.rb +1 -1
- data/lib/cypress-rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ff1a69096cba0508c006c7ec8d96796c12026e8ef0e89956eab2af77112a7c96
|
|
4
|
+
data.tar.gz: ec1076a20ae68ae94359cb35ce81b63b515857eb239fb361da4953d935c400a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3d7559054e9c3a3d67190294253f7df4994a5d784f25bb4aac2782d65eaa03437d53a612ed9b1559ea405b34e661a1ad9203f1e737253403a9a3d5e512c1680
|
|
7
|
+
data.tar.gz: 244632d0f95e460ada182b882a0d95cd618264cf10434b337698bbc1c45e9eb40cfa7499b8398b30568ec36a422755228fe2ec9ff36a77bb5608c66d4560ffd5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 0.9.2
|
|
4
|
+
|
|
5
|
+
* Fix `rake cypress:init` so it recognizes an existing Cypress config file of
|
|
6
|
+
any supported extension (`.js`, `.ts`, `.mjs`, `.cjs`, `.mts`, `.cts`)
|
|
7
|
+
instead of only `cypress.config.js` [#170](https://github.com/testdouble/cypress-rails/issues/170)
|
|
8
|
+
|
|
3
9
|
## 0.9.1
|
|
4
10
|
|
|
5
11
|
* Add `CYPRESS_RAILS_SERVER_THREADS` (default: `"0:4"`) to configure the min:max
|
data/lib/cypress-rails/init.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
module CypressRails
|
|
2
2
|
class Init
|
|
3
|
+
CONFIG_EXTENSIONS = %w[js ts mjs cjs mts cts]
|
|
4
|
+
|
|
3
5
|
DEFAULT_CONFIG = <<~JS
|
|
4
6
|
const { defineConfig } = require('cypress')
|
|
5
7
|
|
|
@@ -20,12 +22,13 @@ module CypressRails
|
|
|
20
22
|
JS
|
|
21
23
|
|
|
22
24
|
def call(cypress_dir = Config.new.cypress_dir)
|
|
23
|
-
|
|
24
|
-
if
|
|
25
|
+
existing_config_path = Dir.glob(File.join(cypress_dir, "cypress.config.{#{CONFIG_EXTENSIONS.join(",")}}")).first
|
|
26
|
+
if existing_config_path
|
|
27
|
+
warn "Cypress config already exists in `#{existing_config_path}'. Skipping."
|
|
28
|
+
else
|
|
29
|
+
config_path = File.join(cypress_dir, "cypress.config.js")
|
|
25
30
|
File.write(config_path, DEFAULT_CONFIG)
|
|
26
31
|
puts "Cypress config initialized in `#{config_path}'"
|
|
27
|
-
else
|
|
28
|
-
warn "Cypress config already exists in `#{config_path}'. Skipping."
|
|
29
32
|
end
|
|
30
33
|
end
|
|
31
34
|
end
|
data/lib/cypress-rails/rake.rb
CHANGED