basecomm_sdk 1.1.0 → 1.1.1

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: ba51c915adccc5a3c7f56d56ebde75fa00154c45
4
- data.tar.gz: 5b35a46622196279e6341737f11581046818cdd8
3
+ metadata.gz: 059bf4b61777744276db3055ae01ef50ac35dc7c
4
+ data.tar.gz: 00afb3085c23d5ba18d2e61f8454edc39a7c58dd
5
5
  SHA512:
6
- metadata.gz: c172f05889c6471d9869c65725e235aaa9afd8315d0b7500bc953b9302381d67c71d697eb1e08b91938921cd98c935410d978b9e1ca6d80d2cefb49acb7d94b2
7
- data.tar.gz: 3e50ba0cab3fd9d2e03bc9f242d229e7e0c6cc1207d9281030cfc927b18cdb1ecce8cedc318dc596d04c6a6e5cc29c9a9fc5ff8a5fdd2f57bddcfcdc2c970c59
6
+ metadata.gz: 9ba904bdc3ae95d29cee137db0aee18b2da6e507bff2f290fbf2c2615bf37b02fcfbb4c9e8fee01a4c25f1bdfbbde8a42d4e3fa7e71dcf8dfd96a33452b9a963
7
+ data.tar.gz: e461d8b23e03d44d6f4b5fa6928e3f242fdbb96455459e00e89cca75ddeeb349db113e4f3ed6459a0b482e7011ddcae87b9f99fed81d873e5c51993ed5b0feb3
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ *1.1.1* (March 24, 2015)
2
+
3
+ * Truncate #account_name to 32 characters
4
+
1
5
  *1.1.0* (March 11, 2015)
2
6
 
3
7
  * add BankAccountTransaction#failed_reason attribute
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Base Commerce SDK
2
2
 
3
- **Version: 1.0.1**
3
+ **Version: 1.1.1**
4
4
 
5
5
  A gem for interfacing with the [Base Commerce](http://www.basecommerce.com/) API. This gem was developed with their help and serves to provide a Gem wrapper around their own Ruby SDK. Please contact them for more information about the Ruby SDK.
6
6
 
@@ -70,5 +70,9 @@ module BasecommSdk
70
70
  settlement_date
71
71
  end
72
72
  end
73
+
74
+ def account_name
75
+ @account_name.to_s.slice(0, 32).strip
76
+ end
73
77
  end
74
78
  end
@@ -1,3 +1,3 @@
1
1
  module BasecommSdk
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -135,5 +135,28 @@ module BasecommSdk
135
135
  expect(bat.status_date).to eq(bat.settlement_date)
136
136
  end
137
137
  end
138
+
139
+ context '.account_name' do
140
+ it 'truncates to 32 characters' do
141
+ account_name = '0123456789012345678901234567890123456789'
142
+ expect(account_name.size).to eq(40)
143
+ bat = create(:bank_account_transaction, account_name: account_name)
144
+ expect(bat.account_name.size).to eq(32)
145
+ end
146
+
147
+ it 'truncates and trims' do
148
+ account_name = '012345678901234567890123456789 '
149
+ expect(account_name.size).to eq(40)
150
+ bat = create(:bank_account_transaction, account_name: account_name)
151
+ expect(bat.account_name.size).to eq(30)
152
+ end
153
+
154
+ it 'retains the first 32 characters' do
155
+ account_name = 'exactly as I f0und it__________!'
156
+ bat = create(:bank_account_transaction, account_name: account_name)
157
+ expect(bat.account_name).to eq(account_name)
158
+ end
159
+
160
+ end
138
161
  end
139
162
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basecomm_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Blackburn
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-11 00:00:00.000000000 Z
12
+ date: 2015-03-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dotenv