devloop 0.0.8 → 0.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6e087fe2cd945782777fe0a1a87fd21b3022f0348a38b1c789f8ba6c7817f49
4
- data.tar.gz: 1718ef614659f6ba55a3a7ca1d60d2d7b676a70919d1a93e7bd4f0c5ff1a46ba
3
+ metadata.gz: df5e69165e639a7c989ba94a3e645beb934ee3d265906dfcb327def357867a09
4
+ data.tar.gz: 2351433c44454695d6f6ea2bcdd26f574dd79c5939b2fbc2eacd2d9d908f987c
5
5
  SHA512:
6
- metadata.gz: 3c0948c9527bc7bed104aa6cac0a65bf6c67618e5d3afa31d2245d90565ca32546cb4bdc8c084ef2103c0919c648f4a315c923aed8ca1b1ec7b636fa394b83fa
7
- data.tar.gz: 59775a6c5a08119a319cd541bd8e45a7bc1432fb57b498a0e788eb22018f7ef864f316fd412c788a8574359144607ca695bb75b7e38bbe132e51ae68b712ecde
6
+ metadata.gz: 3c4744c85d13176a521691e28232d9db7ef14eacb00cd374fc533ac2d7641dfcf23edf228c30bf3cec02cee7e31e596f986da89e1214a25b6df27a4f48b4e376
7
+ data.tar.gz: fbbfc4813cc205ed367529ae84ca758a5915dbba407e052042ff74f9934b71c5e74d56dba3d708e02e2e590e3a5309815aff51422c029d84bc7ed8905136710b
data/README.md CHANGED
@@ -24,7 +24,16 @@ Now you can run:
24
24
  bundle exec devloop
25
25
  ```
26
26
 
27
- While this command it running it will automatically execute tests related to the recently modified lines of code from `spec/` folder.
27
+ You can also use it without adding to the `Gemfile`:
28
+
29
+ ```bash
30
+ gem install devloop
31
+ devloop
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ While `devloop` command is running it will automatically execute tests related to the recently modified lines of code from `spec/` folder.
28
37
 
29
38
  Devloop will automatically detect if [Spring](https://github.com/rails/spring) is enabled for your Rails app. I've observed it reduces time needed to run specs by ~4x.
30
39
 
data/bin/devloop CHANGED
@@ -6,9 +6,11 @@ require "devloop"
6
6
 
7
7
  begin
8
8
  system("bundle exec spring > /dev/null 2>&1")
9
- system("bundle exec devloop_run")
9
+ is_bundled = `bundle list`.include?("devloop")
10
+ run_command = is_bundled ? "bundle exec devloop_run" : "devloop_run"
11
+ system(run_command)
10
12
  puts "Devloop: watching for changes in spec directory..."
11
- system("fswatch -e '.*' -i '\.rb$' #{Dir.pwd} | xargs -n1 -I{} bundle exec devloop_run")
13
+ system("fswatch -e '.*' -i '\.rb$' #{Dir.pwd} | xargs -n1 -I{} #{run_command}")
12
14
  rescue Interrupt # user pressed CTRL+C
13
15
  STDERR.puts "\nDevloop: exiting due to user request"
14
16
  exit 130
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Devloop
4
- VERSION = "0.0.8"
4
+ VERSION = "0.0.9"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devloop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-11 00:00:00.000000000 Z
11
+ date: 2024-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake