devloop 0.0.3 → 0.0.5

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: bd315f90c485333f7c0f4386b15c08920865b3e42906c8cc60bd081c7c466299
4
- data.tar.gz: 8561edca5696f4b1cccb46353717987b093b0820780e801be773196f39f4c0a6
3
+ metadata.gz: 1956ee28a62a8d00af2f447152d03bda7c72442c634761341b9438884330122f
4
+ data.tar.gz: 06ced44c774abafcb87fdc318221efc61602c005ec0233bf98426435d0604986
5
5
  SHA512:
6
- metadata.gz: c6ff478bdb188648ee16f025aada1d5381a373b9ab7095456fea0d2c66d14f53f617581017ba58504607c584b706ee74e68a7c61bfe2bf368e885c8ec27696b1
7
- data.tar.gz: 8bde33a6fa0a8b140441f4c5a839948e89d708163ffb30e755cd97f15f4a1252de8cedee8948e6f3cf2c5bf7d3eca6d989eb950918061747976961a6f428f2d8
6
+ metadata.gz: cdccae7324bc0916b4ccc97078ff53011344597dd55c8b3bca1c63f798f1eff427aa5c1bac452059dd95981f3599cf41817ae24683523a96789d9cfcc209e344
7
+ data.tar.gz: f7a5c88b04a19f17505eeb661e093587b21c2477342da2927907e820095aea1157eb512ec0e09df87f40fcd05ffd0340554eb069476e08bfa79876c69f9b6675
@@ -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 [![Gem Version](https://badge.fury.io/rb/devloop.svg)](https://badge.fury.io/rb/devloop) [![GH Actions](https://github.com/pawurb/devloop/actions/workflows/ci.yml/badge.svg)](https://github.com/pawurb/devloop/actions)
2
2
 
3
- Devloop is an automated Rspec runner for Rails app inspired by [TLDR](https://github.com/tendersearls/tldr). The purpose of this tool is to provide continous and instant feedback when working on Rails app. It run only specs from _lines_ modified in the recent git commits. It means that even if you have a large `spec/user_spec.rb` file, you'll receive specs feedback in fraction on a second on every file save.
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,6 +22,10 @@ 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 recenly modified lines of code from `specs/` folder.
25
+ While this command it running it will automatically execute tests related to the recently modified lines of code from `spec/` folder.
26
+
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
+
29
+ If currently there are no modified spec files, devloop will run tests based on changes in the most recent git commit.
26
30
 
27
31
  This is in a very early stage of development so feedback is welcome.
data/bin/devloop CHANGED
@@ -1,13 +1,13 @@
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 devloop_run")
9
9
  puts "Devloop: watching for changes in spec directory..."
10
- system("fswatch -e '.*' -i '\.rb$' #{Dir.pwd}/spec | xargs -n1 -I{} bundle exec devloop_run")
10
+ system("fswatch -e '.*' -i '\.rb$' #{Dir.pwd} | xargs -n1 -I{} bundle exec devloop_run")
11
11
  rescue Interrupt # user pressed CTRL+C
12
12
  STDERR.puts "\nDevloop: exiting due to user request"
13
13
  exit 130
data/bin/devloop_run CHANGED
@@ -2,6 +2,7 @@
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__) + "/../lib") unless $LOAD_PATH.include?(File.dirname(__FILE__) + "/../lib")
3
3
 
4
4
  require "devloop"
5
+
5
6
  begin
6
7
  require "spring/env"
7
8
  rescue LoadError
data/devloop.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.version = Devloop::VERSION
9
9
  s.authors = ["pawurb"]
10
10
  s.email = ["contact@pawelurbanek.com"]
11
- s.summary = %q{ Ruby test runner }
12
- s.description = %q{ This simple tool allows to run apps tests based on current git diff output. }
11
+ s.summary = "An automated test runner for Rails applications. Execute specs instantly based on a recent git diff output."
12
+ s.description = "Devloop is an automated Rspec runner for Rails app. The purpose of this tool is to provide continuous and instant feedback when working on Rails app. It runs only specs from lines modified in the recent git commits. Even if you have a large user_spec.rb file, you'll receive specs feedback in a fraction of a second on each file save."
13
13
  s.homepage = "https://github.com/pawurb/devloop"
14
14
  s.files = `git ls-files`.split("\n")
15
15
  s.test_files = s.files.grep(%r{^(spec)/})
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Devloop
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.5"
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.3
4
+ version: 0.0.5
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-03 00:00:00.000000000 Z
11
+ date: 2024-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -52,8 +52,11 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: " This simple tool allows to run apps tests based on current git diff
56
- output. "
55
+ description: Devloop is an automated Rspec runner for Rails app. The purpose of this
56
+ tool is to provide continuous and instant feedback when working on Rails app. It
57
+ runs only specs from lines modified in the recent git commits. Even if you have
58
+ a large user_spec.rb file, you'll receive specs feedback in a fraction of a second
59
+ on each file save.
57
60
  email:
58
61
  - contact@pawelurbanek.com
59
62
  executables:
@@ -62,6 +65,7 @@ executables:
62
65
  extensions: []
63
66
  extra_rdoc_files: []
64
67
  files:
68
+ - ".github/workflows/ci.yml"
65
69
  - ".gitignore"
66
70
  - Gemfile
67
71
  - LICENSE.txt
@@ -98,7 +102,8 @@ requirements: []
98
102
  rubygems_version: 3.5.4
99
103
  signing_key:
100
104
  specification_version: 4
101
- summary: Ruby test runner
105
+ summary: An automated test runner for Rails applications. Execute specs instantly
106
+ based on a recent git diff output.
102
107
  test_files:
103
108
  - spec/diff_parser_spec.rb
104
109
  - spec/spec_helper.rb