sdb_service 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
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) <year> Derek Perez (derek@derkeperez.com) | Caring.com
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
- begin
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
- begin
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
@@ -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/#{serializer_result.valid? ? self.serializer_format : "plain"}"
45
+ data["mime_type"] = "text/#{self.serializer_format}"
46
46
  else
47
47
  data = raw_payload
48
48
  data["mime_type"] = "text/plain"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 1
9
- version: 0.3.1
8
+ - 2
9
+ version: 0.3.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Derek Perez