beanstalkd_view 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/lib/beanstalkd_view/server.rb +37 -19
- data/lib/beanstalkd_view/version.rb +1 -1
- data/lib/beanstalkd_view/views/tube_stats.erb +15 -3
- data/spec/rails_app/log/test.log +9895 -1696
- data/spec/support/integration_test_shared_examples.rb +19 -11
- metadata +3 -3
@@ -1,5 +1,5 @@
|
|
1
1
|
shared_examples 'integration_test' do
|
2
|
-
|
2
|
+
|
3
3
|
describe "without beanstalkd daemon running" do
|
4
4
|
before :all do
|
5
5
|
# Make sure beanstalkd is NOT running
|
@@ -13,7 +13,7 @@ shared_examples 'integration_test' do
|
|
13
13
|
page.should have_content "Could not connect"
|
14
14
|
end
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
describe "with beanstalkd daemon running", :requires_beanstalkd => true do
|
18
18
|
before :all do
|
19
19
|
# Make sure beanstalkd is running
|
@@ -28,13 +28,13 @@ shared_examples 'integration_test' do
|
|
28
28
|
body.should have_content "Statistics"
|
29
29
|
body.should have_content "Tubes"
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
it "should show the default tube stats at: tube/default" do
|
33
33
|
visit "#{site_root}tube/default"
|
34
34
|
body.should have_content "Beanstalkd View"
|
35
35
|
body.should have_content "Statistics"
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
38
|
it "show be able to add a job on the overview page", :js => true do
|
39
39
|
visit site_root
|
40
40
|
form = find('#add_job_form')
|
@@ -45,13 +45,13 @@ shared_examples 'integration_test' do
|
|
45
45
|
click_link "confirm_add_job_btn"
|
46
46
|
body.should have_content "Added job:"
|
47
47
|
end
|
48
|
-
|
48
|
+
|
49
49
|
it "show be able to click on the test.tube link (created by the last test)", :js => true do
|
50
50
|
visit site_root
|
51
51
|
click_link('test.tube')
|
52
52
|
body.should have_content "test.tube"
|
53
53
|
end
|
54
|
-
|
54
|
+
|
55
55
|
it "show be able to peek_range and see job (created by the last test)", :js => true do
|
56
56
|
visit site_root
|
57
57
|
form = find('#peek_range_form')
|
@@ -76,14 +76,22 @@ shared_examples 'integration_test' do
|
|
76
76
|
click_button "Kick"
|
77
77
|
body.should have_content "Kicked test.tube"
|
78
78
|
end
|
79
|
-
|
79
|
+
|
80
80
|
it "show be able to peek_ready a tube", :js => true do
|
81
81
|
visit "#{site_root}tube/test.tube"
|
82
82
|
click_link('peek_ready_btn')
|
83
83
|
body.should have_content "Job id:"
|
84
84
|
end
|
85
|
+
|
86
|
+
it "show be able to clear a tube", :js => true do
|
87
|
+
visit "#{site_root}/tube/test.tube"
|
88
|
+
form = find('#clear_form')
|
89
|
+
form.select 'Buried', :from => 'state'
|
90
|
+
click_button "Clear"
|
91
|
+
body.should have_content "Cleared all buried jobs from test.tube"
|
92
|
+
end
|
85
93
|
end
|
86
|
-
|
94
|
+
|
87
95
|
describe "with two beanstalkd daemons running", :requires_two_beanstalkd => true do
|
88
96
|
before :all do
|
89
97
|
# Make sure beanstalkd is running
|
@@ -91,14 +99,14 @@ shared_examples 'integration_test' do
|
|
91
99
|
raise "PRECONDITION NOT MET: beanstalkd not running"
|
92
100
|
end
|
93
101
|
end
|
94
|
-
|
102
|
+
|
95
103
|
it "should show the overview at: /" do
|
96
104
|
visit site_root
|
97
105
|
body.should have_content "Beanstalkd View"
|
98
106
|
body.should have_content "Statistics"
|
99
107
|
body.should have_content "Tubes"
|
100
108
|
end
|
101
|
-
|
109
|
+
|
102
110
|
it "show be able to add a job on the overview page, and view its stats", :js => true do
|
103
111
|
visit site_root
|
104
112
|
form = find('#add_job_form')
|
@@ -108,7 +116,7 @@ shared_examples 'integration_test' do
|
|
108
116
|
body.should have_content "Add new job?"
|
109
117
|
click_link "confirm_add_job_btn"
|
110
118
|
body.should have_content "Added job:"
|
111
|
-
|
119
|
+
|
112
120
|
visit site_root
|
113
121
|
click_link('test.tube')
|
114
122
|
body.should have_content "test.tube"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beanstalkd_view
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -243,7 +243,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
243
243
|
version: '0'
|
244
244
|
segments:
|
245
245
|
- 0
|
246
|
-
hash:
|
246
|
+
hash: -720595023102186338
|
247
247
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
248
248
|
none: false
|
249
249
|
requirements:
|
@@ -252,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
252
|
version: '0'
|
253
253
|
segments:
|
254
254
|
- 0
|
255
|
-
hash:
|
255
|
+
hash: -720595023102186338
|
256
256
|
requirements: []
|
257
257
|
rubyforge_project:
|
258
258
|
rubygems_version: 1.8.24
|