sdb_service 0.3.1 → 0.3.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/README +1 -1
- data/lib/sdb_service/serializer.rb +2 -18
- data/lib/sdb_service/service.rb +1 -1
- metadata +2 -2
data/README
CHANGED
@@ -2,7 +2,7 @@ SDBService Gem - even simpler wrapper around aws_sdb, with builtin serialization
|
|
2
2
|
|
3
3
|
The MIT License
|
4
4
|
|
5
|
-
Copyright (c)
|
5
|
+
Copyright (c) 2010 Derek Perez (derek@derkeperez.com) | Caring.com
|
6
6
|
|
7
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -8,27 +8,11 @@ module SdbService
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def serialize!
|
11
|
-
|
12
|
-
@transformed_payload = serialize_payload(@payload)
|
13
|
-
@valid = true
|
14
|
-
rescue
|
15
|
-
@valid = false
|
16
|
-
@transformed_payload = @payload
|
17
|
-
end
|
18
|
-
return @transformed_payload
|
11
|
+
@transformed_payload = serialize_payload(@payload) rescue @payload
|
19
12
|
end
|
20
13
|
|
21
14
|
def deserialize!
|
22
|
-
|
23
|
-
@transformed_payload = deserialize_payload(@payload)
|
24
|
-
rescue
|
25
|
-
@transformed_payload = @payload
|
26
|
-
end
|
27
|
-
return @transformed_payload
|
28
|
-
end
|
29
|
-
|
30
|
-
def valid?
|
31
|
-
@valid
|
15
|
+
@transformed_payload = deserialize_payload(@payload) rescue @payload
|
32
16
|
end
|
33
17
|
|
34
18
|
def to_s
|
data/lib/sdb_service/service.rb
CHANGED
@@ -42,7 +42,7 @@ module SdbService
|
|
42
42
|
serializer_result = serializer.new(value)
|
43
43
|
serializer_result.serialize!.to_s
|
44
44
|
end
|
45
|
-
data["mime_type"] = "text/#{
|
45
|
+
data["mime_type"] = "text/#{self.serializer_format}"
|
46
46
|
else
|
47
47
|
data = raw_payload
|
48
48
|
data["mime_type"] = "text/plain"
|