restfulx 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +2 -1
- data/lib/restfulx.rb +1 -1
- data/lib/restfulx/active_foo.rb +7 -10
- data/lib/restfulx/amf/ext/serializer.bundle +0 -0
- metadata +32 -14
data/VERSION.yml
CHANGED
data/lib/restfulx.rb
CHANGED
data/lib/restfulx/active_foo.rb
CHANGED
@@ -157,22 +157,19 @@ module ActiveRecord
|
|
157
157
|
# when errors are serialized to XML
|
158
158
|
class Errors
|
159
159
|
# Flex friendly errors
|
160
|
-
def to_fxml(options={})
|
160
|
+
def to_fxml(options = {})
|
161
161
|
options[:root] ||= "errors"
|
162
162
|
options[:indent] ||= 2
|
163
163
|
options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:indent])
|
164
164
|
options[:builder].instruct! unless options.delete(:skip_instruct)
|
165
165
|
options[:builder].errors do |e|
|
166
166
|
# The @errors instance variable is a Hash inside the Errors class
|
167
|
-
@errors.
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
fullmsg = @base.class.human_attribute_name(attr) + ' ' + msg
|
174
|
-
options[:builder].error("field" => attr.camelcase(:lower), "message" => fullmsg)
|
175
|
-
end
|
167
|
+
@errors.each do |attr, msg|
|
168
|
+
next if msg.nil?
|
169
|
+
if attr == "base"
|
170
|
+
options[:builder].error("message", msg.to_s)
|
171
|
+
else
|
172
|
+
options[:builder].error("field" => attr.camelcase(:lower), "message" => msg.to_s)
|
176
173
|
end
|
177
174
|
end
|
178
175
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restfulx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 2
|
8
|
+
- 5
|
9
|
+
version: 1.2.5
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Dima Berastau
|
@@ -9,29 +14,37 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date:
|
17
|
+
date: 2010-07-02 00:00:00 -07:00
|
13
18
|
default_executable: rx-gen
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: rubigen
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 5
|
30
|
+
- 0
|
23
31
|
version: 1.5.0
|
24
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
25
34
|
- !ruby/object:Gem::Dependency
|
26
35
|
name: activesupport
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
38
|
requirements:
|
31
39
|
- - ">="
|
32
40
|
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 2
|
43
|
+
- 0
|
44
|
+
- 0
|
33
45
|
version: 2.0.0
|
34
|
-
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
35
48
|
description:
|
36
49
|
email: dima.berastau@gmail.com
|
37
50
|
executables:
|
@@ -75,6 +88,7 @@ files:
|
|
75
88
|
- lib/restfulx/active_foo.rb
|
76
89
|
- lib/restfulx/active_record_tasks.rb
|
77
90
|
- lib/restfulx/active_record_uuid_helper.rb
|
91
|
+
- lib/restfulx/amf/ext/serializer.bundle
|
78
92
|
- lib/restfulx/configuration.rb
|
79
93
|
- lib/restfulx/datamapper_foo.rb
|
80
94
|
- lib/restfulx/rails/recipes.rb
|
@@ -185,6 +199,8 @@ files:
|
|
185
199
|
- test/rails/views/notes/index.html.erb
|
186
200
|
has_rdoc: true
|
187
201
|
homepage: http://restfulx.org
|
202
|
+
licenses: []
|
203
|
+
|
188
204
|
post_install_message:
|
189
205
|
rdoc_options:
|
190
206
|
- --charset=UTF-8
|
@@ -194,20 +210,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
194
210
|
requirements:
|
195
211
|
- - ">="
|
196
212
|
- !ruby/object:Gem::Version
|
213
|
+
segments:
|
214
|
+
- 0
|
197
215
|
version: "0"
|
198
|
-
version:
|
199
216
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
217
|
requirements:
|
201
218
|
- - ">="
|
202
219
|
- !ruby/object:Gem::Version
|
220
|
+
segments:
|
221
|
+
- 0
|
203
222
|
version: "0"
|
204
|
-
version:
|
205
223
|
requirements: []
|
206
224
|
|
207
225
|
rubyforge_project: restfulx
|
208
|
-
rubygems_version: 1.3.
|
226
|
+
rubygems_version: 1.3.6
|
209
227
|
signing_key:
|
210
|
-
specification_version:
|
228
|
+
specification_version: 3
|
211
229
|
summary: RestfulX Framework Code Generation Engine / Rails 2.1+ Integration Support
|
212
230
|
test_files:
|
213
231
|
- spec/restfulx_spec.rb
|