transact_pro 1.1.1 → 1.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: 011c86b0a8665c94653648cf513db0934d918526
4
- data.tar.gz: 0a2eca582f84e0734bb3c267aa8de19053d03ec0
3
+ metadata.gz: 29293bf9df65648ff7f4eea4681f5b400476ff8c
4
+ data.tar.gz: 867148a9f1736852db5329679bad46b201eb36df
5
5
  SHA512:
6
- metadata.gz: b584e8f8f61484982dd2117d876a952c12f50f63838fb1f7e05f71d91000cf2d97c1c0db872628c25932b5cf087018b8a2fee21faa32801bed4641cdd2005fba
7
- data.tar.gz: 12373ddb763909c7b2a181214a5a0c87338794839d7fdaad48f656f216032334d78a8ee5d2072a2083cf7e91bb6b3a365d3b825f7bb82b570bddab2ddf11939e
6
+ metadata.gz: 8f237b646bfb69ea454db9dcba67f594ad2922302bdd80c7bb1d55796b77c177ff47f2fa545632bdf207aa9e0b1f7207f4f19ab5eb0ecffccc715a862fbc7398
7
+ data.tar.gz: 1e137def4437e85bed00f30bf1ef38e4c5851b36b06fa99012f2749eec96b5a27bc6b237456d263f939ce879d7e74c2e15ca9fb17e052f73ad9dcddeb9b194a3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- transact_pro (1.1.1)
4
+ transact_pro (1.1.2)
5
5
  rest-client (~> 2.0.2)
6
6
 
7
7
  GEM
@@ -20,7 +20,7 @@ GEM
20
20
  safe_yaml (~> 1.0.0)
21
21
  diff-lcs (1.3)
22
22
  docile (1.1.5)
23
- domain_name (0.5.20170404)
23
+ domain_name (0.5.20180417)
24
24
  unf (>= 0.0.5, < 1.0.0)
25
25
  hashdiff (0.3.7)
26
26
  http-cookie (1.0.3)
@@ -30,7 +30,7 @@ GEM
30
30
  mime-types (3.1)
31
31
  mime-types-data (~> 3.2015)
32
32
  mime-types-data (3.2016.0521)
33
- multi_json (1.12.2)
33
+ multi_json (1.13.1)
34
34
  netrc (0.11.0)
35
35
  pry (0.11.3)
36
36
  coderay (~> 1.1.0)
@@ -53,7 +53,7 @@ GEM
53
53
  rspec-mocks (3.7.0)
54
54
  diff-lcs (>= 1.2.0, < 2.0)
55
55
  rspec-support (~> 3.7.0)
56
- rspec-support (3.7.0)
56
+ rspec-support (3.7.1)
57
57
  safe_yaml (1.0.4)
58
58
  simplecov (0.15.1)
59
59
  docile (~> 1.1.0)
@@ -63,11 +63,12 @@ GEM
63
63
  term-ansicolor (1.6.0)
64
64
  tins (~> 1.0)
65
65
  thor (0.20.0)
66
+ timecop (0.9.1)
66
67
  tins (1.16.3)
67
68
  unf (0.1.4)
68
69
  unf_ext
69
- unf_ext (0.0.7.4)
70
- webmock (3.2.1)
70
+ unf_ext (0.0.7.5)
71
+ webmock (3.4.2)
71
72
  addressable (>= 2.3.6)
72
73
  crack (>= 0.3.2)
73
74
  hashdiff
@@ -82,8 +83,9 @@ DEPENDENCIES
82
83
  rake (~> 10.0)
83
84
  rspec (~> 3.7)
84
85
  simplecov (~> 0.15.1)
86
+ timecop (~> 0.9.1)
85
87
  transact_pro!
86
- webmock
88
+ webmock (~> 3.4.2)
87
89
 
88
90
  BUNDLED WITH
89
91
  1.16.1
data/README.md CHANGED
@@ -66,6 +66,7 @@ To this end, initialize gateway instances like so:
66
66
  ```rb
67
67
  options = {
68
68
  TEST: false, # defaults to false, pass `true` if you want the gem to make requests to the sandbox endpoints
69
+ VERBOSE: false, # defaults to false. Initialize with true to have the gem be verbose about that it is doing, especially what params are used in requests.
69
70
  GUID: "CAZY-7319-WI00-0C40", # mandatory
70
71
  PASSWORD: "g44B/pAENO2E", # mandatory
71
72
  ACCOUNT_3D: "CS01", # default routing string of Account to be used for 3D transactions
@@ -3,16 +3,16 @@ class TransactPro::Gateway
3
3
 
4
4
  def initialize(options)
5
5
  test = TransactPro::DEFAULTS[:TEST] || !!options[:TEST]
6
+ verbose = !!options[:VERBOSE]
6
7
 
7
8
  env_key = (test ? :TEST_ENV : :PRODUCTION_ENV)
8
9
 
9
10
  @options = {
10
- TEST: test,
11
11
  pwd: Digest::SHA1.hexdigest(options[:PASSWORD].to_s),
12
12
  guid: options[:GUID].to_s
13
13
  }.merge(TransactPro::DEFAULTS[env_key])
14
14
 
15
- @options.merge!(options)
15
+ @options.merge!(options.merge(TEST: test, VERBOSE: verbose))
16
16
 
17
17
  unless @options[:GUID].to_s[%r'\A(?:\w){4}-(?:\w){4}-(?:\w){4}-(?:\w){4}\z']
18
18
  raise ArgumentError.new(
@@ -28,6 +28,14 @@ class TransactPro::Request
28
28
  # does prep
29
29
  details
30
30
 
31
+ if options[:VERBOSE]
32
+ puts(
33
+ ">> About to make a POST request to TransactPro at #{Time.now} GMT.\n"\
34
+ " url: #{@url}\n"\
35
+ " params: #{@postable_params.merge(pwd: "..redacted..")}"
36
+ )
37
+ end
38
+
31
39
  @raw_response = RestClient.post(@url, @postable_params)
32
40
  @response = TransactPro::Response.new(@raw_response.to_s)
33
41
  end
@@ -1,3 +1,3 @@
1
1
  module TransactPro
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -27,9 +27,9 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "bundler", "~> 1.16"
28
28
  spec.add_development_dependency "rake", "~> 10.0"
29
29
  spec.add_development_dependency "rspec", "~> 3.7"
30
- spec.add_development_dependency "webmock"#, "~> 3.7"
30
+ spec.add_development_dependency "webmock", "~> 3.4.2"
31
+ spec.add_development_dependency "timecop", "~> 0.9.1"
31
32
  spec.add_development_dependency "pry", "~> 0.11.3"
32
33
  spec.add_development_dependency "simplecov", "~> 0.15.1"
33
34
  spec.add_development_dependency "coveralls", "~> 0.7.1"
34
-
35
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transact_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Epigene
@@ -70,16 +70,30 @@ dependencies:
70
70
  name: webmock
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 3.4.2
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: 3.4.2
83
+ - !ruby/object:Gem::Dependency
84
+ name: timecop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 0.9.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
81
95
  - !ruby/object:Gem::Version
82
- version: '0'
96
+ version: 0.9.1
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: pry
85
99
  requirement: !ruby/object:Gem::Requirement