rspec-watcher 0.3.2 → 0.3.3

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: 95f20866b62b51c0b3d8ff72052690e30b763dd4df1a9f34bc9e96b688ceda0c
4
- data.tar.gz: 9e8135fb6ff2d1af2974a2dab46934d3fec845ab4753d3e0050e4687c1392868
3
+ metadata.gz: f75967ea122f2ecadd65bc5cc7e86e1aa6b1effba0c55d1ec1ffd81e66adaae1
4
+ data.tar.gz: '0887e7947f6014276af5c8f16459fea9184a5191867f0482e957c5492abe4d35'
5
5
  SHA512:
6
- metadata.gz: a9eb22b7227ebeadd9d8d532d3e848262ce90440e5081b1c52649ddf647e38c487b3efe38f3e95aec0e4fa5f7c70f61443a046dd9789581e7f04c5c7cfc68a96
7
- data.tar.gz: 8c0acffdfcbf4d26460c245cf35937afbff3ff35f52e347f7391b99778d9bde389706733fea5842cd30d9753f99ac346f8bb833ec782216618a422152ac192cd
6
+ metadata.gz: 46a43e44c700301905e53f53d983917a0a6d48a60a0d1c76f6d83e2134606365551729c17042e8200a0b78c18d01012872346e3f6d233e4ae98ade5ff44bcde9
7
+ data.tar.gz: 6ce0d08158d05ecd5ea266fed43b24831361ed67b3659838fc83fbccfab30544fc23905123130f6ae4bc0900a4044c1119b9bdaa784724427d525c0defce3e47
data/README.md CHANGED
@@ -22,6 +22,12 @@ Then run `bundle install`
22
22
 
23
23
  Disable caching classes in `config/environments/test.rb` when the watcher is running:
24
24
 
25
+ ```ruby
26
+ config.enable_reloading = ENV['RSPEC_WATCHER'] == 'true'
27
+ ```
28
+
29
+ For older versions of Rails (< 7.1), instead use:
30
+
25
31
  ```ruby
26
32
  config.cache_classes = ENV['RSPEC_WATCHER'].nil?
27
33
  ```
@@ -9,13 +9,17 @@ RSpecWatcher.configure do
9
9
 
10
10
  watch 'app', only: /\.rb\z/, ignore: %r{controllers/} do |modified, added, removed|
11
11
  (modified + added + removed).map do |path|
12
- path.sub('app/', 'spec/').sub('.rb', '_spec.rb')
12
+ file_path = Pathname.new(path).relative_path_from(Rails.root.join('app'))
13
+ spec_path = file_path.sub(/.rb\z/, '_spec.rb')
14
+ Rails.root.join('spec', spec_path).to_s
13
15
  end
14
16
  end
15
17
 
16
18
  watch 'app/controllers', only: /\.rb\z/ do |modified, added, removed|
17
19
  (modified + added + removed).map do |path|
18
- path.sub('app/', 'spec/').sub('controllers/', 'requests/').sub('_controller.rb', '_spec.rb')
20
+ file_path = Pathname.new(path).relative_path_from(Rails.root.join('app', 'controllers'))
21
+ spec_path = file_path.sub(/_controller.rb\z/, '_spec.rb')
22
+ Rails.root.join('spec', 'requests', spec_path).to_s
19
23
  end
20
24
  end
21
25
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RSpecWatcher
4
- VERSION = '0.3.2'
4
+ VERSION = '0.3.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-watcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matous Vokal
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-04 00:00:00.000000000 Z
11
+ date: 2025-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core
@@ -62,7 +62,7 @@ licenses:
62
62
  metadata:
63
63
  homepage_uri: https://github.com/Sorc96/rspec-watcher
64
64
  source_code_uri: https://github.com/Sorc96/rspec-watcher
65
- post_install_message:
65
+ post_install_message:
66
66
  rdoc_options: []
67
67
  require_paths:
68
68
  - lib
@@ -77,8 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
79
  requirements: []
80
- rubygems_version: 3.2.32
81
- signing_key:
80
+ rubygems_version: 3.4.19
81
+ signing_key:
82
82
  specification_version: 4
83
83
  summary: Instant feedback for awesome TDD experience with RSpec.
84
84
  test_files: []