File tree Expand file tree Collapse file tree 9 files changed +302
-299
lines changed
Expand file tree Collapse file tree 9 files changed +302
-299
lines changed Original file line number Diff line number Diff line change 1+ # v5.5.1
2+ ## Fixes
3+ - Fixed missing cocktail recipes with duplicated names in datapack export
4+ - Fixed total missing ingredients counting when filtering by ingredient
5+
16# v5.5.0
27## New
38- Added images upload support to glass types
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public function index(Request $request): JsonResource
4848 #[BAO \RateLimitResponse]
4949 public function store (Request $ request ): ExportResource
5050 {
51- $ bar = Bar::findOrFail ($ request ->post ('bar_id ' ));
51+ $ bar = Bar::findOrFail (( int ) $ request ->post ('bar_id ' ));
5252
5353 if ($ request ->user ()->cannot ('createExport ' , $ bar )) {
5454 abort (403 );
Original file line number Diff line number Diff line change @@ -79,18 +79,18 @@ public function test_export_contains_files(): void
7979 $ this ->assertFileExists ($ unzippedFilesDisk ->path ($ file ));
8080 }
8181
82- $ this ->assertFileExists ($ unzippedFilesDisk ->path ('cocktails/gin-and-tonic /data.json ' ));
83- $ this ->assertFileExists ($ unzippedFilesDisk ->path ('cocktails/gin-and-tonic /c-1-img.jpg ' ));
84- $ this ->assertFileExists ($ unzippedFilesDisk ->path ('ingredients/jack-daniels /data.json ' ));
85- $ this ->assertFileExists ($ unzippedFilesDisk ->path ('ingredients/jack-daniels /i-1-img.png ' ));
82+ $ this ->assertFileExists ($ unzippedFilesDisk ->path ('cocktails/gin-and-tonic_1 /data.json ' ));
83+ $ this ->assertFileExists ($ unzippedFilesDisk ->path ('cocktails/gin-and-tonic_1 /c-1-img.jpg ' ));
84+ $ this ->assertFileExists ($ unzippedFilesDisk ->path ('ingredients/jack-daniels_1 /data.json ' ));
85+ $ this ->assertFileExists ($ unzippedFilesDisk ->path ('ingredients/jack-daniels_1 /i-1-img.png ' ));
8686
8787 $ cocktailExport = [];
88- if ($ cocktailFixture = file_get_contents ($ unzippedFilesDisk ->path ('cocktails/gin-and-tonic /data.json ' ))) {
88+ if ($ cocktailFixture = file_get_contents ($ unzippedFilesDisk ->path ('cocktails/gin-and-tonic_1 /data.json ' ))) {
8989 $ cocktailExport = json_decode ($ cocktailFixture , true );
9090 }
9191
9292 $ ingredientExport = [];
93- if ($ ingredientFixture = file_get_contents ($ unzippedFilesDisk ->path ('ingredients/jack-daniels /data.json ' ))) {
93+ if ($ ingredientFixture = file_get_contents ($ unzippedFilesDisk ->path ('ingredients/jack-daniels_1 /data.json ' ))) {
9494 $ ingredientExport = json_decode ($ ingredientFixture , true );
9595 }
9696
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ public function test_default_export_contains_schema_files(): void
6868 $ zip ->close ();
6969
7070 $ this ->assertFileExists ($ unzippedFilesDisk ->path ('_meta.json ' ));
71- $ this ->assertFileExists ($ unzippedFilesDisk ->path ('cocktails/gin-and-tonic /recipe.json ' ));
72- $ this ->assertFileExists ($ unzippedFilesDisk ->path ('cocktails/gin-and-tonic /c-1-img.jpg ' ));
71+ $ this ->assertFileExists ($ unzippedFilesDisk ->path ('cocktails/gin-and-tonic_1 /recipe.json ' ));
72+ $ this ->assertFileExists ($ unzippedFilesDisk ->path ('cocktails/gin-and-tonic_1 /c-1-img.jpg ' ));
7373 }
7474
7575 /**
Original file line number Diff line number Diff line change 66
77use Tests \TestCase ;
88use Kami \Cocktail \Models \Ingredient ;
9+ use Kami \Cocktail \Models \UserIngredient ;
910use Kami \Cocktail \Models \ComplexIngredient ;
1011use Kami \Cocktail \Services \IngredientService ;
1112use Illuminate \Foundation \Testing \RefreshDatabase ;
12- use Kami \Cocktail \Models \UserIngredient ;
1313
1414class IngredientServiceTest extends TestCase
1515{
Original file line number Diff line number Diff line change 11{
22 "recipe" : {
3- "_id" : " gin-and-tonic " ,
3+ "_id" : " gin-and-tonic_1 " ,
44 "name" : " Gin and Tonic" ,
55 "instructions" : " Cocktail instructions go here" ,
66 "created_at" : " 2020-01-01T12:00:00+00:00" ,
2323 ],
2424 "ingredients" : [
2525 {
26- "_id" : " gin " ,
26+ "_id" : " gin_1 " ,
2727 "amount" : 45 ,
2828 "units" : " ml" ,
2929 "optional" : false ,
3737 },
3838 "ingredients" : [
3939 {
40- "_id" : " gin " ,
40+ "_id" : " gin_1 " ,
4141 "name" : " Gin" ,
4242 "strength" : 40 ,
4343 "description" : " Test description" ,
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<draft2 >
33 <recipe >
4- <_id >gin-and-tonic </_id >
4+ <_id >gin-and-tonic_1 </_id >
55 <name >Gin and Tonic</name >
66 <instructions >Cocktail instructions go here</instructions >
77 <created_at >2020-01-01T12:00:00+00:00</created_at >
2121 <copyright >Exported copyright</copyright >
2222 </images >
2323 <ingredients >
24- <_id >gin </_id >
24+ <_id >gin_1 </_id >
2525 <amount >45</amount >
2626 <units >ml</units >
2727 <optional ></optional >
3333 </ingredients >
3434 </recipe >
3535 <ingredients >
36- <_id >gin </_id >
36+ <_id >gin_1 </_id >
3737 <name >Gin</name >
3838 <strength >40</strength >
3939 <description >Test description</description >
Original file line number Diff line number Diff line change 11recipe :
2- _id : gin-and-tonic
2+ _id : gin-and-tonic_1
33 name : ' Gin and Tonic'
44 instructions : ' Cocktail instructions go here'
55 created_at : ' 2020-01-01T12:00:00+00:00'
@@ -20,7 +20,7 @@ recipe:
2020 copyright : ' Exported copyright'
2121 ingredients :
2222 -
23- _id : gin
23+ _id : gin_1
2424 amount : 45.0
2525 units : ml
2626 optional : false
@@ -31,7 +31,7 @@ recipe:
3131 sort : 1
3232ingredients :
3333 -
34- _id : gin
34+ _id : gin_1
3535 name : Gin
3636 strength : 40.0
3737 description : ' Test description'
You can’t perform that action at this time.
0 commit comments