usaepay 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
  SHA256:
3
- metadata.gz: 7d29f7ac049832693d26f2494d94dc54ba578cbf41a60224ea731168220b11c4
4
- data.tar.gz: ed788c4be5e34d8e3282e5897b077008ada1cb6f3af6593df25d38c93f9633dc
3
+ metadata.gz: 89975d8a8be954e6078a9c71fe5105b44b560651ae341c3d1f9a9dda49a87d8f
4
+ data.tar.gz: cba951aadfaa31bdb83c2ec37c451b2c4290309e8d2962e85a19ade24800d695
5
5
  SHA512:
6
- metadata.gz: 5ad1734ff2a18c79ca53f158f780ee3c805494b03960c18d90907dafc4a602a66037296aa9d5c565954c7ddda8382710b0cfcd0ab1f00a1471ca7034292f50da
7
- data.tar.gz: 5b456b458d1535a99edefbf3d49d64e0783f4ee0807321005f6751f6b7bfb3f814fc77f6c3230f2d1837c5af6aa9558b14cfa18aa969849f5ceff69a6f2d3b7d
6
+ metadata.gz: ae0416b15013acc46abce32e891d8566c1fefdcbcee576d4f69534759c53616ba65f7b41d6935cee4bf1beac53d0edb249be1e3b1aaa1c34e78e6fb38ae345cc
7
+ data.tar.gz: b718e66c0f03039b90344f21ca829fcc283dd9d6a880f304467b331645ed3034a9a08dc451094bc0a4e097a27f766903434dd5554249d1e918a695e7a2cae1dc
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .env
data/Gemfile CHANGED
@@ -2,5 +2,9 @@ source "https://rubygems.org"
2
2
 
3
3
  git_source(:github) {|repo_name| "https://github.com/healpay/#{repo_name}" }
4
4
 
5
+ group :development, :test do
6
+ gem 'dotenv', '~> 2.5'
7
+ end
8
+
5
9
  # Specify your gem's dependencies in usaepay.gemspec
6
10
  gemspec
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usaepay (0.1.0)
5
- savon
4
+ usaepay (0.0.3)
5
+ savon (~> 2.12)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -11,24 +11,25 @@ GEM
11
11
  gyoku (>= 0.4.0)
12
12
  nokogiri
13
13
  builder (3.2.3)
14
+ dotenv (2.6.0)
14
15
  gyoku (1.3.1)
15
16
  builder (>= 2.1.2)
16
- httpi (2.4.2)
17
+ httpi (2.4.4)
17
18
  rack
18
19
  socksify
19
- mini_portile2 (2.3.0)
20
+ mini_portile2 (2.4.0)
20
21
  minitest (5.11.1)
21
- nokogiri (1.8.1)
22
- mini_portile2 (~> 2.3.0)
22
+ nokogiri (1.10.1)
23
+ mini_portile2 (~> 2.4.0)
23
24
  nori (2.6.0)
24
- rack (2.0.3)
25
+ rack (2.0.6)
25
26
  rake (10.5.0)
26
- savon (2.11.2)
27
+ savon (2.12.0)
27
28
  akami (~> 1.2)
28
29
  builder (>= 2.1.2)
29
30
  gyoku (~> 1.2)
30
31
  httpi (~> 2.3)
31
- nokogiri (>= 1.4.0)
32
+ nokogiri (>= 1.8.1)
32
33
  nori (~> 2.4)
33
34
  wasabi (~> 3.4)
34
35
  socksify (1.7.1)
@@ -41,9 +42,10 @@ PLATFORMS
41
42
 
42
43
  DEPENDENCIES
43
44
  bundler (~> 1.16)
45
+ dotenv (~> 2.5)
44
46
  minitest (~> 5.0)
45
47
  rake (~> 10.0)
46
48
  usaepay!
47
49
 
48
50
  BUNDLED WITH
49
- 1.16.1
51
+ 1.17.3
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
+ require "dotenv/load"
4
5
  require "usaepay"
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
@@ -8,14 +8,18 @@ module USAePay
8
8
  class Client
9
9
  extend Forwardable
10
10
  def_delegator :@savon, :call
11
- def initialize(wsdl, opts={})
11
+ def initialize(wsdl, opts = {})
12
12
  @wsdl = wsdl
13
- @source_key = opts[:source_key] || raise('Missing source_key')
14
- @pin = opts[:pin]
15
- @savon = Savon.client(wsdl: @wsdl) do
13
+ @source_key = opts.delete(:source_key) { |key| raise ArgumentError, "#{key} required" }
14
+ @pin = opts.delete(:pin)
15
+ @client_ip = opts.delete(:client_ip) { "127.0.0.1" }
16
+ savon_opts = {wsdl: @wsdl}.merge(opts)
17
+
18
+ @savon = Savon.client(savon_opts) do
16
19
  convert_request_keys_to :camelcase
17
20
  namespace_identifier :ns1
18
21
  end
22
+
19
23
  yield self if block_given?
20
24
  end
21
25
 
@@ -35,7 +39,7 @@ module USAePay
35
39
  :seed => seed,
36
40
  :hash_value => sha1
37
41
  },
38
- :client_ip => "127.0.0.1"
42
+ :client_ip => @client_ip
39
43
  }
40
44
  end
41
45
  end
@@ -1,3 +1,3 @@
1
1
  module Usaepay
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ["lib"]
30
30
 
31
- spec.add_dependency "savon"
31
+ spec.add_dependency "savon", "~> 2.12"
32
32
 
33
33
  spec.add_development_dependency "bundler", "~> 1.16"
34
34
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usaepay
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
  - Lance Carlson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-12 00:00:00.000000000 Z
11
+ date: 2019-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '2.12'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '2.12'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -103,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubyforge_project:
107
- rubygems_version: 2.7.3
106
+ rubygems_version: 3.0.2
108
107
  signing_key:
109
108
  specification_version: 4
110
109
  summary: USAepay Client Library