Skip to content

Commit e0f8f0a

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents b9ac3ed + ab92bb6 commit e0f8f0a

File tree

7 files changed

+26
-18
lines changed

7 files changed

+26
-18
lines changed

build.cmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ REM ------------------------------------
1010
REM -- build script for Windows
1111
REM ------------------------------------
1212

13-
SET FANO_DIR="vendor/fano"
1413

14+
IF NOT DEFINED FANO_DIR (SET FANO_DIR="vendor/fano")
1515
IF NOT DEFINED BUILD_TYPE (SET BUILD_TYPE="prod")
1616
IF NOT DEFINED USER_APP_DIR (SET USER_APP_DIR="src")
1717
IF NOT DEFINED UNIT_OUTPUT_DIR (SET UNIT_OUTPUT_DIR="bin\unit")
1818
IF NOT DEFINED EXEC_OUTPUT_DIR (SET EXEC_OUTPUT_DIR="public")
1919
IF NOT DEFINED EXEC_OUTPUT_NAME (SET EXEC_OUTPUT_NAME="app.cgi")
2020
IF NOT DEFINED SOURCE_PROGRAM_NAME (SET SOURCE_PROGRAM_NAME="app.pas")
21+
IF NOT DEFINED FPC_BIN (SET FPC_BIN="fpc")
2122

22-
fpc @vendor/fano/fano.cfg @build.cfg %USER_APP_DIR%\%SOURCE_PROGRAM_NAME%
23+
%FPC_BIN% @vendor/fano/fano.cfg @build.cfg %USER_APP_DIR%\%SOURCE_PROGRAM_NAME%

build.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
# Build script for Linux
1212
#------------------------------------------------------
1313

14+
15+
if [[ -z "${FANO_DIR}" ]]; then
1416
export FANO_DIR="vendor/fano"
17+
fi
1518

1619
if [[ -z "${BUILD_TYPE}" ]]; then
1720
export BUILD_TYPE="prod"
@@ -34,7 +37,11 @@ export EXEC_OUTPUT_NAME="app.cgi"
3437
fi
3538

3639
if [[ -z "${SOURCE_PROGRAM_NAME}" ]]; then
37-
SOURCE_PROGRAM_NAME="app.pas"
40+
export SOURCE_PROGRAM_NAME="app.pas"
41+
fi
42+
43+
if [[ -z "${FPC_BIN}" ]]; then
44+
export FPC_BIN="fpc"
3845
fi
3946

40-
fpc @vendor/fano/fano.cfg @build.cfg ${USER_APP_DIR}/${SOURCE_PROGRAM_NAME}
47+
${FPC_BIN} @vendor/fano/fano.cfg @build.cfg ${USER_APP_DIR}/${SOURCE_PROGRAM_NAME}

src/App/User/Models/UserModel.pas

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
(*!------------------------------------------------------------
22
* Fano Framework Skeleton Application (https://fanoframework.github.io)
33
*
4-
* @link https://github.com/fanoframework/fano-app-views
4+
* @link https://github.com/fanoframework/fano-mvc
55
* @copyright Copyright (c) 2018 Zamrony P. Juhara
6-
* @license https://github.com/fanoframework/fano-app-views/blob/master/LICENSE (GPL 3.0)
6+
* @license https://github.com/fanoframework/fano-mvc/blob/master/LICENSE (GPL 3.0)
77
*------------------------------------------------------------- *)
88
unit UserModel;
99

@@ -24,7 +24,7 @@ interface
2424
*
2525
* @author Zamrony P. Juhara <zamronypj@yahoo.com>
2626
*------------------------------------------------*)
27-
TUserModel = class(TInterfacedObject, IModelReader, IModelReadOnlyData, IDependency)
27+
TUserModel = class(TInterfacedObject, IModelReader, IModelResultSet, IDependency)
2828
private
2929
jsonData : TJSONData;
3030
jsonFilename : string;
@@ -33,8 +33,8 @@ TUserModel = class(TInterfacedObject, IModelReader, IModelReadOnlyData, IDep
3333
constructor create(const jsonDataSrc : string);
3434
destructor destroy(); override;
3535

36-
function read(const params : IModelWriteOnlyData = nil) : IModelReadOnlyData;
37-
function data() : IModelReadOnlyData;
36+
function read(const params : IModelParams = nil) : IModelResultSet;
37+
function data() : IModelResultSet;
3838

3939
(*!------------------------------------------------
4040
* get total data
@@ -87,8 +87,8 @@ implementation
8787
end;
8888

8989
function TUserModel.read(
90-
const params : IModelWriteOnlyData = nil
91-
) : IModelReadOnlyData;
90+
const params : IModelParams = nil
91+
) : IModelResultSet;
9292
var fstr : TFileStream;
9393
begin
9494
fstr:= TFileStream.create(jsonFilename, fmOpenRead or fmShareDenyWrite);
@@ -101,7 +101,7 @@ implementation
101101
result := self;
102102
end;
103103

104-
function TUserModel.data() : IModelReadOnlyData;
104+
function TUserModel.data() : IModelResultSet;
105105
begin
106106
result := self;
107107
end;

src/App/User/Views/UserListingView.pas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
(*!------------------------------------------------------------
22
* Fano Web Framework Skeleton Application (https://fanoframework.github.io)
33
*
4-
* @link https://github.com/fanoframework/fano-app
4+
* @link https://github.com/fanoframework/fano-mvc
55
* @copyright Copyright (c) 2018 Zamrony P. Juhara
6-
* @license https://github.com/fanoframework/fano-app/blob/master/LICENSE (GPL 3.0)
6+
* @license https://github.com/fanoframework/fano-mvc/blob/master/LICENSE (GPL 3.0)
77
*------------------------------------------------------------- *)
88
unit UserListingView;
99

@@ -64,7 +64,7 @@ implementation
6464
const viewParams : IViewParameters;
6565
const response : IResponse
6666
) : IResponse;
67-
var userData : IModelReadOnlyData;
67+
var userData : IModelResultSet;
6868
respBody : IResponseStream;
6969
begin
7070
userData := userModel.data();

src/Templates/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!---end content (see header.html)--->
1+
<!-- end content (see header.html) -->
22
</div>
33

44
</section>

src/Templates/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ <h1>Fano</h1>
5252
</div>
5353

5454
<div class="hero-body">
55-
<!---begin content (see footer.html)--->
55+
<!-- begin content (see footer.html) -->

vendor/fano

Submodule fano updated 78 files

0 commit comments

Comments
 (0)