devloop 0.0.4 → 0.0.6
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/.github/workflows/ci.yml +30 -0
- data/README.md +3 -3
- data/bin/devloop +3 -2
- data/bin/devloop_run +1 -0
- data/lib/devloop/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdbcf2a0d7f3ee56a98ad2db128f8835b348f990efab6fd77ab9a57dbc2f6aa3
|
4
|
+
data.tar.gz: 7b041ec78b9ac2c25e6423e9d3dc4b8be64c1283668d88a259200efa4feade24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 381c4b59391e866838d90084e8251f193d7d3ba31da4ddc7905e28311e6e0d7ab42fb2a5ca18773fe58706f62a270e8a6b7ff9d4412e842954dbb4a86e6a9108
|
7
|
+
data.tar.gz: 6f1d6304053545f310d5416a5649e704d84481a1d654d0c2e4530e64b5f0ee429d41c5106f5465a4c174f097df8a9f5402c0c6890491fe4f29a5283f50139c0a
|
@@ -0,0 +1,30 @@
|
|
1
|
+
name: Ruby CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ main ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
fail-fast: false
|
14
|
+
matrix:
|
15
|
+
ruby-version: ['3.2', '3.1', '3.0', '2.7', '2.6']
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v3
|
18
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby-version }}
|
22
|
+
- name: Setup dependencies
|
23
|
+
run: |
|
24
|
+
gem install bundler -v 2.4.22
|
25
|
+
sudo apt-get update --allow-releaseinfo-change
|
26
|
+
bundle config set --local path 'vendor/bundle'
|
27
|
+
bundle install
|
28
|
+
- name: Run tests
|
29
|
+
run: |
|
30
|
+
bundle exec rake test
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Devloop
|
1
|
+
# Devloop [](https://badge.fury.io/rb/devloop) [](https://github.com/pawurb/devloop/actions)
|
2
2
|
|
3
|
-
Devloop is an automated Rspec runner for Rails apps inspired by [TLDR](https://github.com/tendersearls/tldr). The purpose of this tool is to provide continuous and instant feedback when working on the Rails app. It runs only specs from
|
3
|
+
Devloop is an automated Rspec runner for Rails apps inspired by [TLDR](https://github.com/tendersearls/tldr). The purpose of this tool is to provide continuous and instant feedback when working on the Rails app. It runs only specs from _lines_ modified in the recent git commits. Even if you have a large `spec/user_spec.rb` file, you'll receive specs feedback in ~second on each file save.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -22,7 +22,7 @@ Now you can run:
|
|
22
22
|
bundle exec devloop
|
23
23
|
```
|
24
24
|
|
25
|
-
While this command it running it will automatically execute tests related to the recently modified lines of code from `
|
25
|
+
While this command it running it will automatically execute tests related to the recently modified lines of code from `spec/` folder.
|
26
26
|
|
27
27
|
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.
|
28
28
|
|
data/bin/devloop
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require "rubygems"
|
3
2
|
|
4
3
|
$LOAD_PATH.unshift(File.dirname(__FILE__) + "/../lib") unless $LOAD_PATH.include?(File.dirname(__FILE__) + "/../lib")
|
5
4
|
|
6
5
|
require "devloop"
|
7
6
|
|
8
7
|
begin
|
8
|
+
system("bundle exec spring > /dev/null 2>&1")
|
9
|
+
system("bundle exec devloop_run")
|
9
10
|
puts "Devloop: watching for changes in spec directory..."
|
10
|
-
system("fswatch -e '.*' -i '\.rb$' #{Dir.pwd}
|
11
|
+
system("fswatch -e '.*' -i '\.rb$' #{Dir.pwd} | xargs -n1 -I{} bundle exec devloop_run")
|
11
12
|
rescue Interrupt # user pressed CTRL+C
|
12
13
|
STDERR.puts "\nDevloop: exiting due to user request"
|
13
14
|
exit 130
|
data/bin/devloop_run
CHANGED
data/lib/devloop/version.rb
CHANGED
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.
|
4
|
+
version: 0.0.6
|
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-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -65,6 +65,7 @@ executables:
|
|
65
65
|
extensions: []
|
66
66
|
extra_rdoc_files: []
|
67
67
|
files:
|
68
|
+
- ".github/workflows/ci.yml"
|
68
69
|
- ".gitignore"
|
69
70
|
- Gemfile
|
70
71
|
- LICENSE.txt
|