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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sinesp_client_v2/version.rb +1 -1
- data/lib/sinesp_client_v2.rb +9 -1
- data/sinesp_client_v2.gemspec +3 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e40a18be4f4ed5518f72c2af70973b1b4619c5c27dbc7596a2e7631b5267f39
|
4
|
+
data.tar.gz: 2d3a2ec847fdfdaeb10e30b72e030e52bb7990823930fe1cccefaa2417b3b4f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5da3e5dd6ac4863ef715b9dd90c8fbebbb0ea56e164c7bbf95bf94ad7da687d8862742e0d6eaf38ac31e573856cdbbb4d80de3482caa70dc0bfcdd1e947a778b
|
7
|
+
data.tar.gz: 969e66d0280b5107e236b5ee27c0f5090d683dd40d9a00b8c671594147d65cc89547d076567cc36fc8419721a77c2e38332b9250790712b88e91fed059e056f6
|
data/Gemfile.lock
CHANGED
data/lib/sinesp_client_v2.rb
CHANGED
@@ -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
|
data/sinesp_client_v2.gemspec
CHANGED
@@ -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.
|
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:
|
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: []
|