safettp 0.2.1 → 0.3.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: 79b911d2389ff05c9d950304fda9e891d95c93f7
4
- data.tar.gz: df6ed7d52265889ee084eac7e418afd5e262c1ff
3
+ metadata.gz: 0aacb6665f1ef7a0e355843bc2accae2d4994e4c
4
+ data.tar.gz: d74f7dfbac3ca4feca94d6ff59848888b12676f2
5
5
  SHA512:
6
- metadata.gz: 32e69bb00b3cdaa33f58dcdd54a67de19419b9dbec5999e034266932e5808192a1f9ae445f5ac9dcec17de2c9e5bc7c6037d2684e08406e3f450b30bbf02e927
7
- data.tar.gz: daf81fba6cd444576cd37441ae92cabc26a5050bb7e3121009a0533560cc7671eca6143faa53a4266a522da1d9b7e016f434c88e09f21706c3428b85699eedb6
6
+ metadata.gz: 3bd9caea86427d62a6ec42cdcb821ab01f835a2a42f85b29a316e587aa64b8e5a307d8b56976b4d32dea6a457bfb7a2bac894ed4f97561940fce7886fc81c8f1
7
+ data.tar.gz: 15644c03034daa143f7864e2c7c63a4921a1abc6f42ac8795a99c2641f0b927badb1ba966eb1e394873f977e29640580a522c41174dc6a8b4b0621268e1ee8bc
@@ -1,5 +1,5 @@
1
1
  class Safettp::HTTPOptions
2
- AUTHENTICATORS = {
2
+ AUTH_TYPES = {
3
3
  none: Safettp::NoneAuthenticator,
4
4
  basic: Safettp::BasicAuthenticator
5
5
  }.freeze
@@ -31,9 +31,9 @@ class Safettp::HTTPOptions
31
31
  options_hash.fetch(:body, "")
32
32
  end
33
33
 
34
- def authorization
35
- authorization_options = options_hash.fetch(:authorization, { type: :none })
36
- AUTHENTICATORS.fetch(authorization_options[:type], Safettp::NoneAuthenticator)
37
- .new(authorization_options)
34
+ def auth
35
+ auth_options = options_hash.fetch(:auth, { type: :none })
36
+ AUTH_TYPES.fetch(auth_options[:type], Safettp::NoneAuthenticator)
37
+ .new(auth_options)
38
38
  end
39
39
  end
@@ -30,7 +30,7 @@ class Safettp::Request::Net
30
30
  private
31
31
 
32
32
  def set_authorization(request)
33
- options.authorization.set(request)
33
+ options.auth.set(request)
34
34
  end
35
35
 
36
36
  def set_body(request)
@@ -1,3 +1,3 @@
1
1
  module Safettp
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safettp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emric