cukeq 0.0.1.dev

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/.autotest +1 -0
  2. data/.document +5 -0
  3. data/.gitignore +21 -0
  4. data/LICENSE +20 -0
  5. data/README.rdoc +73 -0
  6. data/Rakefile +68 -0
  7. data/VERSION +1 -0
  8. data/bin/cukeq +34 -0
  9. data/features/cukeq.feature +15 -0
  10. data/features/example1.feature +1 -0
  11. data/features/example2.feature +1 -0
  12. data/features/step_definitions/cukeq_steps.rb +22 -0
  13. data/features/support/cukeq_helper.rb +73 -0
  14. data/features/support/env.rb +13 -0
  15. data/features/support/report_app.rb +36 -0
  16. data/lib/cukeq.rb +45 -0
  17. data/lib/cukeq/broker.rb +65 -0
  18. data/lib/cukeq/em/system3.rb +53 -0
  19. data/lib/cukeq/job_clearer.rb +19 -0
  20. data/lib/cukeq/master.rb +146 -0
  21. data/lib/cukeq/reporter.rb +22 -0
  22. data/lib/cukeq/runner.rb +63 -0
  23. data/lib/cukeq/scenario_exploder.rb +32 -0
  24. data/lib/cukeq/scenario_runner.rb +134 -0
  25. data/lib/cukeq/scm.rb +51 -0
  26. data/lib/cukeq/scm/git_bridge.rb +36 -0
  27. data/lib/cukeq/scm/shell_svn_bridge.rb +65 -0
  28. data/lib/cukeq/scm/svn_bridge.rb +77 -0
  29. data/lib/cukeq/slave.rb +114 -0
  30. data/lib/cukeq/webapp.rb +38 -0
  31. data/spec/cukeq/broker_spec.rb +78 -0
  32. data/spec/cukeq/cukeq_spec.rb +10 -0
  33. data/spec/cukeq/master_spec.rb +153 -0
  34. data/spec/cukeq/reporter_spec.rb +29 -0
  35. data/spec/cukeq/runner_spec.rb +11 -0
  36. data/spec/cukeq/scenario_exploder_spec.rb +17 -0
  37. data/spec/cukeq/scenario_runner_spec.rb +32 -0
  38. data/spec/cukeq/scm/git_bridge_spec.rb +52 -0
  39. data/spec/cukeq/scm/svn_bridge_spec.rb +5 -0
  40. data/spec/cukeq/scm_spec.rb +48 -0
  41. data/spec/cukeq/slave_spec.rb +86 -0
  42. data/spec/cukeq/webapp_spec.rb +37 -0
  43. data/spec/spec.opts +1 -0
  44. data/spec/spec_helper.rb +12 -0
  45. metadata +228 -0
@@ -0,0 +1,37 @@
1
+ require File.expand_path("../../spec_helper", __FILE__)
2
+
3
+ describe CukeQ::WebApp do
4
+ include Rack::Test::Methods
5
+
6
+ def app
7
+ @app ||= CukeQ::WebApp.new(URI.parse("http://localhost:9292"))
8
+ end
9
+
10
+ it "errors if the request is not a POST" do
11
+ get "/"
12
+
13
+ last_response.should_not be_ok
14
+ last_response.headers['Allow'].should == 'POST'
15
+ end
16
+
17
+ it "errors if the POST body is not valid JSON" do
18
+ post "/", 'not json'
19
+
20
+ last_response.should_not be_ok
21
+ last_response.headers['Content-Type'].should == 'application/json'
22
+ end
23
+
24
+ it "accepts valid JSON" do
25
+ post "/", '{"some":"data"}'
26
+
27
+ last_response.status.should == 202
28
+ last_response.body.should == "ok"
29
+ end
30
+
31
+ it "starts the app with the given callback" do
32
+ app.handler.should_receive(:run).with(app, {:Host => 'localhost', :Port => 9292})
33
+ app.run("callback")
34
+ app.instance_variable_get("@callback").should == "callback"
35
+ end
36
+
37
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1 @@
1
+ --color
@@ -0,0 +1,12 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
4
+ require 'rubygems'
5
+
6
+ require 'cukeq'
7
+ require 'rspec'
8
+ require "rack/test"
9
+
10
+ RSpec.configure do |config|
11
+
12
+ end
metadata ADDED
@@ -0,0 +1,228 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cukeq
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: true
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ - dev
10
+ version: 0.0.1.dev
11
+ platform: ruby
12
+ authors:
13
+ - Jari Bakken
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-11-29 00:00:00 +01:00
19
+ default_executable: cukeq
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: amqp
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: thin
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ segments:
43
+ - 0
44
+ version: "0"
45
+ type: :runtime
46
+ version_requirements: *id002
47
+ - !ruby/object:Gem::Dependency
48
+ name: json
49
+ prerelease: false
50
+ requirement: &id003 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
57
+ version: "0"
58
+ type: :runtime
59
+ version_requirements: *id003
60
+ - !ruby/object:Gem::Dependency
61
+ name: git
62
+ prerelease: false
63
+ requirement: &id004 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ segments:
69
+ - 0
70
+ version: "0"
71
+ type: :runtime
72
+ version_requirements: *id004
73
+ - !ruby/object:Gem::Dependency
74
+ name: rspec
75
+ prerelease: false
76
+ requirement: &id005 !ruby/object:Gem::Requirement
77
+ none: false
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ segments:
82
+ - 2
83
+ - 0
84
+ - 0
85
+ version: 2.0.0
86
+ type: :development
87
+ version_requirements: *id005
88
+ - !ruby/object:Gem::Dependency
89
+ name: yard
90
+ prerelease: false
91
+ requirement: &id006 !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ segments:
97
+ - 0
98
+ version: "0"
99
+ type: :development
100
+ version_requirements: *id006
101
+ - !ruby/object:Gem::Dependency
102
+ name: cucumber
103
+ prerelease: false
104
+ requirement: &id007 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ segments:
110
+ - 0
111
+ version: "0"
112
+ type: :development
113
+ version_requirements: *id007
114
+ - !ruby/object:Gem::Dependency
115
+ name: rack-test
116
+ prerelease: false
117
+ requirement: &id008 !ruby/object:Gem::Requirement
118
+ none: false
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ segments:
123
+ - 0
124
+ version: "0"
125
+ type: :development
126
+ version_requirements: *id008
127
+ description: Cucumber features distributed using AMQP.
128
+ email: jari.bakken@gmail.com
129
+ executables:
130
+ - cukeq
131
+ extensions: []
132
+
133
+ extra_rdoc_files:
134
+ - LICENSE
135
+ - README.rdoc
136
+ files:
137
+ - .autotest
138
+ - .document
139
+ - .gitignore
140
+ - LICENSE
141
+ - README.rdoc
142
+ - Rakefile
143
+ - VERSION
144
+ - bin/cukeq
145
+ - features/cukeq.feature
146
+ - features/example1.feature
147
+ - features/example2.feature
148
+ - features/step_definitions/cukeq_steps.rb
149
+ - features/support/cukeq_helper.rb
150
+ - features/support/env.rb
151
+ - features/support/report_app.rb
152
+ - lib/cukeq.rb
153
+ - lib/cukeq/broker.rb
154
+ - lib/cukeq/em/system3.rb
155
+ - lib/cukeq/job_clearer.rb
156
+ - lib/cukeq/master.rb
157
+ - lib/cukeq/reporter.rb
158
+ - lib/cukeq/runner.rb
159
+ - lib/cukeq/scenario_exploder.rb
160
+ - lib/cukeq/scenario_runner.rb
161
+ - lib/cukeq/scm.rb
162
+ - lib/cukeq/scm/git_bridge.rb
163
+ - lib/cukeq/scm/shell_svn_bridge.rb
164
+ - lib/cukeq/scm/svn_bridge.rb
165
+ - lib/cukeq/slave.rb
166
+ - lib/cukeq/webapp.rb
167
+ - spec/cukeq/broker_spec.rb
168
+ - spec/cukeq/cukeq_spec.rb
169
+ - spec/cukeq/master_spec.rb
170
+ - spec/cukeq/reporter_spec.rb
171
+ - spec/cukeq/runner_spec.rb
172
+ - spec/cukeq/scenario_exploder_spec.rb
173
+ - spec/cukeq/scenario_runner_spec.rb
174
+ - spec/cukeq/scm/git_bridge_spec.rb
175
+ - spec/cukeq/scm/svn_bridge_spec.rb
176
+ - spec/cukeq/scm_spec.rb
177
+ - spec/cukeq/slave_spec.rb
178
+ - spec/cukeq/webapp_spec.rb
179
+ - spec/spec.opts
180
+ - spec/spec_helper.rb
181
+ has_rdoc: true
182
+ homepage: http://github.com/jarib/cukeq
183
+ licenses: []
184
+
185
+ post_install_message:
186
+ rdoc_options:
187
+ - --charset=UTF-8
188
+ require_paths:
189
+ - lib
190
+ required_ruby_version: !ruby/object:Gem::Requirement
191
+ none: false
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ segments:
196
+ - 0
197
+ version: "0"
198
+ required_rubygems_version: !ruby/object:Gem::Requirement
199
+ none: false
200
+ requirements:
201
+ - - ">"
202
+ - !ruby/object:Gem::Version
203
+ segments:
204
+ - 1
205
+ - 3
206
+ - 1
207
+ version: 1.3.1
208
+ requirements: []
209
+
210
+ rubyforge_project:
211
+ rubygems_version: 1.3.7
212
+ signing_key:
213
+ specification_version: 3
214
+ summary: Distributed cucumbers
215
+ test_files:
216
+ - spec/cukeq/broker_spec.rb
217
+ - spec/cukeq/cukeq_spec.rb
218
+ - spec/cukeq/master_spec.rb
219
+ - spec/cukeq/reporter_spec.rb
220
+ - spec/cukeq/runner_spec.rb
221
+ - spec/cukeq/scenario_exploder_spec.rb
222
+ - spec/cukeq/scenario_runner_spec.rb
223
+ - spec/cukeq/scm/git_bridge_spec.rb
224
+ - spec/cukeq/scm/svn_bridge_spec.rb
225
+ - spec/cukeq/scm_spec.rb
226
+ - spec/cukeq/slave_spec.rb
227
+ - spec/cukeq/webapp_spec.rb
228
+ - spec/spec_helper.rb