rack-app 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d90aa076001c7ddbd654f22791f34854fbcd1d80
4
- data.tar.gz: df0aa5a38c939340419270aae93830def72f84f0
3
+ metadata.gz: 097e5b729d2cfe47b8e84540d852156752b8b8c7
4
+ data.tar.gz: cb73e8e4fa1ac9258cae43368397df5cd2953ec3
5
5
  SHA512:
6
- metadata.gz: de99d24d08255b30a9962f0307da406558ab7e3212a19116ef4fff00aadeede2b74b8fe008244dc19f11d7d8fa87bb201b22c0b620d90f61bb50bc53e25547b1
7
- data.tar.gz: 6d2e15dd8548668f67786b7c96c89b9bdce77adce5dc006fcf250965fa958b1deaf8a14ed905e2a0dc9541f243492cb9e8e0be33879e8e4aa0a76027e4d48cdf
6
+ metadata.gz: 1623efcf53ed1452603b2879ccb92c4011f7e82349abae1885976d65330349a59ee842aebd157ee6ec6e3efed2e4c0f6b882c0f624bcea7232bbf45e9ab98ad9
7
+ data.tar.gz: 9c693e883506a7bfb8dba88c702db684a1ce5496edadb46b8a74d13b4363ec8a0fb5113dc42dacdf27a37c80438929f9006dd44d9e69f2913b4b5e008f26c006
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [travis-link]: http://travis-ci.org/adamluzsi/rack-app.rb
5
5
  [travis-home]: http://travis-ci.org/
6
6
 
7
- ![Rack::App](http://rack-app-website.herokuapp.com/image/msruby.png)
7
+ ![Rack::App](http://rack-app-website.herokuapp.com/image/msruby_new.png)
8
8
 
9
9
  Your next favourite rack based micro framework that is totally addition free!
10
10
  Have a cup of awesomeness with your performance designed framework!
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.0
1
+ 0.12.0
@@ -124,4 +124,18 @@ class Rack::App
124
124
  @response || raise("response object is not set for #{self.class}")
125
125
  end
126
126
 
127
+ def payload
128
+ @__payload__ ||= Proc.new{
129
+ return nil unless @request.body.respond_to?(:gets)
130
+
131
+ payload = ''
132
+ while chunk = @request.body.gets
133
+ payload += chunk
134
+ end
135
+ @request.body.rewind
136
+
137
+ return payload
138
+ }.call
139
+ end
140
+
127
141
  end
@@ -43,6 +43,9 @@ module Rack::App::Test
43
43
  properties = format_properties(raw_properties)
44
44
  additional_headers = properties[:headers].reduce({}) { |m, (k, v)| m.merge("HTTP_#{k.to_s.gsub('-', '_').upcase}" => v.to_s) }
45
45
 
46
+ payload = raw_properties.delete(:payload)
47
+ additional_headers["rack.input"]= ::Rack::Lint::InputWrapper.new(StringIO.new(payload.to_s)) if payload.is_a?(String)
48
+
46
49
  {
47
50
  "REMOTE_ADDR" => "192.168.56.1",
48
51
  "REQUEST_METHOD" => request_method.to_s.upcase,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-01-30 00:00:00.000000000 Z
12
+ date: 2016-02-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler