rspec-notify 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 966c01b96c2638280a65f231c1d985c14adc63f9
4
+ data.tar.gz: ae4169b379e9e2b6d0dbf5cab579c1948414f608
5
+ SHA512:
6
+ metadata.gz: 6cd40873108cbd9816a0e1062d36f81e2931a3c8fde376f529bf393e5f2f2c12718bfa17978d8e46c53ac0905bc110e81da739d62c7992f1e64436e6e0d7e649
7
+ data.tar.gz: 34abb1a14009fcc5dee73f9f04f71fc1be99a193a5a03e1ab298b437e4e54860cdb5a7c64997223f8f7bf416ac1662fed882b6259e0c231ce6c5a50808c1415f
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ -r ./lib/rspec/notify.rb
3
+ --format RSpec::Notify
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in rspec-notify.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 yoshihara
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,34 @@
1
+ # Rspec::Notify
2
+
3
+ RSpec notification with Growl. (for OSX)
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'rspec-notify'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install rspec-notify
18
+
19
+ ## Usage
20
+
21
+ $ rspec --color -f RSpec::Notify your_spec.rb
22
+
23
+
24
+ ## Icons
25
+
26
+ The success/failure/pending are found in http://www.iconsdb.com/.
27
+
28
+ ## Contributing
29
+
30
+ 1. Fork it
31
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
32
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
33
+ 4. Push to the branch (`git push origin my-new-feature`)
34
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,22 @@
1
+ iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAADmElEQVRoge2Z
2
+ P27bShCHvyEsIseQb7JI8ZIgCIwUr/EZFPgCVCVeQIguEKQOgrSuWL3CFwiQ
3
+ RmzTGa8K5MDzCu6KlML9RzlAHqCfIHMgicOZ3W93Z9dw1llnnfW/0tbMitaU
4
+ v8V3a8oi956sG7ZmdiHIR4XV1sxynxXxXS6AL1szy2qdi/QHzC4E+aBwLSgg
5
+ AMu8MMfVmnKhsFa0EORTa8q/583uR8q9kvKj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avFP/nym1aLpX2o
66
+ 67o31trIuexXiwaoGG1JOeOcQet5yG+10fUerTXTOJFLZbNeM4URrYWcCzSQ
67
+ fX84bxmHeVd0crL7t9rK7b/7jsefOs23q95OP/jwGzfGdJ/Vmrdaa5nCvON3
68
+ zu13O4pS55qeQkCURmR+5pwjxkgIaT+lTXvWUZSSsc5w6dIxy0XHdjc8ZrS8
69
+ 87ff/k+nOg8vYDv9m3c8evz0pafeQePjpdQ66xwhxUTJFVTFGkNMES2CCGgj
70
+ V7bSpWS63pFTodZKzoUQJrTMcuXwYMN2N37qzJkzt1+t8/AiP3D8+T/celtr
71
+ PKC1vK7R5k2DCMvlLLd3u928lcvzHGyModZGbRnvPLthvPJ8lhDtiRzbPT/1
72
+ 09d+6W0XvviCfHnRn5g+/IlrzKtf/TN39b27N6dy02q9gAYhxv2gPvN53/dM
73
+ U8A5g9Fz6TnnmPeiPAHt/pzrg3fd8tXnpMofC4Af2X1/egMXLrzmzUp4b9/1
74
+ d5SSb0o5iyiNd45Ll4/o+26/xPJ1msbvNNrDxsjnr7/u2kfe8trPvahvYy8Z
75
+ gP9un/nH27HWbWprN8YYz08hrLQWGbZp2y/0xcPDg28/8R9PPv2hdz9TVb5s
76
+ L9vL9uLsvwDCIyLctnDqbQAAAABJRU5ErkJggg==
Binary file
@@ -0,0 +1,40 @@
1
+ require 'ruby-growl'
2
+ require 'rspec/core/formatters/progress_formatter'
3
+
4
+ module RSpec
5
+ class Notify < RSpec::Core::Formatters::ProgressFormatter
6
+ def initalize
7
+ @summary = ""
8
+ end
9
+
10
+ def colorise_summary(summary)
11
+ super
12
+ @summary = summary
13
+ end
14
+
15
+ def dump_summary(duration, example_count, failure_count, pending_count)
16
+ super
17
+ success_count = example_count - failure_count
18
+ icon = read_icon(success_count, failure_count, pending_count)
19
+
20
+ title = "#{(success_count / example_count.to_f * 100).round(2)}% passed"
21
+ g = Growl.new "localhost", "rspec-growl"
22
+ g.add_notification("notification", "rspec Notification", icon)
23
+ g.notify "notification", title, @summary
24
+ end
25
+
26
+ private
27
+
28
+ def read_icon(success, failure, pending)
29
+ icon_path = File.join(File.dirname(__FILE__), "..", "..", "icons")
30
+ if failure > 0
31
+ icon_name = "failure"
32
+ elsif pending > 0
33
+ icon_name = "pending"
34
+ else
35
+ icon_name = "success"
36
+ end
37
+ File.read(File.join(icon_path, "#{icon_name}.icon")).unpack("m").first
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,5 @@
1
+ module Rspec
2
+ module Notify
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,10 @@
1
+ base_dir = File.dirname(__FILE__)
2
+ icons_dir = File.join(base_dir, "..", "icons")
3
+ icons = Dir.glob(File.join(icons_dir, "*.png"))
4
+
5
+ icons.each do |icon|
6
+ icon_file = File.read(icon)
7
+ File.open(File.join(icons_dir, "#{File.basename(icon, '.png')}.icon"), "w") do |f|
8
+ f.puts [icon_file].pack("m")
9
+ end
10
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rspec/notify/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "rspec-notify"
8
+ spec.version = Rspec::Notify::VERSION
9
+ spec.authors = ["yoshihara"]
10
+ spec.email = ["h.yoshihara@everyleaf.com"]
11
+ spec.description = "Notification for Rspec with Growl."
12
+ spec.summary = "Notification for Rspec with Growl."
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep("spec")
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_runtime_dependency("ruby-growl")
22
+ spec.add_runtime_dependency("rspec")
23
+ spec.add_development_dependency("bundler", "~> 1.3")
24
+ spec.add_development_dependency("rake")
25
+ end
@@ -0,0 +1,14 @@
1
+ require "rspec"
2
+
3
+ class RSpecNotifySample
4
+ end
5
+
6
+ describe RSpecNotifySample do
7
+ it "success" do
8
+ expect("aaabb").to eq("a" * 3 + "b" * 2)
9
+ end
10
+
11
+ it "failure" do
12
+ expect("aaabb").to eq("a" * 3 + "b")
13
+ end
14
+ end
@@ -0,0 +1,16 @@
1
+ require "rspec"
2
+
3
+ class RSpecNotifySample
4
+ end
5
+
6
+ describe RSpecNotifySample do
7
+ it "success" do
8
+ expect("aaabb").to eq("a" * 3 + "b" * 2)
9
+ end
10
+
11
+ it "pending" do
12
+ pending
13
+ expect("aaabb").to eq("a" * 3 + "bb")
14
+ end
15
+ end
16
+
@@ -0,0 +1,10 @@
1
+ require "rspec"
2
+
3
+ class RSpecNotifySample
4
+ end
5
+
6
+ describe RSpecNotifySample do
7
+ it "success" do
8
+ expect("aaabb").to eq("a" * 3 + "b" * 2)
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,120 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec-notify
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - yoshihara
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ruby-growl
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Notification for Rspec with Growl.
70
+ email:
71
+ - h.yoshihara@everyleaf.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .gitignore
77
+ - .rspec
78
+ - Gemfile
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - icons/failure.icon
83
+ - icons/failure.png
84
+ - icons/pending.icon
85
+ - icons/pending.png
86
+ - icons/success.icon
87
+ - icons/success.png
88
+ - lib/rspec/notify.rb
89
+ - lib/rspec/notify/version.rb
90
+ - misc/pack_icons.rb
91
+ - rspec-notify.gemspec
92
+ - samples/failure_spec.rb
93
+ - samples/pending_spec.rb
94
+ - samples/success_spec.rb
95
+ homepage: ''
96
+ licenses:
97
+ - MIT
98
+ metadata: {}
99
+ post_install_message:
100
+ rdoc_options: []
101
+ require_paths:
102
+ - lib
103
+ required_ruby_version: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - '>='
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ required_rubygems_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - '>='
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ requirements: []
114
+ rubyforge_project:
115
+ rubygems_version: 2.0.3
116
+ signing_key:
117
+ specification_version: 4
118
+ summary: Notification for Rspec with Growl.
119
+ test_files: []
120
+ has_rdoc: