test-unit-notify 1.0.2 → 1.0.3

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: 1c9d92d5a6547a086c53bcee1e9ddd6346a55ce7
4
- data.tar.gz: bf3b8b2108d1ca127e712054ba85b0d6c9371922
3
+ metadata.gz: 352fc0b8e6ac14a1e23818406315173f1df27ad2
4
+ data.tar.gz: e161d8b47f4d6fec95e7200e12f515ad777f06ba
5
5
  SHA512:
6
- metadata.gz: 4b41f3f696e0341cd2da406c5efcde74947e3b10fd640bddd2b9fbac0a26f2648af0cd07ccf1ada781f518ad8fbea6ea6d4f662ffef7633c50b639802427bd6f
7
- data.tar.gz: 525c143a55835cb6f83ee7319e09826342c294e32a78c587147f7e4984f81bdb030cd1a9b138557969c1a43ef6dccb645c8f5c3b34fcd8e1c347dc4538ab4f2c
6
+ metadata.gz: 97ac95ef3c781dbad4b378ccff10125746471b7b4477d337a7de6497ac58959557e46b83c5030cb5c7d1516f72b406bb95090b633e2349651513ba33fd6f3aef
7
+ data.tar.gz: b3cb2bbbcbbe761312bccd5af46c1e3baa4d4aa451f3346ecdf22d66327553526078dde9b76ddc89ff875b58996dc922b1d505b5f7c1e684762d3c93ed204972
data/Rakefile CHANGED
@@ -31,15 +31,18 @@ Packnga::DocumentTask.new(spec) do |task|
31
31
  task.translate_language = "ja"
32
32
  end
33
33
 
34
+ release_task = nil
34
35
  Packnga::ReleaseTask.new(spec) do |task|
36
+ release_task = task
37
+ task.index_html_dir = "../../www/test-unit.github.io"
35
38
  end
36
39
 
40
+ doc_dir = base_dir + "doc"
41
+ reference_dir = doc_dir + "reference"
42
+ reference_screenshot_dir = reference_dir + "screenshot"
37
43
  namespace :doc do
38
- task :screenshot do
39
- doc_dir = base_dir + "doc"
40
- reference_dir = doc_dir + "reference"
41
- reference_screenshot_dir = reference_dir + "screenshot"
42
- mkdir_p(reference_screenshot_dir.to_s)
44
+ directory reference_screenshot_dir.to_s
45
+ task :screenshot => reference_screenshot_dir.to_s do
43
46
  (base_dir + "screenshot").children.each do |file|
44
47
  next if file.directory?
45
48
  cp(file.to_s, reference_screenshot_dir.to_s)
@@ -48,4 +51,19 @@ namespace :doc do
48
51
  end
49
52
  task :yard => "doc:screenshot"
50
53
 
54
+ namespace :release do
55
+ namespace :references do
56
+ namespace :upload do
57
+ index_html_dir = release_task.instance_variable_get(:@index_html_dir)
58
+ index_html_dir = Pathname.new(index_html_dir)
59
+ upload_dir = index_html_dir + spec.name
60
+ directory upload_dir.to_s
61
+ task :screenshot => ["doc:screenshot", upload_dir.to_s] do
62
+ cp_r(reference_screenshot_dir.to_s, upload_dir.to_s)
63
+ end
64
+ end
65
+ task :upload => "upload:screenshot"
66
+ end
67
+ end
68
+
51
69
  # vim: syntax=Ruby
@@ -1,5 +1,18 @@
1
1
  # News
2
2
 
3
+ ## 1.0.3 - 2014-08-03 {#version-1-0-3}
4
+
5
+ ### Improvements
6
+
7
+ * Supported OS X native notification system via
8
+ [terminal-notifier](https://github.com/alloy/terminal-notifier).
9
+ It requires OS X 10.8 or later.
10
+ [GitHub#4][Patch by cosmo0920]
11
+
12
+ ### Thanks
13
+
14
+ * cosmo0920
15
+
3
16
  ## 1.0.2 - 2014-07-13 {#version-1-0-2}
4
17
 
5
18
  ### Improvements
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2010-2013 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2010-2014 Kouhei Sutou <kou@clear-code.com>
2
2
  #
3
3
  # This library is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU Lesser General Public License as published by
@@ -181,6 +181,27 @@ module Test
181
181
  end
182
182
  end
183
183
 
184
+ # @private
185
+ class TerminalNotifier < NotifyCommand
186
+ include ERB::Util
187
+
188
+ def initialize
189
+ @command = "terminal-notifier"
190
+ end
191
+
192
+ def run(parameters)
193
+ title = parameters[:title]
194
+ message = parameters[:message]
195
+
196
+ command_line = [
197
+ @command,
198
+ "-title", title,
199
+ "-message", message,
200
+ ]
201
+ system(*command_line)
202
+ end
203
+ end
204
+
184
205
  class Notifier
185
206
  class << self
186
207
  # @return [Boolean] return `true` if test result notification
@@ -196,7 +217,12 @@ module Test
196
217
 
197
218
  # @private
198
219
  def commands
199
- [NotifySend.new, Growlnotify.new, GrowlnotifyForWindows.new]
220
+ [
221
+ NotifySend.new,
222
+ Growlnotify.new,
223
+ GrowlnotifyForWindows.new,
224
+ TerminalNotifier.new,
225
+ ]
200
226
  end
201
227
  end
202
228
 
@@ -3,7 +3,7 @@ module Test
3
3
  module Notify
4
4
  # test-unit-notify version number formatted as
5
5
  # "#\\{MAJOR}.#\\{MINOR}.#\\{MICRO}".
6
- VERSION = "1.0.2"
6
+ VERSION = "1.0.3"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-unit-notify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-13 00:00:00.000000000 Z
11
+ date: 2014-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit