rspec-emoji-formatter 0.1.0 → 0.1.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cfaa96afadfab4cfae543f51249e41928e0153b
|
4
|
+
data.tar.gz: 5f02eda8abb6eb6fcc7146293df1b6c0ddb37228
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a332e5f8b67ad033c99d740a060a021d2c468f0a95c9755777420f886af336eb57c78e1809e7067d07d9a16a31f1b9e7fe3c897055219d3176f78357ca39b9d7
|
7
|
+
data.tar.gz: fa1515a25ee4cedb02af824b4c16d754fd835ac065f7c39a75943a746ae4728c30b67707e6fe4eaa46a398c09e24a1b5e3d13712f9c5f228384e83c45b575a6f
|
@@ -1,67 +1,5 @@
|
|
1
1
|
require "rspec/core/formatters/console_codes"
|
2
2
|
|
3
3
|
class EmojiFormatter
|
4
|
-
|
5
|
-
PROGRESS_ICONS = {
|
6
|
-
:example_passed => "\u{1f600}",
|
7
|
-
:example_failed => "\u{1f621}",
|
8
|
-
:example_pending => "\u{1f537}"
|
9
|
-
}
|
10
|
-
|
11
|
-
RSpec::Core::Formatters.register self, :start, :example_passed, :example_failed,
|
12
|
-
:example_pending, :dump_failures, :dump_summary
|
13
|
-
|
14
|
-
def initialize(output)
|
15
|
-
@output = output
|
16
|
-
end
|
17
|
-
|
18
|
-
def start(_)
|
19
|
-
@output << "\n"
|
20
|
-
end
|
21
|
-
|
22
|
-
def example_passed(_)
|
23
|
-
example_result(:example_passed)
|
24
|
-
end
|
25
|
-
|
26
|
-
def example_failed(_)
|
27
|
-
example_result(:example_failed)
|
28
|
-
end
|
29
|
-
|
30
|
-
def example_pending(_)
|
31
|
-
example_result(:example_pending)
|
32
|
-
end
|
33
|
-
|
34
|
-
def dump_failures(notifications)
|
35
|
-
@output << "\n\n"
|
36
|
-
|
37
|
-
notifications.failure_notifications.each_with_index do |notification, i|
|
38
|
-
data = { i: i + 1, desc: notification.description }
|
39
|
-
@output << "%4<i>s) %<desc>s\n" % data
|
40
|
-
@output << " `bundle exec rspec #{notification.example.location_rerun_argument}`\n\n"
|
41
|
-
|
42
|
-
notification.colorized_message_lines.each do |line|
|
43
|
-
@output << " #{line}\n"
|
44
|
-
end
|
45
|
-
|
46
|
-
notification.colorized_formatted_backtrace.each do |line|
|
47
|
-
@output << " #{line}\n"
|
48
|
-
end
|
49
|
-
|
50
|
-
@output << "\n\n"
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def dump_summary(summary)
|
55
|
-
final_stats = "#{summary.examples.count} examples:\
|
56
|
-
#{summary.failed_examples.count} #{PROGRESS_ICONS[:example_failed]} \
|
57
|
-
#{summary.pending_examples.count} #{PROGRESS_ICONS[:example_pending]} "
|
58
|
-
@output << final_stats
|
59
|
-
puts "" # without this we get a % at the end of the output...
|
60
|
-
end
|
61
|
-
|
62
|
-
private
|
63
|
-
def example_result(type)
|
64
|
-
string = PROGRESS_ICONS[type]
|
65
|
-
@output << "#{string} "
|
66
|
-
end
|
4
|
+
# see emoji-formatter
|
67
5
|
end
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["alexmctaylorpants@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Add some 😀 to your tests!}
|
13
|
-
spec.description = %q{
|
13
|
+
spec.description = %q{PLEASE NOTE: this gem has been renamed to emoji-formatter.}
|
14
14
|
spec.homepage = "https://github.com/alextaylor000/rspec-emoji-formatter"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-emoji-formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,8 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.4'
|
55
|
-
description:
|
56
|
-
I wanted to.
|
55
|
+
description: 'PLEASE NOTE: this gem has been renamed to emoji-formatter.'
|
57
56
|
email:
|
58
57
|
- alexmctaylorpants@gmail.com
|
59
58
|
executables: []
|