minitest-macos-notification 0.0.1 → 0.0.2
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/.gitignore +1 -0
- data/Gemfile.lock +3 -1
- data/README.md +9 -2
- data/lib/minitest/macos_notification/version.rb +1 -1
- data/lib/minitest/reporters/macos_notification_reporter.rb +11 -3
- data/minitest-macos-notification.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a5e1b2f0e08fd26a8c95eb8fac6e6e3a2db8557
|
4
|
+
data.tar.gz: ddbaa6c25982886f8ddf42818249a7ef51c4fc7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf68ac87c76e31ca59c85225d3bd19e748efdb32092cb956beee05261c3ba53565aad179cc2683afff0b4e7df28cc09e72b6d892018d772dcb547408de86cafd
|
7
|
+
data.tar.gz: 4d423f5bb61355dd6368b12a644c507e56adda1e3a83b7a9c698d16ebf92c64410c9bda8d061b4b1708cb07d8e093ab1340054546acad9ca40ced82b4ae6f5f0
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
minitest-macos-notification (0.0.
|
4
|
+
minitest-macos-notification (0.0.2)
|
5
5
|
minitest (~> 5.0)
|
6
6
|
minitest-reporters (~> 1.1)
|
7
|
+
os (~> 1.0)
|
7
8
|
terminal-notifier (~> 2.0)
|
8
9
|
|
9
10
|
GEM
|
@@ -19,6 +20,7 @@ GEM
|
|
19
20
|
builder
|
20
21
|
minitest (>= 5.0)
|
21
22
|
ruby-progressbar
|
23
|
+
os (1.0.0)
|
22
24
|
rake (10.5.0)
|
23
25
|
ruby-progressbar (1.9.0)
|
24
26
|
terminal-notifier (2.0.0)
|
data/README.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
Simple macOS notification reporter for Minitest Reporters, based on the [minitest-osx](https://github.com/tombell/minitest-osx) gem.
|
4
4
|
|
5
|
+
[](http://badge.fury.io/rb/minitest-macos-notification)
|
6
|
+
[](https://travis-ci.org/sleepingstu/minitest-macos-notification)
|
7
|
+
|
5
8
|
## Installation
|
6
9
|
|
7
10
|
Add this line to your application's Gemfile:
|
@@ -12,11 +15,15 @@ gem "minitest-macos-notification"
|
|
12
15
|
|
13
16
|
And then execute:
|
14
17
|
|
15
|
-
|
18
|
+
```sh
|
19
|
+
bundle
|
20
|
+
```
|
16
21
|
|
17
22
|
Or install it yourself as:
|
18
23
|
|
19
|
-
|
24
|
+
```sh
|
25
|
+
gem install minitest-macos-notification
|
26
|
+
```
|
20
27
|
|
21
28
|
## Usage
|
22
29
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "minitest/reporters"
|
4
|
+
require "os"
|
4
5
|
require "terminal-notifier"
|
5
6
|
|
6
7
|
module Minitest
|
@@ -8,11 +9,18 @@ module Minitest
|
|
8
9
|
class MacosNotificationReporter < BaseReporter
|
9
10
|
def report
|
10
11
|
super
|
11
|
-
|
12
|
+
show_notification if OS.mac?
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def show_notification
|
18
|
+
text = "#{total_count} tests, #{failures} failures, #{errors} errors, #{skips} skips in #{total_time}"
|
12
19
|
title = options[:title] || "Minitest"
|
13
|
-
subtitle = (passed? ? "
|
20
|
+
subtitle = (passed? ? "\u{1F49A} Success" : "\u{1F494} Failed")
|
21
|
+
group = title.downcase.tr(" ", "-")
|
14
22
|
|
15
|
-
TerminalNotifier.notify(text, title: title, subtitle: subtitle)
|
23
|
+
TerminalNotifier.notify(text, title: title, subtitle: subtitle, group: group)
|
16
24
|
end
|
17
25
|
end
|
18
26
|
end
|
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.add_dependency "minitest", "~> 5.0"
|
27
27
|
spec.add_dependency "minitest-reporters", "~> 1.1"
|
28
|
+
spec.add_dependency "os", "~> 1.0"
|
28
29
|
spec.add_dependency "terminal-notifier", "~> 2.0"
|
29
30
|
|
30
31
|
spec.add_development_dependency "bundler", "~> 1.16"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-macos-notification
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: os
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: terminal-notifier
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|