wsdsl 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/params.rb +14 -13
- data/wsdsl.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/lib/params.rb
CHANGED
@@ -67,11 +67,12 @@ class WSDSL
|
|
67
67
|
|
68
68
|
# Defines a new param and add it to the optional or required list based
|
69
69
|
# the passed options.
|
70
|
+
# @param [Symbol] type
|
71
|
+
# The type of param
|
70
72
|
#
|
71
73
|
# @param [Symbol, String] name
|
72
74
|
# The name of the param
|
73
|
-
#
|
74
|
-
# The type of param
|
75
|
+
#
|
75
76
|
# @param [Hash] options
|
76
77
|
# A hash representing the param settings
|
77
78
|
#
|
@@ -80,7 +81,7 @@ class WSDSL
|
|
80
81
|
#
|
81
82
|
# @return [Array] the typed list of params (required or optional)
|
82
83
|
# @api public]
|
83
|
-
def param(
|
84
|
+
def param(type, name, options={})
|
84
85
|
options[:type] = type
|
85
86
|
options[:space_name] = options[:space_name] || space_name
|
86
87
|
if options.delete(:required)
|
@@ -106,7 +107,7 @@ class WSDSL
|
|
106
107
|
# @return [Arrays<WSDSL::Params::Rule>]
|
107
108
|
# List of optional or required param rules depending on the new param rule type
|
108
109
|
def string(name, options={})
|
109
|
-
param(
|
110
|
+
param(:string, name, options)
|
110
111
|
end
|
111
112
|
|
112
113
|
# Defines a new integer param and add it to the required or optional list
|
@@ -123,7 +124,7 @@ class WSDSL
|
|
123
124
|
# @return [Arrays<WSDSL::Params::Rule>]
|
124
125
|
# List of optional or required param rules depending on the new param rule type
|
125
126
|
def integer(name, options={})
|
126
|
-
param(
|
127
|
+
param(:integer, name, options)
|
127
128
|
end
|
128
129
|
|
129
130
|
# Defines a new float param and add it to the required or optional list
|
@@ -140,7 +141,7 @@ class WSDSL
|
|
140
141
|
# @return [Arrays<WSDSL::Params::Rule>]
|
141
142
|
# List of optional or required param rules depending on the new param rule type
|
142
143
|
def float(name, options={})
|
143
|
-
param(
|
144
|
+
param(:float, name, options)
|
144
145
|
end
|
145
146
|
|
146
147
|
# Defines a new decimal param and add it to the required or optional list
|
@@ -157,7 +158,7 @@ class WSDSL
|
|
157
158
|
# @return [Arrays<WSDSL::Params::Rule>]
|
158
159
|
# List of optional or required param rules depending on the new param rule type
|
159
160
|
def decimal(name, options={})
|
160
|
-
param(
|
161
|
+
param(:decimal, name, options)
|
161
162
|
end
|
162
163
|
|
163
164
|
# Defines a new boolean param and add it to the required or optional list
|
@@ -174,7 +175,7 @@ class WSDSL
|
|
174
175
|
# @return [Arrays<WSDSL::Params::Rule>]
|
175
176
|
# List of optional or required param rules depending on the new param rule type
|
176
177
|
def boolean(name, options={})
|
177
|
-
param(
|
178
|
+
param(:boolean, name, options)
|
178
179
|
end
|
179
180
|
|
180
181
|
# Defines a new datetime param and add it to the required or optional list
|
@@ -191,7 +192,7 @@ class WSDSL
|
|
191
192
|
# @return [Arrays<WSDSL::Params::Rule>]
|
192
193
|
# List of optional or required param rules depending on the new param rule type
|
193
194
|
def datetime(name, options={})
|
194
|
-
param(
|
195
|
+
param(:datetime, name, options)
|
195
196
|
end
|
196
197
|
|
197
198
|
# Defines a new text param and add it to the required or optional list
|
@@ -208,7 +209,7 @@ class WSDSL
|
|
208
209
|
# @return [Arrays<WSDSL::Params::Rule>]
|
209
210
|
# List of optional or required param rules depending on the new param rule type
|
210
211
|
def text(name, options={})
|
211
|
-
param(
|
212
|
+
param(:text, name, options)
|
212
213
|
end
|
213
214
|
|
214
215
|
# Defines a new binary param and add it to the required or optional list
|
@@ -225,7 +226,7 @@ class WSDSL
|
|
225
226
|
# @return [Arrays<WSDSL::Params::Rule>]
|
226
227
|
# List of optional or required param rules depending on the new param rule type
|
227
228
|
def binary(name, options={})
|
228
|
-
param(
|
229
|
+
param(:binary, name, options)
|
229
230
|
end
|
230
231
|
|
231
232
|
# Defines a new array param and add it to the required or optional list
|
@@ -242,7 +243,7 @@ class WSDSL
|
|
242
243
|
# @return [Array<WSDSL::Params::Rule>]
|
243
244
|
# List of optional or required param rules depending on the new param rule type
|
244
245
|
def array(name, options={})
|
245
|
-
param(
|
246
|
+
param(:array, name, options)
|
246
247
|
end
|
247
248
|
|
248
249
|
# Defines a new file param and add it to the required or optional list
|
@@ -259,7 +260,7 @@ class WSDSL
|
|
259
260
|
# @return [Arrays<WSDSL::Params::Rule>]
|
260
261
|
# List of optional or required param rules depending on the new param rule type
|
261
262
|
def file(name, options={})
|
262
|
-
param(
|
263
|
+
param(:file, name, options)
|
263
264
|
end
|
264
265
|
|
265
266
|
# @group param setters based on the state (required or optional)
|
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.
|
8
|
+
s.version = "0.2.0"
|
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-05-
|
12
|
+
s.date = %q{2011-05-19}
|
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
@@ -2,7 +2,7 @@
|
|
2
2
|
name: wsdsl
|
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
|
- Matt Aimonetti
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-05-
|
13
|
+
date: 2011-05-19 00:00:00 Z
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description: A Ruby DSL describing Web Services without implementation details.
|