rspec-nc 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. data/LICENSE +22 -0
  2. data/README.md +4 -0
  3. data/Rakefile +2 -0
  4. data/lib/nc.rb +17 -0
  5. data/rspec-nc.gemspec +17 -0
  6. data/spec/nc_spec.rb +21 -0
  7. metadata +68 -0
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Odin Dutton
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.
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ RSpec Notification Center
2
+ -------------------------
3
+
4
+ Specify multiple formatters: `rspec spec/lib --format=doc --format=Nc`.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
data/lib/nc.rb ADDED
@@ -0,0 +1,17 @@
1
+ require 'rspec/core/formatters/base_text_formatter'
2
+ require 'terminal-notifier'
3
+
4
+ class Nc < RSpec::Core::Formatters::BaseTextFormatter
5
+ def dump_summary(duration, example_count, failure_count, pending_count)
6
+ say "Finished in #{duration} seconds", summary_line(example_count, failure_count, pending_count)
7
+ end
8
+
9
+ def dump_pending; end
10
+ def dump_failures; end
11
+
12
+ private
13
+
14
+ def say(title, body)
15
+ TerminalNotifier.notify body, :title => title
16
+ end
17
+ end
data/rspec-nc.gemspec ADDED
@@ -0,0 +1,17 @@
1
+ # -*- encoding: utf-8 -*-
2
+ Gem::Specification.new do |gem|
3
+ gem.name = 'rspec-nc'
4
+ gem.version = '0.0.1'
5
+ gem.authors = ['Odin Dutton']
6
+ gem.email = ['odindutton@gmail.com']
7
+ gem.description = 'https://github.com/twe4ked/rspec-nc'
8
+ gem.summary = "RSpec extension for Mountain Lion's Notification Center"
9
+ gem.homepage = 'https://github.com/twe4ked/rspec-nc'
10
+
11
+ gem.add_dependency 'terminal-notifier', '~> 1.4.2'
12
+
13
+ gem.files = `git ls-files`.split($\)
14
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
+ gem.test_files = gem.files.grep(%r{^(spec)/})
16
+ gem.require_paths = ['lib']
17
+ end
data/spec/nc_spec.rb ADDED
@@ -0,0 +1,21 @@
1
+ require 'nc'
2
+
3
+ RSpec.configure do |config|
4
+ config.color_enabled = true
5
+ config.formatter = 'doc'
6
+ config.formatter = 'Nc'
7
+ end
8
+
9
+ describe 'it works' do
10
+ it 'returns success' do
11
+ # success!
12
+ end
13
+
14
+ it 'returns pending' do
15
+ pending
16
+ end
17
+
18
+ it 'returns failure' do
19
+ raise 'the roof'
20
+ end
21
+ end
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec-nc
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Odin Dutton
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-08-17 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: terminal-notifier
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 1.4.2
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.4.2
30
+ description: https://github.com/twe4ked/rspec-nc
31
+ email:
32
+ - odindutton@gmail.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - LICENSE
38
+ - README.md
39
+ - Rakefile
40
+ - lib/nc.rb
41
+ - rspec-nc.gemspec
42
+ - spec/nc_spec.rb
43
+ homepage: https://github.com/twe4ked/rspec-nc
44
+ licenses: []
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ requirements: []
62
+ rubyforge_project:
63
+ rubygems_version: 1.8.23
64
+ signing_key:
65
+ specification_version: 3
66
+ summary: RSpec extension for Mountain Lion's Notification Center
67
+ test_files:
68
+ - spec/nc_spec.rb