panier 0.0.4 → 0.0.5
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/docs/examples.md +10 -8
- data/docs/implementation_notes.md +4 -0
- 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: 19b9ce32fa8e93dfa70424bfd483f1c1d7322d9e
|
|
4
|
+
data.tar.gz: 3fda6db95aa34201a8d860666ea62194233d33b1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56af0e1f779440bc5206728f6a50926b1d2a90a80d0746b9e1a0225832b1da9161d5ae765fb3b1307767650ed9770f2d2c85e3977205be8723ad77dbf1a69e61
|
|
7
|
+
data.tar.gz: e43623b9d2e354759717f4c982f6ae1f680dfc9824f912f17ccaa989cbf03d57f5df1809df09a5ad2de69f23e6175887e32d1efbeb6ea1cbcb986a1001a159d3
|
data/docs/examples.md
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Examples
|
|
2
2
|
|
|
3
|
-
## Input
|
|
3
|
+
## Input
|
|
4
|
+
|
|
5
|
+
### Input 1
|
|
4
6
|
Quantity, Product, Price
|
|
5
7
|
1, book, 12.49
|
|
6
8
|
1, music CD, 14.99
|
|
7
9
|
1, chocolate bar, 0.85
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
### Input 2
|
|
10
12
|
Quantity, Product, Price
|
|
11
13
|
1, imported box of chocolates, 10.00
|
|
12
14
|
1, imported bottle of perfume, 47.50
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
### Input 3
|
|
15
17
|
Quantity, Product, Price
|
|
16
18
|
1, imported bottle of perfume, 27.99
|
|
17
19
|
1, bottle of perfume, 18.99
|
|
18
20
|
1, packet of headache pills, 9.75
|
|
19
21
|
1, box of imported chocolates, 11.25
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
## Output
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
### Output 1
|
|
24
26
|
1, book, 12.49
|
|
25
27
|
1, music CD, 16.49
|
|
26
28
|
1, chocolate bar, 0.85
|
|
@@ -28,14 +30,14 @@
|
|
|
28
30
|
Sales Taxes: 1.50
|
|
29
31
|
Total: 29.83
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
### Output 2
|
|
32
34
|
1, imported box of chocolates, 10.50
|
|
33
35
|
1, imported bottle of perfume, 54.65
|
|
34
36
|
|
|
35
37
|
Sales Taxes: 7.65
|
|
36
38
|
Total: 65.15
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
### Output 3
|
|
39
41
|
1, imported bottle of perfume, 32.19
|
|
40
42
|
1, bottle of perfume, 20.89
|
|
41
43
|
1, packet of headache pills, 9.75
|
|
@@ -14,6 +14,10 @@ With regard to the given coding exercise, the following assumptions have been ma
|
|
|
14
14
|
* The product name is the same for input and output. Some changes to input data had to be made to allow for discrepancies. TODO: Name the changes.
|
|
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
|
+
## Testing
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
17
21
|
## Design considerations
|
|
18
22
|
|
|
19
23
|
### Input
|
data/lib/panier/version.rb
CHANGED