beanstalkd_view 1.2.12 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5281430061bd31788ede7550710f9ac84ecd6b60
4
- data.tar.gz: 3e5ece7278263e6affcaa487dd14952ac6d061f4
3
+ metadata.gz: 2f7b8257b1b1d3eae86c69e325ff9f7c09a91aa2
4
+ data.tar.gz: 22aaa2ce1d663bd594e22e2a89b2e118dca66893
5
5
  SHA512:
6
- metadata.gz: ffb637cbbb7fd9ac0faf68b8551da612557c080b1790dce9ea5eb31a36aad352cf99c282c767b141b7721e249a2d20c79908af8a219aacce655bd01101fc9883
7
- data.tar.gz: a9e208e7118526ad748513ae3982630f226dc5eddbbeb0aac2438185c354b21c5bda2b6105283b6f7be0e578f0e5eebaa7dc1e4bc252ccf625b06f81193a5e49
6
+ metadata.gz: c4ef8838a25c10198e85badc7d505e95fc7d0acb22bb59c7eef19842f3dae9c9989243548d3dd37a557fee8efa32d54efffc405109a42059ee0becbf8c0795c4
7
+ data.tar.gz: d9a8565b26177a357a867553bda7785116d9fb93281720387a510ef0c455806323e3052ca9d290f413a6f1e55fdffe16699a28f93e840253cdb36c7d230106c2
@@ -1,3 +1,8 @@
1
+ 2.0.0
2
+ -----------
3
+
4
+ - Depend on beaneater 1.0.0 via @ryanjohns
5
+
1
6
  1.2.12
2
7
  -----------
3
8
 
data/README.md CHANGED
@@ -52,6 +52,12 @@ authenticate :admin_user do
52
52
  end
53
53
  ```
54
54
 
55
+ Breaking changes since 2.0.0!
56
+ ------------------------
57
+
58
+ As of version 2.0.0, beanstalkd_view no longer supports connection to multiple beanstalkd
59
+ servers due to a decision to drop connection pool support in the beaneater gem.
60
+
55
61
  Troubleshooting
56
62
  ------------------------
57
63
  1. CSS/JS assets not being served in Rails when running behind Apache or Nginx
@@ -130,10 +136,9 @@ from the command line after modifying any javascript or css files. The output f
130
136
 
131
137
  Running the tests
132
138
  ------------------------
133
- There are 3 variants of RSpec tests.
139
+ There are 2 variants of RSpec tests.
134
140
  * Without beanstalkd running, just execute: rspec spec
135
- * With 1 instance of beanstalkd running (default port), execute: rspec spec --tag requires_beanstalkd
136
- * With 2 instances of beanstalkd running (ports 11300 and 11400), execute: rspec spec --tag requires_two_beanstalkd
141
+ * With beanstalkd running (default port), execute: rspec spec --tag requires_beanstalkd
137
142
 
138
143
  Customization
139
144
  ------------------------
data/Rakefile CHANGED
@@ -19,7 +19,7 @@ namespace :beanstalkd_view do
19
19
  task :enqueue_test do
20
20
  host = "localhost"
21
21
  port = 11300
22
- beanstalk = Beaneater::Pool.new([ "#{host}:#{port}" ])
22
+ beanstalk = Beaneater.new("#{host}:#{port}")
23
23
 
24
24
  # Loop flooding the queues with jobs
25
25
  while true
@@ -37,7 +37,7 @@ namespace :beanstalkd_view do
37
37
  task :pull_test do
38
38
  host = "localhost"
39
39
  port = 11300
40
- beanstalk = Beaneater::Pool.new([ "#{host}:#{port}" ])
40
+ beanstalk = Beaneater.new("#{host}:#{port}")
41
41
 
42
42
  while true
43
43
  tube_name = TEST_QUEUES.sample
@@ -7,7 +7,7 @@ module BeanstalkdView
7
7
  class BadURL < RuntimeError; end
8
8
 
9
9
  def beanstalk
10
- @@beanstalk ||= Beaneater::Pool.new(beanstalk_addresses)
10
+ @@beanstalk ||= Beaneater.new(beanstalk_address)
11
11
  end
12
12
 
13
13
  def beanstalk_url
@@ -15,9 +15,9 @@ module BeanstalkdView
15
15
  ENV['BEANSTALK_URL'] || 'beanstalk://127.0.0.1/'
16
16
  end
17
17
 
18
- def beanstalk_addresses
18
+ def beanstalk_address
19
19
  uris = beanstalk_url.split(/[\s,]+/)
20
- uris.map {|uri| beanstalk_host_and_port(uri)}
20
+ beanstalk_host_and_port(uris.first)
21
21
  end
22
22
 
23
23
  def beanstalk_host_and_port(uri_string)
@@ -82,7 +82,7 @@ module BeanstalkdView
82
82
  (min+GUESS_PEEK_RANGE)-1
83
83
  end
84
84
 
85
- def close_connections
85
+ def close_connection
86
86
  begin
87
87
  beanstalk.close
88
88
  rescue Beaneater::NotConnected
@@ -16,7 +16,7 @@ module BeanstalkdView
16
16
 
17
17
  get "/" do
18
18
  begin
19
- @connections = beanstalk.connections
19
+ @connection = beanstalk.connection
20
20
  @tubes = beanstalk.tubes.all
21
21
  @tubes = @tubes.sort_by{|obj| obj.name }
22
22
  @stats = beanstalk.stats
@@ -27,7 +27,7 @@ module BeanstalkdView
27
27
  rescue Beaneater::NotFoundError => @error
28
28
  erb :error
29
29
  rescue Beaneater::NotConnected => @error
30
- close_connections
30
+ close_connection
31
31
  erb :error
32
32
  end
33
33
  end
@@ -48,29 +48,32 @@ module BeanstalkdView
48
48
  rescue Beaneater::NotFoundError => @error
49
49
  erb :error
50
50
  rescue Beaneater::NotConnected => @error
51
- close_connections
51
+ close_connection
52
52
  erb :error
53
53
  end
54
54
  end
55
55
 
56
- get "/tube/:tube" do
56
+ get "/tube/*" do
57
57
  begin
58
- @tube = beanstalk.tubes[params[:tube]]
58
+ @tube = beanstalk.tubes[params[:splat].first]
59
59
  @stats = @tube.stats
60
60
  erb :tube_stats
61
61
  rescue Beaneater::NotFoundError => @error
62
62
  erb :error
63
63
  rescue Beaneater::NotConnected => @error
64
- close_connections
64
+ close_connection
65
65
  erb :error
66
66
  end
67
67
  end
68
68
 
69
- get "/peek/:tube/:type" do
69
+ get "/peek/*" do
70
70
  content_type :json
71
+ parts = params[:splat].first.split('/')
72
+ tube = parts[0...-1].join('/')
73
+ type = parts.last
71
74
  begin
72
- tube = beanstalk.tubes[params[:tube]]
73
- response = tube.peek(params[:type])
75
+ tube = beanstalk.tubes[tube]
76
+ response = tube.peek(type)
74
77
  if response
75
78
  job_to_hash(response).to_json
76
79
  else
@@ -79,7 +82,7 @@ module BeanstalkdView
79
82
  rescue Beaneater::NotFoundError => @error
80
83
  { :error => @error.to_s }.to_json
81
84
  rescue Beaneater::NotConnected => @error
82
- close_connections
85
+ close_connection
83
86
  { :error => @error.to_s }.to_json
84
87
  end
85
88
  end
@@ -105,43 +108,38 @@ module BeanstalkdView
105
108
 
106
109
  @jobs = []
107
110
  for i in min..max
108
- begin
109
- jobs = beanstalk.jobs.find_all(i)
110
- jobs.each do |job|
111
- @jobs << job_to_hash(job)
112
- end
113
- rescue Beaneater::NotFoundError
114
- # Since we're looping over potentially non-existant jobs, ignore
115
- end
111
+ job = beanstalk.jobs.find(i)
112
+ @jobs << job_to_hash(job) if job
116
113
  end
117
114
  erb :peek_range
118
115
  rescue Beaneater::NotFoundError => @error
119
116
  erb :error
120
117
  rescue Beaneater::NotConnected => @error
121
- close_connections
118
+ close_connection
122
119
  erb :error
123
120
  end
124
121
  end
125
122
 
126
- get "/delete/:tube/:job_id" do
123
+ get "/delete/*" do
124
+ parts = params[:splat].first.split('/')
125
+ tube = parts[0...-1].join('/')
126
+ job_id = parts.last
127
127
  begin
128
128
  response = nil
129
- jobs = beanstalk.jobs.find_all(params[:job_id].to_i)
130
- raise Beaneater::NotFoundError.new("Job not found with specified id", 'find') if jobs.size == 0
131
- raise Beaneater::NotFoundError.new("Multiple jobs found with specified id", 'find') if jobs.size > 1
132
- job = jobs[0]
133
- response = job.delete if job
129
+ job = beanstalk.jobs.find(job_id.to_i)
130
+ raise Beaneater::NotFoundError.new("Job not found with specified id", 'find') if job.nil?
131
+ response = job.delete
134
132
  if response
135
- cookies[:beanstalkd_view_notice] = "Deleted Job #{params[:job_id]}"
136
- redirect url("/tube/#{escaped_tube_param}")
133
+ cookies[:beanstalkd_view_notice] = "Deleted Job #{job_id}"
134
+ redirect url("/tube/#{escaped_tube_param(tube)}")
137
135
  else
138
- cookies[:beanstalkd_view_notice] = "Error deleting Job #{params[:job_id]}"
139
- redirect url("/tube/#{escaped_tube_param}")
136
+ cookies[:beanstalkd_view_notice] = "Error deleting Job #{job_id}"
137
+ redirect url("/tube/#{escaped_tube_param(tube)}")
140
138
  end
141
139
  rescue Beaneater::NotFoundError => @error
142
140
  erb :error
143
141
  rescue Beaneater::NotConnected => @error
144
- close_connections
142
+ close_connection
145
143
  erb :error
146
144
  end
147
145
  end
@@ -160,7 +158,7 @@ module BeanstalkdView
160
158
  rescue Beaneater::NotFoundError => @error
161
159
  erb :error
162
160
  rescue Beaneater::NotConnected => @error
163
- close_connections
161
+ close_connection
164
162
  erb :error
165
163
  end
166
164
  end
@@ -181,7 +179,7 @@ module BeanstalkdView
181
179
  rescue Beaneater::NotFoundError => @error
182
180
  erb :error
183
181
  rescue Beaneater::NotConnected => @error
184
- close_connections
182
+ close_connection
185
183
  erb :error
186
184
  end
187
185
  end
@@ -201,7 +199,7 @@ module BeanstalkdView
201
199
  rescue Beaneater::NotFoundError => @error
202
200
  erb :error
203
201
  rescue Beaneater::NotConnected => @error
204
- close_connections
202
+ close_connection
205
203
  erb :error
206
204
  end
207
205
  end
@@ -213,8 +211,8 @@ module BeanstalkdView
213
211
 
214
212
  private
215
213
 
216
- def escaped_tube_param
217
- CGI::escape(params[:tube])
214
+ def escaped_tube_param(tube = nil)
215
+ CGI::escape(tube || params[:tube])
218
216
  end
219
217
 
220
218
  def path_prefix
@@ -1,3 +1,3 @@
1
1
  module BeanstalkdView
2
- VERSION = "1.2.12"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -5,15 +5,13 @@
5
5
  <table class="table">
6
6
  <thead>
7
7
  <tr>
8
- <th>Connections</th>
8
+ <th>Connection</th>
9
9
  </tr>
10
10
  </thead>
11
11
  <tbody>
12
- <% @connections.each do |connection| %>
13
- <tr>
14
- <td><%= connection.address %></td>
15
- </tr>
16
- <% end %>
12
+ <tr>
13
+ <td><%= @connection.address %></td>
14
+ </tr>
17
15
  </tbody>
18
16
  </table>
19
17
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beanstalkd_view",
3
- "version": "1.2.12",
3
+ "version": "2.0.0",
4
4
  "devDependencies": {
5
5
  "grunt": "~0.4.1",
6
6
  "grunt-contrib-jshint": "~0.3.0",
@@ -6,17 +6,17 @@ describe BeanstalkdView::BeanstalkdUtils do
6
6
  utils = Object.new.extend BeanstalkdView::BeanstalkdUtils
7
7
 
8
8
  ENV['BEANSTALK_URL'] = "beanstalk://localhost:12300"
9
- utils.beanstalk_addresses.should eq(["localhost:12300"])
9
+ utils.beanstalk_address.should eq("localhost:12300")
10
10
 
11
11
  ENV['BEANSTALK_URL'] = "beanstalk://localhost:12300/, beanstalk://localhost:12301/"
12
- utils.beanstalk_addresses.should eq(["localhost:12300","localhost:12301"])
12
+ utils.beanstalk_address.should eq("localhost:12300")
13
13
 
14
14
  ENV['BEANSTALK_URL'] = "beanstalk://localhost:12300 beanstalk://localhost:12301"
15
- utils.beanstalk_addresses.should eq(["localhost:12300","localhost:12301"])
15
+ utils.beanstalk_address.should eq("localhost:12300")
16
16
 
17
17
  expect {
18
- ENV['BEANSTALK_URL'] = "beanstalk://localhost:12300, http://localhost:12301"
19
- utils.beanstalk_addresses
18
+ ENV['BEANSTALK_URL'] = "http://localhost:12301"
19
+ utils.beanstalk_address
20
20
  }.should raise_error(BeanstalkdView::BeanstalkdUtils::BadURL)
21
21
  end
22
22
 
@@ -689,3 +689,224 @@ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-02-10 08:43:30 -0500
689
689
 
690
690
 
691
691
  Started GET "/beanstalkd/tube/default" for 127.0.0.1 at 2015-02-10 08:43:30 -0500
692
+
693
+
694
+ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-05-10 10:53:34 -0400
695
+
696
+
697
+ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-05-10 10:56:13 -0400
698
+
699
+
700
+ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-05-10 10:56:30 -0400
701
+
702
+
703
+ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-05-10 10:59:07 -0400
704
+
705
+
706
+ Started GET "/beanstalkd/tube/default" for 127.0.0.1 at 2015-05-10 10:59:08 -0400
707
+
708
+
709
+ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-05-10 10:59:11 -0400
710
+
711
+
712
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:11 -0400
713
+
714
+
715
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:11 -0400
716
+
717
+
718
+ Started GET "/favicon.ico" for 127.0.0.1 at 2015-05-10 10:59:11 -0400
719
+
720
+ ActionController::RoutingError (No route matches [GET] "/favicon.ico"):
721
+ actionpack (3.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
722
+ actionpack (3.2.6) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
723
+ railties (3.2.6) lib/rails/rack/logger.rb:26:in `call_app'
724
+ railties (3.2.6) lib/rails/rack/logger.rb:16:in `call'
725
+ actionpack (3.2.6) lib/action_dispatch/middleware/request_id.rb:22:in `call'
726
+ rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
727
+ rack (1.4.5) lib/rack/runtime.rb:17:in `call'
728
+ activesupport (3.2.6) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
729
+ rack (1.4.5) lib/rack/lock.rb:15:in `call'
730
+ actionpack (3.2.6) lib/action_dispatch/middleware/static.rb:62:in `call'
731
+ railties (3.2.6) lib/rails/engine.rb:479:in `call'
732
+ railties (3.2.6) lib/rails/application.rb:220:in `call'
733
+ rack (1.4.5) lib/rack/builder.rb:134:in `call'
734
+ rack (1.4.5) lib/rack/urlmap.rb:64:in `block in call'
735
+ rack (1.4.5) lib/rack/urlmap.rb:49:in `each'
736
+ rack (1.4.5) lib/rack/urlmap.rb:49:in `call'
737
+ capybara (2.0.2) lib/capybara/server.rb:19:in `call'
738
+ rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
739
+ /Users/denniskuczynski/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
740
+ /Users/denniskuczynski/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
741
+ /Users/denniskuczynski/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
742
+
743
+
744
+
745
+
746
+ Started GET "/favicon.ico" for 127.0.0.1 at 2015-05-10 10:59:11 -0400
747
+
748
+ ActionController::RoutingError (No route matches [GET] "/favicon.ico"):
749
+ actionpack (3.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
750
+ actionpack (3.2.6) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
751
+ railties (3.2.6) lib/rails/rack/logger.rb:26:in `call_app'
752
+ railties (3.2.6) lib/rails/rack/logger.rb:16:in `call'
753
+ actionpack (3.2.6) lib/action_dispatch/middleware/request_id.rb:22:in `call'
754
+ rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
755
+ rack (1.4.5) lib/rack/runtime.rb:17:in `call'
756
+ activesupport (3.2.6) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
757
+ rack (1.4.5) lib/rack/lock.rb:15:in `call'
758
+ actionpack (3.2.6) lib/action_dispatch/middleware/static.rb:62:in `call'
759
+ railties (3.2.6) lib/rails/engine.rb:479:in `call'
760
+ railties (3.2.6) lib/rails/application.rb:220:in `call'
761
+ rack (1.4.5) lib/rack/builder.rb:134:in `call'
762
+ rack (1.4.5) lib/rack/urlmap.rb:64:in `block in call'
763
+ rack (1.4.5) lib/rack/urlmap.rb:49:in `each'
764
+ rack (1.4.5) lib/rack/urlmap.rb:49:in `call'
765
+ capybara (2.0.2) lib/capybara/server.rb:19:in `call'
766
+ rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
767
+ /Users/denniskuczynski/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
768
+ /Users/denniskuczynski/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
769
+ /Users/denniskuczynski/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
770
+
771
+
772
+
773
+
774
+ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-05-10 10:59:14 -0400
775
+
776
+
777
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:15 -0400
778
+
779
+
780
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:15 -0400
781
+
782
+
783
+ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-05-10 10:59:17 -0400
784
+
785
+
786
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:17 -0400
787
+
788
+
789
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:17 -0400
790
+
791
+
792
+ Started GET "/beanstalkd/peek-range?min=0&max=0" for 127.0.0.1 at 2015-05-10 10:59:18 -0400
793
+
794
+
795
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:18 -0400
796
+
797
+
798
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:18 -0400
799
+
800
+
801
+ Started GET "/beanstalkd/tube/test.tube" for 127.0.0.1 at 2015-05-10 10:59:18 -0400
802
+
803
+
804
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:18 -0400
805
+
806
+
807
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:18 -0400
808
+
809
+
810
+ Started GET "/beanstalkd/tube/test.tube" for 127.0.0.1 at 2015-05-10 10:59:20 -0400
811
+
812
+
813
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:20 -0400
814
+
815
+
816
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:20 -0400
817
+
818
+
819
+ Started GET "/beanstalkd/tube/test.tube" for 127.0.0.1 at 2015-05-10 10:59:23 -0400
820
+
821
+
822
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:23 -0400
823
+
824
+
825
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:23 -0400
826
+
827
+
828
+ Started GET "/beanstalkd/tube/test.tube" for 127.0.0.1 at 2015-05-10 10:59:25 -0400
829
+
830
+
831
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:25 -0400
832
+
833
+
834
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:25 -0400
835
+
836
+
837
+ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-05-10 10:59:27 -0400
838
+
839
+
840
+ Started GET "/beanstalkd/tube/default" for 127.0.0.1 at 2015-05-10 10:59:27 -0400
841
+
842
+
843
+ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-05-10 10:59:27 -0400
844
+
845
+
846
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:27 -0400
847
+
848
+
849
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:27 -0400
850
+
851
+
852
+ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-05-10 10:59:31 -0400
853
+
854
+
855
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:31 -0400
856
+
857
+
858
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:31 -0400
859
+
860
+
861
+ Started GET "/beanstalkd/" for 127.0.0.1 at 2015-05-10 10:59:33 -0400
862
+
863
+
864
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:33 -0400
865
+
866
+
867
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:33 -0400
868
+
869
+
870
+ Started GET "/beanstalkd/peek-range?min=0&max=0" for 127.0.0.1 at 2015-05-10 10:59:34 -0400
871
+
872
+
873
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:34 -0400
874
+
875
+
876
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:34 -0400
877
+
878
+
879
+ Started GET "/beanstalkd/tube/test%2Ftube" for 127.0.0.1 at 2015-05-10 10:59:35 -0400
880
+
881
+
882
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:35 -0400
883
+
884
+
885
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:35 -0400
886
+
887
+
888
+ Started GET "/beanstalkd/tube/test%2Ftube" for 127.0.0.1 at 2015-05-10 10:59:37 -0400
889
+
890
+
891
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:37 -0400
892
+
893
+
894
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:37 -0400
895
+
896
+
897
+ Started GET "/beanstalkd/tube/test%2Ftube" for 127.0.0.1 at 2015-05-10 10:59:39 -0400
898
+
899
+
900
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:39 -0400
901
+
902
+
903
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:39 -0400
904
+
905
+
906
+ Started GET "/beanstalkd/tube/test%2Ftube" for 127.0.0.1 at 2015-05-10 10:59:41 -0400
907
+
908
+
909
+ Started GET "/beanstalkd/css/beanstalkd_view.min.css" for 127.0.0.1 at 2015-05-10 10:59:41 -0400
910
+
911
+
912
+ Started GET "/beanstalkd/js/beanstalkd_view.min.js" for 127.0.0.1 at 2015-05-10 10:59:41 -0400
@@ -17,17 +17,9 @@ end
17
17
 
18
18
  RSpec.configure do |config|
19
19
  config.treat_symbols_as_metadata_keys_with_true_values = true
20
- config.filter_run_excluding :requires_beanstalkd, :requires_two_beanstalkd
20
+ config.filter_run_excluding :requires_beanstalkd
21
21
 
22
- config.before(:each) do
23
- requires_two_beanstalkd = example.options[:requires_two_beanstalkd]
24
- if requires_two_beanstalkd
25
- ENV['BEANSTALK_URL'] = 'beanstalk://localhost:11300,beanstalk://localhost:11400'
26
- else
27
- ENV['BEANSTALK_URL'] = 'beanstalk://localhost:11300'
28
- end
29
- end
22
+ config.before(:each) do
23
+ ENV['BEANSTALK_URL'] = 'beanstalk://localhost:11300'
24
+ end
30
25
  end
31
-
32
-
33
-
@@ -10,7 +10,7 @@ shared_examples 'integration_test' do
10
10
 
11
11
  it "should should error at site root" do
12
12
  visit site_root
13
- page.should have_content "Could not connect"
13
+ page.should have_content "Connection to beanstalk 'localhost:11300' is closed!"
14
14
  end
15
15
  end
16
16
 
@@ -32,25 +32,4 @@ shared_examples 'integration_test' do
32
32
 
33
33
  end
34
34
 
35
- describe "with two beanstalkd daemons running", :requires_two_beanstalkd => true do
36
- before :all do
37
- # Make sure beanstalkd is running
38
- if `pgrep beanstalkd` == ""
39
- raise "PRECONDITION NOT MET: beanstalkd not running"
40
- end
41
- end
42
-
43
- it "should show the overview at: /", :requires_two_beanstalkd => true do
44
- visit site_root
45
- page.should have_content "Beanstalkd View"
46
- page.should have_content "Statistics"
47
- page.should have_content "Tubes"
48
- end
49
-
50
- it_behaves_like "queue_browser", :requires_two_beanstalkd => true do
51
- let(:tube_name) { 'test.two' }
52
- end
53
-
54
- end
55
-
56
35
  end
@@ -40,7 +40,7 @@ shared_examples 'queue_browser' do
40
40
  end
41
41
 
42
42
  it "should be able to pause a tube", :js => true do
43
- visit "#{site_root}/tube/#{CGI::escape(tube_name)}"
43
+ visit "#{site_root}tube/#{CGI::escape(tube_name)}"
44
44
  form = find('#pause_form')
45
45
  form.fill_in 'delay', :with => 1
46
46
  click_button "Pause"
@@ -62,7 +62,7 @@ shared_examples 'queue_browser' do
62
62
  end
63
63
 
64
64
  it "should be able to clear a tube", :js => true do
65
- visit "#{site_root}/tube/#{CGI::escape(tube_name)}"
65
+ visit "#{site_root}tube/#{CGI::escape(tube_name)}"
66
66
  form = find('#clear_form')
67
67
  form.select 'Buried', :from => 'state'
68
68
  click_button "Clear"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beanstalkd_view
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.12
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Kuczynski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2015-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.3.0
47
+ version: 1.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.3.0
54
+ version: 1.0.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: vegas
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -217,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
217
  version: '0'
218
218
  requirements: []
219
219
  rubyforge_project:
220
- rubygems_version: 2.4.3
220
+ rubygems_version: 2.4.6
221
221
  signing_key:
222
222
  specification_version: 4
223
223
  summary: A Sinatra app to view/manage beanstalkd queues that can be embedded in a