Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kul1/paypal
https://github.com/kul1/paypal
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kul1/paypal
- Owner: kul1
- Created: 2021-03-16T22:21:02.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-03-17T21:28:20.000Z (over 3 years ago)
- Last Synced: 2024-10-03T05:21:10.922Z (about 1 month ago)
- Language: Ruby
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Basic Credit Card Processing
###### _by Prateep Kul_
## Overview of code design
- Follow instruction with open case for new assignment
- For example:
- Instead of check case 'Charge' || 'Credit' in one case to save coding, then
still keep it as seperate case for future expansion
- Platform: ruby which can be config to have both call from
- command line and
- STDIO both Mac and Linux
- Use simple array functions that most languages provided for easy understand## Installation:
- This code develop in Mac using Ruby version 2.6, however any ruby in others platform should work.
- Using Gemfile with bundle for easy install required gems in this version and/or future development.## How to run this code
For example: input file name are input1.txt, input2.txt
- Run as normal ruby command
```
ruby myprogram.rb input1.txt input2.txt
```- Run via command arguments
```
./myprogram input1.txt input2.txt
```- input read from STDIN, like:
```
./myprogram < input1.txt
./myprogram < input1.txt
```## How to test
Test logic to get result as expect from input file
- Input data use file input.txt
- Test with Rspec
- use guard while working (TDD)## To Test run
```
$ guard
```or
```
$ rspec
```