ipiranga 0.0.5 → 0.0.6

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: 9ba581b8afe71d12ded58bfea512196e1684cbd6
4
- data.tar.gz: 41d7b838b54c7720f726327d56184bd9a7eee037
3
+ metadata.gz: 868098abf90c4ad8c0e881415948c9743a6a7d71
4
+ data.tar.gz: ba49b193aa51fd68ddcf4f51f3431546aaeede6c
5
5
  SHA512:
6
- metadata.gz: dd523ead6de24192b77a2eb7e983f455d0ebbbeaa176aa56a3a5c925be7c0f93ea0f3bbd165a1ed72f4feee3f9aad13f9afd7254bc5342fee326bfd011b92180
7
- data.tar.gz: dbea4913f2c2eaede45650b48f31ea1f88e1c72895f7a1e030d7f57567109b2d9a2caa9f6b3e9bd3a70bd097e945095a625f491f33ad1671b1b0430411a818fe
6
+ metadata.gz: 3d7b2b2ba2cc1c14df197a086f96d16faa8188533248237a3dc519b44c0280cb9b9483c05171693bb88c634fe7b79cba1f53e6dc15dd8e6c828eec7b94873ccb
7
+ data.tar.gz: bc98ea5ce1843a714f9cd897e0b67129722a2a12427bccb03716666c04a2d127b3ce73af6e67798d211eee47dbf5ffa64c6e1439ab48fde3f9aa6c5c5530df74
@@ -1,4 +1,4 @@
1
1
  require 'ipiranga/error'
2
- require 'ipiranga/clients/km'
3
- require 'ipiranga/clients/pf'
2
+ require 'ipiranga/client/km'
3
+ require 'ipiranga/client/pf'
4
4
  require 'ipiranga/version'
@@ -27,7 +27,7 @@ module Ipiranga
27
27
  end
28
28
 
29
29
  def wsdl
30
- @wsdl ||= open(@wsdl_url.to_s).read.gsub("http://eaidev:2010", "https://#{@wsdl_url.host}")
30
+ @wsdl ||= open(@wsdl_url.to_s).read.gsub(/http:\/\/eai(dev|prd):2010/, "https://#{@wsdl_url.host}")
31
31
  end
32
32
 
33
33
  def soap
@@ -3,7 +3,7 @@ require 'ipiranga/client'
3
3
  module Ipiranga
4
4
  class KM < Client
5
5
  def wsdl_url
6
- if defined?(RAILS_ENV) && RAILS_ENV == "production"
6
+ if defined?(ENV["RAILS_ENV"]) && ENV["RAILS_ENV"] == "production"
7
7
  "https://b2b.ipiranga.com.br/csp/ensb2cws/cbpi.bs.km.pedido.Service.CLS?WSDL=1"
8
8
  else
9
9
  "https://b2bdv.ipiranga.com.br/csp/ensb2cws/cbpi.bs.km.pedido.Service.CLS?WSDL=1"
@@ -3,7 +3,7 @@ require 'ipiranga/client'
3
3
  module Ipiranga
4
4
  class PF < Client
5
5
  def wsdl_url
6
- if defined?(RAILS_ENV) && RAILS_ENV == "production"
6
+ if defined?(ENV["RAILS_ENV"]) && ENV["RAILS_ENV"] == "production"
7
7
  "https://b2b.ipiranga.com.br/csp/ensb2cws/cbpi.bs.participantePF.Service.CLS?WSDL=1"
8
8
  else
9
9
  "https://b2bdv.ipiranga.com.br/csp/ensb2cws/cbpi.bs.participantePF.Service.CLS?WSDL=1"
@@ -24,7 +24,7 @@ module Ipiranga
24
24
 
25
25
  private
26
26
 
27
- def self.raise_exception(result)
27
+ def raise_exception(result)
28
28
  case result["msgErro"]
29
29
  when "Usuario/Password Inválido"
30
30
  raise InvalidCredentials.new(result)
@@ -1,6 +1,6 @@
1
1
  module Ipiranga
2
2
  # Joins the version numbers
3
- VERSION = [0, 0, 5].join('.')
3
+ VERSION = [0, 0, 6].join('.')
4
4
 
5
5
  # Returns {VERSION}
6
6
  # @return [String]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipiranga
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amadeus Folego
@@ -73,11 +73,11 @@ extensions: []
73
73
  extra_rdoc_files: []
74
74
  files:
75
75
  - lib/ipiranga.rb
76
- - lib/ipiranga/clients/km.rb
77
- - lib/ipiranga/clients/pf.rb
78
76
  - lib/ipiranga/version.rb
79
77
  - lib/ipiranga/client.rb
80
78
  - lib/ipiranga/error.rb
79
+ - lib/ipiranga/client/km.rb
80
+ - lib/ipiranga/client/pf.rb
81
81
  homepage: https://github.com/badosu/Ipiranga
82
82
  licenses:
83
83
  - MIT
@@ -103,3 +103,4 @@ signing_key:
103
103
  specification_version: 4
104
104
  summary: Ipiranga Web Services Client
105
105
  test_files: []
106
+ has_rdoc: