finapps_core 2.0.13 → 2.0.14
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86bc9e7cd93098384999250f48d2fdda8f4ca28b
|
4
|
+
data.tar.gz: 2937bd60ffef3631111dc2e56dee2f74b7dbd079
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05bbf8d6c82bb75465d0860283401a1740aef976eec61061b433fa0e02cf9849ec618d2fba52055f4156c7b41a6e6af876c101447ece3d8fb5261b3309ea8297
|
7
|
+
data.tar.gz: d6e35e528aae53103ef0f3cd8469bdd1c5fe9289a5f4c9533e867347d742826339578b9b4207580b5e8acab276f259b161d6934203fbea50896b0b69be1428ed
|
@@ -23,26 +23,6 @@ module ObjectExtensions
|
|
23
23
|
def present?
|
24
24
|
!blank?
|
25
25
|
end
|
26
|
-
|
27
|
-
# Returns the receiver if it's present otherwise returns +nil+.
|
28
|
-
# <tt>object.presence</tt> is equivalent to
|
29
|
-
#
|
30
|
-
# object.present? ? object : nil
|
31
|
-
#
|
32
|
-
# For example, something like
|
33
|
-
#
|
34
|
-
# state = params[:state] if params[:state].present?
|
35
|
-
# country = params[:country] if params[:country].present?
|
36
|
-
# region = state || country || 'US'
|
37
|
-
#
|
38
|
-
# becomes
|
39
|
-
#
|
40
|
-
# region = params[:state].presence || params[:country].presence || 'US'
|
41
|
-
#
|
42
|
-
# @return [Object]
|
43
|
-
def presence
|
44
|
-
self if present?
|
45
|
-
end
|
46
26
|
end
|
47
27
|
end
|
48
28
|
|
@@ -4,7 +4,7 @@ module FinAppsCore
|
|
4
4
|
module ParameterFilter
|
5
5
|
using StringExtensions
|
6
6
|
PROTECTED_KEYS = %w(login login1 username password password1 password_confirm token
|
7
|
-
x-
|
7
|
+
x-tenant-token authorization routing_no account_no tpr_id).freeze
|
8
8
|
|
9
9
|
def skip_sensitive_data(hash)
|
10
10
|
if hash.is_a? String
|
data/lib/finapps_core/version.rb
CHANGED
@@ -29,16 +29,5 @@ RSpec.describe ObjectExtensions do
|
|
29
29
|
it { expect(false.present?).to eq(false) }
|
30
30
|
end
|
31
31
|
end
|
32
|
-
|
33
|
-
describe '#presence' do
|
34
|
-
# Returns the receiver if it's present otherwise returns +nil+.
|
35
|
-
context 'returns the receiver when the receiver is present' do
|
36
|
-
it { expect(true.presence).to eq(true) }
|
37
|
-
end
|
38
|
-
|
39
|
-
context 'returns nil when the receiver is not present' do
|
40
|
-
it { expect(false.presence).to be_nil }
|
41
|
-
end
|
42
|
-
end
|
43
32
|
end
|
44
33
|
end
|
@@ -13,7 +13,11 @@ RSpec.describe FinAppsCore::Utils::ParameterFilter do
|
|
13
13
|
token: '123456',
|
14
14
|
login: 'sammysosa',
|
15
15
|
username: 'johnny',
|
16
|
-
name: 'george'
|
16
|
+
name: 'george',
|
17
|
+
routing_no: '2316151651',
|
18
|
+
account_no: '987984654',
|
19
|
+
tpr_id: 'asdfasdf5465w1e65r4we654r',
|
20
|
+
'x-tenant-token': '498798465132154987498'
|
17
21
|
}
|
18
22
|
end
|
19
23
|
let(:filtered_params) do
|
@@ -23,7 +27,11 @@ RSpec.describe FinAppsCore::Utils::ParameterFilter do
|
|
23
27
|
token: '[REDACTED]',
|
24
28
|
login: '[REDACTED]',
|
25
29
|
username: '[REDACTED]',
|
26
|
-
name: 'george'
|
30
|
+
name: 'george',
|
31
|
+
routing_no: '[REDACTED]',
|
32
|
+
account_no: '[REDACTED]',
|
33
|
+
tpr_id: '[REDACTED]',
|
34
|
+
'x-tenant-token': '[REDACTED]'
|
27
35
|
}
|
28
36
|
end
|
29
37
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finapps_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Quintero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|