lhc 7.3.2 → 7.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lhc.rb +1 -0
- data/lib/lhc/version.rb +1 -1
- data/spec/basic_methods/request_without_rails_spec.rb +21 -2
- 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: 83dac4c381a05800447892414ec9f5ef164cf92e
|
4
|
+
data.tar.gz: 15135229c079cca688d42d7a6d08f5ae745aa178
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bccaf223150d3bafc8ea178ab5a7309eefba5d572a9af7e33582a00c7a7120e22762eab92d99d37f691e1cfb5a759e3033236ac552c6f44b472a5c348904a669
|
7
|
+
data.tar.gz: 691ba40ddcb42c761b1092f97b98ff1e1a3a7110721d1a0c9c15d4c3c5abb3d3fe4daab1725385daa6ad358f08b986f80b0e4cbc28706fecbb5532e933f13782
|
data/lib/lhc.rb
CHANGED
data/lib/lhc/version.rb
CHANGED
@@ -1,9 +1,28 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe LHC do
|
4
|
-
context '
|
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
|
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.
|
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-
|
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.
|
367
|
+
rubygems_version: 2.6.14
|
368
368
|
signing_key:
|
369
369
|
specification_version: 4
|
370
370
|
summary: LocalHttpClient
|