starting_blocks-stopplicht 0.0.4 → 0.9.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.
- checksums.yaml +7 -0
- data/Rakefile +9 -0
- data/lib/stopplicht_alert.rb +2 -0
- data/spec/stopplicht_alert_spec.rb +77 -0
- data/starting_blocks-stopplicht.gemspec +2 -1
- metadata +28 -26
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 19f3694bee2e42cdbf3deecf83f483f44feda2e6
|
4
|
+
data.tar.gz: e4efc7eb70e885c584a1b7f8923d503587aab8c9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1849dac3d0e6fdf6fd656848d42d740463d977cc91a123a9b1a0466f0ecd48786c1c809dcd0f76425e25a2db928195ab63be274f726002137853b970b8677516
|
7
|
+
data.tar.gz: df1cb7af6ea620e02b1f997495e832580026cedc70ca3eeb26ce3a145c75130ee86bd794835b49882e6488980319d3a9e176926cd5258439bb276ed8fb796a0f
|
data/Rakefile
CHANGED
data/lib/stopplicht_alert.rb
CHANGED
@@ -6,11 +6,13 @@ module StartingBlocks
|
|
6
6
|
@spec_count = files.count
|
7
7
|
return if files.count == 0
|
8
8
|
display :yellow
|
9
|
+
rescue
|
9
10
|
end
|
10
11
|
|
11
12
|
def receive_results results
|
12
13
|
return if @spec_count.to_i == 0
|
13
14
|
display results[:color]
|
15
|
+
rescue
|
14
16
|
end
|
15
17
|
|
16
18
|
def display color
|
@@ -0,0 +1,77 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'minitest/spec'
|
3
|
+
require_relative '../lib/starting_blocks-stopplicht'
|
4
|
+
require 'mocha/setup'
|
5
|
+
|
6
|
+
describe 'stopplicht' do
|
7
|
+
|
8
|
+
describe "receiving files to run" do
|
9
|
+
|
10
|
+
it "should display yellow if given files" do
|
11
|
+
alert = StartingBlocks::Extensions::StopplichtAlert.new
|
12
|
+
|
13
|
+
alert.expects(:display).with :yellow
|
14
|
+
|
15
|
+
alert.receive_files_to_run ["another.txt"]
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should display nothing if given no files" do
|
19
|
+
alert = StartingBlocks::Extensions::StopplichtAlert.new
|
20
|
+
|
21
|
+
alert.expects(:display).never
|
22
|
+
|
23
|
+
alert.receive_files_to_run []
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should not throw an error if display throws" do
|
28
|
+
alert = StartingBlocks::Extensions::StopplichtAlert.new
|
29
|
+
|
30
|
+
alert.expects(:display).raises 'k'
|
31
|
+
|
32
|
+
alert.receive_files_to_run ["another.txt"]
|
33
|
+
|
34
|
+
# no error should have occurred
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "receiving test results" do
|
39
|
+
|
40
|
+
it "should display the results color" do
|
41
|
+
|
42
|
+
StartingBlocks::Extensions::StopplichtAlert
|
43
|
+
.any_instance.stubs(:display)
|
44
|
+
|
45
|
+
color = Object.new
|
46
|
+
alert = StartingBlocks::Extensions::StopplichtAlert.new
|
47
|
+
|
48
|
+
alert.receive_files_to_run ["test.txt"]
|
49
|
+
|
50
|
+
alert.expects(:display).with color
|
51
|
+
alert.receive_results( { color: color } )
|
52
|
+
end
|
53
|
+
|
54
|
+
it "should not display any results if no files were passed" do
|
55
|
+
alert = StartingBlocks::Extensions::StopplichtAlert.new
|
56
|
+
alert.receive_files_to_run []
|
57
|
+
alert.expects(:display).never
|
58
|
+
alert.receive_results( { color: Object.new } )
|
59
|
+
end
|
60
|
+
|
61
|
+
it "should eat any exception from display" do
|
62
|
+
|
63
|
+
StartingBlocks::Extensions::StopplichtAlert
|
64
|
+
.any_instance.stubs(:display)
|
65
|
+
|
66
|
+
color = Object.new
|
67
|
+
alert = StartingBlocks::Extensions::StopplichtAlert.new
|
68
|
+
|
69
|
+
alert.receive_files_to_run ["test.txt"]
|
70
|
+
|
71
|
+
alert.stubs(:display).raises 'k'
|
72
|
+
alert.receive_results( { color: color } )
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "starting_blocks-stopplicht"
|
7
|
-
spec.version = "0.0
|
7
|
+
spec.version = "0.9.0"
|
8
8
|
spec.authors = ["Darren Cauthon"]
|
9
9
|
spec.email = ["darren@cauthon.com"]
|
10
10
|
spec.description = %q{stopplicht support for starting_blocks}
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.add_development_dependency "bundler", "~> 1.3"
|
21
21
|
spec.add_development_dependency "rake"
|
22
|
+
spec.add_development_dependency "mocha"
|
22
23
|
|
23
24
|
spec.add_runtime_dependency "starting_blocks"
|
24
25
|
end
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: starting_blocks-stopplicht
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
5
|
-
prerelease:
|
4
|
+
version: 0.9.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Darren Cauthon
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-05-24 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,33 +27,43 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mocha
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
44
53
|
- !ruby/object:Gem::Version
|
45
54
|
version: '0'
|
46
55
|
- !ruby/object:Gem::Dependency
|
47
56
|
name: starting_blocks
|
48
57
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
58
|
requirements:
|
51
|
-
- -
|
59
|
+
- - '>='
|
52
60
|
- !ruby/object:Gem::Version
|
53
61
|
version: '0'
|
54
62
|
type: :runtime
|
55
63
|
prerelease: false
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
65
|
requirements:
|
59
|
-
- -
|
66
|
+
- - '>='
|
60
67
|
- !ruby/object:Gem::Version
|
61
68
|
version: '0'
|
62
69
|
description: stopplicht support for starting_blocks
|
@@ -73,36 +80,31 @@ files:
|
|
73
80
|
- Rakefile
|
74
81
|
- lib/starting_blocks-stopplicht.rb
|
75
82
|
- lib/stopplicht_alert.rb
|
83
|
+
- spec/stopplicht_alert_spec.rb
|
76
84
|
- starting_blocks-stopplicht.gemspec
|
77
85
|
homepage: ''
|
78
86
|
licenses:
|
79
87
|
- MIT
|
88
|
+
metadata: {}
|
80
89
|
post_install_message:
|
81
90
|
rdoc_options: []
|
82
91
|
require_paths:
|
83
92
|
- lib
|
84
93
|
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
-
none: false
|
86
94
|
requirements:
|
87
|
-
- -
|
95
|
+
- - '>='
|
88
96
|
- !ruby/object:Gem::Version
|
89
97
|
version: '0'
|
90
|
-
segments:
|
91
|
-
- 0
|
92
|
-
hash: -2857791411203491699
|
93
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
-
none: false
|
95
99
|
requirements:
|
96
|
-
- -
|
100
|
+
- - '>='
|
97
101
|
- !ruby/object:Gem::Version
|
98
102
|
version: '0'
|
99
|
-
segments:
|
100
|
-
- 0
|
101
|
-
hash: -2857791411203491699
|
102
103
|
requirements: []
|
103
104
|
rubyforge_project:
|
104
|
-
rubygems_version:
|
105
|
+
rubygems_version: 2.2.2
|
105
106
|
signing_key:
|
106
|
-
specification_version:
|
107
|
+
specification_version: 4
|
107
108
|
summary: stopplicht support for starting_blocks
|
108
|
-
test_files:
|
109
|
+
test_files:
|
110
|
+
- spec/stopplicht_alert_spec.rb
|