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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd89217aeb71215ca5c49d519d2d5a758618b18b
4
- data.tar.gz: 4d78d4de8582ff57a1761a149303fa3f638369b3
3
+ metadata.gz: 63085cd6f572280dd638cd117d3f16fc558f70d0
4
+ data.tar.gz: 96afbf7ede7bde36cbe6590cf7d4af507d8538f3
5
5
  SHA512:
6
- metadata.gz: 9dc809c54b6301355de08cb61a4ed2551f1231ce2407f75921ce0dbd786d2976889f23c493d9fe19e644b2db0be3c4dcc2291d79b5536aaf88cfcb6013681d2a
7
- data.tar.gz: b477a06426222fb25506c189c55bc0e021da6d819e3a31094d1081afefaee4e2af6d891238002f4a1174addbb44d65703380a3f59035b25b83e278b9b4f92f55
6
+ metadata.gz: 4414f7af836dbfad1635f816cc9817c20c64c1e58695c78d0331118f7570e7c8f50075c52285cdc34dfb7d4cc8edef17f6b523c273a15f6cff2fb816fabd720d
7
+ data.tar.gz: 171bcdc82d4e783e162ce00920732a8bcc74e4217b0a6d947e6d7ddcecfe31a155ee0cb38cdb1af381e195d3be36cf8f4d1d7c5679070a1aa427fe98449bf94b
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Namira
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
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.0
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: 2017-10-20 00:00:00.000000000 Z
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.11
145
+ rubygems_version: 2.6.13
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: A simple wrapper around HTTP