fawry 1.3.1 → 1.4.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: 67bf2df195ce85382e7bd0d9f6d6b2111e5204d59fbc4091a5d9b31b7dde9a5f
4
- data.tar.gz: 8a1ebb82a2b6a4937358193ae8c843f7dfcab971ed82c757171a1387c711d9d8
3
+ metadata.gz: 7ceeba4660bac627fe2be38b051bdc2b1d5c07db74fbd1373ab363b5e4e616e9
4
+ data.tar.gz: 28228c7e057417166257b129de55a48918f33142a5f0ec0fa715a9962be54bfe
5
5
  SHA512:
6
- metadata.gz: 61914bd40afa7f491abc7f4f65b98e4f4b5e7e384335a7359028c548ec683a88035fef1799e844084e706ca7856828534a72f8a637676d4217510f008db2dfd3
7
- data.tar.gz: 16b0687a4eee80795b08f1f71697c25619318b0b1fad49ca455f55527892aa97ea87e95e3edda5d3544433cbc33647a4e2e1524256874737ec8eb1d543c248e4
6
+ metadata.gz: 936ec7e35ab66a3153882cc916c76d9f72caf216e8f6d910d753b8d0133551235cfe409b0ff9846abdfa3fa112784f703e44830da5a29f46a4d14d2bf9bb9f75
7
+ data.tar.gz: 3c1d857be36e7d8c97691500a861ded813b3eb811aa5530ae492298fb61b6b456bc529c7561eb6107845fe600ae0bdc1792d3bf79c1373e7880b858a5d4d4a19
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Desktop (please complete the following information):**
27
+ - OS: [e.g. iOS]
28
+ - Browser [e.g. chrome, safari]
29
+ - Version [e.g. 22]
30
+
31
+ **Smartphone (please complete the following information):**
32
+ - Device: [e.g. iPhone6]
33
+ - OS: [e.g. iOS8.1]
34
+ - Browser [e.g. stock browser, safari]
35
+ - Version [e.g. 22]
36
+
37
+ **Additional context**
38
+ Add any other context about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,70 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ main ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ main ]
20
+ schedule:
21
+ - cron: '38 19 * * 0'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://git.io/codeql-language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v2
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v1
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
52
+
53
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
+ # If this step fails, then you should remove it and run the build manually (see below)
55
+ - name: Autobuild
56
+ uses: github/codeql-action/autobuild@v1
57
+
58
+ # ℹ️ Command-line programs to run using the OS shell.
59
+ # 📚 https://git.io/JvXDl
60
+
61
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62
+ # and modify them (or add more) to build your code if your project
63
+ # uses a compiled language
64
+
65
+ #- run: |
66
+ # make bootstrap
67
+ # make release
68
+
69
+ - name: Perform CodeQL Analysis
70
+ uses: github/codeql-action/analyze@v1
@@ -9,9 +9,9 @@ name: Ruby
9
9
 
10
10
  on:
11
11
  push:
12
- branches: [ master ]
12
+ branches: [ main ]
13
13
  pull_request:
14
- branches: [ master ]
14
+ branches: [ main ]
15
15
 
16
16
  jobs:
17
17
  test:
@@ -19,7 +19,7 @@ jobs:
19
19
  runs-on: ubuntu-latest
20
20
  strategy:
21
21
  matrix:
22
- ruby-version: ['2.6', '2.7', '3.0']
22
+ ruby-version: [2.6, 2.7, '3.0', 3.1]
23
23
 
24
24
  steps:
25
25
  - uses: actions/checkout@v2
@@ -27,7 +27,7 @@ jobs:
27
27
  # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
28
28
  # change this to (see https://github.com/ruby/setup-ruby#versioning):
29
29
  # uses: ruby/setup-ruby@v1
30
- uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
30
+ uses: ruby/setup-ruby@v1
31
31
  with:
32
32
  ruby-version: ${{ matrix.ruby-version }}
33
33
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Fawry Changelog
2
2
 
3
+ ## [v1.4.1](https://github.com/fawry-api/fawry/releases/tag/v1.4.1) (03.08.2024)
4
+ - Update dependencies
5
+
6
+ ## [v1.4.0](https://github.com/fawry-api/fawry/releases/tag/v1.4.0) (24.12.2021)
7
+ - Update dependencies
8
+
3
9
  ## [v1.3.1](https://github.com/fawry-api/fawry/releases/tag/v1.3.1) (15.08.2021)
4
10
  - Add language param to charge request params
5
11
 
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fawry (1.3.1)
5
- dry-validation (~> 1.3, >= 1.3.1)
6
- faraday (~> 0.17.0)
4
+ fawry (1.4.1)
5
+ dry-validation (~> 1.7)
6
+ faraday (~> 1.8)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -12,27 +12,26 @@ GEM
12
12
  public_suffix (>= 2.0.2, < 5.0)
13
13
  ast (2.4.2)
14
14
  byebug (11.1.3)
15
- concurrent-ruby (1.1.8)
15
+ concurrent-ruby (1.2.2)
16
16
  crack (0.4.5)
17
17
  rexml
18
- diff-lcs (1.4.4)
19
- dry-configurable (0.12.1)
18
+ diff-lcs (1.5.0)
19
+ dry-configurable (0.13.0)
20
20
  concurrent-ruby (~> 1.0)
21
- dry-core (~> 0.5, >= 0.5.0)
22
- dry-container (0.7.2)
21
+ dry-core (~> 0.6)
22
+ dry-container (0.9.0)
23
23
  concurrent-ruby (~> 1.0)
24
- dry-configurable (~> 0.1, >= 0.1.3)
25
- dry-core (0.5.0)
24
+ dry-configurable (~> 0.13, >= 0.13.0)
25
+ dry-core (0.7.1)
26
26
  concurrent-ruby (~> 1.0)
27
- dry-equalizer (0.3.0)
28
- dry-inflector (0.2.0)
27
+ dry-inflector (0.2.1)
29
28
  dry-initializer (3.0.4)
30
29
  dry-logic (1.2.0)
31
30
  concurrent-ruby (~> 1.0)
32
31
  dry-core (~> 0.5, >= 0.5)
33
- dry-schema (1.6.2)
32
+ dry-schema (1.8.0)
34
33
  concurrent-ruby (~> 1.0)
35
- dry-configurable (~> 0.8, >= 0.8.3)
34
+ dry-configurable (~> 0.13, >= 0.13.0)
36
35
  dry-core (~> 0.5, >= 0.5)
37
36
  dry-initializer (~> 3.0)
38
37
  dry-logic (~> 1.0)
@@ -43,25 +42,46 @@ GEM
43
42
  dry-core (~> 0.5, >= 0.5)
44
43
  dry-inflector (~> 0.1, >= 0.1.2)
45
44
  dry-logic (~> 1.0, >= 1.0.2)
46
- dry-validation (1.6.0)
45
+ dry-validation (1.7.0)
47
46
  concurrent-ruby (~> 1.0)
48
47
  dry-container (~> 0.7, >= 0.7.1)
49
- dry-core (~> 0.4)
50
- dry-equalizer (~> 0.2)
48
+ dry-core (~> 0.5, >= 0.5)
51
49
  dry-initializer (~> 3.0)
52
- dry-schema (~> 1.5, >= 1.5.2)
53
- faraday (0.17.4)
54
- multipart-post (>= 1.2, < 3)
50
+ dry-schema (~> 1.8, >= 1.8.0)
51
+ faraday (1.10.3)
52
+ faraday-em_http (~> 1.0)
53
+ faraday-em_synchrony (~> 1.0)
54
+ faraday-excon (~> 1.1)
55
+ faraday-httpclient (~> 1.0)
56
+ faraday-multipart (~> 1.0)
57
+ faraday-net_http (~> 1.0)
58
+ faraday-net_http_persistent (~> 1.0)
59
+ faraday-patron (~> 1.0)
60
+ faraday-rack (~> 1.0)
61
+ faraday-retry (~> 1.0)
62
+ ruby2_keywords (>= 0.0.4)
63
+ faraday-em_http (1.0.0)
64
+ faraday-em_synchrony (1.0.0)
65
+ faraday-excon (1.1.0)
66
+ faraday-httpclient (1.0.1)
67
+ faraday-multipart (1.0.4)
68
+ multipart-post (~> 2)
69
+ faraday-net_http (1.0.1)
70
+ faraday-net_http_persistent (1.2.0)
71
+ faraday-patron (1.0.0)
72
+ faraday-rack (1.0.0)
73
+ faraday-retry (1.0.3)
55
74
  hashdiff (1.0.1)
56
- multipart-post (2.1.1)
57
- parallel (1.20.1)
58
- parser (3.0.1.1)
75
+ multipart-post (2.3.0)
76
+ parallel (1.21.0)
77
+ parser (3.0.3.2)
59
78
  ast (~> 2.4.1)
60
79
  public_suffix (4.0.6)
61
80
  rainbow (3.0.0)
62
- rake (13.0.3)
63
- regexp_parser (2.1.1)
64
- rexml (3.2.5)
81
+ rake (13.0.6)
82
+ regexp_parser (2.2.0)
83
+ rexml (3.3.3)
84
+ strscan
65
85
  rspec (3.10.0)
66
86
  rspec-core (~> 3.10.0)
67
87
  rspec-expectations (~> 3.10.0)
@@ -74,24 +94,26 @@ GEM
74
94
  rspec-mocks (3.10.2)
75
95
  diff-lcs (>= 1.2.0, < 2.0)
76
96
  rspec-support (~> 3.10.0)
77
- rspec-support (3.10.2)
97
+ rspec-support (3.10.3)
78
98
  rspec_junit_formatter (0.4.1)
79
99
  rspec-core (>= 2, < 4, != 2.12.0)
80
- rubocop (1.13.0)
100
+ rubocop (1.24.0)
81
101
  parallel (~> 1.10)
82
102
  parser (>= 3.0.0.0)
83
103
  rainbow (>= 2.2.2, < 4.0)
84
104
  regexp_parser (>= 1.8, < 3.0)
85
105
  rexml
86
- rubocop-ast (>= 1.2.0, < 2.0)
106
+ rubocop-ast (>= 1.15.0, < 2.0)
87
107
  ruby-progressbar (~> 1.7)
88
108
  unicode-display_width (>= 1.4.0, < 3.0)
89
- rubocop-ast (1.5.0)
109
+ rubocop-ast (1.15.0)
90
110
  parser (>= 3.0.1.1)
91
111
  ruby-progressbar (1.11.0)
92
- unicode-display_width (2.0.0)
93
- webmock (3.12.2)
94
- addressable (>= 2.3.6)
112
+ ruby2_keywords (0.0.5)
113
+ strscan (3.1.0)
114
+ unicode-display_width (2.1.0)
115
+ webmock (3.14.0)
116
+ addressable (>= 2.8.0)
95
117
  crack (>= 0.3.2)
96
118
  hashdiff (>= 0.4.0, < 2.0.0)
97
119
 
@@ -109,4 +131,4 @@ DEPENDENCIES
109
131
  webmock (~> 3.12)
110
132
 
111
133
  BUNDLED WITH
112
- 2.2.3
134
+ 2.3.3
data/README.md CHANGED
@@ -1,5 +1,3 @@
1
- [![CircleCI](https://circleci.com/gh/fawry-api/fawry.svg?style=svg)](https://circleci.com/gh/fawry-api/fawry)
2
-
3
1
  # Fawry
4
2
 
5
3
  [README - متوفر باللغة العربية](https://github.com/fawry-api/fawry/blob/master/README-ar.md)
@@ -10,7 +8,7 @@ A plug-and-play library that makes interfacing with Fawry's payment gateway API
10
8
 
11
9
  _Fawry's production and sandbox environments are supported._
12
10
 
13
- _This library is tested on Ruby v2.6, 2.7, 3.0_
11
+ _This library is tested on Ruby v2.6, 2.7, 3.0, 3.1_
14
12
 
15
13
  ## Installation
16
14
 
@@ -184,4 +182,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
184
182
 
185
183
  ## Contributing
186
184
 
187
- Bug reports and pull requests are welcome on GitHub at https://github.com/amrrbakry/fawry. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
185
+ Bug reports and pull requests are welcome on GitHub at https://github.com/fawry-api/fawry. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
data/fawry.gemspec CHANGED
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.metadata['homepage_uri'] = 'https://github.com/amrrbakry/fawry'
20
20
  spec.metadata['source_code_uri'] = 'https://github.com/amrrbakry/fawry'
21
+ spec.metadata['rubygems_mfa_required'] = 'true'
21
22
 
22
23
  # Specify which files should be added to the gem when it is released.
23
24
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -28,8 +29,8 @@ Gem::Specification.new do |spec|
28
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
30
  spec.require_paths = ['lib']
30
31
 
31
- spec.add_dependency 'dry-validation', '~> 1.3', '>= 1.3.1'
32
- spec.add_dependency 'faraday', '~> 0.17.0'
32
+ spec.add_dependency 'dry-validation', '~> 1.7'
33
+ spec.add_dependency 'faraday', '~> 1.8'
33
34
 
34
35
  spec.add_development_dependency 'bundler', '~> 2.0'
35
36
  spec.add_development_dependency 'byebug', '~> 11.0'
@@ -69,7 +69,7 @@ module Fawry
69
69
 
70
70
  def self.decode(string)
71
71
  arr = string.split('&')
72
- arr.map { |str| str.split('=') }.to_h
72
+ arr.to_h { |str| str.split('=') }
73
73
  end
74
74
  end
75
75
  end
@@ -41,15 +41,17 @@ module Fawry
41
41
 
42
42
  rule(:fawry_secure_key) do
43
43
  if Fawry.configuration.fawry_secure_key.nil? && ENV['FAWRY_SECURE_KEY'].nil? && value.nil?
44
- key(:fawry_secure_key).failure('fawry secure key is required in either Fawry.configuration or'\
45
- 'as an environment variable (FAWRY_SECURE_KEY), or as an argument to this method')
44
+ key(:fawry_secure_key)
45
+ .failure('fawry secure key is required in either Fawry.configuration or'\
46
+ 'as an environment variable (FAWRY_SECURE_KEY), or as an argument to this method')
46
47
  end
47
48
  end
48
49
 
49
50
  rule(:merchant_code) do
50
51
  if Fawry.configuration.fawry_merchant_code.nil? && ENV['FAWRY_MERCHANT_CODE'].nil? && value.nil?
51
- key(:merchant_code).failure('fawry merchant code is required in either Fawry.configuration or'\
52
- 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
52
+ key(:merchant_code)
53
+ .failure('fawry merchant code is required in either Fawry.configuration or'\
54
+ 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
53
55
  end
54
56
  end
55
57
  end
@@ -24,8 +24,9 @@ module Fawry
24
24
 
25
25
  rule(:merchant_code) do
26
26
  if Fawry.configuration.fawry_merchant_code.nil? && ENV['FAWRY_MERCHANT_CODE'].nil? && value.nil?
27
- key(:merchant_code).failure('fawry merchant code is required in either Fawry.configuration or'\
28
- 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
27
+ key(:merchant_code)
28
+ .failure('fawry merchant code is required in either Fawry.configuration or'\
29
+ 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
29
30
  end
30
31
  end
31
32
  end
@@ -14,15 +14,17 @@ module Fawry
14
14
 
15
15
  rule(:fawry_secure_key) do
16
16
  if Fawry.configuration.fawry_secure_key.nil? && ENV['FAWRY_SECURE_KEY'].nil? && value.nil?
17
- key(:fawry_secure_key).failure('fawry secure key is required in either Fawry.configuration or'\
18
- 'as an environment variable (FAWRY_SECURE_KEY), or as an argument to this method')
17
+ key(:fawry_secure_key)
18
+ .failure('fawry secure key is required in either Fawry.configuration or'\
19
+ 'as an environment variable (FAWRY_SECURE_KEY), or as an argument to this method')
19
20
  end
20
21
  end
21
22
 
22
23
  rule(:merchant_code) do
23
24
  if Fawry.configuration.fawry_merchant_code.nil? && ENV['FAWRY_MERCHANT_CODE'].nil? && value.nil?
24
- key(:merchant_code).failure('fawry merchant code is required in either Fawry.configuration or'\
25
- 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
25
+ key(:merchant_code)
26
+ .failure('fawry merchant code is required in either Fawry.configuration or'\
27
+ 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
26
28
  end
27
29
  end
28
30
  end
@@ -13,15 +13,17 @@ module Fawry
13
13
 
14
14
  rule(:fawry_secure_key) do
15
15
  if Fawry.configuration.fawry_secure_key.nil? && ENV['FAWRY_SECURE_KEY'].nil? && value.nil?
16
- key(:fawry_secure_key).failure('fawry secure key is required in either Fawry.configuration or'\
17
- 'as an environment variable (FAWRY_SECURE_KEY), or as an argument to this method')
16
+ key(:fawry_secure_key)
17
+ .failure('fawry secure key is required in either Fawry.configuration or'\
18
+ 'as an environment variable (FAWRY_SECURE_KEY), or as an argument to this method')
18
19
  end
19
20
  end
20
21
 
21
22
  rule(:merchant_code) do
22
23
  if Fawry.configuration.fawry_merchant_code.nil? && ENV['FAWRY_MERCHANT_CODE'].nil? && value.nil?
23
- key(:merchant_code).failure('fawry merchant code is required in either Fawry.configuration or'\
24
- 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
24
+ key(:merchant_code)
25
+ .failure('fawry merchant code is required in either Fawry.configuration or'\
26
+ 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
25
27
  end
26
28
  end
27
29
  end
@@ -13,15 +13,17 @@ module Fawry
13
13
 
14
14
  rule(:fawry_secure_key) do
15
15
  if Fawry.configuration.fawry_secure_key.nil? && ENV['FAWRY_SECURE_KEY'].nil? && value.nil?
16
- key(:fawry_secure_key).failure('fawry secure key is required in either Fawry.configuration or'\
17
- 'as an environment variable (FAWRY_SECURE_KEY), or as an argument to this method')
16
+ key(:fawry_secure_key)
17
+ .failure('fawry secure key is required in either Fawry.configuration or'\
18
+ 'as an environment variable (FAWRY_SECURE_KEY), or as an argument to this method')
18
19
  end
19
20
  end
20
21
 
21
22
  rule(:merchant_code) do
22
23
  if Fawry.configuration.fawry_merchant_code.nil? && ENV['FAWRY_MERCHANT_CODE'].nil? && value.nil?
23
- key(:merchant_code).failure('fawry merchant code is required in either Fawry.configuration or'\
24
- 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
24
+ key(:merchant_code)
25
+ .failure('fawry merchant code is required in either Fawry.configuration or'\
26
+ 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
25
27
  end
26
28
  end
27
29
  end
@@ -15,15 +15,17 @@ module Fawry
15
15
 
16
16
  rule(:fawry_secure_key) do
17
17
  if Fawry.configuration.fawry_secure_key.nil? && ENV['FAWRY_SECURE_KEY'].nil? && value.nil?
18
- key(:fawry_secure_key).failure('fawry secure key is required in either Fawry.configuration or'\
19
- 'as an environment variable (FAWRY_SECURE_KEY), or as an argument to this method')
18
+ key(:fawry_secure_key)
19
+ .failure('fawry secure key is required in either Fawry.configuration or'\
20
+ 'as an environment variable (FAWRY_SECURE_KEY), or as an argument to this method')
20
21
  end
21
22
  end
22
23
 
23
24
  rule(:merchant_code) do
24
25
  if Fawry.configuration.fawry_merchant_code.nil? && ENV['FAWRY_MERCHANT_CODE'].nil? && value.nil?
25
- key(:merchant_code).failure('fawry merchant code is required in either Fawry.configuration or'\
26
- 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
26
+ key(:merchant_code)
27
+ .failure('fawry merchant code is required in either Fawry.configuration or'\
28
+ 'as an environment variable (FAWRY_MERCHANT_CODE), or as an argument to this method')
27
29
  end
28
30
  end
29
31
  end
data/lib/fawry/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fawry
4
- VERSION = '1.3.1'
4
+ VERSION = '1.4.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fawry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amr El Bakry
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-15 00:00:00.000000000 Z
11
+ date: 2024-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-validation
@@ -16,34 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 1.3.1
19
+ version: '1.7'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '1.3'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 1.3.1
26
+ version: '1.7'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: faraday
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - "~>"
38
32
  - !ruby/object:Gem::Version
39
- version: 0.17.0
33
+ version: '1.8'
40
34
  type: :runtime
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
38
  - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: 0.17.0
40
+ version: '1.8'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: bundler
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -149,7 +143,9 @@ executables: []
149
143
  extensions: []
150
144
  extra_rdoc_files: []
151
145
  files:
152
- - ".circleci/config.yml"
146
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
147
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
148
+ - ".github/workflows/codeql-analysis.yml"
153
149
  - ".github/workflows/ruby.yml"
154
150
  - ".gitignore"
155
151
  - ".rspec"
@@ -192,6 +188,7 @@ licenses:
192
188
  metadata:
193
189
  homepage_uri: https://github.com/amrrbakry/fawry
194
190
  source_code_uri: https://github.com/amrrbakry/fawry
191
+ rubygems_mfa_required: 'true'
195
192
  post_install_message:
196
193
  rdoc_options: []
197
194
  require_paths:
@@ -207,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
204
  - !ruby/object:Gem::Version
208
205
  version: '0'
209
206
  requirements: []
210
- rubygems_version: 3.1.4
207
+ rubygems_version: 3.4.10
211
208
  signing_key:
212
209
  specification_version: 4
213
210
  summary: A library to interface with Fawry's payment gateway API (charge, refund,
data/.circleci/config.yml DELETED
@@ -1,57 +0,0 @@
1
- version: 2
2
- jobs:
3
- build:
4
- docker:
5
- - image: circleci/ruby:2.6.0
6
-
7
- working_directory: ~/repo
8
-
9
- steps:
10
- - checkout
11
-
12
- # Download and cache dependencies
13
- - restore_cache:
14
- keys:
15
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
16
- # fallback to using the latest cache if no exact match is found
17
- - v1-dependencies-
18
-
19
- - run:
20
- name: install bundler
21
- command: gem install bundler
22
-
23
- - run:
24
- name: install dependencies
25
- command: |
26
- bundle install --jobs=4 --retry=3 --path vendor/bundle
27
-
28
- - save_cache:
29
- paths:
30
- - ./vendor/bundle
31
- key: v1-dependencies-{{ checksum "Gemfile.lock" }}
32
-
33
- # run tests!
34
- - run:
35
- name: run tests
36
- command: |
37
- mkdir /tmp/test-results
38
- TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
39
- circleci tests split --split-by=timings)"
40
-
41
- bundle exec rspec \
42
- --format progress \
43
- --format RspecJunitFormatter \
44
- --out /tmp/test-results/rspec.xml \
45
- --format progress \
46
- $TEST_FILES
47
-
48
- - run:
49
- name: run rubocop
50
- command: bundle exec rubocop
51
-
52
- # collect reports
53
- - store_test_results:
54
- path: /tmp/test-results
55
- - store_artifacts:
56
- path: /tmp/test-results
57
- destination: test-results