roda-rest_api 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/roda/plugins/rest_api.rb +2 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a10a4d12512258569caa7868c710cad5a0ab08b
4
- data.tar.gz: a2c6119be852652f5a501b8399f48939bdb44e66
3
+ metadata.gz: 9fec8c5ed12a97582fea8ead7707631e37447aff
4
+ data.tar.gz: 7ce40200de6b126706ccfdda544c9939714ec412
5
5
  SHA512:
6
- metadata.gz: 3b7d40f3204763b8235ead49ce662b7145ca4f2de8d32f8c4ae4e0f93344857b25469786bf989dbbfc63cf04f2169d41f77b4516237d2ec440b6f6a57fbfc271
7
- data.tar.gz: 47b350dcf2dfcbda051983c210b7d393acfa48002a39d3965ad0865ccb8272f5df571d2b47fb84062968d74509a58376cfd212a3d8c41651e44de4f8859050f9
6
+ metadata.gz: 8c9a1bf529a2904efead47199fff1208b33095f49dca3cd2fd4f9b3173071b7fe4977e4f540fcd5416cf66b7f8be33264dbe4d945ec34766742a651ab284c481
7
+ data.tar.gz: 0f8d4725d55357608d32a8534546edf360c29f990cd537ce8ed81a63ead6b5fa9f20b29054b399291529d7d63f86edb4aebf20b984d026810a13052b8d0a1d76
@@ -89,6 +89,7 @@ class Roda
89
89
  rescue StandardError => e
90
90
  raise if ENV['RACK_ENV'] == 'development'
91
91
  @request.response.status = method === :save ? 422 : 404
92
+ @request.response.write e
92
93
  end
93
94
  end
94
95
 
@@ -96,7 +97,7 @@ class Roda
96
97
 
97
98
  def arguments(method)
98
99
  if method === :save
99
- args = if @request.media_type == "application/x-www-form-urlencoded"
100
+ args = if Rack::Request::FORM_DATA_MEDIA_TYPES.include?(@request.media_type)
100
101
  @request.POST
101
102
  else
102
103
  JSON.parse(@request.body.read)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roda-rest_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michel Benevento
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-14 00:00:00.000000000 Z
11
+ date: 2015-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roda
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.4.5
97
+ rubygems_version: 2.4.2
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: REST APIs with Roda