neon_api 0.1.1 → 0.1.2

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: 8447bd0028a149a3d391d0db3cefeddb95f3e40e
4
- data.tar.gz: 69c3be725b7cd8ea8c0c7158625fa5b4fb785c3b
3
+ metadata.gz: b9cbcc594765a8c810227d2f29af457059aff266
4
+ data.tar.gz: 9e3506ceabc14c6c207668b06ee9d99d826b204b
5
5
  SHA512:
6
- metadata.gz: 59ce1c15acf761534e23f42bac54b5ee7c0021252f79aa7d5bb7e945b4d3eda96a6fd8f75aeebc37ca17f0a6db8417667f4c0df6610b34f11c1e8f0cf60259c8
7
- data.tar.gz: 2c49c9f7ff0d591fe90b8a97ca31d7678322284c3c7b94966f1284c40ee6d286bc7700d6ac35ccea38806432dc1bde022d55a1e7e385517926b0c337b13b6296
6
+ metadata.gz: f09560d2d7052d5c9d93d47322019608857d56f464520de9d6465b02677001bb305ad5a19d4f14213a6c343b661a6e0ac8601a85471abdb9d87bfc9229b455fb
7
+ data.tar.gz: a4a08ee849df72b3ea945a3bb715c7371d74a5d775ee2d097665f38a844b7931750b72a24b42e13a9ed3cb6bdefd20e352599ced74154886dda3aff09d44c8f7
data/README.md CHANGED
@@ -31,9 +31,10 @@ NeonApi.configure do |config|
31
31
  config.token = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
32
32
  config.username = 'user@name.com'
33
33
  config.password = 'password'
34
- config.encrypt_pem = 'public_encrypt.pem' #path to your encryption pem
35
- config.decrypt_pem = 'public_decrypt.pem' #path to your decryption pem
36
- config.environment = :development #environment :development of :production
34
+ config.proxy = 'http://dasd:asd@asd.asd.com:80' # neon needs a fixed outbound ip
35
+ config.encrypt_pem = 'public_encrypt.pem' # path to your encryption pem
36
+ config.decrypt_pem = 'public_decrypt.pem' # path to your decryption pem
37
+ config.environment = :development # environment :development of :production
37
38
  end
38
39
  ```
39
40
 
@@ -8,7 +8,7 @@ module NeonApi
8
8
  class Client
9
9
  attr_accessor :url, :environment, :payload, :token, :last_authenticated_at, :response,
10
10
  :auth_token, :aes_key, :aes_iv, :expire_time, :client_id, :bank_account, :response
11
- def initialize(environment = :development, token, login, password, encrypt_pem, decrypt_pem)
11
+ def initialize(environment = :development, token, login, password, encrypt_pem, decrypt_pem, proxy)
12
12
  @base_url = if production?
13
13
  'https://apiparceiros.banconeon.com.br/ '
14
14
  else
@@ -21,6 +21,9 @@ module NeonApi
21
21
  @password = password
22
22
  @encrypt_pem = encrypt_pem
23
23
  @decrypt_pem = decrypt_pem
24
+ @proxy = proxy
25
+
26
+ RestClient.proxy = @proxy if @proxy
24
27
  end
25
28
 
26
29
  def authenticate
@@ -15,10 +15,10 @@ module NeonApi
15
15
 
16
16
  # Configuration
17
17
  class Configuration
18
- attr_accessor :environment, :token, :client, :username, :password, :encrypt_pem, :decrypt_pem
18
+ attr_accessor :environment, :token, :client, :username, :password, :encrypt_pem, :decrypt_pem, :proxy
19
19
 
20
20
  def client_setup
21
- @client ||= Client.new(environment, token, username, password, encrypt_pem, decrypt_pem)
21
+ @client ||= Client.new(environment, token, username, password, encrypt_pem, decrypt_pem, proxy)
22
22
  @client.authenticate
23
23
  end
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module NeonApi
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neon_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Hamdan