panier 0.0.5 → 0.0.6
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 +4 -4
- data/bin/panier +4 -9
- data/docs/implementation_notes.md +5 -1
- data/lib/panier/application/cli.rb +1 -1
- data/lib/panier/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58ab9849deb461ffab2ca54397a5a98e558b0b05
|
4
|
+
data.tar.gz: 53c9a23d5fd62ebc3fd9521e4d0d202453f56ecb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90a092eb21f6d4a3cb7d5330088bac848f35304eefd4947f954fd232700b00996a8c78d0c3ca1608128ef98fbd507261a7c4b1ecc9f6a096cdd83b9ec9c7a421
|
7
|
+
data.tar.gz: cc6fea799352dcbc6b200d42e223cbfab4bb498a3fa2b1a2b692cf353a28e9abee9121d2d181b5ccabdef795dfef53758db5d8e529ecbada4a2b768fb2b3dc4b
|
data/bin/panier
CHANGED
@@ -1,14 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(File.dirname(File.realpath(__FILE__)) + '/../lib')
|
3
|
+
$LOAD_PATH.unshift(File.dirname(File.realpath(__FILE__)) + '/../lib')
|
5
4
|
|
6
|
-
|
5
|
+
require 'panier'
|
7
6
|
|
8
|
-
|
7
|
+
cli = Panier::Application::CLI.new
|
9
8
|
|
10
|
-
|
11
|
-
else
|
12
|
-
puts 'Panier supports only Ruby 2.1.2+'
|
13
|
-
exit(-1)
|
14
|
-
end
|
9
|
+
exit cli.run
|
@@ -11,9 +11,13 @@ With regard to the given coding exercise, the following assumptions have been ma
|
|
11
11
|
* We are interested in calculating tax for the purposes of generating an itemised receipt.
|
12
12
|
* We assume a preexisting product catalog, where each product contains one more more tax classes.
|
13
13
|
* Products may be selected by the shopper from the preexisting product catalog. This catalog is limited to the items in the test data. Unknown items are ignored.
|
14
|
-
* The product name is the same for input and output. Some changes to input data had to be made to allow for discrepancies.
|
14
|
+
* The product name is the same for input and output. Some changes to input data had to be made to allow for discrepancies.
|
15
15
|
* There are some products with the same name and different prices. We can assume that these items are available in various sizes.
|
16
16
|
|
17
|
+
## Ruby version
|
18
|
+
|
19
|
+
The gem has been tested in the latest version of Ruby (2.1.2 at the time of writing) only. Older versions should work but have not been tested.
|
20
|
+
|
17
21
|
## Testing
|
18
22
|
|
19
23
|
An interesting spec is found in the [`sales_tax_service_spec.rb`](../spec/panier/application/sales_tax_service_spec.rb). It demonstrates the successful processing of all the examples found in the [Examples](examples.md) document.
|
data/lib/panier/version.rb
CHANGED