luna-rspec-formatters 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cda1f916da2f00b29f5bf0bd3dd447f1a1053d95
|
4
|
+
data.tar.gz: 46a134b7f2884a41e1ad9758f87db73d880ede7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efb7ad0863ea147a664fbbb0d22b15e0e512fcde789601953b5a34d018842176ce99cf95f008c4bfe46f12eb608af2992a5e985e8e9aee071f2710849bd19c3b
|
7
|
+
data.tar.gz: 5a74f5f159d2d6bfa68f4c33ce43d206b33330e2645e7cae407eb11328fdde8f4c2e98e6c02fa2b8980221e8feb8c890feb07ebeb4930b3438f3202ea5809437
|
@@ -21,15 +21,17 @@ module Luna
|
|
21
21
|
|
22
22
|
def dump_summary(duration, total, failures, pending)
|
23
23
|
super
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
unless ENV["LUNA_DISABLE_LIBNOTIFY"]
|
25
|
+
Libnotify.new do |notify|
|
26
|
+
notify.summary = "RSpec Test Results"
|
27
|
+
notify.urgency = :critical
|
28
|
+
notify.transient = true
|
29
|
+
notify.append = true
|
30
|
+
notify.timeout = 1
|
31
|
+
notify.body = \
|
32
|
+
"Passed: #{total - failures}, Failed: #{failures}, Pending: #{pending}"
|
33
|
+
end.show!
|
34
|
+
end
|
33
35
|
end
|
34
36
|
end
|
35
37
|
end
|
@@ -6,45 +6,25 @@ module Luna
|
|
6
6
|
module Formatters
|
7
7
|
class Documentation < Base
|
8
8
|
|
9
|
-
def example_passed
|
9
|
+
def example_passed(e)
|
10
10
|
super(e)
|
11
|
-
|
12
|
-
success_color(print_description(e))
|
11
|
+
print_description(e, :success)
|
13
12
|
end
|
14
13
|
|
15
|
-
def example_failed
|
14
|
+
def example_failed(e)
|
16
15
|
super(e)
|
17
|
-
|
18
|
-
failure_color(print_description(e))
|
16
|
+
print_description(e, :failure)
|
19
17
|
end
|
20
18
|
|
21
|
-
def example_pending
|
19
|
+
def example_pending(e)
|
22
20
|
super(e)
|
23
|
-
|
24
|
-
pending_color(print_description(e))
|
21
|
+
print_description(e, :pending)
|
25
22
|
end
|
26
23
|
|
27
24
|
# -------------------------------------------------------------
|
28
25
|
|
29
|
-
def
|
30
|
-
|
31
|
-
end
|
32
|
-
|
33
|
-
def syntax_highlight(text)
|
34
|
-
CodeRay.scan(text, :ruby).term
|
35
|
-
end
|
36
|
-
|
37
|
-
|
38
|
-
def highlight_methods(text)
|
39
|
-
text.gsub(/(#|\.)([a-z0-9_]+)/) { $1.white + $2.magenta }
|
40
|
-
end
|
41
|
-
|
42
|
-
# -------------------------------------------------------------
|
43
|
-
|
44
|
-
def print_description(example)
|
45
|
-
constant = example.full_description.chomp(example.description)
|
46
|
-
output.print " " + highlight_methods(syntax_highlight(constant))
|
47
|
-
output.print highlight_graves(example.description) + ":"
|
26
|
+
def print_description(example, type)
|
27
|
+
output.print send(:"#{type}_color", "\t" + example.full_description + "\n")
|
48
28
|
end
|
49
29
|
end
|
50
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luna-rspec-formatters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordon Bedwell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: libnotify
|