lhc 7.3.2 → 7.3.3

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: 18ed805164740684c14fcaf8969e36552343716c
4
- data.tar.gz: 91c29a88668b280d3e7afb5817842eb249bd5789
3
+ metadata.gz: 83dac4c381a05800447892414ec9f5ef164cf92e
4
+ data.tar.gz: 15135229c079cca688d42d7a6d08f5ae745aa178
5
5
  SHA512:
6
- metadata.gz: 69f19962896705b953771eae02ddb21fb5e2a94381704596ff54995f0270a457facaed0096c7d32e36849915bce7d0d7cd8be9f4550d576af3d1b6ea7fae9098
7
- data.tar.gz: 2d250a08c0262fdc73be9c75aa338297ebc0696b482ddd801ede63ccc3b41e66c142d7b79ca4c614397a6e7f6f9131ee0c4bea80449b6c94c6722c4e1a907b0f
6
+ metadata.gz: bccaf223150d3bafc8ea178ab5a7309eefba5d572a9af7e33582a00c7a7120e22762eab92d99d37f691e1cfb5a759e3033236ac552c6f44b472a5c348904a669
7
+ data.tar.gz: 691ba40ddcb42c761b1092f97b98ff1e1a3a7110721d1a0c9c15d4c3c5abb3d3fe4daab1725385daa6ad358f08b986f80b0e4cbc28706fecbb5532e933f13782
data/lib/lhc.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'typhoeus'
2
2
  require 'active_support/core_ext/object/blank'
3
+ require 'active_support/core_ext/hash/keys'
3
4
 
4
5
  module LHC
5
6
  autoload :BasicMethodsConcern,
@@ -1,3 +1,3 @@
1
1
  module LHC
2
- VERSION ||= '7.3.2'
2
+ VERSION ||= '7.3.3'
3
3
  end
@@ -1,9 +1,28 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe LHC do
4
- context 'request' do
4
+ context 'GET' do
5
+ before do
6
+ stub_request(:get, "http://datastore/v2/feedbacks").to_return(status: 200, body: "{}")
7
+ end
5
8
  it "is able to call .request without LHC raising NoMethodError: undefined method `blank?' for nil:NilClass when calling it outside of the rails context" do
6
- expect { LHC.request(url: "http://datastore/v2/feedbacks", method: :get) }.not_to raise_error(NoMethodError)
9
+ expect { LHC.request(url: "http://datastore/v2/feedbacks", method: :get) }.not_to raise_error
10
+ end
11
+ end
12
+
13
+ context 'POST' do
14
+ before do
15
+ stub_request(:post, "http://datastore/v2/feedbacks").to_return(status: 200, body: "{}")
16
+ end
17
+
18
+ it "is able to call .request without LHC raising NoMethodError: undefined method `deep_symbolize_keys' for {}:Hash" do
19
+ options = {
20
+ url: "http://datastore/v2/feedbacks",
21
+ method: :post,
22
+ body: "{}",
23
+ headers: { 'Content-Type' => 'application/json' }
24
+ }
25
+ expect { LHC.request(options) }.not_to raise_error
7
26
  end
8
27
  end
9
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhc
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.2
4
+ version: 7.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://github.com/local-ch/lhc/contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-13 00:00:00.000000000 Z
11
+ date: 2018-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -364,7 +364,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
364
364
  requirements:
365
365
  - Ruby >= 2.0.0
366
366
  rubyforge_project:
367
- rubygems_version: 2.6.12
367
+ rubygems_version: 2.6.14
368
368
  signing_key:
369
369
  specification_version: 4
370
370
  summary: LocalHttpClient