vidibus-service 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.md +38 -0
- data/Rakefile +10 -20
- data/config/routes.rb +1 -1
- data/lib/vidibus-service.rb +1 -3
- data/lib/vidibus/service.rb +5 -10
- data/lib/vidibus/service/connector_app.rb +2 -1
- data/lib/vidibus/service/errors.rb +5 -0
- data/lib/vidibus/service/version.rb +5 -0
- metadata +92 -80
- data/.bundle/config +0 -2
- data/.document +0 -5
- data/.rspec +0 -2
- data/Gemfile +0 -18
- data/README.rdoc +0 -30
- data/VERSION +0 -1
- data/spec/spec_helper.rb +0 -31
- data/spec/vidibus/service/client_spec.rb +0 -73
- data/spec/vidibus/service/connector_app_spec.rb +0 -320
- data/spec/vidibus/service/controller_validations_spec.rb +0 -5
- data/spec/vidibus/service/mongoid_spec.rb +0 -226
- data/spec/vidibus/service_spec.rb +0 -14
- data/vidibus-service.gemspec +0 -106
data/LICENSE
CHANGED
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# Vidibus::Service [![](http://travis-ci.org/vidibus/vidibus-service.png)](http://travis-ci.org/vidibus/vidibus-service) [![](http://stillmaintained.com/vidibus/vidibus-service.png)](http://stillmaintained.com/vidibus/vidibus-service)
|
2
|
+
|
3
|
+
DESCRIBE
|
4
|
+
|
5
|
+
This gem is part of [Vidibus](http://vidibus.org), an open source toolset for building distributed (video) applications.
|
6
|
+
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add `gem "vidibus-service"` to your Gemfile. Then call `bundle install` on your console.
|
11
|
+
|
12
|
+
|
13
|
+
## Requirements
|
14
|
+
|
15
|
+
In order to work properly this gem needs the route /connector to call a Rack app. Usually this
|
16
|
+
route gets provided automatically but that may fail if your application has some sort of catch-all
|
17
|
+
route. To check if the route works as expected, just call http://yourapp.com/connector and expect
|
18
|
+
an error message like this:
|
19
|
+
|
20
|
+
```
|
21
|
+
This service has not been configured yet. Use your Connector to set it up.
|
22
|
+
```
|
23
|
+
|
24
|
+
If you don't see this error message, add the route manually at the top of your routes.rb:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
match "/connector" => Vidibus::Service::ConnectorApp
|
28
|
+
```
|
29
|
+
|
30
|
+
|
31
|
+
## Usage
|
32
|
+
|
33
|
+
DESCRIBE
|
34
|
+
|
35
|
+
|
36
|
+
## Copyright
|
37
|
+
|
38
|
+
© 2010-2011 Andre Pankratz. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -1,35 +1,25 @@
|
|
1
|
-
require "
|
2
|
-
require "
|
3
|
-
require "rake/rdoctask"
|
1
|
+
require "bundler"
|
2
|
+
require "rdoc/task"
|
4
3
|
require "rspec"
|
5
4
|
require "rspec/core/rake_task"
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
gem.summary = %Q{Provides tools for Vidibus services}
|
12
|
-
gem.description = %Q{Description...}
|
13
|
-
gem.email = "andre@vidibus.com"
|
14
|
-
gem.homepage = "http://github.com/vidibus/vidibus-service"
|
15
|
-
gem.authors = ["Andre Pankratz"]
|
16
|
-
end
|
17
|
-
Jeweler::GemcutterTasks.new
|
18
|
-
rescue LoadError
|
19
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
20
|
-
end
|
6
|
+
Bundler::GemHelper.install_tasks
|
7
|
+
|
8
|
+
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
9
|
+
require "vidibus/service/version"
|
21
10
|
|
22
|
-
|
11
|
+
RSpec::Core::RakeTask.new(:rcov) do |t|
|
23
12
|
t.pattern = "spec/**/*_spec.rb"
|
24
13
|
t.rcov = true
|
25
14
|
t.rcov_opts = ["--exclude", "^spec,/gems/"]
|
26
15
|
end
|
27
16
|
|
28
17
|
Rake::RDocTask.new do |rdoc|
|
29
|
-
version = File.exist?("VERSION") ? File.read("VERSION") : ""
|
30
18
|
rdoc.rdoc_dir = "rdoc"
|
31
|
-
rdoc.title = "vidibus-
|
19
|
+
rdoc.title = "vidibus-sysinfo #{Vidibus::Service::VERSION}"
|
32
20
|
rdoc.rdoc_files.include("README*")
|
33
21
|
rdoc.rdoc_files.include("lib/**/*.rb")
|
34
22
|
rdoc.options << "--charset=utf-8"
|
35
23
|
end
|
24
|
+
|
25
|
+
task :default => :rcov
|
data/config/routes.rb
CHANGED
data/lib/vidibus-service.rb
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
# require "rails"
|
2
1
|
require "vidibus-secure"
|
3
2
|
require "vidibus-validate_uri"
|
4
3
|
require "vidibus-uuid"
|
5
4
|
require "vidibus-core_extensions"
|
6
5
|
|
7
|
-
|
8
|
-
require "service"
|
6
|
+
require "vidibus/service"
|
9
7
|
|
10
8
|
if defined?(Rails)
|
11
9
|
module Vidibus::Service
|
data/lib/vidibus/service.rb
CHANGED
@@ -1,13 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
require "service/client"
|
8
|
-
require "service/mongoid"
|
9
|
-
require "service/connector_app"
|
10
|
-
require "service/controller_validations"
|
1
|
+
require "vidibus/service/errors"
|
2
|
+
require "vidibus/service/client"
|
3
|
+
require "vidibus/service/mongoid"
|
4
|
+
require "vidibus/service/connector_app"
|
5
|
+
require "vidibus/service/controller_validations"
|
11
6
|
|
12
7
|
# Shorthand for Service.discover
|
13
8
|
def Service(wanted, realm)
|
@@ -161,7 +161,8 @@ module Vidibus
|
|
161
161
|
|
162
162
|
this = service.new(data)
|
163
163
|
this.valid?
|
164
|
-
|
164
|
+
errors = this.errors.respond_to?(:messages) ? this.errors.messages : this.errors # Support Rails < 3.0.9
|
165
|
+
raise ValidationError unless errors.except(:secret).empty?
|
165
166
|
|
166
167
|
set_secret!(this)
|
167
168
|
this.save or raise ValidationError
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidibus-service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andre Pankratz
|
@@ -15,28 +15,26 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-09-08 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
name: mongoid
|
22
23
|
prerelease: false
|
23
|
-
type: :runtime
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 7
|
30
30
|
segments:
|
31
31
|
- 2
|
32
|
-
|
33
|
-
|
34
|
-
version: 2.0.0
|
35
|
-
name: mongoid
|
32
|
+
version: "2"
|
33
|
+
type: :runtime
|
36
34
|
version_requirements: *id001
|
37
35
|
- !ruby/object:Gem::Dependency
|
36
|
+
name: vidibus-core_extensions
|
38
37
|
prerelease: false
|
39
|
-
type: :runtime
|
40
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
42
40
|
requirements:
|
@@ -46,11 +44,11 @@ dependencies:
|
|
46
44
|
segments:
|
47
45
|
- 0
|
48
46
|
version: "0"
|
49
|
-
|
47
|
+
type: :runtime
|
50
48
|
version_requirements: *id002
|
51
49
|
- !ruby/object:Gem::Dependency
|
50
|
+
name: vidibus-secure
|
52
51
|
prerelease: false
|
53
|
-
type: :runtime
|
54
52
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
53
|
none: false
|
56
54
|
requirements:
|
@@ -60,11 +58,11 @@ dependencies:
|
|
60
58
|
segments:
|
61
59
|
- 0
|
62
60
|
version: "0"
|
63
|
-
|
61
|
+
type: :runtime
|
64
62
|
version_requirements: *id003
|
65
63
|
- !ruby/object:Gem::Dependency
|
64
|
+
name: vidibus-uuid
|
66
65
|
prerelease: false
|
67
|
-
type: :runtime
|
68
66
|
requirement: &id004 !ruby/object:Gem::Requirement
|
69
67
|
none: false
|
70
68
|
requirements:
|
@@ -74,11 +72,11 @@ dependencies:
|
|
74
72
|
segments:
|
75
73
|
- 0
|
76
74
|
version: "0"
|
77
|
-
|
75
|
+
type: :runtime
|
78
76
|
version_requirements: *id004
|
79
77
|
- !ruby/object:Gem::Dependency
|
78
|
+
name: vidibus-validate_uri
|
80
79
|
prerelease: false
|
81
|
-
type: :runtime
|
82
80
|
requirement: &id005 !ruby/object:Gem::Requirement
|
83
81
|
none: false
|
84
82
|
requirements:
|
@@ -88,11 +86,11 @@ dependencies:
|
|
88
86
|
segments:
|
89
87
|
- 0
|
90
88
|
version: "0"
|
91
|
-
|
89
|
+
type: :runtime
|
92
90
|
version_requirements: *id005
|
93
91
|
- !ruby/object:Gem::Dependency
|
92
|
+
name: httparty
|
94
93
|
prerelease: false
|
95
|
-
type: :runtime
|
96
94
|
requirement: &id006 !ruby/object:Gem::Requirement
|
97
95
|
none: false
|
98
96
|
requirements:
|
@@ -102,11 +100,11 @@ dependencies:
|
|
102
100
|
segments:
|
103
101
|
- 0
|
104
102
|
version: "0"
|
105
|
-
|
103
|
+
type: :runtime
|
106
104
|
version_requirements: *id006
|
107
105
|
- !ruby/object:Gem::Dependency
|
106
|
+
name: json
|
108
107
|
prerelease: false
|
109
|
-
type: :runtime
|
110
108
|
requirement: &id007 !ruby/object:Gem::Requirement
|
111
109
|
none: false
|
112
110
|
requirements:
|
@@ -116,25 +114,27 @@ dependencies:
|
|
116
114
|
segments:
|
117
115
|
- 0
|
118
116
|
version: "0"
|
119
|
-
|
117
|
+
type: :runtime
|
120
118
|
version_requirements: *id007
|
121
119
|
- !ruby/object:Gem::Dependency
|
120
|
+
name: bundler
|
122
121
|
prerelease: false
|
123
|
-
type: :development
|
124
122
|
requirement: &id008 !ruby/object:Gem::Requirement
|
125
123
|
none: false
|
126
124
|
requirements:
|
127
125
|
- - ">="
|
128
126
|
- !ruby/object:Gem::Version
|
129
|
-
hash:
|
127
|
+
hash: 23
|
130
128
|
segments:
|
129
|
+
- 1
|
131
130
|
- 0
|
132
|
-
|
133
|
-
|
131
|
+
- 0
|
132
|
+
version: 1.0.0
|
133
|
+
type: :development
|
134
134
|
version_requirements: *id008
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
|
+
name: rake
|
136
137
|
prerelease: false
|
137
|
-
type: :development
|
138
138
|
requirement: &id009 !ruby/object:Gem::Requirement
|
139
139
|
none: false
|
140
140
|
requirements:
|
@@ -144,27 +144,25 @@ dependencies:
|
|
144
144
|
segments:
|
145
145
|
- 0
|
146
146
|
version: "0"
|
147
|
-
|
147
|
+
type: :development
|
148
148
|
version_requirements: *id009
|
149
149
|
- !ruby/object:Gem::Dependency
|
150
|
+
name: rdoc
|
150
151
|
prerelease: false
|
151
|
-
type: :development
|
152
152
|
requirement: &id010 !ruby/object:Gem::Requirement
|
153
153
|
none: false
|
154
154
|
requirements:
|
155
|
-
- -
|
155
|
+
- - ">="
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
hash:
|
157
|
+
hash: 3
|
158
158
|
segments:
|
159
|
-
- 2
|
160
|
-
- 0
|
161
159
|
- 0
|
162
|
-
version:
|
163
|
-
|
160
|
+
version: "0"
|
161
|
+
type: :development
|
164
162
|
version_requirements: *id010
|
165
163
|
- !ruby/object:Gem::Dependency
|
164
|
+
name: rcov
|
166
165
|
prerelease: false
|
167
|
-
type: :development
|
168
166
|
requirement: &id011 !ruby/object:Gem::Requirement
|
169
167
|
none: false
|
170
168
|
requirements:
|
@@ -174,12 +172,26 @@ dependencies:
|
|
174
172
|
segments:
|
175
173
|
- 0
|
176
174
|
version: "0"
|
177
|
-
|
175
|
+
type: :development
|
178
176
|
version_requirements: *id011
|
179
177
|
- !ruby/object:Gem::Dependency
|
178
|
+
name: rspec
|
180
179
|
prerelease: false
|
181
|
-
type: :development
|
182
180
|
requirement: &id012 !ruby/object:Gem::Requirement
|
181
|
+
none: false
|
182
|
+
requirements:
|
183
|
+
- - ~>
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
hash: 7
|
186
|
+
segments:
|
187
|
+
- 2
|
188
|
+
version: "2"
|
189
|
+
type: :development
|
190
|
+
version_requirements: *id012
|
191
|
+
- !ruby/object:Gem::Dependency
|
192
|
+
name: rr
|
193
|
+
prerelease: false
|
194
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
183
195
|
none: false
|
184
196
|
requirements:
|
185
197
|
- - ">="
|
@@ -188,12 +200,26 @@ dependencies:
|
|
188
200
|
segments:
|
189
201
|
- 0
|
190
202
|
version: "0"
|
191
|
-
|
192
|
-
version_requirements: *
|
203
|
+
type: :development
|
204
|
+
version_requirements: *id013
|
193
205
|
- !ruby/object:Gem::Dependency
|
206
|
+
name: webmock
|
194
207
|
prerelease: false
|
208
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
210
|
+
requirements:
|
211
|
+
- - ">="
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
hash: 3
|
214
|
+
segments:
|
215
|
+
- 0
|
216
|
+
version: "0"
|
195
217
|
type: :development
|
196
|
-
|
218
|
+
version_requirements: *id014
|
219
|
+
- !ruby/object:Gem::Dependency
|
220
|
+
name: rack-test
|
221
|
+
prerelease: false
|
222
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
197
223
|
none: false
|
198
224
|
requirements:
|
199
225
|
- - ">="
|
@@ -202,44 +228,33 @@ dependencies:
|
|
202
228
|
segments:
|
203
229
|
- 0
|
204
230
|
version: "0"
|
205
|
-
|
206
|
-
version_requirements: *
|
207
|
-
description:
|
231
|
+
type: :development
|
232
|
+
version_requirements: *id015
|
233
|
+
description: Enables Vidibus Services for the embedding Rails application
|
208
234
|
email: andre@vidibus.com
|
209
235
|
executables: []
|
210
236
|
|
211
237
|
extensions: []
|
212
238
|
|
213
|
-
extra_rdoc_files:
|
214
|
-
|
215
|
-
- README.rdoc
|
239
|
+
extra_rdoc_files: []
|
240
|
+
|
216
241
|
files:
|
217
|
-
- .bundle/config
|
218
|
-
- .document
|
219
|
-
- .rspec
|
220
|
-
- Gemfile
|
221
|
-
- LICENSE
|
222
|
-
- README.rdoc
|
223
|
-
- Rakefile
|
224
|
-
- VERSION
|
225
|
-
- app/models/service.rb
|
226
|
-
- config/locales/en.yml
|
227
|
-
- config/routes.rb
|
228
|
-
- lib/vidibus-service.rb
|
229
|
-
- lib/vidibus/service.rb
|
230
242
|
- lib/vidibus/service/client.rb
|
231
243
|
- lib/vidibus/service/connector_app.rb
|
232
244
|
- lib/vidibus/service/controller_validations.rb
|
245
|
+
- lib/vidibus/service/errors.rb
|
233
246
|
- lib/vidibus/service/mongoid.rb
|
234
|
-
-
|
235
|
-
-
|
236
|
-
-
|
237
|
-
-
|
238
|
-
-
|
239
|
-
-
|
240
|
-
-
|
247
|
+
- lib/vidibus/service/version.rb
|
248
|
+
- lib/vidibus/service.rb
|
249
|
+
- lib/vidibus-service.rb
|
250
|
+
- app/models/service.rb
|
251
|
+
- config/locales/en.yml
|
252
|
+
- config/routes.rb
|
253
|
+
- LICENSE
|
254
|
+
- README.md
|
255
|
+
- Rakefile
|
241
256
|
has_rdoc: true
|
242
|
-
homepage:
|
257
|
+
homepage: https://github.com/vidibus/vidibus-service
|
243
258
|
licenses: []
|
244
259
|
|
245
260
|
post_install_message:
|
@@ -261,21 +276,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
276
|
requirements:
|
262
277
|
- - ">="
|
263
278
|
- !ruby/object:Gem::Version
|
264
|
-
hash:
|
279
|
+
hash: 23
|
265
280
|
segments:
|
266
|
-
-
|
267
|
-
|
281
|
+
- 1
|
282
|
+
- 3
|
283
|
+
- 6
|
284
|
+
version: 1.3.6
|
268
285
|
requirements: []
|
269
286
|
|
270
|
-
rubyforge_project:
|
287
|
+
rubyforge_project: vidibus-service
|
271
288
|
rubygems_version: 1.6.2
|
272
289
|
signing_key:
|
273
290
|
specification_version: 3
|
274
|
-
summary:
|
275
|
-
test_files:
|
276
|
-
|
277
|
-
- spec/vidibus/service/client_spec.rb
|
278
|
-
- spec/vidibus/service/connector_app_spec.rb
|
279
|
-
- spec/vidibus/service/controller_validations_spec.rb
|
280
|
-
- spec/vidibus/service/mongoid_spec.rb
|
281
|
-
- spec/vidibus/service_spec.rb
|
291
|
+
summary: Service handling for Vidibus applications
|
292
|
+
test_files: []
|
293
|
+
|