hiu_auth 0.0.4 → 0.0.5

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hiu_auth.rb +1 -0
  3. data/lib/hiu_http.rb +21 -0
  4. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b314505ea997350c0b18c59b42c1c5bf85510545015503717e04da8812c4401b
4
- data.tar.gz: 0b88b7192f42d0c653591b16b31f1e5a286e1059fe5520925c19cfc2f4a60b65
3
+ metadata.gz: d2f705d1370c614ac99def69b6b0dd7d61d0a1d5eb92765a3501219a13b9aafd
4
+ data.tar.gz: be485943530a12c5bfa5b99c019c7cd1104f5103cb6c4b047296ad4da0efef41
5
5
  SHA512:
6
- metadata.gz: 00f2a4b9d032120494f26a9dbffec902df61a66d7565343b9998f8b7c662d37dad3503e0c5f4664a3a29f7d321fea45df1f53a062b58f9fc6be90c64f17610bb
7
- data.tar.gz: fd2d49645ae12a7480320ce7aadb2bdc0341fa390a7332a60a8a26fbc65e9697a785043c8a2c7a91dca21509aef1b7e4143bc24908e40b006e143d1de2b8ba49
6
+ metadata.gz: 14e482cc89a1645c5ebed2aa5aac34de6c4b6ddb6da61ba05251a8c78c08ea29ab8a334a5a1d130074fcab7004903ddfe335f42c1b7747f99244e77342ea4750
7
+ data.tar.gz: 5d974db22fa6d2d2ffa10015726ead970c215c07022a58d87c24b893e3fd38ee64c755b3b8e1a1c70a62de0b6dcf4e6c87ad990c89bde41dc5e9852e0b214b0c
data/lib/hiu_auth.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative 'hiu_http'
2
3
 
3
4
  class HiuAuth
data/lib/hiu_http.rb ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ class HiuHttp
4
+ attr_reader :method, :connection
5
+
6
+ def initialize(base_url, uri, method, headers, options = {})
7
+ Excon.defaults[:ssl_verify_peer] = false
8
+ @method = method
9
+ @connection = Excon.new(
10
+ base_url + uri,
11
+ headers: headers,
12
+ body: URI.encode_www_form(options),
13
+ tcp_nodelay: true,
14
+ nonblock: false,
15
+ )
16
+ end
17
+
18
+ def call
19
+ connection.request(method: method)
20
+ end
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiu_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dino Hiu
@@ -31,6 +31,7 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - lib/hiu_auth.rb
34
+ - lib/hiu_http.rb
34
35
  homepage: https://rubygems.org/gems/hiu_auth
35
36
  licenses:
36
37
  - MIT