rspec_traffic_light_formater 0.1.0
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.
- data/Guardfile +6 -0
- data/Manifest +6 -0
- data/Rakefile +15 -0
- data/lib/traffic_light_formatter.rb +22 -0
- data/rspec_traffic_light_formater.gemspec +32 -0
- data/spec/demo_spec.rb +12 -0
- data/spec/spec_helper.rb +5 -0
- metadata +72 -0
data/Guardfile
ADDED
data/Manifest
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'echoe'
|
4
|
+
|
5
|
+
Echoe.new('rspec_traffic_light_formater', '0.1.0') do |p|
|
6
|
+
p.description = "Use a traffic light with an Arduino to show rspec status."
|
7
|
+
p.url = "https://github.com/nledez/rspec_traffic_light_formater"
|
8
|
+
p.author = "Nicolas Ledez"
|
9
|
+
p.email = "rubygems@ledez.net"
|
10
|
+
p.ignore_pattern = ["tmp/*", "script/*"]
|
11
|
+
p.development_dependencies = []
|
12
|
+
p.runtime_dependencies = [ "traffic_light" ]
|
13
|
+
end
|
14
|
+
|
15
|
+
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rspec/core/formatters/progress_formatter'
|
2
|
+
require 'net/http'
|
3
|
+
|
4
|
+
class TrafficLightFormatter < RSpec::Core::Formatters::ProgressFormatter
|
5
|
+
def initialize(output)
|
6
|
+
super
|
7
|
+
setColor "2"
|
8
|
+
end
|
9
|
+
|
10
|
+
def setColor(colors)
|
11
|
+
Net::HTTP.get(URI('http://localhost:4567/set-color/' + colors))
|
12
|
+
end
|
13
|
+
|
14
|
+
def dump_summary(duration, example_count, failure_count, pending_count)
|
15
|
+
unless failure_count > 0
|
16
|
+
setColor "1"
|
17
|
+
else
|
18
|
+
setColor "4"
|
19
|
+
end
|
20
|
+
super
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = "rspec_traffic_light_formater"
|
5
|
+
s.version = "0.1.0"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Nicolas Ledez"]
|
9
|
+
s.date = "2012-07-29"
|
10
|
+
s.description = "Use a traffic light with an Arduino to show rspec status."
|
11
|
+
s.email = "rubygems@ledez.net"
|
12
|
+
s.extra_rdoc_files = ["lib/traffic_light_formatter.rb"]
|
13
|
+
s.files = ["Guardfile", "Manifest", "Rakefile", "lib/traffic_light_formatter.rb", "spec/demo_spec.rb", "spec/spec_helper.rb", "rspec_traffic_light_formater.gemspec"]
|
14
|
+
s.homepage = "https://github.com/nledez/rspec_traffic_light_formater"
|
15
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rspec_traffic_light_formater"]
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
s.rubyforge_project = "rspec_traffic_light_formater"
|
18
|
+
s.rubygems_version = "1.8.23"
|
19
|
+
s.summary = "Use a traffic light with an Arduino to show rspec status."
|
20
|
+
|
21
|
+
if s.respond_to? :specification_version then
|
22
|
+
s.specification_version = 3
|
23
|
+
|
24
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
25
|
+
s.add_runtime_dependency(%q<traffic_light>, [">= 0"])
|
26
|
+
else
|
27
|
+
s.add_dependency(%q<traffic_light>, [">= 0"])
|
28
|
+
end
|
29
|
+
else
|
30
|
+
s.add_dependency(%q<traffic_light>, [">= 0"])
|
31
|
+
end
|
32
|
+
end
|
data/spec/demo_spec.rb
ADDED
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rspec_traffic_light_formater
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Nicolas Ledez
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-07-29 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: traffic_light
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
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: '0'
|
30
|
+
description: Use a traffic light with an Arduino to show rspec status.
|
31
|
+
email: rubygems@ledez.net
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files:
|
35
|
+
- lib/traffic_light_formatter.rb
|
36
|
+
files:
|
37
|
+
- Guardfile
|
38
|
+
- Manifest
|
39
|
+
- Rakefile
|
40
|
+
- lib/traffic_light_formatter.rb
|
41
|
+
- spec/demo_spec.rb
|
42
|
+
- spec/spec_helper.rb
|
43
|
+
- rspec_traffic_light_formater.gemspec
|
44
|
+
homepage: https://github.com/nledez/rspec_traffic_light_formater
|
45
|
+
licenses: []
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options:
|
48
|
+
- --line-numbers
|
49
|
+
- --inline-source
|
50
|
+
- --title
|
51
|
+
- Rspec_traffic_light_formater
|
52
|
+
require_paths:
|
53
|
+
- lib
|
54
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ! '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '1.2'
|
66
|
+
requirements: []
|
67
|
+
rubyforge_project: rspec_traffic_light_formater
|
68
|
+
rubygems_version: 1.8.23
|
69
|
+
signing_key:
|
70
|
+
specification_version: 3
|
71
|
+
summary: Use a traffic light with an Arduino to show rspec status.
|
72
|
+
test_files: []
|