playerconnect-wsdsl 0.3.2 → 0.3.3
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/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/params_verification.rb +6 -1
- data/lib/wsdsl.rb +1 -0
- data/playerconnect-wsdsl.gemspec +11 -11
- data/spec/params_verification_spec.rb +1 -1
- data/spec/wsdsl_spec.rb +7 -5
- metadata +3 -3
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ Jeweler::Tasks.new do |gem|
|
|
11
11
|
gem.description = %Q{A Ruby DSL describing Web Services without implementation details.}
|
12
12
|
gem.email = "sdod"
|
13
13
|
gem.authors = ["Team SDOD"]
|
14
|
-
gem.version = "0.3.
|
14
|
+
gem.version = "0.3.3"
|
15
15
|
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
16
16
|
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
17
17
|
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
data/lib/params_verification.rb
CHANGED
@@ -235,7 +235,12 @@ module ParamsVerification
|
|
235
235
|
if choices && param_value && !choices.include?(param_value)
|
236
236
|
raise InvalidParamValue, "Value for parameter '#{param_name}' (#{param_value}) is not in the allowed set of values."
|
237
237
|
end
|
238
|
-
|
238
|
+
|
239
|
+
if rule.options[:minvalue] && param_value
|
240
|
+
min = rule.options[:minvalue]
|
241
|
+
raise InvalidParamValue, "Value for parameter '#{param_name}' is lower than the min accepted value (#{min})." if param_value.to_i < min
|
242
|
+
end
|
243
|
+
|
239
244
|
params
|
240
245
|
end
|
241
246
|
|
data/lib/wsdsl.rb
CHANGED
data/playerconnect-wsdsl.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.3.
|
7
|
+
s.name = "playerconnect-wsdsl"
|
8
|
+
s.version = "0.3.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
11
|
+
s.authors = ["Team SDOD"]
|
12
|
+
s.date = "2011-10-28"
|
13
|
+
s.description = "A Ruby DSL describing Web Services without implementation details."
|
14
|
+
s.email = "sdod"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
17
|
"README.md"
|
@@ -42,11 +42,11 @@ Gem::Specification.new do |s|
|
|
42
42
|
"spec/wsdsl_spec.rb",
|
43
43
|
"wsdsl.gemspec"
|
44
44
|
]
|
45
|
-
s.homepage =
|
46
|
-
s.licenses = [
|
47
|
-
s.require_paths = [
|
48
|
-
s.rubygems_version =
|
49
|
-
s.summary =
|
45
|
+
s.homepage = "http://github.com/playerconnect/wsdsl"
|
46
|
+
s.licenses = ["MIT"]
|
47
|
+
s.require_paths = ["lib"]
|
48
|
+
s.rubygems_version = "1.8.10"
|
49
|
+
s.summary = "Web Service DSL"
|
50
50
|
|
51
51
|
if s.respond_to? :specification_version then
|
52
52
|
s.specification_version = 3
|
@@ -63,7 +63,7 @@ describe ParamsVerification do
|
|
63
63
|
it "should raise an exception when a param is under the minvalue" do
|
64
64
|
params = @valid_params.dup
|
65
65
|
params['num'] = 1
|
66
|
-
lambda{ ParamsVerification.validate!(params, @service.defined_params) }.should raise_exception(ParamsVerification::
|
66
|
+
lambda{ ParamsVerification.validate!(params, @service.defined_params) }.should raise_exception(ParamsVerification::InvalidParamValue)
|
67
67
|
end
|
68
68
|
|
69
69
|
it "should raise an exception when a param isn't in the param option list" do
|
data/spec/wsdsl_spec.rb
CHANGED
@@ -105,8 +105,8 @@ describe WSDSL do
|
|
105
105
|
@service = service.name
|
106
106
|
end
|
107
107
|
|
108
|
-
def
|
109
|
-
[@app, @service
|
108
|
+
def list
|
109
|
+
[@app, @service]
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
@@ -135,7 +135,7 @@ describe WSDSL do
|
|
135
135
|
describe_service("projects.xml") { |s| }
|
136
136
|
service = WSList.all.find{|s| s.url == "projects.xml"}
|
137
137
|
service.controller_dispatch("application").
|
138
|
-
should == ["application", "projects"
|
138
|
+
should == ["application", "projects"]
|
139
139
|
end
|
140
140
|
|
141
141
|
it "should be able to dispatch namespaced controller" do
|
@@ -150,10 +150,10 @@ describe WSDSL do
|
|
150
150
|
end
|
151
151
|
|
152
152
|
service = WSList.all.find{|s| s.url == "project/:project_id/tasks.xml"}
|
153
|
-
service.controller_dispatch("application").should == ["application", "project"
|
153
|
+
service.controller_dispatch("application").should == ["application", "project"]
|
154
154
|
|
155
155
|
service = WSList.all.find{|s| s.url == "project/:project_id/task/:task_id/items.xml"}
|
156
|
-
service.controller_dispatch("application").should == ["application", "project"
|
156
|
+
service.controller_dispatch("application").should == ["application", "project"]
|
157
157
|
end
|
158
158
|
|
159
159
|
it "should raise exception when controller class is not found" do
|
@@ -164,6 +164,8 @@ describe WSDSL do
|
|
164
164
|
service = WSList.all.find{|s| s.url == "unknown.xml"}
|
165
165
|
lambda { service.controller_dispatch("application") }.
|
166
166
|
should raise_error("The UnknownController class was not found")
|
167
|
+
lambda { service.controller_dispatch("application") }.
|
168
|
+
should raise_error("The UnknownController class was not found")
|
167
169
|
end
|
168
170
|
end
|
169
171
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playerconnect-wsdsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-28 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: A Ruby DSL describing Web Services without implementation details.
|
15
15
|
email: sdod
|
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
version: '0'
|
65
65
|
requirements: []
|
66
66
|
rubyforge_project:
|
67
|
-
rubygems_version: 1.8.
|
67
|
+
rubygems_version: 1.8.10
|
68
68
|
signing_key:
|
69
69
|
specification_version: 3
|
70
70
|
summary: Web Service DSL
|