coin_rack 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/coin_rack.rb CHANGED
@@ -67,9 +67,10 @@ class CoinRack
67
67
  def delete(request)
68
68
  k = key(request)
69
69
  f = format(request)
70
+ value = Coin.read(k)
70
71
  Coin.delete k
71
72
  result = {}
72
- result[k] = nil
73
+ result[k] = value
73
74
  send f, result
74
75
  end
75
76
 
@@ -1,3 +1,3 @@
1
1
  class CoinRack
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -199,7 +199,7 @@ class CoinRackTest < MicroTest::Test
199
199
  data = JSON.parse(response.body)
200
200
  assert response.header["Content-Type"] == "text/json"
201
201
  assert response.code == "200"
202
- assert response.body == "{\"example\":null}"
202
+ assert response.body == "{\"example\":\"value\"}"
203
203
  assert Coin.read("example").nil?
204
204
  end
205
205
 
@@ -211,7 +211,7 @@ class CoinRackTest < MicroTest::Test
211
211
  response = http.request(request)
212
212
  assert response.header["Content-Type"] == "text/xml"
213
213
  assert response.code == "200"
214
- assert response.body == "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<hash>\n <example nil=\"true\"/>\n</hash>\n"
214
+ assert response.body == "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<hash>\n <example>value</example>\n</hash>\n"
215
215
  assert REXML::Document.new(response.body)
216
216
  assert Coin.read("example").nil?
217
217
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coin_rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
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: 2012-12-04 00:00:00.000000000 Z
12
+ date: 2012-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack