Skip to content

Commit

Permalink
ADDED SEMANTIC VERSION (DMVCFRAMEWORK_VERSION const in MVCFramework.C…
Browse files Browse the repository at this point in the history
…ommons.pas hold the current version)

Updated the IDE Expert to show the current version of the framework
FIX to the mapper about the datasets null values (needs to be chack in old Delphi versions)
FIX to the dataset boolean values
ADDED more unit tests about nullability
  • Loading branch information
danieleteti committed Jan 29, 2017
1 parent 03be713 commit 7190780
Show file tree
Hide file tree
Showing 11 changed files with 229 additions and 159 deletions.
64 changes: 33 additions & 31 deletions ideexpert/DMVC.Expert.CodeGen.Templates.pas
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{ *************************************************************************** }
{ }
{ Delphi MVC Framework }
{ }
{ Copyright (c) 2010-2017 Daniele Teti and the DMVCFramework Team }
{ }
{ https://github.com/danieleteti/delphimvcframework }
{ }
{ *************************************************************************** }
{ }
{ Licensed under the Apache License, Version 2.0 (the "License"); }
{ you may not use this file except in compliance with the License. }
{ You may obtain a copy of the License at }
{ }
{ http://www.apache.org/licenses/LICENSE-2.0 }
{ }
{ Unless required by applicable law or agreed to in writing, software }
{ distributed under the License is distributed on an "AS IS" BASIS, }
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
{ See the License for the specific language governing permissions and }
{ limitations under the License. }
{ }
{ This IDE expert is based off of the one included with the DUnitX }
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
{ }
{ The DUnitX project is run by Vincent Parrett and can be found at: }
{ }
{ https://github.com/VSoftTechnologies/DUnitX }
{ *************************************************************************** }
// ***************************************************************************
//
// Delphi MVC Framework
//
// Copyright (c) 2010-2017 Daniele Teti and the DMVCFramework Team
//
// https://github.com/danieleteti/delphimvcframework
//
// ***************************************************************************
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// This IDE expert is based off of the one included with the DUnitX
// project. Original source by Robert Love. Adapted by Nick Hodges.
//
// The DUnitX project is run by Vincent Parrett and can be found at:
//
// https://github.com/VSoftTechnologies/DUnitX
// ***************************************************************************

unit DMVC.Expert.CodeGen.Templates;

Expand All @@ -44,6 +44,7 @@ interface
'uses' + sLineBreak +
' System.SysUtils,' + sLineBreak +
' MVCFramework.Logger,' + sLineBreak +
' MVCFramework.Commons,' + sLineBreak +
' Winapi.Windows,' + sLineBreak +
' Winapi.ShellAPI,' + sLineBreak +
' ReqMulti, {enables files upload}' + sLineBreak +
Expand All @@ -60,7 +61,7 @@ interface
' LHandle: THandle;' + sLineBreak +
' LServer: TIdHTTPWebBrokerBridge;' + sLineBreak +
'begin' + sLineBreak +
' Writeln(''** DMVCFramework Server **'');' + sLineBreak +
' Writeln(''** DMVCFramework Server ** build '' + DMVCFRAMEWORK_VERSION);' + sLineBreak +
' Writeln(Format(''Starting HTTP Server on port %%d'', [APort]));' + sLineBreak +
' LServer := TIdHTTPWebBrokerBridge.Create(nil);' + sLineBreak +
' try' + sLineBreak +
Expand Down Expand Up @@ -95,6 +96,7 @@ interface
sLineBreak +
'begin' + sLineBreak +
' ReportMemoryLeaksOnShutdown := True;' + sLineBreak +
' IsMultiThread := True;' + sLineBreak +
' try' + sLineBreak +
' if WebRequestHandler <> nil then' + sLineBreak +
' WebRequestHandler.WebModuleClass := WebModuleClass;' + sLineBreak +
Expand Down Expand Up @@ -150,7 +152,7 @@ ' %1:s = class(TMVCController) ' + sLineBreak +
'procedure %0:s.Index;' + sLineBreak +
'begin' + sLineBreak +
' //use Context property to access to the HTTP request and response ' + sLineBreak +
' Render(''Hello World'');' + sLineBreak +
' Render(''Hello DelphiMVCFramework World'');' + sLineBreak +
'end;' + sLineBreak + sLineBreak +
'procedure %0:s.GetSpecializedHello(const FirstName: String);' + sLineBreak +
'begin' + sLineBreak +
Expand Down
22 changes: 11 additions & 11 deletions ideexpert/DMVC_IDE_Expert_D101Berlin.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,7 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
Expand Down Expand Up @@ -554,7 +545,16 @@
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
<DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
Expand Down
Loading

0 comments on commit 7190780

Please sign in to comment.