devloop 0.0.9 → 0.1.0
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/README.md +3 -7
- data/bin/devloop +6 -1
- data/devloop.gemspec +1 -0
- data/lib/devloop/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7d144786989a541134bfda50fe5496b59eb776342e114f6c9c772b630661cc5
|
4
|
+
data.tar.gz: 2dc23915955ac14ed782ba5efa8240a48a3a5671ce163ef9b58083a2670ae3a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad7432cfb77b79e4321705e7fc5ba2cb6df2bd02b87bbbbb34465e73dbe20160890b08367a4c9e14f7177040b1a6c81fd04000c5743419f172d76b569e262fc9
|
7
|
+
data.tar.gz: a17b35a3eff615cef9398f5dfabf59256080e47b7fb82a15a809d5f4848dd20596631dbccf1049575e7f485da99ed8d2b54f5e14e38b03ff48a816d14014e4ad
|
data/README.md
CHANGED
@@ -6,12 +6,6 @@ Optionally, you can edit first line of any spec file (i.e. add `#`) to run all t
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
It uses [fswatch](https://github.com/emcrisostomo/fswatch) so make sure to install it first:
|
10
|
-
|
11
|
-
```bash
|
12
|
-
brew install fswatch
|
13
|
-
```
|
14
|
-
|
15
9
|
In your `Gemfile`:
|
16
10
|
|
17
11
|
```ruby
|
@@ -31,9 +25,11 @@ gem install devloop
|
|
31
25
|
devloop
|
32
26
|
```
|
33
27
|
|
28
|
+
Remember to run the `devloop` command from the root of your Rails application.
|
29
|
+
|
34
30
|
## Usage
|
35
31
|
|
36
|
-
While `devloop`
|
32
|
+
While `devloop` process is running it will automatically execute tests related to the recently modified lines of code from `spec/` folder.
|
37
33
|
|
38
34
|
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.
|
39
35
|
|
data/bin/devloop
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
$LOAD_PATH.unshift(File.dirname(__FILE__) + "/../lib") unless $LOAD_PATH.include?(File.dirname(__FILE__) + "/../lib")
|
4
4
|
|
5
5
|
require "devloop"
|
6
|
+
require "listen"
|
6
7
|
|
7
8
|
begin
|
8
9
|
system("bundle exec spring > /dev/null 2>&1")
|
@@ -10,7 +11,11 @@ begin
|
|
10
11
|
run_command = is_bundled ? "bundle exec devloop_run" : "devloop_run"
|
11
12
|
system(run_command)
|
12
13
|
puts "Devloop: watching for changes in spec directory..."
|
13
|
-
|
14
|
+
listener = Listen.to(".", only: %r{.rb$}) do
|
15
|
+
system(run_command)
|
16
|
+
end
|
17
|
+
listener.start
|
18
|
+
sleep
|
14
19
|
rescue Interrupt # user pressed CTRL+C
|
15
20
|
STDERR.puts "\nDevloop: exiting due to user request"
|
16
21
|
exit 130
|
data/devloop.gemspec
CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.executables = ["devloop", "devloop_run"]
|
18
18
|
s.license = "MIT"
|
19
|
+
s.add_dependency "listen"
|
19
20
|
s.add_development_dependency "rake"
|
20
21
|
s.add_development_dependency "rspec"
|
21
22
|
s.add_development_dependency "rufo"
|
data/lib/devloop/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devloop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
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
|
+
date: 2024-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: listen
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rake
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|