mock_braintree 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aea598969fad5aa0fdf866645af6b3204dca000d59304c4d53faab6f5b0704de
4
- data.tar.gz: 1b90d38ecd6c5acea7ceed0d851f6990c34412f7a9fe01e858f6aebf87357943
3
+ metadata.gz: 9003517a0967b41c191a6bcc5fd99ae595aa34e5ec902afd46a76426c995a7d9
4
+ data.tar.gz: 861fea6fc652766bc327d5b77d62f99454707c99e75d44444eb8a08a6dfd94ea
5
5
  SHA512:
6
- metadata.gz: 8cfcf2f6e956d19cb29669d476e57f4338de3250de07aae0d2f6746f693fa3b41ecb20d4e47b4ec0af3852ec54b29bada5163f3159e043bf35290d6d5403b782
7
- data.tar.gz: f704db440ec0ddac52b1f6d57c5898987721d67e67dc15c14efcdb0a7817150266e82ce847412fdedfb2a7896cb6dd0ba054139c090a3b9e62228971eb8d2b18
6
+ metadata.gz: ef8806e2b96f0e3beebd4a8f40a93e1708b81acd24382bf96a5eb19bf419ca5c36f32414a5cbdfbba831ca67c05c8ff04133636757baf3eca24e752477de8d75
7
+ data.tar.gz: 5be4305f38d88a9866b6981c4d1001fce23c05eedeed0f6d66fe250cd8b6d30faa602da961b16a4e34b58ac9acf6e869c11223501724f341c9cbdf9e4f2530a5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
+ # 0.2.1
2
+ * Fix bug where transaction object would return new ID value each time called
3
+ * Removed `nonce` attribute from transaction object to match actual Braintree response
4
+
1
5
  # 0.2.0
2
- * BREAKING CHANGE - separated transaction and result object. Depending on success, the result will now be either a `SuccessfulResult` or `UnsuccessfulResult` object that contains a transaction object. This was changed to better match an actual Braintree response.
6
+ * BREAKING CHANGE - separated transaction and result object. Depending on success, the result will now be either a `SuccessfulResult` or `UnsuccessfulResult` object that contains a transaction object. This was changed to better match an actual Braintree response
3
7
 
4
8
  # 0.1.0
5
9
  * Add basic `transaction.sale` functionality with result object and `transaction` object
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mock_braintree (0.1.0)
4
+ mock_braintree (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,12 +1,10 @@
1
1
  require 'securerandom'
2
2
 
3
3
  class Transaction
4
- attr_reader :nonce, :amount
4
+ attr_reader :amount
5
5
 
6
6
  def initialize(hash = {})
7
7
  @amount = hash[:amount]
8
- @nonce = hash[:nonce]
9
- @id = id
10
8
  @options = hash.fetch(:options, nil)
11
9
  @submit_for_settlement = submit_for_settlement
12
10
  end
@@ -25,12 +23,8 @@ class Transaction
25
23
  end
26
24
  end
27
25
 
28
- # def transaction
29
- # self
30
- # end
31
-
32
26
  def id
33
- SecureRandom.hex(3)
27
+ @id ||= SecureRandom.hex(3)
34
28
  end
35
29
 
36
30
  private
@@ -1,3 +1,3 @@
1
1
  module MockBraintree
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mock_braintree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brent Busby
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-03 00:00:00.000000000 Z
11
+ date: 2019-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler