starkit_banking 0.1.25 → 0.1.26

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
  SHA1:
3
- metadata.gz: 558984942a332b023fdc3897345d842389c0c2d9
4
- data.tar.gz: 574c1d4d5e8812ece7e6fe5645393771caccd4de
3
+ metadata.gz: fdf0950212c7833eb18b94bdfbdf9eec515be300
4
+ data.tar.gz: cbeedcd0625a1848a215b4dd0b3e07c13df84dab
5
5
  SHA512:
6
- metadata.gz: b7b0cdcc695d559c9710d2afaa5e46271f5ecac47195cd928bc9a1ca77a7affc9d206962cc6dfff1a81d6075550f7fccc3987e0ee0c2bbe041ac1d4682283d38
7
- data.tar.gz: 8c067b411523c6daab79106b2909f09c500bfc0929226c908b08cd440a484303108b539f47c7c06a9251088f70ea31a167678e76691fcb79098a4fc5606b2c9c
6
+ metadata.gz: cdb86571122906957062826f40c5bda7e0ba4dfae24c7c2817d42351bcc9bd170cb1c4171adad966bf17e1a514ece6c76426b171549b490af5e0a600bf3e3630
7
+ data.tar.gz: 316adb7c7f41ee8213798d716bca7d2b9d8f6cd5886aa5d4dd20527be923820430889e0e467b1468573ebdfbeabd571eccb51161f519953fa302216798dddad5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- starkit_banking (0.1.24)
4
+ starkit_banking (0.1.26)
5
5
  activerecord (~> 4.2.7)
6
6
  activesupport (~> 4.2.7)
7
7
  api_banking (= 0.1.33)
@@ -11,27 +11,27 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actionpack (4.2.9)
15
- actionview (= 4.2.9)
16
- activesupport (= 4.2.9)
14
+ actionpack (4.2.10)
15
+ actionview (= 4.2.10)
16
+ activesupport (= 4.2.10)
17
17
  rack (~> 1.6)
18
18
  rack-test (~> 0.6.2)
19
19
  rails-dom-testing (~> 1.0, >= 1.0.5)
20
20
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
21
- actionview (4.2.9)
22
- activesupport (= 4.2.9)
21
+ actionview (4.2.10)
22
+ activesupport (= 4.2.10)
23
23
  builder (~> 3.1)
24
24
  erubis (~> 2.7.0)
25
25
  rails-dom-testing (~> 1.0, >= 1.0.5)
26
26
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
27
- activemodel (4.2.9)
28
- activesupport (= 4.2.9)
27
+ activemodel (4.2.10)
28
+ activesupport (= 4.2.10)
29
29
  builder (~> 3.1)
30
- activerecord (4.2.9)
31
- activemodel (= 4.2.9)
32
- activesupport (= 4.2.9)
30
+ activerecord (4.2.10)
31
+ activemodel (= 4.2.10)
32
+ activesupport (= 4.2.10)
33
33
  arel (~> 6.0)
34
- activesupport (4.2.9)
34
+ activesupport (4.2.10)
35
35
  i18n (~> 0.7)
36
36
  minitest (~> 5.1)
37
37
  thread_safe (~> 0.3, >= 0.3.4)
@@ -47,13 +47,15 @@ GEM
47
47
  coderay (1.1.1)
48
48
  crack (0.4.3)
49
49
  safe_yaml (~> 1.0.0)
50
+ crass (1.0.3)
50
51
  erubis (2.7.0)
51
- ethon (0.10.1)
52
+ ethon (0.11.0)
52
53
  ffi (>= 1.3.0)
53
54
  ffi (1.9.18)
54
55
  hashdiff (0.3.1)
55
56
  i18n (0.7.0)
56
- loofah (2.0.3)
57
+ loofah (2.1.1)
58
+ crass (~> 1.0.2)
57
59
  nokogiri (>= 1.5.9)
58
60
  method_source (0.8.2)
59
61
  mini_portile2 (2.1.0)
@@ -79,20 +81,20 @@ GEM
79
81
  rails-deprecated_sanitizer (>= 1.0.1)
80
82
  rails-html-sanitizer (1.0.3)
81
83
  loofah (~> 2.0)
82
- railties (4.2.9)
83
- actionpack (= 4.2.9)
84
- activesupport (= 4.2.9)
84
+ railties (4.2.10)
85
+ actionpack (= 4.2.10)
86
+ activesupport (= 4.2.10)
85
87
  rake (>= 0.8.7)
86
88
  thor (>= 0.18.1, < 2.0)
87
89
  rake (10.5.0)
88
90
  safe_yaml (1.0.4)
89
- sixarm_ruby_unaccent (1.1.2)
91
+ sixarm_ruby_unaccent (1.2.0)
90
92
  slop (3.6.0)
91
- thor (0.19.4)
93
+ thor (0.20.0)
92
94
  thread_safe (0.3.6)
93
95
  typhoeus (1.1.2)
94
96
  ethon (>= 0.9.0)
95
- tzinfo (1.2.3)
97
+ tzinfo (1.2.4)
96
98
  thread_safe (~> 0.1)
97
99
  vcr (3.0.3)
98
100
  webmock (2.1.0)
@@ -1,46 +1,50 @@
1
1
  module StarkitBanking
2
2
  class Environment
3
- def self.build(credentials)
4
- if credentials.environment.try(:upcase) == 'UAT'
5
- if credentials.bank_name == 'YBL'
6
- ::ApiBanking::Environment::YBL::UAT.new(
7
- credentials.decrypt_username,
8
- credentials.password,
9
- credentials.decrypt_client_id,
10
- credentials.decrypt_client_secret
11
- )
12
- else
13
- ::ApiBanking::Environment::RBL::UAT.new(
14
- credentials.decrypt_username,
15
- credentials.password,
16
- credentials.decrypt_client_id,
17
- credentials.decrypt_client_secret,
18
- credentials.client_certificate.path,
19
- credentials.client_private_key.path,
20
- credentials.decrypt_client_private_key_pwd
21
- )
22
- end
23
- elsif credentials.environment.try(:upcase) == 'PROD'
24
- if credentials.bank_name == 'YBL'
25
- ::ApiBanking::Environment::YBL::PRD.new(
26
- credentials.decrypt_username,
27
- credentials.password,
28
- credentials.decrypt_client_id,
29
- credentials.decrypt_client_secret,
30
- credentials.client_certificate.path,
31
- credentials.client_private_key.path,
32
- credentials.decrypt_client_private_key_pwd
33
- )
34
- else
35
- ::ApiBanking::Environment::RBL::PROD.new(
36
- credentials.decrypt_username,
37
- credentials.password,
38
- credentials.decrypt_client_id,
39
- credentials.decrypt_client_secret,
40
- credentials.client_certificate.path,
41
- credentials.client_private_key.path,
42
- credentials.decrypt_client_private_key_pwd
43
- )
3
+ def self.build(credentials)
4
+ if credentials.decrypt_username == 'DEMO'
5
+ ApiBanking::Environment::LOCAL.new(ENV['LOCAL_API_HOST'],ENV['LOCAL_API_PORT'])
6
+ else
7
+ if credentials.environment.try(:upcase) == 'UAT'
8
+ if credentials.bank_name == 'YBL'
9
+ ::ApiBanking::Environment::YBL::UAT.new(
10
+ credentials.decrypt_username,
11
+ credentials.password,
12
+ credentials.decrypt_client_id,
13
+ credentials.decrypt_client_secret
14
+ )
15
+ else
16
+ ::ApiBanking::Environment::RBL::UAT.new(
17
+ credentials.decrypt_username,
18
+ credentials.password,
19
+ credentials.decrypt_client_id,
20
+ credentials.decrypt_client_secret,
21
+ credentials.client_certificate.path,
22
+ credentials.client_private_key.path,
23
+ credentials.decrypt_client_private_key_pwd
24
+ )
25
+ end
26
+ elsif credentials.environment.try(:upcase) == 'PROD'
27
+ if credentials.bank_name == 'YBL'
28
+ ::ApiBanking::Environment::YBL::PRD.new(
29
+ credentials.decrypt_username,
30
+ credentials.password,
31
+ credentials.decrypt_client_id,
32
+ credentials.decrypt_client_secret,
33
+ credentials.client_certificate.path,
34
+ credentials.client_private_key.path,
35
+ credentials.decrypt_client_private_key_pwd
36
+ )
37
+ else
38
+ ::ApiBanking::Environment::RBL::PROD.new(
39
+ credentials.decrypt_username,
40
+ credentials.password,
41
+ credentials.decrypt_client_id,
42
+ credentials.decrypt_client_secret,
43
+ credentials.client_certificate.path,
44
+ credentials.client_private_key.path,
45
+ credentials.decrypt_client_private_key_pwd
46
+ )
47
+ end
44
48
  end
45
49
  end
46
50
  end
@@ -1,3 +1,3 @@
1
1
  module StarkitBanking
2
- VERSION = '0.1.25'
2
+ VERSION = '0.1.26'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starkit_banking
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.25
4
+ version: 0.1.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - akil
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-12 00:00:00.000000000 Z
11
+ date: 2017-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler