Skip to content

Commit

Permalink
Merge branch 'release/1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
ktekinay committed Feb 14, 2015
2 parents 6eead58 + fd6f9ee commit 7763cf8
Show file tree
Hide file tree
Showing 18 changed files with 233 additions and 47 deletions.
12 changes: 12 additions & 0 deletions Kaju Admin App/Build Automation.xojo_code
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
#tag BuildAutomation
Begin BuildStepList Linux
Begin ExternalIDEScriptStep UpdateAppVersionLinux
AppliesTo = 0
FolderItem = Li4AQnVpbGQgU2NyaXB0cwBVcGRhdGUgQXBwIFZlcnNpb24ueG9qb19zY3JpcHQ=
End
Begin BuildProjectStep Build
End
End
Begin BuildStepList Mac OS X
Begin ExternalIDEScriptStep UpdateAppVersionMac
AppliesTo = 0
FolderItem = Li4AQnVpbGQgU2NyaXB0cwBVcGRhdGUgQXBwIFZlcnNpb24ueG9qb19zY3JpcHQ=
End
Begin BuildProjectStep Build
End
End
Begin BuildStepList Windows
Begin ExternalIDEScriptStep UpdateAppVersionWin
AppliesTo = 0
FolderItem = Li4AQnVpbGQgU2NyaXB0cwBVcGRhdGUgQXBwIFZlcnNpb24ueG9qb19zY3JpcHQ=
End
Begin BuildProjectStep Build
End
End
Expand Down
23 changes: 23 additions & 0 deletions Kaju Admin App/Build Scripts/Update App Version.xojo_script
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
dim kajuVersion as string
kajuVersion = ConstantValue( "Kaju.Version" )

dim parts() as string
parts = kajuVersion.Split( "." )

if parts.Ubound < 2 then
redim parts( 2 )
end if

for i as integer = 0 to 2
if parts( i ) = "" then
parts( i ) = "0"
end if
next i

PropertyValue( "App.MajorVersion" ) = parts( 0 )
PropertyValue( "App.MinorVersion" ) = parts( 1 )
PropertyValue( "App.BugVersion" ) = parts( 2 )

PropertyValue( "App.ShortVersion" ) = kajuVersion
PropertyValue( "App.LongVersion" ) = "v." + kajuVersion

10 changes: 5 additions & 5 deletions Kaju Admin App/Kaju Admin.xojo_project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Type=Desktop
RBProjectVersion=2014.032
RBProjectVersion=2015.01
MinIDEVersion=20070100
Folder=Kaju Classes;../Kaju Classes;&h2570CF64;&h0;false
Class=App;App.xojo_code;&h7955649;&h0;false
Expand All @@ -26,13 +26,13 @@ Class=FolderItemAlias;Other Classes/FolderItemAlias.xojo_code;&h53EF1AE5;&h6AF5D
Class=HTTPSSocket;../Kaju Classes/Kaju/HTTPSSocket.xojo_code;&h5ACDFAEB;&h11400316;false
AppMenuBar=MainMenuBar
MajorVersion=1
MinorVersion=3
SubVersion=3
MinorVersion=4
SubVersion=0
NonRelease=0
Release=3
InfoVersion=Kaju Admin
LongVersion=v.1.3.3
ShortVersion=1.3.3
LongVersion=v.1.4
ShortVersion=1.4
WinCompanyName=MacTechnologies Consulting
WinInternalName=
WinProductName=
Expand Down
36 changes: 36 additions & 0 deletions Kaju Classes/Kaju.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,33 @@ Protected Module Kaju
End Sub
#tag EndMethod

#tag Method, Flags = &h1
Protected Function DidLastUpdateFail() As Boolean
dim marker as string = kSwitchUpdateFailed
dim args as string = System.CommandLine
dim pos as integer = args.InStrB( marker )
return pos <> 0

End Function
#tag EndMethod

#tag Method, Flags = &h1
Protected Function DidLastUpdateSucceed(ByRef fromVersion As String) As Boolean
dim marker as string = kSwitchUpdateSucceeded
dim args as string = System.CommandLine
dim pos as integer = args.InStrB( marker )

if pos <> 0 then
fromVersion = args.MidB( pos + marker.LenB + 1 )
fromVersion = fromVersion.Trim
return true
else
return false
end if

End Function
#tag EndMethod

#tag Method, Flags = &h1
Protected Function GetTemporaryFolder() As FolderItem
dim f as FolderItem = GetTemporaryFolderItem
Expand Down Expand Up @@ -346,9 +373,18 @@ Protected Module Kaju
#tag EndNote


#tag Constant, Name = kSwitchUpdateFailed, Type = String, Dynamic = False, Default = \"--kaju-fail", Scope = Private
#tag EndConstant

#tag Constant, Name = kSwitchUpdateSucceeded, Type = String, Dynamic = False, Default = \"--kaju-success", Scope = Private
#tag EndConstant

#tag Constant, Name = kUpdatePacketMarker, Type = String, Dynamic = False, Default = \"KAJU ", Scope = Protected
#tag EndConstant

#tag Constant, Name = Version, Type = String, Dynamic = False, Default = \"1.4", Scope = Protected
#tag EndConstant


#tag ViewBehavior
#tag ViewProperty
Expand Down
49 changes: 48 additions & 1 deletion Kaju Classes/Kaju/HTTPSSocket.xojo_code
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
#tag Class
Protected Class HTTPSSocket
Inherits HTTPSecureSocket
#tag Event
Function AuthenticationRequired(Realm As String, Headers As InternetHeaders, ByRef Name As String, ByRef Password As String) As Boolean
if RaiseEvent AuthenticationRequired( Realm, Headers, Name, Password ) then
return true
end if

if Username <> "" then
Name = Username
Password = self.Password
return true
else
return false
end if
End Function
#tag EndEvent


#tag Method, Flags = &h0
Sub Get(url As String)
SetSecure( url )
Expand Down Expand Up @@ -107,22 +124,52 @@ Inherits HTTPSecureSocket
#tag EndMethod

#tag Method, Flags = &h21
Private Sub SetSecure(url As String)
Private Sub SetSecure(ByRef url As String)
if ForceSecure or url.Trim.Left( 8 ) = "https://" then
self.Secure = true
self.Port = 443
else
self.Secure = false
self.Port = 80
end if

//
// See if the username and password has been specified
//
dim rx as new RegEx
rx.SearchPattern = "^(?:https?://)([^:/\x20@]+):([^:/\x20@]*)@(.*)"

dim match as RegExMatch = rx.Search( url )
if match is nil then
Username = ""
Password = ""
else
Username = DecodeURLComponent( match.SubExpressionString( 1 ) )
Password = DecodeURLComponent( match.SubExpressionString( 2 ) )
url = match.SubExpressionString( 3 )
end if

End Sub
#tag EndMethod


#tag Hook, Flags = &h0
Event AuthenticationRequired(Realm As String, Headers As InternetHeaders, ByRef Name As String, ByRef Password As String) As Boolean
#tag EndHook


#tag Property, Flags = &h0
ForceSecure As Boolean
#tag EndProperty

#tag Property, Flags = &h21
Private Password As String
#tag EndProperty

#tag Property, Flags = &h21
Private Username As String
#tag EndProperty


#tag Constant, Name = kDefaultMaximumIterations, Type = Double, Dynamic = False, Default = \"5", Scope = Private
#tag EndConstant
Expand Down
Loading

0 comments on commit 7763cf8

Please sign in to comment.