http_utilities 1.2.6.2 → 1.2.6.3

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: a3efac587f297244e6ef38c04ee8215d289e8dad
4
- data.tar.gz: 51b3cdbae9e20dabb42359604e294f26f467b48c
3
+ metadata.gz: 1036be05e1a991da35a3dee2e0e6b1125e6dca6b
4
+ data.tar.gz: 437c2c98897c28cfb5108c1b8a69073c54ca7b57
5
5
  SHA512:
6
- metadata.gz: efbe1c36ac8483d308be301f4f9ccc43af2635d8642ed6d59c881c4c8cb82098160f728679e4c65c5f4e079d957e009ca4c853025a554bf808c0a7de741468c7
7
- data.tar.gz: e9427b38ba8614548472f8b9fcac54a3a6a63b437e939ffb3423da0938d6953bac119d2cf826e7b6e381eb610a92bd2c1fd93b1eb49efdf7571468b5c7385146
6
+ metadata.gz: cc216781a91f6a862e60dc9ce08922af4771d04a26c4b12a609bf7571a39b4780971567ed1b361dd2ff47521002e1ab04da087abbcbeb1611f5cee2a496aa196
7
+ data.tar.gz: 06b47cf2c960c16bd3f67d5eae054ee5edee109d9be0749ff9078a48d9b81e5497f1241e3ac065c65dd91c68e873f926fcb763cec7437bbe1e4572c0ea7abeb8
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
3
3
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version=
4
4
 
5
5
  s.name = "http_utilities"
6
- s.version = "1.2.6.2"
6
+ s.version = "1.2.6.3"
7
7
 
8
8
  s.authors = ["Sebastian Johnsson"]
9
9
  s.description = "Wrapper for Faraday with additional functionality"
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module HttpUtilities
3
- VERSION = "1.2.6.2"
3
+ VERSION = "1.2.6.3"
4
4
 
5
5
  require File.join(File.dirname(__FILE__), 'http_utilities/railtie') if defined?(Rails)
6
6
 
@@ -83,8 +83,8 @@ module HttpUtilities
83
83
  proxy_options = {}
84
84
 
85
85
  proxy_options[:uri] = "http://#{self.proxy[:host]}:#{self.proxy[:port]}"
86
- proxy_options[:user] = self.proxy[:username] if self.proxy[:username] && self.proxy[:username].present?
87
- proxy_options[:password] = self.proxy[:password] if self.proxy[:password] && self.proxy[:password].present?
86
+ proxy_options[:user] = self.proxy[:username] if self.proxy[:username] && !self.proxy[:username].empty?
87
+ proxy_options[:password] = self.proxy[:password] if self.proxy[:password] && !self.proxy[:password].empty?
88
88
 
89
89
  return proxy_options
90
90
  end
@@ -88,6 +88,16 @@ module HttpUtilities
88
88
 
89
89
  return credentials
90
90
  end
91
+
92
+ def proxy_options_for_faraday
93
+ proxy_options = {}
94
+
95
+ proxy_options[:uri] = ::Proxy.format_proxy_address(self.host, self.port, true)
96
+ proxy_options[:user] = self.username if self.username && !self.username.empty?
97
+ proxy_options[:password] = self.password if self.password && !self.password.empty?
98
+
99
+ return proxy_options
100
+ end
91
101
  end
92
102
 
93
103
  end
@@ -84,6 +84,16 @@ module HttpUtilities
84
84
 
85
85
  return credentials
86
86
  end
87
+
88
+ def proxy_options_for_faraday
89
+ proxy_options = {}
90
+
91
+ proxy_options[:uri] = ::Proxy.format_proxy_address(self.host, self.port, true)
92
+ proxy_options[:user] = self.username if self.username && !self.username.empty?
93
+ proxy_options[:password] = self.password if self.password && !self.password.empty?
94
+
95
+ return proxy_options
96
+ end
87
97
  end
88
98
 
89
99
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_utilities
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6.2
4
+ version: 1.2.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Johnsson