sinesp_client_v2 0.1.3 → 0.1.4

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: 7c231c34b08222d9e711e1e85a1382fca97a91e5ca22291945c055ed1a9ae13f
4
- data.tar.gz: 4cfd7ec1a17d44e3f7bdc5a7793e7aa83a4242c107eadce85ee2b94c2d7976af
3
+ metadata.gz: 7e40a18be4f4ed5518f72c2af70973b1b4619c5c27dbc7596a2e7631b5267f39
4
+ data.tar.gz: 2d3a2ec847fdfdaeb10e30b72e030e52bb7990823930fe1cccefaa2417b3b4f8
5
5
  SHA512:
6
- metadata.gz: 14632d5133a3ab5e8c8e59b6453738139674d5a7f4916893e8fe5c712046d5b9ff34d75016479373c228e81ca29ab3de8a00c5626224dc2967dc0fde439275a3
7
- data.tar.gz: 5b97a0169e41da944775ed0cc3cc6b3309ac468f10f152a703296b9e904f8c5107450cd376e137eac5ff4ece8abb4ffdcbcd1b9cfed978cb130004cc9ce35a4f
6
+ metadata.gz: 5da3e5dd6ac4863ef715b9dd90c8fbebbb0ea56e164c7bbf95bf94ad7da687d8862742e0d6eaf38ac31e573856cdbbb4d80de3482caa70dc0bfcdd1e947a778b
7
+ data.tar.gz: 969e66d0280b5107e236b5ee27c0f5090d683dd40d9a00b8c671594147d65cc89547d076567cc36fc8419721a77c2e38332b9250790712b88e91fed059e056f6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sinesp_client_v2 (0.1.2)
4
+ sinesp_client_v2 (0.1.4)
5
5
  httparty (~> 0.15.6)
6
6
 
7
7
  GEM
@@ -1,3 +1,3 @@
1
1
  module SinespClientV2
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -9,7 +9,11 @@ module SinespClientV2
9
9
  BASE_URL = 'sinespcidadao.sinesp.gov.br'.freeze
10
10
  SECRET_KEY = 'XvAmRTGhQchFwzwduKYK'.freeze
11
11
 
12
- def self.search(plate)
12
+ def self.search(plate, proxy = {})
13
+ unless proxy.empty?
14
+ configure_proxy(proxy[:host], proxy[:port], proxy[:user], proxy[:password])
15
+ end
16
+
13
17
  @plate = plate.gsub(/\W+/, '')
14
18
 
15
19
  response = post(
@@ -90,4 +94,8 @@ module SinespClientV2
90
94
  </v:Body>
91
95
  </v:Envelope>"
92
96
  end
97
+
98
+ def self.configure_proxy(host, port, user, password)
99
+ http_proxy(host, port,user, password)
100
+ end
93
101
  end
@@ -10,7 +10,9 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["aschiavon91@gmail.com"]
11
11
 
12
12
  spec.summary = "Another version of sinesp client gem"
13
- spec.description = "Usage: include sinesp_client_v2 and call SinespClientV2.search('ABC1234')"
13
+ spec.description = "Usage: include sinesp_client_v2 and call SinespClientV2.search('ABC1234')
14
+ or SinespClientV2.search('ABC1234', {host: '127.0.0.1', port: '8080', user: 'user', password: '123456'})
15
+ to use with proxy!"
14
16
  spec.homepage = "https://github.com/aschiavon91/sinesp_client"
15
17
  spec.license = "MIT"
16
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinesp_client_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antonio Schiavon
@@ -66,7 +66,10 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.15.6
69
- description: 'Usage: include sinesp_client_v2 and call SinespClientV2.search(''ABC1234'')'
69
+ description: |-
70
+ Usage: include sinesp_client_v2 and call SinespClientV2.search('ABC1234')
71
+ or SinespClientV2.search('ABC1234', {host: '127.0.0.1', port: '8080', user: 'user', password: '123456'})
72
+ to use with proxy!
70
73
  email:
71
74
  - aschiavon91@gmail.com
72
75
  executables: []