hidemyass2 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: 9f58232809f330aaddd6784b94e77d764b19d56f
4
- data.tar.gz: 3a1e0c97e472d9cf18eced9ff64817cc2b3c89bc
3
+ metadata.gz: 81daf30436f054fe6c5d00d0a65f3278e5225b7d
4
+ data.tar.gz: a8bc68d272b7e71af5808c8fc13bf03764c1cfc0
5
5
  SHA512:
6
- metadata.gz: 213cf39af8934d826e2093df37011615ceaaa454971c4f555976538e3c51b7b78f355ac8967f2780575d58a9b002adaac9fc2e39ad19d0342c35d02d906b300a
7
- data.tar.gz: b9022fd597ef987ba08e6576055ac0cf50eeb149927bd75ca33abf4871aa99a7112e23ca4d6b3ef50fb2ef3c0b20521250f00ddde6b6f229ed059548767ee6a3
6
+ metadata.gz: d17a7c7a96096f8dd132c15c819c34962ff5298d5ec178d64729edf15386b229cc069e85b15379190ba96dd6ea1b60c553cba3a1dc5e986d1b3c1580f094837b
7
+ data.tar.gz: 47d567766e3f75ce23edc547570cfd08dfeb823a7520de4061bbf50f6db582a62d321e4b2b786c40285847357dbd152f9131a20ddd077ad85d2be74549277c01
data/README.md CHANGED
@@ -53,10 +53,10 @@ require 'hidemyass'
53
53
  # pp - Per Page. 0..3 = 10, 25, 50, 100.
54
54
  # sortBy - Sort by. Defaults to date.
55
55
 
56
- proxies = HideMyAss.proxies 'c[]' => 'FRANCE', sortBy: 'response_time'
56
+ proxies = HideMyAss.proxies 'c[]' => 'France', sortBy: 'response_time'
57
57
 
58
58
  proxies.first.country
59
- # => 'FRANCE'
59
+ # => 'france'
60
60
  ```
61
61
 
62
62
  Visit http://proxylist.hidemyass.com for more informations how to filter.
@@ -68,11 +68,11 @@ module HideMyAss
68
68
  @port ||= @row.at_xpath('td[3]').text.strip.to_i
69
69
  end
70
70
 
71
- # The country where the proxy is hosted.
71
+ # The country where the proxy is hosted in downcase letters.
72
72
  #
73
73
  # @return [ String ]
74
74
  def country
75
- @country ||= @row.at_xpath('td[4]').text.strip
75
+ @country ||= @row.at_xpath('td[4]').text.strip.downcase
76
76
  end
77
77
 
78
78
  # The average response time in milliseconds.
@@ -92,7 +92,7 @@ module HideMyAss
92
92
  end
93
93
 
94
94
  # The network protocol in in downcase letters.
95
- # (https or http or socks4/5).
95
+ # (https or http or socks)
96
96
  #
97
97
  # @return [ String ]
98
98
  def type
@@ -101,11 +101,12 @@ module HideMyAss
101
101
 
102
102
  alias protocol type
103
103
 
104
- # The level of anonymity (Low, Medium, High, ...).
104
+ # The level of anonymity in downcase letters.
105
+ # (low, medium, high, ...)
105
106
  #
106
107
  # @return [ String ]
107
108
  def anonymity
108
- @anonymity ||= @row.at_xpath('td[8]').text.strip
109
+ @anonymity ||= @row.at_xpath('td[8]').text.strip.downcase
109
110
  end
110
111
 
111
112
  # The complete URL of that proxy server.
@@ -122,6 +123,13 @@ module HideMyAss
122
123
  ip.split('.').reject(&:empty?).count == 4
123
124
  end
124
125
 
126
+ # If the proxy's network protocol is HTTP.
127
+ #
128
+ # @return [ Boolean ]
129
+ def http?
130
+ protocol == 'http'
131
+ end
132
+
125
133
  # If the proxy's network protocol is HTTPS.
126
134
  #
127
135
  # @return [ Boolean ]
@@ -157,6 +165,19 @@ module HideMyAss
157
165
  anonym? && ssl?
158
166
  end
159
167
 
168
+ # :nocov:
169
+ # Custom inspect method.
170
+ #
171
+ # @example
172
+ # inspect
173
+ # => '<HideMyAss::Proxy http://123.57.52.171:80>'
174
+ #
175
+ # @return [ String ]
176
+ def inspect
177
+ "<#{self.class.name} #{url}>"
178
+ end
179
+ # :nocov:
180
+
160
181
  private
161
182
 
162
183
  # To find out if the element is a part of the IP.
@@ -1,3 +1,3 @@
1
1
  module HideMyAss
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hidemyass2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastián Katzer