lucid_http 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lucid_http.rb +4 -0
- data/lib/lucid_http/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 261b34c3ff617c6412a4b5928f123cf72d692df9
|
4
|
+
data.tar.gz: e53200bdfd633cb285ca4d2fe3b0b28863f58bd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7abd597d390c286da5e298ff25788dcccde01ad074b3920e24a403c545608d14692de13765017bf733d1882917b4b47ba9987ba2ad60bcd33c9bbd3fc075d2e1
|
7
|
+
data.tar.gz: 676abd88bdb500abb3fa57a44dfaf90f68fca9b0466fb1561b4e0f0b4eaf59e108d2f5d0942f7dcab7448466324fe30e94567a08b0942c64b3d9d27c72bdbd1a
|
data/lib/lucid_http.rb
CHANGED
@@ -32,9 +32,13 @@ end
|
|
32
32
|
def __lucid_http__setup(url, action: :get, follow: false, form: nil, json: false, **opts)
|
33
33
|
__lucid_http__clean
|
34
34
|
@__lucid_http__client = HTTP.persistent(LucidHttp.target_url)
|
35
|
+
if json
|
36
|
+
@__lucid_http__client = @__lucid_http__client.accept("application/json")
|
37
|
+
end
|
35
38
|
if follow
|
36
39
|
@__lucid_http__client = @__lucid_http__client.follow
|
37
40
|
end
|
41
|
+
|
38
42
|
@__lucid_http__path = @__lucid_http__client.default_options.persistent + url
|
39
43
|
@__lucid_http__res = @__lucid_http__client.send(action.to_sym, url, form: form)
|
40
44
|
@__lucid_http__json = json
|
data/lib/lucid_http/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lucid_http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Federico Iachetti
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
108
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.6.
|
109
|
+
rubygems_version: 2.6.10
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Lucid Http wraps the http.rb gem in a simple DSL.
|