proxied 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8a21544331bd1193d8d9f134f838999c742aa4c1f4c2e5d2ea900bae9ea26da
4
- data.tar.gz: cc45d9f563de4ad0c4603653193b66e2c0739ae30433b7884edfdaf7824af00d
3
+ metadata.gz: 9e64762e0a727e0f5523d9cae41d35a6af65d1ad736ec206185a57129011c09d
4
+ data.tar.gz: a9a6a3686aefc30494b787977de830b2a6c82fa1e0c5efb24448bdcb35d73376
5
5
  SHA512:
6
- metadata.gz: 908e478ad96163724976c277880433fd8975ccc7c27e68f639f61d7dfb39c6d2abb5eea5a43d996a983765326fd51f3031e46436e893aef81abf69ec73343899
7
- data.tar.gz: a32cd75f38f5860cad7b7ba62cbfca8260666fbf773e42ca9e27d33326b37e210e17a14a3dec60b30030605d75997fd06f780ce8d5bb89835563e5fe7e50e2e0
6
+ metadata.gz: 72154e04ecdc6feb1b4bdf3785bf0477044829e57afd0c100b63ca2fd72073fc6f84447c579f388378d977cbdfce6d98a40a033dbc93ccd4e0bb9ab34362e9af
7
+ data.tar.gz: 6d916e4a0ef2a42cccc47c45d60a32deabc5b4367faa99431090453bd3b9e0fd010d85f2c9ef718d4ac14f4e75f59d8950e4e938d45a18ceb9f8feb0463f0baf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- proxied (0.1.6)
4
+ proxied (0.1.7)
5
5
  faraday (>= 0.14)
6
6
  net-ssh (>= 4.0)
7
7
 
@@ -37,8 +37,8 @@ module Proxied
37
37
  ::Proxied::Utilities.proxy_options_for_faraday(host: self.host, port: self.port, username: self.username, password: self.password)
38
38
  end
39
39
 
40
- def proxy_switcher_address
41
- ::Proxied::Utilities.format_proxy_switcher_address(host: self.host, port: self.port, username: self.username, password: self.password)
40
+ def proxy_switcher_import_format
41
+ ::Proxied::Utilities.proxy_switcher_import_format(host: self.host, port: self.port, username: self.username, password: self.password, country: self.country)
42
42
  end
43
43
  end
44
44
 
@@ -33,8 +33,15 @@ module Proxied
33
33
  return proxy_options
34
34
  end
35
35
 
36
- def format_proxy_switcher_address(host:, port: 80, username: nil, password: nil)
36
+ def proxy_switcher_import_format(host:, port: 80, username: nil, password: nil, country: nil)
37
+ # Format:
38
+ # COUNTRY_CODE,COUNTRY_NAME,CITY,USERNAME:PASSWORD@IP_ADDRESS:PORT
39
+
37
40
  address = ""
41
+
42
+ if !country.to_s.empty?
43
+ address += "#{country.upcase},,,"
44
+ end
38
45
 
39
46
  if !username.to_s.empty? && !password.to_s.empty?
40
47
  address += "#{username}:#{password}@"
@@ -1,3 +1,3 @@
1
1
  module Proxied
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxied
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-12 00:00:00.000000000 Z
11
+ date: 2018-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday