fsr 0.1.4 → 0.1.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/Gemfile.lock +12 -10
- data/lib/fsr/version.rb +1 -1
- data/lib/fsr.rb +22 -22
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47ae417bf5a363655b2f31478d055e40e9c0ba5b74f6ced67b125c6104ca1400
|
4
|
+
data.tar.gz: 79bb260e4510283cda5b5a9c76e815cccf42cc35d722818e932e778d8d793c88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73e9b6ab1ccede691b6a376e6f4ace4c672f179329776789843ce45a60ed233b49271860045ef9835a016990764a1cd2d5b255dc7f2d4112b7546a368171e699
|
7
|
+
data.tar.gz: d885c18291751204ffd5c2136aebe7e026d7f0e7fe1e5f2199e22e098eac5e265f641d3984546f4d1b674b2f6310bc897e50cc2353f565e2b491604cbf2405c8
|
data/Gemfile.lock
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fsr (0.1.
|
4
|
+
fsr (0.1.6)
|
5
5
|
listen
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
ast (2.4.2)
|
11
|
-
ffi (1.17.0)
|
11
|
+
ffi (1.17.0-arm64-darwin)
|
12
12
|
json (2.7.2)
|
13
|
+
language_server-protocol (3.17.0.3)
|
13
14
|
listen (3.9.0)
|
14
15
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
15
16
|
rb-inotify (~> 0.9, >= 0.9.10)
|
16
|
-
parallel (1.
|
17
|
+
parallel (1.25.1)
|
17
18
|
parser (3.3.2.0)
|
18
19
|
ast (~> 2.4.1)
|
19
20
|
racc
|
@@ -26,24 +27,25 @@ GEM
|
|
26
27
|
regexp_parser (2.9.2)
|
27
28
|
rexml (3.2.8)
|
28
29
|
strscan (>= 3.0.9)
|
29
|
-
rubocop (1.
|
30
|
+
rubocop (1.64.1)
|
30
31
|
json (~> 2.3)
|
32
|
+
language_server-protocol (>= 3.17.0)
|
31
33
|
parallel (~> 1.10)
|
32
|
-
parser (>= 3.
|
34
|
+
parser (>= 3.3.0.2)
|
33
35
|
rainbow (>= 2.2.2, < 4.0)
|
34
36
|
regexp_parser (>= 1.8, < 3.0)
|
35
37
|
rexml (>= 3.2.5, < 4.0)
|
36
|
-
rubocop-ast (>= 1.
|
38
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
37
39
|
ruby-progressbar (~> 1.7)
|
38
40
|
unicode-display_width (>= 2.4.0, < 3.0)
|
39
|
-
rubocop-ast (1.
|
40
|
-
parser (>= 3.
|
41
|
+
rubocop-ast (1.31.3)
|
42
|
+
parser (>= 3.3.1.0)
|
41
43
|
ruby-progressbar (1.13.0)
|
42
44
|
strscan (3.1.0)
|
43
45
|
unicode-display_width (2.5.0)
|
44
46
|
|
45
47
|
PLATFORMS
|
46
|
-
|
48
|
+
arm64-darwin-22
|
47
49
|
|
48
50
|
DEPENDENCIES
|
49
51
|
fsr!
|
@@ -51,4 +53,4 @@ DEPENDENCIES
|
|
51
53
|
rubocop (~> 1.21)
|
52
54
|
|
53
55
|
BUNDLED WITH
|
54
|
-
|
56
|
+
2.4.10
|
data/lib/fsr/version.rb
CHANGED
data/lib/fsr.rb
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
require_relative 'fsr/version'
|
4
4
|
require 'listen'
|
5
|
+
require 'rspec/core'
|
6
|
+
|
7
|
+
$LOAD_PATH.push('spec')
|
5
8
|
|
6
9
|
# Run RSpec fast by avoiding full app boot
|
7
10
|
#
|
@@ -25,7 +28,22 @@ module Fsr
|
|
25
28
|
"#{`pwd`.strip}/spec"
|
26
29
|
].select { |dir| Dir.exist?(dir) }
|
27
30
|
)
|
28
|
-
Listen.to(*listen)
|
31
|
+
Listen.to(*listen) do |modified, added|
|
32
|
+
files = [modified, added].compact.flatten if load.empty?
|
33
|
+
Fsr::Runner.new(run, load: files).run
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.sandboxed
|
38
|
+
orig_world = RSpec.world
|
39
|
+
orig_example = RSpec.current_example
|
40
|
+
RSpec.world = RSpec::Core::World.new(RSpec.configuration)
|
41
|
+
|
42
|
+
yield
|
43
|
+
ensure
|
44
|
+
RSpec.world = orig_world
|
45
|
+
RSpec.current_example = orig_example
|
46
|
+
RSpec.clear_examples
|
29
47
|
end
|
30
48
|
|
31
49
|
# core runner
|
@@ -37,27 +55,9 @@ module Fsr
|
|
37
55
|
|
38
56
|
def run
|
39
57
|
@dependent_files.each { |file| load(file) }
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
def cleanup
|
45
|
-
warn_level = $VERBOSE
|
46
|
-
$VERBOSE = nil
|
47
|
-
remove_rspec
|
48
|
-
require('rspec')
|
49
|
-
configure
|
50
|
-
$VERBOSE = warn_level
|
51
|
-
end
|
52
|
-
|
53
|
-
def remove_rspec
|
54
|
-
Object.send(:remove_const, 'RSpec')
|
55
|
-
$LOADED_FEATURES.reject! { |a| a.include?('rspec') }
|
56
|
-
end
|
57
|
-
|
58
|
-
def configure
|
59
|
-
load('spec/spec_helper.rb')
|
60
|
-
load('spec/rails_helper.rb')
|
58
|
+
Fsr.sandboxed do
|
59
|
+
RSpec::Core::Runner.run(@specs)
|
60
|
+
end
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fsr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elamaran Angusamy Elango
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: listen
|