saorin 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -12,12 +12,16 @@ module Saorin
|
|
12
12
|
|
13
13
|
@connection = ::Faraday::Connection.new(options) do |builder|
|
14
14
|
builder.adapter ::Faraday.default_adapter
|
15
|
+
builder.response :raise_error
|
15
16
|
block.call builder if block
|
16
17
|
end
|
17
18
|
end
|
18
19
|
|
19
20
|
def send_request(content)
|
20
|
-
response = @connection.post
|
21
|
+
response = @connection.post do |req|
|
22
|
+
req.headers[:content_type] = CONTENT_TYPE
|
23
|
+
req.body = content
|
24
|
+
end
|
21
25
|
response.body
|
22
26
|
end
|
23
27
|
end
|
@@ -21,8 +21,8 @@ module Saorin
|
|
21
21
|
while request = connection.request
|
22
22
|
case request
|
23
23
|
when ::Reel::Request
|
24
|
-
response_body = ''
|
25
24
|
response_body = process_request(request.body) if request.method.to_s.upcase == 'POST'
|
25
|
+
response_body ||= ''
|
26
26
|
request.respond :ok, DEFAULT_HEADERS.dup, response_body
|
27
27
|
end
|
28
28
|
end
|
data/lib/saorin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saorin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -124,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: '0'
|
125
125
|
segments:
|
126
126
|
- 0
|
127
|
-
hash:
|
127
|
+
hash: 1684078337645603249
|
128
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
version: '0'
|
134
134
|
segments:
|
135
135
|
- 0
|
136
|
-
hash:
|
136
|
+
hash: 1684078337645603249
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project:
|
139
139
|
rubygems_version: 1.8.24
|