torquebox-backstage 0.1.2 → 0.2.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.
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +16 -16
- data/TODO +4 -5
- data/TORQUEBOX_VERSION +1 -1
- data/VERSION +1 -1
- data/backstage.rb +0 -1
- data/lib/destinations/models/destination.rb +3 -0
- data/lib/destinations/models/queue.rb +3 -0
- data/lib/helpers.rb +7 -0
- data/spec/api_spec.rb +16 -4
- metadata +4 -3
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -33,21 +33,21 @@ GEM
|
|
|
33
33
|
tilt (1.2.2)
|
|
34
34
|
tobias-sinatra-url-for (0.2.1)
|
|
35
35
|
sinatra (>= 0.9.1.1)
|
|
36
|
-
torquebox (1.0.0.
|
|
37
|
-
torquebox-base (= 1.0.0.
|
|
38
|
-
torquebox-messaging (= 1.0.0.
|
|
39
|
-
torquebox-naming (= 1.0.0.
|
|
40
|
-
torquebox-rake-support (= 1.0.0.
|
|
41
|
-
torquebox-vfs (= 1.0.0.
|
|
42
|
-
torquebox-web (= 1.0.0.
|
|
43
|
-
torquebox-base (1.0.0.
|
|
44
|
-
torquebox-messaging (1.0.0.
|
|
45
|
-
torquebox-base (= 1.0.0.
|
|
46
|
-
torquebox-naming (= 1.0.0.
|
|
47
|
-
torquebox-naming (1.0.0.
|
|
48
|
-
torquebox-rake-support (1.0.0.
|
|
49
|
-
torquebox-vfs (1.0.0.
|
|
50
|
-
torquebox-web (1.0.0.
|
|
36
|
+
torquebox (1.0.0.CR2)
|
|
37
|
+
torquebox-base (= 1.0.0.CR2)
|
|
38
|
+
torquebox-messaging (= 1.0.0.CR2)
|
|
39
|
+
torquebox-naming (= 1.0.0.CR2)
|
|
40
|
+
torquebox-rake-support (= 1.0.0.CR2)
|
|
41
|
+
torquebox-vfs (= 1.0.0.CR2)
|
|
42
|
+
torquebox-web (= 1.0.0.CR2)
|
|
43
|
+
torquebox-base (1.0.0.CR2-java)
|
|
44
|
+
torquebox-messaging (1.0.0.CR2-java)
|
|
45
|
+
torquebox-base (= 1.0.0.CR2)
|
|
46
|
+
torquebox-naming (= 1.0.0.CR2)
|
|
47
|
+
torquebox-naming (1.0.0.CR2-java)
|
|
48
|
+
torquebox-rake-support (1.0.0.CR2)
|
|
49
|
+
torquebox-vfs (1.0.0.CR2-java)
|
|
50
|
+
torquebox-web (1.0.0.CR2-java)
|
|
51
51
|
watchr (0.7)
|
|
52
52
|
|
|
53
53
|
PLATFORMS
|
|
@@ -65,5 +65,5 @@ DEPENDENCIES
|
|
|
65
65
|
sinatra (= 1.1.2)
|
|
66
66
|
thor
|
|
67
67
|
tobias-sinatra-url-for
|
|
68
|
-
torquebox (= 1.0.0.
|
|
68
|
+
torquebox (= 1.0.0.CR2)
|
|
69
69
|
watchr
|
data/TODO
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
TODO
|
|
2
2
|
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* store failure backtraces for jobs/tasks in TorqueBox, and display here
|
|
3
|
+
* link queues/topics to their apps (requires TB changes)
|
|
4
|
+
* see how backstage behaves in a cluster
|
|
5
|
+
* allow resending DLQ and ExpiryQueue messages (requires replacing the external (client) queuebrowser with one based off of the mbean listMessages)
|
|
6
|
+
* store failure backtraces for jobs/tasks in TorqueBox, and display here (requires TB changes)
|
|
8
7
|
* improve test coverage
|
|
9
8
|
* add stats collection, with memory usage and other bits? ruby runtime stats?
|
data/TORQUEBOX_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.0.
|
|
1
|
+
1.0.0.CR2
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.2.0
|
data/backstage.rb
CHANGED
data/lib/helpers.rb
CHANGED
|
@@ -105,6 +105,13 @@ module Backstage
|
|
|
105
105
|
response[key] = json_url_for( object_path( value ) )
|
|
106
106
|
end
|
|
107
107
|
end
|
|
108
|
+
|
|
109
|
+
if object.respond_to?( :subcollections )
|
|
110
|
+
object.subcollections.each do |collection|
|
|
111
|
+
response[collection] = json_url_for( collection_path( object, collection ) )
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
108
115
|
response
|
|
109
116
|
end
|
|
110
117
|
|
data/spec/api_spec.rb
CHANGED
|
@@ -41,7 +41,7 @@ module Backstage
|
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
end
|
|
45
45
|
|
|
46
46
|
describe 'with authentication enabled' do
|
|
47
47
|
before(:each) do
|
|
@@ -49,7 +49,7 @@ module Backstage
|
|
|
49
49
|
@authenticator = mock(:authenticator)
|
|
50
50
|
TorqueBox::Authentication.stub(:default).and_return(@authenticator)
|
|
51
51
|
end
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
it "api should work with authentication" do
|
|
54
54
|
@authenticator.should_receive(:authenticate).with('blah', 'pw').and_return(true)
|
|
55
55
|
authorize 'blah', 'pw'
|
|
@@ -73,14 +73,14 @@ module Backstage
|
|
|
73
73
|
ENV['REQUIRE_AUTHENTICATION'] = nil
|
|
74
74
|
end
|
|
75
75
|
end
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
%w{ app queue topic job message_processor service pool }.each do |resource|
|
|
78
78
|
klass = "backstage/#{resource}".constantize
|
|
79
79
|
describe resource do
|
|
80
80
|
it "should have hash attributes beyond :resource" do
|
|
81
81
|
klass.to_hash_attributes.size.should > 1
|
|
82
82
|
end
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
describe "/#{resource.pluralize}" do
|
|
85
85
|
before(:each) do
|
|
86
86
|
klass.stub(:all).and_return([resource_with_mock_mbean(klass)])
|
|
@@ -131,6 +131,18 @@ module Backstage
|
|
|
131
131
|
end
|
|
132
132
|
end
|
|
133
133
|
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
describe "/queue" do
|
|
137
|
+
before(:each) do
|
|
138
|
+
Queue.stub(:find).and_return(resource_with_mock_mbean(Queue))
|
|
139
|
+
get "/queue/somename", :format => 'json'
|
|
140
|
+
@response = JSON.parse(last_response.body, :symbolize_names => true)
|
|
141
|
+
end
|
|
134
142
|
|
|
143
|
+
it "should include a link to its messages" do
|
|
144
|
+
@response[:messages].should =~ %r{/queue/.*/messages.*format=json$}
|
|
145
|
+
end
|
|
135
146
|
end
|
|
147
|
+
|
|
136
148
|
end
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: torquebox-backstage
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.2.0
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Tobias Crawley
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-04-
|
|
13
|
+
date: 2011-04-26 00:00:00 -04:00
|
|
14
14
|
default_executable: backstage
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
@@ -75,7 +75,7 @@ dependencies:
|
|
|
75
75
|
requirements:
|
|
76
76
|
- - "="
|
|
77
77
|
- !ruby/object:Gem::Version
|
|
78
|
-
version: 1.0.0.
|
|
78
|
+
version: 1.0.0.CR2
|
|
79
79
|
requirement: *id006
|
|
80
80
|
prerelease: false
|
|
81
81
|
type: :runtime
|
|
@@ -188,6 +188,7 @@ extra_rdoc_files:
|
|
|
188
188
|
- README.md
|
|
189
189
|
- TODO
|
|
190
190
|
files:
|
|
191
|
+
- CHANGELOG.md
|
|
191
192
|
- Gemfile
|
|
192
193
|
- Gemfile.lock
|
|
193
194
|
- README.md
|