namira 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/namira/request.rb +5 -5
- data/lib/namira/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: 63085cd6f572280dd638cd117d3f16fc558f70d0
|
4
|
+
data.tar.gz: 96afbf7ede7bde36cbe6590cf7d4af507d8538f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4414f7af836dbfad1635f816cc9817c20c64c1e58695c78d0331118f7570e7c8f50075c52285cdc34dfb7d4cc8edef17f6b523c273a15f6cff2fb816fabd720d
|
7
|
+
data.tar.gz: 171bcdc82d4e783e162ce00920732a8bcc74e4217b0a6d947e6d7ddcecfe31a155ee0cb38cdb1af381e195d3be36cf8f4d1d7c5679070a1aa427fe98449bf94b
|
data/lib/namira/request.rb
CHANGED
@@ -4,16 +4,16 @@ module Namira
|
|
4
4
|
class Request
|
5
5
|
attr_reader :uri, :http_method
|
6
6
|
|
7
|
-
def initialize(uri:, http_method: :get, headers: {}, body: nil, auth: nil)
|
7
|
+
def initialize(uri:, http_method: :get, headers: {}, body: nil, auth: nil, config: {})
|
8
8
|
@uri = uri
|
9
9
|
@http_method = http_method
|
10
10
|
@headers = headers || {}
|
11
11
|
@body = body
|
12
12
|
@auth = auth
|
13
|
-
@timeout = Namira.configure.timeout
|
14
|
-
@max_redirect = Namira.configure.max_redirect
|
15
|
-
@backend = Namira.configure.backend || Namira::Backend
|
16
|
-
@user_agent = Namira.configure.user_agent
|
13
|
+
@timeout = config[:timeout] || Namira.configure.timeout
|
14
|
+
@max_redirect = config[:max_redirect] || Namira.configure.max_redirect
|
15
|
+
@backend = config[:backend] || Namira.configure.backend || Namira::Backend
|
16
|
+
@user_agent = config[:user_agent] || Namira.configure.user_agent
|
17
17
|
end
|
18
18
|
|
19
19
|
def send_request
|
data/lib/namira/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: namira
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Skylar Schipper
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
requirements: []
|
144
144
|
rubyforge_project:
|
145
|
-
rubygems_version: 2.6.
|
145
|
+
rubygems_version: 2.6.13
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: A simple wrapper around HTTP
|