wsdsl 0.0.1 → 0.0.2
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/VERSION +1 -1
- data/lib/ws_list.rb +19 -0
- data/wsdsl.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/ws_list.rb
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
# @api public
|
4
4
|
module WSList
|
5
5
|
|
6
|
+
class UnknownService < StandardError; end
|
7
|
+
|
6
8
|
module_function
|
7
9
|
|
8
10
|
# Add a service to the array tracking
|
@@ -24,6 +26,23 @@ module WSList
|
|
24
26
|
def all
|
25
27
|
@list || []
|
26
28
|
end
|
29
|
+
|
30
|
+
# Returns a service based on its name
|
31
|
+
#
|
32
|
+
# @param [String] name The name of the service you are looking for.
|
33
|
+
# @raise [UnknownService] if a service with the passed name isn't found.
|
34
|
+
# @return [WSDSL] The found service.
|
35
|
+
#
|
36
|
+
# @api public
|
37
|
+
def self.named(name)
|
38
|
+
service = all.find{|service| service.name == name}
|
39
|
+
if service.nil?
|
40
|
+
raise UnknownService, "Service named #{name} isn't available"
|
41
|
+
else
|
42
|
+
service
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
27
46
|
|
28
47
|
end
|
29
48
|
|
data/wsdsl.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{wsdsl}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Matt Aimonetti"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-03-04}
|
13
13
|
s.description = %q{A Ruby DSL describing Web Services without implementation details.}
|
14
14
|
s.email = %q{mattaimonetti@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Matt Aimonetti
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-03-04 00:00:00 -08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|