1
0
Commit Graph

51 Commits

Author SHA1 Message Date
c822323536 Remove scripts folder 2024-08-25 09:19:44 +02:00
ea6020d425 Fix factory bot
Fix factory bot compatibility with latest activesupport version
2024-08-24 22:31:29 +02:00
17d5096b94 Add tool versions file with ruby version 2024-08-24 22:28:15 +02:00
6ec6145f67 Restructure dependencies
Move them to Gemfile
2024-08-24 22:27:58 +02:00
65cbe96ca9 Add gemfile.lock to ignored files 2024-08-24 22:26:03 +02:00
f98fe45ca6 Remove gemfile.lock from project 2024-08-24 22:25:07 +02:00
dd74e44085 Update readme links
Some checks failed
CI RSpec Tests / CI (push) Has been cancelled
2024-03-30 10:00:17 +01:00
659212b4ff Set allowed push host to new gitea rubygems server 2024-03-30 09:59:11 +01:00
e2efe04b78 Update planet express homepage 2024-03-30 09:59:00 +01:00
22bcd54011 Update gem spec author details 2024-03-30 09:58:30 +01:00
c5665656d1 Update MIT license holder 2024-03-30 09:58:05 +01:00
Tim Kächele
91e271186e Fix bug where shipments by LP provider with wrong size received discounts 2021-11-22 19:56:39 +01:00
Tim Kächele
a9dc75a695 Remove test_file 2021-11-22 19:56:39 +01:00
Tim Kächele
87d4205f40 Add performance benchmarking scripts
Add scripts that were used to generate a halfway realistic
set of inputs
2021-11-22 19:56:39 +01:00
Tim Kächele
fbebe75e2d Improve available budget calculation
Don't store individual discounts, and instead sum them up directly.
2021-11-22 19:56:39 +01:00
Tim Kächele
a09cecacb7 Improve shipment formatter performance
Use #strftime instead of #iso8601 for faster shipment formatting
2021-11-22 19:56:39 +01:00
Tim Kächele
283a6a5c50
Remove publishing task 2021-11-22 08:44:26 +01:00
Tim Kächele
185de016ba Optimize input parsing
- Use handrolled "parsing" instead of CSV
2021-11-20 22:08:38 +01:00
Tim Kächele
8d3c7d9bd4 Optimize date parsing using strptime 2021-11-20 21:54:02 +01:00
Tim Kächele
ce4075a507 Optimize DiscountBudget for month lookups 2021-11-20 21:47:23 +01:00
Tim Kächele
c6b32d66c7 Optimize lowest price for package size lookup 2021-11-20 21:33:46 +01:00
Tim Kächele
31b0cbd896 Optimize provider_and_package_size lookup 2021-11-20 20:47:28 +01:00
Tim Kächele
9db9d55985 Optimize rule_applied_in_month? lookup 2021-11-20 19:40:22 +01:00
Tim Kächele
7b6606e32b Optimize faster l shipment count lookup 2021-11-20 19:02:28 +01:00
72c160b894 Remove github workflows folder 2021-08-20 19:00:27 +02:00
02b3142244 Add random test file 2021-08-20 18:57:55 +02:00
b99bebde74 Add publish workflow 2021-08-20 18:55:37 +02:00
574f186f0f Fix rubocop style offenses 2021-03-08 11:45:15 +01:00
3e64b35558 Write proper readme 2021-03-08 11:45:07 +01:00
5719237879 Final wiring of the individual components 2021-03-08 11:09:29 +01:00
859619de72 Reorganize file structure 2021-03-08 11:08:06 +01:00
f43e4b700d Implement shipment formatter 2021-03-07 22:13:28 +01:00
6c4c9c75fe Implement LP L discount rule 2021-03-07 22:11:59 +01:00
2f34945418 Implement S Shipments Discount rule 2021-03-07 21:00:05 +01:00
5c3bb4d41a Add rule_applied_in_month and l_shipment count to shipment repo
- Add method to check whehter a rule was applied to a shipment in a given month
- Add a method to count the l shipments for a specific provider in a given month
2021-03-07 19:25:22 +01:00
c43263a49b Rename shipping options factory file 2021-03-07 19:23:20 +01:00
1e0b8db8b3 Implement a rule base class
Implement a potential base class for future rules
2021-03-07 19:02:34 +01:00
337419fe28 Implement discount PORO 2021-03-07 18:58:41 +01:00
86dffbc8fe Add inspection methods to shipping option 2021-03-07 18:55:34 +01:00
a0ab3cc6da Make repositories enumerable 2021-03-07 18:10:38 +01:00
47a013eb66 Add delegate methods to shipment class 2021-03-07 18:09:27 +01:00
e0d300c441 Introduce monkey patch for date
Allows to retrieve the begin of month for a given date
2021-03-07 18:07:50 +01:00
2e3a68e285 Rename discount budget methods and expose maximum possible discount
- Rename #apply_discount to #register_applied_discount to make it
  more clear that it only registers discounts and does not apply them
- Expose maximum possible discount to make it possible to get get the possible
  discount without registering it in the budget
2021-03-07 11:32:05 +01:00
26b3be7359 Add simplecov
Makes it easier to figure out what is covered by specs
2021-03-07 11:31:14 +01:00
65dd309569 Implement remaining_budget? method in discount budget 2021-03-06 20:28:48 +01:00
c4528b1c92 Implement discount budget for month repository
- Provide a repository to retrieve a discount budget
  for a given month
2021-03-06 19:07:47 +01:00
815615a03c Implement a discount budget
A discount budget to represent the available budget for
discounts
2021-03-06 17:42:50 +01:00
b6f2d46d91 Extract default repository behavior into base class 2021-03-06 17:33:26 +01:00
66886e6ae6 Implement shipment reader
- Add shipment object
- Add object to represent invalid shipments
- Implement reader for the csv input format
2021-03-05 21:43:44 +01:00
e169921c14 Add version number spec for gem 2021-03-05 21:03:32 +01:00