blinky 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +30 -0
- data/README.rdoc +22 -16
- data/Rakefile +4 -39
- data/blinky.gemspec +20 -66
- data/lib/blinky.rb +10 -10
- data/lib/blinky/light.rb +8 -8
- data/lib/blinky/light_factory.rb +3 -3
- data/lib/blinky/no_supported_devices_found.rb +2 -2
- data/lib/blinky/version.rb +3 -0
- data/lib/ci_server_plugins/test_server_plugin.rb +7 -7
- data/lib/device_recipes/delcom_engineering/visual_indicator_gen_one.rb +6 -6
- data/lib/device_recipes/delcom_engineering/visual_indicator_gen_two.rb +6 -6
- data/spec/acceptance_spec.rb +102 -102
- data/spec/blinky_spec.rb +14 -14
- data/spec/ci_server_plugins/test_server_plugin_spec.rb +29 -29
- data/spec/fixtures/ci_server_plugins/mock_ci_server.rb +3 -3
- data/spec/fixtures/device_recipes/aenima_engineering/model_462.rb +2 -2
- data/spec/fixtures/device_recipes/aenima_engineering/model_eulogy.rb +2 -2
- data/spec/fixtures/device_recipes/fragile_engineering/wretched.rb +4 -4
- data/spec/light_factory_spec.rb +46 -46
- data/spec/light_spec.rb +27 -27
- data/spec/spec_helper.rb +2 -3
- metadata +82 -70
- data/VERSION +0 -1
data/spec/light_spec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '/spec_helper')
|
2
2
|
|
3
3
|
module Blinky
|
4
|
-
|
4
|
+
|
5
5
|
module TestEngineering
|
6
6
|
module TestModel
|
7
7
|
def success!
|
@@ -9,44 +9,44 @@ module Blinky
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
module MockCiPlugin
|
14
14
|
def watch_mock_ci_server
|
15
15
|
notify_build_status
|
16
16
|
end
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
module AnotherMockCiPlugin
|
20
20
|
def watch_another_mock_ci_server
|
21
21
|
notify_a_different_build_status
|
22
22
|
end
|
23
23
|
end
|
24
|
-
|
25
|
-
|
24
|
+
|
25
|
+
|
26
26
|
describe "Light" do
|
27
|
-
|
27
|
+
|
28
28
|
describe "that has been constructed with a device, a device recipe, and some CI plugins" do
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
30
|
+
before(:each) do
|
31
|
+
@supported_device = double("supported device",:idVendor => 0x2000, :idProduct => 0x2222)
|
32
|
+
@light = Light.new(@supported_device, TestEngineering::TestModel, [MockCiPlugin, AnotherMockCiPlugin ] )
|
33
|
+
end
|
34
|
+
|
35
|
+
it "can call recipe methods on the device" do
|
36
|
+
@supported_device.should_receive(:indicate_success)
|
37
|
+
@light.success!
|
38
|
+
end
|
39
|
+
|
40
|
+
it "can receive call back methods defined in a plugins" do
|
41
|
+
@light.should_receive(:notify_build_status)
|
42
|
+
@light.watch_mock_ci_server
|
43
|
+
end
|
44
|
+
|
45
|
+
it "can receive call backs from a server via another plugin" do
|
46
|
+
@light.should_receive(:notify_a_different_build_status)
|
47
|
+
@light.watch_another_mock_ci_server
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
51
|
end
|
52
52
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,73 +1,84 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: blinky
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 3
|
10
|
-
version: 0.0.3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Perryn Fowler
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
name: ruby-usb
|
23
|
-
prerelease: false
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
12
|
+
date: 2012-12-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: libusb
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
- 2
|
33
|
-
- 1
|
34
|
-
version: 0.2.1
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.2.2
|
35
22
|
type: :runtime
|
36
|
-
|
37
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.2.2
|
30
|
+
- !ruby/object:Gem::Dependency
|
38
31
|
name: rspec
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 2.11.0
|
38
|
+
type: :development
|
39
39
|
prerelease: false
|
40
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.11.0
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 10.0.2
|
49
54
|
type: :development
|
50
|
-
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 10.0.2
|
51
62
|
description: plug and play support for USB build status indicators
|
52
|
-
email:
|
63
|
+
email:
|
64
|
+
- perryn.fowler@gmail.com
|
53
65
|
executables: []
|
54
|
-
|
55
66
|
extensions: []
|
56
|
-
|
57
|
-
|
58
|
-
- LICENSE
|
59
|
-
- README.rdoc
|
60
|
-
files:
|
67
|
+
extra_rdoc_files: []
|
68
|
+
files:
|
61
69
|
- .document
|
70
|
+
- .gitignore
|
71
|
+
- Gemfile
|
72
|
+
- Gemfile.lock
|
62
73
|
- LICENSE
|
63
74
|
- README.rdoc
|
64
75
|
- Rakefile
|
65
|
-
- VERSION
|
66
76
|
- blinky.gemspec
|
67
77
|
- lib/blinky.rb
|
68
78
|
- lib/blinky/light.rb
|
69
79
|
- lib/blinky/light_factory.rb
|
70
80
|
- lib/blinky/no_supported_devices_found.rb
|
81
|
+
- lib/blinky/version.rb
|
71
82
|
- lib/ci_server_plugins/test_server_plugin.rb
|
72
83
|
- lib/device_recipes/delcom_engineering/visual_indicator_gen_one.rb
|
73
84
|
- lib/device_recipes/delcom_engineering/visual_indicator_gen_two.rb
|
@@ -86,39 +97,40 @@ files:
|
|
86
97
|
- spec/light_factory_spec.rb
|
87
98
|
- spec/light_spec.rb
|
88
99
|
- spec/spec_helper.rb
|
89
|
-
has_rdoc: true
|
90
100
|
homepage: http://github.com/perryn/blinky
|
91
101
|
licenses: []
|
92
|
-
|
93
102
|
post_install_message:
|
94
103
|
rdoc_options: []
|
95
|
-
|
96
|
-
require_paths:
|
104
|
+
require_paths:
|
97
105
|
- lib
|
98
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
107
|
none: false
|
100
|
-
requirements:
|
101
|
-
- -
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
|
104
|
-
|
105
|
-
- 0
|
106
|
-
version: "0"
|
107
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ! '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
113
|
none: false
|
109
|
-
requirements:
|
110
|
-
- -
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
|
113
|
-
segments:
|
114
|
-
- 0
|
115
|
-
version: "0"
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
116
118
|
requirements: []
|
117
|
-
|
118
119
|
rubyforge_project:
|
119
|
-
rubygems_version: 1.
|
120
|
+
rubygems_version: 1.8.24
|
120
121
|
signing_key:
|
121
122
|
specification_version: 3
|
122
123
|
summary: helps you see the light
|
123
|
-
test_files:
|
124
|
-
|
124
|
+
test_files:
|
125
|
+
- spec/acceptance_spec.rb
|
126
|
+
- spec/blinky_spec.rb
|
127
|
+
- spec/ci_server_plugins/test_server_plugin_spec.rb
|
128
|
+
- spec/fixtures/ci_server_plugins/mock_ci_server.rb
|
129
|
+
- spec/fixtures/device_recipes/aenima_engineering/model_462.rb
|
130
|
+
- spec/fixtures/device_recipes/aenima_engineering/model_eulogy.rb
|
131
|
+
- spec/fixtures/device_recipes/fragile_engineering/wretched.rb
|
132
|
+
- spec/fixtures/plugins.rb
|
133
|
+
- spec/fixtures/recipes.rb
|
134
|
+
- spec/light_factory_spec.rb
|
135
|
+
- spec/light_spec.rb
|
136
|
+
- spec/spec_helper.rb
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.3
|