dm-restful-adapter 0.0.2.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ module Restful
3
3
  extend self
4
4
 
5
5
  def post(storage_name, attrs)
6
- Configuration.backend.call(:post, resourceify(storage_name), attrs)
6
+ Configuration.backend.call(:post, resourceify(storage_name), storage_name.singularize => attrs)
7
7
  end
8
8
 
9
9
  def get(storage_name, attrs)
@@ -1,7 +1,7 @@
1
1
  module DataMapper
2
2
  module Adapters
3
3
  module RestfulAdapter
4
- VERSION = '0.0.2.1'
4
+ VERSION = '0.0.3'
5
5
  end
6
6
  end
7
7
  end
@@ -79,7 +79,7 @@ end
79
79
 
80
80
  Mimic.mimic(:port => 4000) do
81
81
  post "/heffalumps" do
82
- heffalump = HeffalumpModel.new(params)
82
+ heffalump = HeffalumpModel.new(params['heffalump'])
83
83
  if heffalump.save
84
84
  response = heffalump.to_json
85
85
  [200, {'Content-Type' => 'application/json', 'Content-Length' => response.bytesize}, response]
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-restful-adapter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 69
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- - 1
11
- version: 0.0.2.1
9
+ - 3
10
+ version: 0.0.3
12
11
  platform: ruby
13
12
  authors:
14
13
  - Ryan Moran
@@ -17,8 +16,7 @@ autorequire:
17
16
  bindir: bin
18
17
  cert_chain: []
19
18
 
20
- date: 2012-04-23 00:00:00 -07:00
21
- default_executable:
19
+ date: 2012-04-29 00:00:00 Z
22
20
  dependencies:
23
21
  - !ruby/object:Gem::Dependency
24
22
  name: dm-core
@@ -157,7 +155,6 @@ files:
157
155
  - spec/support/migrations/1_create_heffalump_models.rb
158
156
  - spec/support/mimic.rb
159
157
  - spec/support/setup_mimic_db.rb
160
- has_rdoc: true
161
158
  homepage: https://github.com/optimis/dm-restful-adapter
162
159
  licenses: []
163
160
 
@@ -187,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
184
  requirements: []
188
185
 
189
186
  rubyforge_project:
190
- rubygems_version: 1.6.2
187
+ rubygems_version: 1.8.15
191
188
  signing_key:
192
189
  specification_version: 3
193
190
  summary: ""