fintecture 0.1.9 → 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.
data/lib/fintecture.rb CHANGED
@@ -1,82 +1,82 @@
1
- require 'logger'
2
- require 'uri'
3
- require 'faraday'
4
-
5
- #ToRemove
6
- require 'openssl'
7
- require 'cgi'
8
-
9
- # Version
10
- require 'fintecture/version'
11
-
12
- # Modules
13
- require 'fintecture/connect'
14
- require 'fintecture/authentication'
15
-
16
- # Utilities
17
- require 'fintecture/utils/crypto'
18
-
19
- # Endpoints
20
- require 'fintecture/api/base_url'
21
- require 'fintecture/api/endpoints/authentication'
22
-
23
- # Connections
24
- require 'fintecture/faraday/authentication/connection'
25
-
26
-
27
- module Fintecture
28
- @log_level = nil
29
- @logger = nil
30
- @environment = 'sandbox'
31
-
32
- ENVIRONMENTS = %w[local test sandbox production].freeze
33
-
34
- class << self
35
- attr_accessor :app_id, :app_secret, :private_key
36
-
37
- def environment=(environment)
38
- environment = environment.downcase
39
-
40
- raise "#{environment} not a valid environment, options are [#{ENVIRONMENTS.join(', ')}]" unless ENVIRONMENTS.include?(environment)
41
-
42
- @environment = environment
43
- end
44
-
45
- def environment
46
- @environment
47
- end
48
-
49
- # Logging
50
- LEVEL_DEBUG = Logger::DEBUG
51
- LEVEL_ERROR = Logger::ERROR
52
- LEVEL_INFO = Logger::INFO
53
-
54
- def log_level
55
- @log_level
56
- end
57
-
58
- def log_level=(val)
59
- if val == "debug"
60
- val = LEVEL_DEBUG
61
- elsif val == "info"
62
- val = LEVEL_INFO
63
- end
64
-
65
- if !val.nil? && ![LEVEL_DEBUG, LEVEL_ERROR, LEVEL_INFO].include?(val)
66
- raise ArgumentError, 'log_level should only be set to `nil`, `debug` or `info`'
67
- end
68
- @log_level = val
69
- end
70
-
71
- def logger
72
- @logger
73
- end
74
-
75
- def logger=(val)
76
- @logger = val
77
- end
78
-
79
- end
80
- end
81
-
1
+ require 'logger'
2
+ require 'uri'
3
+ require 'faraday'
4
+
5
+ #ToRemove
6
+ require 'openssl'
7
+ require 'cgi'
8
+
9
+ # Version
10
+ require 'fintecture/version'
11
+
12
+ # Modules
13
+ require 'fintecture/connect'
14
+ require 'fintecture/authentication'
15
+
16
+ # Utilities
17
+ require 'fintecture/utils/crypto'
18
+
19
+ # Endpoints
20
+ require 'fintecture/api/base_url'
21
+ require 'fintecture/api/endpoints/authentication'
22
+
23
+ # Connections
24
+ require 'fintecture/faraday/authentication/connection'
25
+
26
+
27
+ module Fintecture
28
+ @log_level = nil
29
+ @logger = nil
30
+ @environment = 'sandbox'
31
+
32
+ ENVIRONMENTS = %w[local test sandbox production].freeze
33
+
34
+ class << self
35
+ attr_accessor :app_id, :app_secret, :private_key
36
+
37
+ def environment=(environment)
38
+ environment = environment.downcase
39
+
40
+ raise "#{environment} not a valid environment, options are [#{ENVIRONMENTS.join(', ')}]" unless ENVIRONMENTS.include?(environment)
41
+
42
+ @environment = environment
43
+ end
44
+
45
+ def environment
46
+ @environment
47
+ end
48
+
49
+ # Logging
50
+ LEVEL_DEBUG = Logger::DEBUG
51
+ LEVEL_ERROR = Logger::ERROR
52
+ LEVEL_INFO = Logger::INFO
53
+
54
+ def log_level
55
+ @log_level
56
+ end
57
+
58
+ def log_level=(val)
59
+ if val == "debug"
60
+ val = LEVEL_DEBUG
61
+ elsif val == "info"
62
+ val = LEVEL_INFO
63
+ end
64
+
65
+ if !val.nil? && ![LEVEL_DEBUG, LEVEL_ERROR, LEVEL_INFO].include?(val)
66
+ raise ArgumentError, 'log_level should only be set to `nil`, `debug` or `info`'
67
+ end
68
+ @log_level = val
69
+ end
70
+
71
+ def logger
72
+ @logger
73
+ end
74
+
75
+ def logger=(val)
76
+ @logger = val
77
+ end
78
+
79
+ end
80
+ end
81
+
82
82
  Fintecture.log_level = ENV["FINTECTURE_LOG"] unless ENV["FINTECTURE_LOG"].nil?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fintecture
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fintecture
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-18 00:00:00.000000000 Z
11
+ date: 2021-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -105,7 +105,7 @@ licenses:
105
105
  metadata:
106
106
  homepage_uri: http://fintecture.com
107
107
  source_code_uri: https://github.com/Fintecture/fintecture-sdk-ruby
108
- post_install_message:
108
+ post_install_message:
109
109
  rdoc_options: []
110
110
  require_paths:
111
111
  - lib
@@ -120,8 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubygems_version: 3.0.6
124
- signing_key:
123
+ rubygems_version: 3.2.22
124
+ signing_key:
125
125
  specification_version: 4
126
126
  summary: Short summary
127
127
  test_files: []