derail_specs 0.3.0 → 0.4.0

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: b3cb7b4de2c0df3488fd8d13cea48a9a432eb4a93c9154348373d19ffb2f5faf
4
- data.tar.gz: 6640217cd89418908ad6cf8bf23d4acaf85aa75baf8f2495bdf661ff157d7161
3
+ metadata.gz: 1ca53c48f235d3cd9caf87c214bf4683b60cdf8e6211e3c65fa62a9dcdf5e45f
4
+ data.tar.gz: 00ced973776c36fb38a419603ca5c00971f5f61f883e92b8a4e20add8c1b0d72
5
5
  SHA512:
6
- metadata.gz: 3587e23efa379f03cdab789814e0ed81c026688d1013dc7e216625e69a320445631b3f5d6dec3a51ad58ac2f5a0d4fdc07e121ba93326ed2d4a9e32958752958
7
- data.tar.gz: cfd6c514732a6b153115038a04aa979232d0d0306cbfb93d1915410b13b405d77a31382ec7b27f9989529c81cebec9edb1497f18d299cee26c43d8c166678601
6
+ metadata.gz: 87242fbd1dab956f9eb10d7aed765d5d9f406a04fbb4008790d0623b833de7f59a8a3973659fd411ca3fa98cc38c09f12ea686413af5c70ce890c20ee596cedd
7
+ data.tar.gz: c116887a284320c09f4e01503f1e48d171ee35aac750eeb33b03711719cf5a6d0ca50ec6650bda40541f1f6428c9709a9fd46835ea276731e26b5845bad614f2
data/.rubocop.yml CHANGED
@@ -5,6 +5,7 @@ AllCops:
5
5
  Exclude:
6
6
  - 'example/db/schema.rb'
7
7
  - 'example/bin/*'
8
+ - 'vendor/**/*'
8
9
 
9
10
  Style/StringLiterals:
10
11
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
3
 
4
+ ## [0.4.0] - 2021-09-16
5
+
6
+ - Add infinite server mode, which can be used by not setting a command in the config
7
+ -
4
8
  ## [0.3.0] - 2021-09-16
5
9
 
6
10
  - Add `/factory-bot/create` route to map to FactoryBot.create
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- derail_specs (0.3.0)
4
+ derail_specs (0.4.0)
5
5
  puma (>= 3.8.0)
6
6
  railties (>= 5.2.0)
7
7
 
data/README.md CHANGED
@@ -38,6 +38,12 @@ DerailSpecs.configure do |config|
38
38
  end
39
39
  ```
40
40
 
41
+ Alternatively, if you don't set a `config.command`, the server will boot in
42
+ *infinite* mode and will not stop until receiving an INT signal (IE Ctrl+c).
43
+ This is good for when your test command isn't available in a rails context,
44
+ like when you are running rails in docker, but have a test application running
45
+ on the host machine.
46
+
41
47
  ## Usage
42
48
 
43
49
  To run tests, run
data/bin/setup CHANGED
@@ -5,4 +5,7 @@ set -vx
5
5
 
6
6
  bundle install
7
7
 
8
+ cd example
9
+ bin/setup
10
+
8
11
  # Do any other automated setup that you need to do here
data/example/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- derail_specs (0.3.0)
4
+ derail_specs (0.4.0)
5
5
  puma (>= 3.8.0)
6
6
  railties (>= 5.2.0)
7
7
 
@@ -10,11 +10,20 @@ module DerailSpecs
10
10
 
11
11
  puts "Starting Tests…"
12
12
 
13
- system DerailSpecs.configuration.command
13
+ if command.present?
14
+ puts "Run: #{command}"
15
+ system command
16
+ else
17
+ loop { sleep 60 }
18
+ end
14
19
  end
15
20
 
16
21
  private
17
22
 
23
+ def command
24
+ DerailSpecs.configuration.command
25
+ end
26
+
18
27
  def set_exit_hooks!
19
28
  at_exit do
20
29
  Transaction.rollback
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DerailSpecs
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: derail_specs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Piechowski