proxy_service 0.0.2 → 0.0.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: 38cdb59fef090cca25e655130d91518ac3357946
4
- data.tar.gz: fbef2837395c170a06f357d15265dc276b3c941e
3
+ metadata.gz: 4e6d358768c44f1374444e0a4ae94c02e579e15d
4
+ data.tar.gz: b94249dbfa487c461fc5f484a91caad9d7321e09
5
5
  SHA512:
6
- metadata.gz: 7cc615ca48de232996ce1e7d2d332aab56faca1346b3be171161815991447d4be1e647b126e9cd868a5b9a3ad69dbdbb9908f9442aa33967291cb79ea925d5e6
7
- data.tar.gz: 818e762409a5c513f4191d88ea062d0960c65dbf121a284f965da9fb56bfef4cf827d3ca6f64a702b37ff58ad2e2ce68236b72dda63a07fe75a29e6d7e1ad293
6
+ metadata.gz: ed89ffe6b0221b84dc8ac19d2328157b47cec3f46f8e9050d6b04ba0a290b3f1be4ad29ce6819a246f02bbcf82f04a32e38455276c67a8fa96e6c9e1946d4211
7
+ data.tar.gz: 2c8c355cfe7d368238d3e9a53168f6f3de119eb683f3bf58d30d7b26e576b308ee3ce15dd556e7d4102ac82cc7746927d8ef911823ab138c4337acc9f253ef24
@@ -1,3 +1,3 @@
1
1
  class ProxyService
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ describe ProxyService::MechanizeAgent, slow: true do
4
+
5
+ describe '#set_proxy' do
6
+ context 'when -proxy- has an +ip+' do
7
+ let(:proxy) { double('Proxy', ip: '127.0.0.1', port: 8080) }
8
+
9
+ it 'calls +set_proxy+ on the underlying object' do
10
+ expect(subject.__getobj__).to receive(:set_proxy).with(proxy.ip, proxy.port, nil, nil)
11
+ subject.set_proxy(proxy)
12
+ end
13
+ end
14
+
15
+ context 'when -proxy- does not have an +ip+' do
16
+ let(:proxy) { double('Proxy', ip: nil) }
17
+
18
+ it 'does not call +set_proxy+ on the underlying object' do
19
+ expect(subject.__getobj__).to_not receive(:set_proxy)
20
+ subject.set_proxy(proxy)
21
+ end
22
+ end
23
+ end
24
+
25
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxy_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Buckley
@@ -112,6 +112,7 @@ files:
112
112
  - lib/proxy_service/version.rb
113
113
  - lib/proxy_service/worker.rb
114
114
  - proxy_service.gemspec
115
+ - spec/lib/proxy_service/mechanize_agent_spec.rb
115
116
  - spec/lib/proxy_service/proxy_spec.rb
116
117
  - spec/lib/proxy_service/worker_spec.rb
117
118
  - spec/lib/proxy_service_spec.rb
@@ -141,6 +142,7 @@ signing_key:
141
142
  specification_version: 4
142
143
  summary: Manages rotation of proxies using a queue
143
144
  test_files:
145
+ - spec/lib/proxy_service/mechanize_agent_spec.rb
144
146
  - spec/lib/proxy_service/proxy_spec.rb
145
147
  - spec/lib/proxy_service/worker_spec.rb
146
148
  - spec/lib/proxy_service_spec.rb