fuubar 2.5.0 → 2.5.1
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/LICENSE.txt +1 -1
- data/README.md +47 -23
- data/lib/fuubar.rb +36 -36
- data/lib/fuubar/output.rb +2 -2
- metadata +19 -21
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fd1a2c4590312a74d9626c64fc2ddd353ff5ebd351a74e3643087646c60462a
|
4
|
+
data.tar.gz: 46a97b176a9c504e0f20553a94f304be2bb97b171258e7350c5d460ff6d83fb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8545ad87bb3cf36a508feaa26f3d5cdbb82bf362187dd7fc522c92255d9b8456a98a436dc6da6288568655842567bd132b2418aab297d410b41e92404a7da194
|
7
|
+
data.tar.gz: ea0f79a6c37344dabf5bbbd23d273148856bd5e4220af3785155a7f9a748f3314eee8391f37f4c5c615f0f7ae5b90e4b360f0eb4a09fd13aae5bc247800a0242
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,29 @@
|
|
1
1
|
Fuubar
|
2
2
|
================================================================================
|
3
|
-
|
3
|
+
|
4
|
+
<div align="center">
|
5
|
+
<a href="https://rubygems.org/gems/fuubar" alt="RubyGems Version">
|
6
|
+
<img src="https://img.shields.io/gem/v/fuubar.svg?style=flat-square&label=current-version" alt="RubyGems Version" />
|
7
|
+
</a>
|
8
|
+
|
9
|
+
<a href="https://rubygems.org/gems/fuubar" alt="RubyGems Rank Overall">
|
10
|
+
<img src="https://img.shields.io/gem/rt/fuubar.svg?style=flat-square&label=total-rank" alt="RubyGems Rank Overall" />
|
11
|
+
</a>
|
12
|
+
|
13
|
+
<a href="https://rubygems.org/gems/fuubar" alt="RubyGems Rank Daily">
|
14
|
+
<img src="https://img.shields.io/gem/rd/fuubar.svg?style=flat-square&label=daily-rank" alt="RubyGems Rank Daily" />
|
15
|
+
</a>
|
16
|
+
|
17
|
+
<a href="https://rubygems.org/gems/fuubar" alt="RubyGems Downloads">
|
18
|
+
<img src="https://img.shields.io/gem/dt/fuubar.svg?style=flat-square&label=total-downloads" alt="RubyGems Downloads" />
|
19
|
+
</a>
|
20
|
+
|
21
|
+
<a href="https://github.com/thekompanee/fuubar/actions?query=workflow%3ABuild" alt="Build Status">
|
22
|
+
<img src="https://img.shields.io/github/workflow/status/jfelchner/fuubar/Build?label=CI&style=flat-square&logo=github" alt="Build Status" />
|
23
|
+
</a>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<br>
|
4
27
|
|
5
28
|
fuubar is an instafailing [RSpec][rspec] formatter that uses
|
6
29
|
a progress bar instead of a string of letters and dots as feedback.
|
@@ -23,22 +46,22 @@ Usage
|
|
23
46
|
|
24
47
|
In order to use fuubar, you have three options.
|
25
48
|
|
26
|
-
### Option 1: Invoke It Manually Via The Command Line
|
49
|
+
### Option 1: Invoke It Manually Via The Command Line
|
27
50
|
|
28
|
-
```
|
51
|
+
```bash
|
29
52
|
rspec --format Fuubar --color
|
30
53
|
```
|
31
54
|
|
32
|
-
### Option 2: Add It To Your Local `.rspec` File
|
55
|
+
### Option 2: Add It To Your Local `.rspec` File
|
33
56
|
|
34
|
-
```
|
57
|
+
```text
|
35
58
|
# .rspec
|
36
59
|
|
37
60
|
--format Fuubar
|
38
61
|
--color
|
39
62
|
```
|
40
63
|
|
41
|
-
### Option 3: Add It To Your `spec_helper.rb`
|
64
|
+
### Option 3: Add It To Your `spec_helper.rb`
|
42
65
|
|
43
66
|
```ruby
|
44
67
|
# spec/spec_helper.rb
|
@@ -51,7 +74,7 @@ end
|
|
51
74
|
Advanced Usage
|
52
75
|
--------------------------------
|
53
76
|
|
54
|
-
### Customizing The Bar
|
77
|
+
### Customizing The Bar
|
55
78
|
|
56
79
|
fuubar exposes an RSpec configuration variable called
|
57
80
|
`fuubar_progress_bar_options` which, when set will be passed directly to
|
@@ -59,7 +82,7 @@ fuubar exposes an RSpec configuration variable called
|
|
59
82
|
the [ruby-progressbar documentation][rpb-docs] for details on all of the options
|
60
83
|
you can pass in.
|
61
84
|
|
62
|
-
#### Example
|
85
|
+
#### Example
|
63
86
|
|
64
87
|
Let's say for example that you would like to change the format of the bar. You
|
65
88
|
would do that like so:
|
@@ -74,9 +97,11 @@ end
|
|
74
97
|
|
75
98
|
would make it so that, when fuubar is output, it would look something like:
|
76
99
|
|
77
|
-
|
100
|
+
```text
|
101
|
+
My Fuubar! <================================ > 53.44% 00:12:31
|
102
|
+
```
|
78
103
|
|
79
|
-
### Hiding Pending/Skipped Spec Summary
|
104
|
+
### Hiding Pending/Skipped Spec Summary
|
80
105
|
|
81
106
|
By default fuubar follows RSpec's lead and will dump out a summary of all of the
|
82
107
|
pending specs in the suite once the test run is over. This is a good idea
|
@@ -84,7 +109,7 @@ because the additional noise is a nudge to fix those tests. We realize however
|
|
84
109
|
that not all teams have the luxury of implementing all of the pending specs and
|
85
110
|
therefore fuubar gives you the option of supressing that summary.
|
86
111
|
|
87
|
-
#### Example
|
112
|
+
#### Example
|
88
113
|
|
89
114
|
```ruby
|
90
115
|
# spec/spec_helper.rb
|
@@ -94,14 +119,13 @@ RSpec.configure do |config|
|
|
94
119
|
end
|
95
120
|
```
|
96
121
|
|
97
|
-
### Enabling Auto-Refresh
|
122
|
+
### Enabling Auto-Refresh
|
98
123
|
|
99
124
|
By default fuubar refreshes the bar only between each spec.
|
100
125
|
You can enable an auto-refresh feature that will keep refreshing the bar (and
|
101
126
|
therefore the ETA) every second.
|
102
127
|
You can enable the feature as follows:
|
103
128
|
|
104
|
-
|
105
129
|
```ruby
|
106
130
|
# spec/spec_helper.rb
|
107
131
|
|
@@ -110,7 +134,7 @@ RSpec.configure do |config|
|
|
110
134
|
end
|
111
135
|
```
|
112
136
|
|
113
|
-
#### Undesirable
|
137
|
+
#### Undesirable Effects
|
114
138
|
|
115
139
|
Unfortunately this option doesn't play well with things like debuggers, as
|
116
140
|
having a bar show up every second would be undesireable (which is why the
|
@@ -150,17 +174,17 @@ Security
|
|
150
174
|
fuubar is cryptographically signed. To be sure the gem you install hasn’t been
|
151
175
|
tampered with, follow these steps:
|
152
176
|
|
153
|
-
|
177
|
+
* Add my public key (if you haven’t already) as a trusted certificate
|
154
178
|
|
155
|
-
```
|
156
|
-
gem cert --add <(curl -Ls https://raw.github.com/thekompanee/fuubar/master/certs/thekompanee.pem)
|
157
|
-
```
|
179
|
+
```bash
|
180
|
+
gem cert --add <(curl -Ls https://raw.github.com/thekompanee/fuubar/master/certs/thekompanee.pem)
|
181
|
+
```
|
158
182
|
|
159
|
-
|
183
|
+
* Install fuubar telling it to use security checks when possible.
|
160
184
|
|
161
|
-
```
|
162
|
-
gem install fuubar -P MediumSecurity
|
163
|
-
```
|
185
|
+
```bash
|
186
|
+
gem install fuubar -P MediumSecurity
|
187
|
+
```
|
164
188
|
|
165
189
|
> **Note:** The `MediumSecurity` trust profile will verify signed gems, but
|
166
190
|
> allow the installation of unsigned dependencies.
|
@@ -183,7 +207,7 @@ The names and logos for The Kompanee are trademarks of The Kompanee, Ltd.
|
|
183
207
|
License
|
184
208
|
--------------------------------------------------------------------------------
|
185
209
|
|
186
|
-
fuubar is Copyright © 2010-
|
210
|
+
fuubar is Copyright © 2010-2021 Jeff Kreeftmeijer and Jeff Felchner. It is
|
187
211
|
free software, and may be redistributed under the terms specified in the
|
188
212
|
[LICENSE][license] file.
|
189
213
|
|
data/lib/fuubar.rb
CHANGED
@@ -5,25 +5,24 @@ require 'rspec/core/formatters/base_text_formatter'
|
|
5
5
|
require 'ruby-progressbar'
|
6
6
|
require 'fuubar/output'
|
7
7
|
|
8
|
-
RSpec.configuration.add_setting :fuubar_progress_bar_options, :default => {}
|
9
|
-
RSpec.configuration.add_setting :fuubar_auto_refresh, :default => false
|
10
|
-
RSpec.configuration.add_setting :fuubar_output_pending_results, :default => true
|
8
|
+
::RSpec.configuration.add_setting :fuubar_progress_bar_options, :default => {}
|
9
|
+
::RSpec.configuration.add_setting :fuubar_auto_refresh, :default => false
|
10
|
+
::RSpec.configuration.add_setting :fuubar_output_pending_results, :default => true
|
11
11
|
|
12
|
-
class Fuubar < RSpec::Core::Formatters::BaseTextFormatter
|
12
|
+
class Fuubar < ::RSpec::Core::Formatters::BaseTextFormatter
|
13
13
|
DEFAULT_PROGRESS_BAR_OPTIONS = { :format => ' %c/%C |%w>%i| %e ' }.freeze
|
14
14
|
|
15
|
-
RSpec::Core::Formatters.register self,
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
attr_accessor :
|
26
|
-
:example_tick_lock,
|
15
|
+
::RSpec::Core::Formatters.register self,
|
16
|
+
:close,
|
17
|
+
:dump_failures,
|
18
|
+
:dump_pending,
|
19
|
+
:example_failed,
|
20
|
+
:example_passed,
|
21
|
+
:example_pending,
|
22
|
+
:message,
|
23
|
+
:start
|
24
|
+
|
25
|
+
attr_accessor :example_tick_lock,
|
27
26
|
:progress,
|
28
27
|
:passed_count,
|
29
28
|
:pending_count,
|
@@ -32,8 +31,8 @@ class Fuubar < RSpec::Core::Formatters::BaseTextFormatter
|
|
32
31
|
def initialize(*args)
|
33
32
|
super
|
34
33
|
|
35
|
-
self.example_tick_lock = Mutex.new
|
36
|
-
self.progress = ProgressBar.create(
|
34
|
+
self.example_tick_lock = ::Mutex.new
|
35
|
+
self.progress = ::ProgressBar.create(
|
37
36
|
DEFAULT_PROGRESS_BAR_OPTIONS.
|
38
37
|
merge(:throttle_rate => continuous_integration? ? 1.0 : nil).
|
39
38
|
merge(:total => 0,
|
@@ -50,19 +49,10 @@ class Fuubar < RSpec::Core::Formatters::BaseTextFormatter
|
|
50
49
|
:output => output,
|
51
50
|
:autostart => false)
|
52
51
|
|
53
|
-
self.progress
|
54
|
-
self.passed_count
|
55
|
-
self.pending_count
|
56
|
-
self.failed_count
|
57
|
-
self.example_tick_thread = Thread.new do
|
58
|
-
loop do
|
59
|
-
sleep(1)
|
60
|
-
|
61
|
-
if configuration.fuubar_auto_refresh
|
62
|
-
example_tick(notification)
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end # rubocop:disable Layout/BlockAlignment
|
52
|
+
self.progress = ::ProgressBar.create(progress_bar_options)
|
53
|
+
self.passed_count = 0
|
54
|
+
self.pending_count = 0
|
55
|
+
self.failed_count = 0
|
66
56
|
|
67
57
|
super
|
68
58
|
|
@@ -102,6 +92,18 @@ class Fuubar < RSpec::Core::Formatters::BaseTextFormatter
|
|
102
92
|
end
|
103
93
|
end
|
104
94
|
|
95
|
+
def example_tick_thread
|
96
|
+
::Thread.new do
|
97
|
+
loop do
|
98
|
+
sleep(1)
|
99
|
+
|
100
|
+
if configuration.fuubar_auto_refresh
|
101
|
+
example_tick(notification)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
105
107
|
def message(notification)
|
106
108
|
if progress.respond_to? :log
|
107
109
|
progress.log(notification.message)
|
@@ -123,11 +125,9 @@ class Fuubar < RSpec::Core::Formatters::BaseTextFormatter
|
|
123
125
|
super
|
124
126
|
end
|
125
127
|
|
126
|
-
# rubocop:disable Naming/MemoizedInstanceVariableName
|
127
128
|
def output
|
128
|
-
@fuubar_output ||= Fuubar::Output.new(super, configuration.tty?)
|
129
|
+
@fuubar_output ||= ::Fuubar::Output.new(super, configuration.tty?) # rubocop:disable Naming/MemoizedInstanceVariableName
|
129
130
|
end
|
130
|
-
# rubocop:enable Naming/MemoizedInstanceVariableName
|
131
131
|
|
132
132
|
private
|
133
133
|
|
@@ -160,11 +160,11 @@ class Fuubar < RSpec::Core::Formatters::BaseTextFormatter
|
|
160
160
|
end
|
161
161
|
|
162
162
|
def color_code_for(*args)
|
163
|
-
RSpec::Core::Formatters::ConsoleCodes.console_code_for(*args)
|
163
|
+
::RSpec::Core::Formatters::ConsoleCodes.console_code_for(*args)
|
164
164
|
end
|
165
165
|
|
166
166
|
def configuration
|
167
|
-
RSpec.configuration
|
167
|
+
::RSpec.configuration
|
168
168
|
end
|
169
169
|
|
170
170
|
def continuous_integration?
|
data/lib/fuubar/output.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'delegate'
|
4
4
|
|
5
|
-
class Fuubar < RSpec::Core::Formatters::BaseTextFormatter
|
5
|
+
class Fuubar < ::RSpec::Core::Formatters::BaseTextFormatter
|
6
6
|
class Output < ::Delegator
|
7
|
-
def initialize(output, force_tty = false)
|
7
|
+
def initialize(output, force_tty = false) # rubocop:disable Style/OptionalBooleanParameter, Lint/MissingSuper
|
8
8
|
@raw_output = output
|
9
9
|
@force_tty = force_tty
|
10
10
|
end
|
metadata
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuubar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Evans
|
8
8
|
- Jeff Kreeftmeijer
|
9
9
|
- jfelchner
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain:
|
13
13
|
- |
|
14
14
|
-----BEGIN CERTIFICATE-----
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
MIIEGDCCAoCgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAyMTAwLgYDVQQDDCdhY2Nv
|
16
|
+
dW50c19ydWJ5Z2Vtcy9EQz10aGVrb21wYW5lZS9EQz1jb20wHhcNMjAxMjI2MjIy
|
17
|
+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XSuOxjXAkFe1r9RhPzeMY8lPVh6aEQKNLVkzbpIjoGzUgAPGPZG/ylKSWycwE
|
32
|
+
qfHiDXzCAqMzSsb3sMQO1+0euciY1oTOyYCHYKo+gemWEI/p8PyJe/qB2tWC9GYs
|
33
|
+
m+we5ul7O4Sq8qKnX0KCqHneqaXakcbuEkhViW6Def432jH8JjYums6EW2mg9570
|
34
|
+
pHS20TH4u9o0+5DIhayfGrmAtdtQutQNCclONqBlk7r3/16Y8Lr376dDHrISZlwd
|
35
|
+
fdbUKgJXqJeb4GYhiKV07l67XExVjmAklMuA6bcB7mk+aSYUkoWNic4ZYGNjVv88
|
36
|
+
AapqLKNG/UPfrJhdhTtFR4ARb8f54rgzONhTaAqVk23Bdp1yoDXaulFCkmU=
|
39
37
|
-----END CERTIFICATE-----
|
40
|
-
date:
|
38
|
+
date: 2020-12-31 00:00:00.000000000 Z
|
41
39
|
dependencies:
|
42
40
|
- !ruby/object:Gem::Dependency
|
43
41
|
name: rspec-core
|
@@ -103,7 +101,7 @@ metadata:
|
|
103
101
|
homepage_uri: https://github.com/thekompanee/fuubar
|
104
102
|
source_code_uri: https://github.com/thekompanee/fuubar
|
105
103
|
wiki_uri: https://github.com/thekompanee/fuubar/wiki
|
106
|
-
post_install_message:
|
104
|
+
post_install_message:
|
107
105
|
rdoc_options: []
|
108
106
|
require_paths:
|
109
107
|
- lib
|
@@ -118,8 +116,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
116
|
- !ruby/object:Gem::Version
|
119
117
|
version: '0'
|
120
118
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
122
|
-
signing_key:
|
119
|
+
rubygems_version: 3.2.3
|
120
|
+
signing_key:
|
123
121
|
specification_version: 4
|
124
122
|
summary: the instafailing RSpec progress bar formatter
|
125
123
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|