Skip to content
Browse files

Cleaned up namespaces so that HttpParser is now Fracture.Http. Update…

…d NuGet package to include the required FParsec assemblies.
  • Loading branch information...
1 parent cdc5152 commit 08b074632c2220ba5dc902453f15abc2c6cdffa0 @panesofglass panesofglass committed Jun 18, 2011
View
14 Fracture.sln
@@ -15,9 +15,19 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fracture", "src\lib\fractur
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fracture.Tests", "src\tests\Fracture.Tests\Fracture.Tests.fsproj", "{43B4FEB8-E0EF-4510-81B9-314059D2473B}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "HttpParser", "src\lib\httpparser\HttpParser.fsproj", "{13571762-E1C9-492A-9141-37AA0094759A}"
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fracture.Http", "src\lib\http\Fracture.Http.fsproj", "{13571762-E1C9-492A-9141-37AA0094759A}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "HttpParser.Tests", "src\tests\HttpParser.Tests\HttpParser.Tests.fsproj", "{D208FDA3-0198-478F-8596-A91ADEDB76C6}"
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fracture.Http.Tests", "src\tests\Http.Tests\Fracture.Http.Tests.fsproj", "{D208FDA3-0198-478F-8596-A91ADEDB76C6}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{04847EAA-343D-4C73-9C06-664F0DF5C9C6}"
+ ProjectSection(SolutionItems) = preProject
+ build.bat = build.bat
+ build.fsx = build.fsx
+ build.sh = build.sh
+ fracture.nuspec = fracture.nuspec
+ LICENSE.txt = LICENSE.txt
+ README = README
+ EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
View
9 build.fsx
@@ -66,10 +66,10 @@ Target "BuildApp" (fun _ ->
{p with
CodeLanguage = FSharp
AssemblyVersion = version
- AssemblyTitle = "HttpParser"
+ AssemblyTitle = "Fracture.Http"
AssemblyDescription = "An HTTP and URI parser combinator library."
Guid = "13571762-E1C9-492A-9141-37AA0094759A"
- OutputFileName = "./src/lib/httpparser/AssemblyInfo.fs" })
+ OutputFileName = "./src/lib/http/AssemblyInfo.fs" })
MSBuildRelease buildDir "Build" appReferences
|> Log "AppBuild-Output: "
@@ -114,7 +114,10 @@ Target "BuildNuGet" (fun _ ->
CleanDirs [nugetDir; nugetLibDir; nugetDocsDir]
XCopy (docsDir |> FullName) nugetDocsDir
- [buildDir + "Fracture.dll"; buildDir + "HttpParser.dll"]
+ [ buildDir + "Fracture.dll"
+ buildDir + "Fracture.Http.dll"
+ buildDir + "FParsecCS.dll"
+ buildDir + "FParsec.dll" ]
|> CopyTo nugetLibDir
NuGet (fun p ->
View
4 build.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# Builds the Fracture library.
+set -e
+"./packages/FAKE.1.56.7/tools/FAKE.exe" "build.fsx"
View
3 fracture.nuspec
@@ -11,6 +11,5 @@
<projectUrl>http://fractureio.github.com/fracture</projectUrl>
<licenseUrl>http://github.com/fractureio/fracture/raw/master/LICENSE.txt</licenseUrl>
<tags>socket networking tcp http fsharp</tags>
- @dependencies@
- </metadata>
+ </metadata>
</package>
View
1 src/lib/fracture/Fracture.fsproj
@@ -12,6 +12,7 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<Name>Fracture</Name>
<FscToolPath>..\..\..\lib\FSharp\v4.0\bin\</FscToolPath>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
View
2 src/lib/httpparser/CharParsers.fs → src/lib/http/CharParsers.fs
@@ -1,4 +1,4 @@
-module HttpParser.CharParsers
+module Fracture.Http.CharParsers
open System
open FParsec.Primitives
View
11 src/lib/httpparser/HttpParser.fsproj → src/lib/http/Fracture.Http.fsproj
@@ -7,11 +7,12 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{13571762-e1c9-492a-9141-37aa0094759a}</ProjectGuid>
<OutputType>Library</OutputType>
- <RootNamespace>HttpParser</RootNamespace>
- <AssemblyName>HttpParser</AssemblyName>
+ <RootNamespace>Fracture.Http</RootNamespace>
+ <AssemblyName>Fracture.Http</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <Name>HttpParser</Name>
+ <Name>Fracture.Http</Name>
<FscToolPath>..\..\..\lib\FSharp\v4.0\bin</FscToolPath>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -29,7 +30,7 @@
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
- <DocumentationFile>bin\Release\HttpParser.XML</DocumentationFile>
+ <DocumentationFile>bin\Release\Fracture.Http.XML</DocumentationFile>
</PropertyGroup>
<Import Project="..\..\..\lib\FSharp\v4.0\bin\Microsoft.FSharp.Targets" />
<ItemGroup>
@@ -62,4 +63,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project>
+</Project>
View
4 src/lib/httpparser/Hex.fs → src/lib/http/Hex.fs
@@ -1,6 +1,6 @@
/// A hexadecimal converter.
/// See http://fssnip.net/25
-module HttpParser.Hex
+module Fracture.Http.Hex
open System
@@ -46,4 +46,4 @@ let decode (s:string) =
buf.[n] <- byte (((fromHexDigit s.[i]) <<< 4) ||| (fromHexDigit s.[i + 1]))
i <- i + 2
n <- n + 1
- buf
+ buf
View
8 src/lib/httpparser/Http.fs → src/lib/http/Http.fs
@@ -1,12 +1,12 @@
-module HttpParser.Http
+module Fracture.Http.Http
open System
open System.Xml.Linq
open FParsec.Primitives
open FParsec.CharParsers
-open HttpParser.Primitives
-open HttpParser.CharParsers
-open HttpParser.Uri
+open Primitives
+open CharParsers
+open Uri
type HttpRequestMethod =
| GET
View
4 src/lib/httpparser/Primitives.fs → src/lib/http/Primitives.fs
@@ -1,8 +1,8 @@
-module HttpParser.Primitives
+module Fracture.Http.Primitives
open System
open FParsec.Primitives
-open HttpParser.Hex
+open Fracture.Http.Hex
module String =
let ofCharList (input:char list) = String(Array.ofList input)
View
16 src/lib/httpparser/Uri.fs → src/lib/http/Uri.fs
@@ -1,10 +1,10 @@
-module HttpParser.Uri
+module Fracture.Http.Uri
open System
open FParsec.Primitives
open FParsec.CharParsers
-open HttpParser.Primitives
-open HttpParser.CharParsers
+open Primitives
+open CharParsers
type UriKind =
| AbsoluteUri of UriPart list
@@ -65,15 +65,15 @@ let opaquePart<'a> : Parser<UriPart list,'a> = (fun u1 u2 -> [Host !!(u1::u2)])
let hierPart<'a> : Parser<UriPart list,'a> =
(fun a b c -> a @ [QueryString(match b with Some(q) -> !!q | _ -> null);Fragment(match c with Some(f) -> !!f | _ -> null)])
<!> (netPath <|> ((fun a -> [Path !!a]) <!> uriAbsPath))
- <*> opt (cons <!> qmark <*> uriQuery)
- <*> opt (cons <!> hash <*> uriFragment)
+ <*> opt (qmark *> uriQuery)
+ <*> opt (hash *> uriFragment)
let absoluteUri<'a> : Parser<UriKind,'a> = (fun a b -> AbsoluteUri(a::b)) <!> scheme .>> colon <*> (hierPart <|> opaquePart)
let relativeUri<'a> : Parser<UriKind,'a> =
(fun a b c -> RelativeUri [Path !!a;QueryString(match b with Some(q) -> !!q | _ -> null);Fragment(match c with Some(f) -> !!f | _ -> null)])
<!> (uriAbsPath <|> relPath)
- <*> opt (cons <!> qmark <*> uriQuery)
- <*> opt (cons <!> hash <*> uriFragment)
+ <*> opt (qmark *> uriQuery)
+ <*> opt (hash *> uriFragment)
-let fragmentRef<'a> : Parser<UriKind,'a> = (fun a b -> FragmentRef(Fragment !!(a::b))) <!> hash <*> uriFragment
+let fragmentRef<'a> : Parser<UriKind,'a> = (fun f -> FragmentRef(Fragment !!f)) <!> hash *> uriFragment
let uriReference<'a> : Parser<UriKind,'a> = absoluteUri <|> relativeUri <|> fragmentRef
View
8 ...tests/HttpParser.Tests/CharParsersTest.fs → src/tests/Http.Tests/CharParsersTest.fs
@@ -1,10 +1,10 @@
-module HttpParser.Tests.CharParsersTest
+module Fracture.Http.Tests.CharParsersTest
open System
open FParsec.CharParsers
-open HttpParser.Hex
-open HttpParser.Primitives
-open HttpParser.CharParsers
+open Fracture.Http.Hex
+open Fracture.Http.Primitives
+open Fracture.Http.CharParsers
open NUnit.Framework
open FsUnit
View
14 .../HttpParser.Tests/HttpParser.Tests.fsproj → ...sts/Http.Tests/Fracture.Http.Tests.fsproj
@@ -7,10 +7,10 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{d208fda3-0198-478f-8596-a91adedb76c6}</ProjectGuid>
<OutputType>Library</OutputType>
- <RootNamespace>HttpParser.Tests</RootNamespace>
- <AssemblyName>HttpParser.Tests</AssemblyName>
+ <RootNamespace>Fracture.Http.Tests</RootNamespace>
+ <AssemblyName>Fracture.Http.Tests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <Name>HttpParser.Tests</Name>
+ <Name>Fracture.Http.Tests</Name>
<FscToolPath>..\..\..\lib\FSharp\v4.0\bin\</FscToolPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -69,8 +69,10 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
- <ProjectReference Include="..\..\lib\HttpParser\HttpParser.fsproj">
- <Name>HttpParser</Name>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\lib\http\Fracture.Http.fsproj">
+ <Name>Fracture.Http</Name>
<Project>{13571762-e1c9-492a-9141-37aa0094759a}</Project>
<Private>True</Private>
</ProjectReference>
@@ -82,4 +84,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project>
+</Project>
View
4 src/tests/HttpParser.Tests/HexTest.fs → src/tests/Http.Tests/HexTest.fs
@@ -1,6 +1,6 @@
-module HttpParser.Tests.HexTest
+module Fracture.Http.Tests.HexTest
-open HttpParser.Hex
+open Fracture.Http.Hex
open NUnit.Framework
open FsUnit
View
10 src/tests/HttpParser.Tests/HttpTest.fs → src/tests/Http.Tests/HttpTest.fs
@@ -1,12 +1,12 @@
-module HttpParser.Tests.HttpTest
+module Fracture.Http.Tests.HttpTest
open System
open FParsec.Error
open FParsec.CharParsers
-open HttpParser.Primitives
-open HttpParser.CharParsers
-open HttpParser.Uri
-open HttpParser.Http
+open Fracture.Http.Primitives
+open Fracture.Http.CharParsers
+open Fracture.Http.Uri
+open Fracture.Http.Http
open NUnit.Framework
open FsUnit
View
2 ...ests/HttpParser.Tests/HttpTestRequests.fs → src/tests/Http.Tests/HttpTestRequests.fs
@@ -1,4 +1,4 @@
-module HttpParser.Tests.HttpMachineTest
+module Fracture.Http.Tests.HttpTestRequests
open System
open System.Collections.Generic
View
6 src/tests/HttpParser.Tests/PrimitivesTest.fs → src/tests/Http.Tests/PrimitivesTest.fs
@@ -1,9 +1,9 @@
-module HttpParser.Tests.PrimitivesTest
+module Fracture.Http.Tests.PrimitivesTest
open System
open FParsec.CharParsers
-open HttpParser.Hex
-open HttpParser.Primitives
+open Fracture.Http.Hex
+open Fracture.Http.Primitives
open NUnit.Framework
open FsUnit
View
6 src/tests/HttpParser.Tests/UriTest.fs → src/tests/Http.Tests/UriTest.fs
@@ -1,10 +1,10 @@
-module HttpParser.Tests.UriTest
+module Fracture.Http.Tests.UriTest
open System
open FParsec.Error
open FParsec.CharParsers
-open HttpParser.CharParsers
-open HttpParser.Uri
+open Fracture.Http.CharParsers
+open Fracture.Http.Uri
open NUnit.Framework
open FsUnit
View
0 src/tests/HttpParser.Tests/packages.config → src/tests/Http.Tests/packages.config
File renamed without changes.

0 comments on commit 08b0746

Please sign in to comment.
Something went wrong with that request. Please try again.