parallel_rspec_progress 0.1.2 → 1.0.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/Gemfile.lock +9 -1
- data/README.md +2 -0
- data/lib/parallel_rspec_progress/controller.rb +12 -2
- data/lib/parallel_rspec_progress/formatter.rb +3 -3
- data/lib/parallel_rspec_progress/version.rb +1 -1
- data/parallel_rspec_progress.gemspec +2 -0
- metadata +29 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e955737406ae1e757a748d30328aeae977ed64fecd53b46ca4094ca80e076da
|
4
|
+
data.tar.gz: 0e0ef92fefc61513526869d43d23c9d6fa1100e3a95c10dd62cb705751cfe63b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99a0fe77cc78606b61ec82e509091bd6202d2b339a42995212a6e12f8db05f2641385e47fbdee84c739d9d09891f22a50cc94bf01e52d4c0af90946ffa031061
|
7
|
+
data.tar.gz: 29084a1510bfb17f2831f7836da5cf09787c9b80d99a27be0148bff48190f511faf61b77be3dc8be39551860e34cd2bb31f0b3073fc183b39a4431ccc0b8bcaf
|
data/Gemfile.lock
CHANGED
@@ -1,17 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
parallel_rspec_progress (0.
|
4
|
+
parallel_rspec_progress (1.0.0)
|
5
5
|
parallel_tests (~> 2.7, >= 2.7.1)
|
6
|
+
rainbow (~> 3.0)
|
6
7
|
ruby-progressbar (~> 1.10)
|
7
8
|
|
8
9
|
GEM
|
9
10
|
remote: https://rubygems.org/
|
10
11
|
specs:
|
12
|
+
coderay (1.1.2)
|
11
13
|
diff-lcs (1.3)
|
14
|
+
method_source (0.9.2)
|
12
15
|
parallel (1.17.0)
|
13
16
|
parallel_tests (2.28.0)
|
14
17
|
parallel
|
18
|
+
pry (0.12.2)
|
19
|
+
coderay (~> 1.1.0)
|
20
|
+
method_source (~> 0.9.0)
|
21
|
+
rainbow (3.0.0)
|
15
22
|
rake (10.5.0)
|
16
23
|
rspec (3.8.0)
|
17
24
|
rspec-core (~> 3.8.0)
|
@@ -34,6 +41,7 @@ PLATFORMS
|
|
34
41
|
DEPENDENCIES
|
35
42
|
bundler (~> 2.0)
|
36
43
|
parallel_rspec_progress!
|
44
|
+
pry (~> 0.12.2)
|
37
45
|
rake (~> 10.0)
|
38
46
|
rspec (~> 3.0)
|
39
47
|
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# ParallelRspecProgress
|
2
2
|
|
3
|
+
[](https://badge.fury.io/rb/parallel_rspec_progress)
|
4
|
+
|
3
5
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/parallel_rspec_progress`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
6
|
|
5
7
|
TODO: Delete this and the text above, and describe your gem
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "ruby-progressbar"
|
2
2
|
require "drb/drb"
|
3
|
+
require "rainbow"
|
3
4
|
|
4
5
|
module ParallelRspecProgress
|
5
6
|
class Controller
|
@@ -12,6 +13,7 @@ module ParallelRspecProgress
|
|
12
13
|
|
13
14
|
def stop
|
14
15
|
DRb.stop_service
|
16
|
+
process_results
|
15
17
|
end
|
16
18
|
|
17
19
|
def put_total(val)
|
@@ -34,8 +36,8 @@ module ParallelRspecProgress
|
|
34
36
|
@pending << item
|
35
37
|
end
|
36
38
|
|
37
|
-
@progressbar.increment
|
38
39
|
@progressbar.title = compose_title
|
40
|
+
@progressbar.increment
|
39
41
|
end
|
40
42
|
|
41
43
|
private
|
@@ -51,7 +53,15 @@ module ParallelRspecProgress
|
|
51
53
|
end
|
52
54
|
|
53
55
|
def compose_title
|
54
|
-
"passed: #{@passed.count} failed: #{@failed.count} pending: #{@pending.count}"
|
56
|
+
"passed: #{Rainbow(@passed.count).green} failed: #{Rainbow(@failed.count).red} pending: #{Rainbow(@pending.count).yellow}"
|
57
|
+
end
|
58
|
+
|
59
|
+
def process_results
|
60
|
+
if @failed.any?
|
61
|
+
puts @failed.map {|x| "#{Rainbow(x).red}" }
|
62
|
+
else
|
63
|
+
puts Rainbow("Everything is OK!").green
|
64
|
+
end
|
55
65
|
end
|
56
66
|
end
|
57
67
|
end
|
@@ -29,14 +29,14 @@ class ParallelProgressFormatter
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def example_passed(notification)
|
32
|
-
controller.add(key: :passed, item:
|
32
|
+
controller.add(key: :passed, item: notification.example.location)
|
33
33
|
end
|
34
34
|
|
35
35
|
def example_failed(notification)
|
36
|
-
controller.add(key: :failed, item:
|
36
|
+
controller.add(key: :failed, item: notification.example.location)
|
37
37
|
end
|
38
38
|
|
39
39
|
def example_pending(notification)
|
40
|
-
controller.add(key: :pending, item:
|
40
|
+
controller.add(key: :pending, item: notification.example.location)
|
41
41
|
end
|
42
42
|
end
|
@@ -38,8 +38,10 @@ Gem::Specification.new do |spec|
|
|
38
38
|
|
39
39
|
spec.add_dependency "parallel_tests", '~> 2.7', '>= 2.7.1'
|
40
40
|
spec.add_dependency "ruby-progressbar", '~> 1.10'
|
41
|
+
spec.add_dependency "rainbow", '~> 3.0'
|
41
42
|
|
42
43
|
spec.add_development_dependency "bundler", "~> 2.0"
|
43
44
|
spec.add_development_dependency "rake", "~> 10.0"
|
44
45
|
spec.add_development_dependency "rspec", "~> 3.0"
|
46
|
+
spec.add_development_dependency "pry", "~> 0.12.2"
|
45
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_rspec_progress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Viktor Sych
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '1.10'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rainbow
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '3.0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '3.0'
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
name: bundler
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,6 +100,20 @@ dependencies:
|
|
86
100
|
- - "~>"
|
87
101
|
- !ruby/object:Gem::Version
|
88
102
|
version: '3.0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: pry
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 0.12.2
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: 0.12.2
|
89
117
|
description: united fancy progressbar for parallel_rspec
|
90
118
|
email:
|
91
119
|
- skcc321@gmail.com
|