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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3d89cfb05f3e19b063b49656ab41d7b55d3c493
4
- data.tar.gz: 4187068a6b4c10d59697dedd2258076c615d58f1
3
+ metadata.gz: 261b34c3ff617c6412a4b5928f123cf72d692df9
4
+ data.tar.gz: e53200bdfd633cb285ca4d2fe3b0b28863f58bd6
5
5
  SHA512:
6
- metadata.gz: d9fd3f7f7af0dd63e9c1c82be3867814ff34ce201fe3ae952bf09aada906889817766d81c080fee510d3055bceb0e869ad897a33fd0079cb2f832272f58d962a
7
- data.tar.gz: c6750975060769f0704a6b1da6b86d2e22f4bebfa001eaada0b6c1e18e5c4cbce2b134b32a4aa03648cd74adc34100b28fa1e78ba1b76c24547404161e00b688
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
@@ -1,3 +1,3 @@
1
1
  module LucidHttp
2
- VERSION = "0.11.0"
2
+ VERSION = "0.11.1"
3
3
  end
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.0
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: 2016-12-31 00:00:00.000000000 Z
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.8
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.