tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From florianhockm...@apache.org
Subject tinkerpop git commit: TINKERPOP-1836 Add Gremlin.Net.Template project [Forced Update!]
Date Sun, 11 Feb 2018 17:16:38 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1836 87832f28b -> 46a2a12e7 (forced update)


TINKERPOP-1836 Add Gremlin.Net.Template project

This project is a dotnet template that can be installed and then used to create a simple dotnet
console application ready to be used together with a Gremlin Server.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/46a2a12e
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/46a2a12e
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/46a2a12e

Branch: refs/heads/TINKERPOP-1836
Commit: 46a2a12e7c6d555500b77de9cb76a0870aadfb44
Parents: 0bcab7f
Author: Florian Hockmann <fh@florian-hockmann.de>
Authored: Sun Feb 11 18:16:11 2018 +0100
Committer: Florian Hockmann <fh@florian-hockmann.de>
Committed: Sun Feb 11 18:16:11 2018 +0100

----------------------------------------------------------------------
 gremlin-dotnet/Gremlin.Net.sln                  | 19 ++++++-
 .../glv/Gremlin.Net.Template.csproj.template    | 32 +++++++++++
 .../glv/Gremlin.Net.Template.nuspec.template    | 21 ++++++++
 gremlin-dotnet/glv/generate.groovy              |  8 ++-
 .../.template.config/template.json              | 14 +++++
 .../Gremlin.Net.Template.csproj                 | 32 +++++++++++
 .../Gremlin.Net.Template.nuspec                 | 21 ++++++++
 .../src/Gremlin.Net.Template/Program.cs         | 50 +++++++++++++++++
 .../src/Gremlin.Net.Template/README.md          | 46 ++++++++++++++++
 .../src/Gremlin.Net.Template/Service.cs         | 43 +++++++++++++++
 gremlin-dotnet/src/pom.xml                      | 47 ++++++++++++++++
 .../Gremlin.Net.Template.IntegrationTest.csproj | 20 +++++++
 .../ServiceTests.cs                             | 56 ++++++++++++++++++++
 pom.xml                                         |  2 +
 14 files changed, 409 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/Gremlin.Net.sln
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/Gremlin.Net.sln b/gremlin-dotnet/Gremlin.Net.sln
index b1a5d19..3f2b2b4 100644
--- a/gremlin-dotnet/Gremlin.Net.sln
+++ b/gremlin-dotnet/Gremlin.Net.sln
@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
-VisualStudioVersion = 15.0.26430.12
+VisualStudioVersion = 15.0.27130.2026
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{584F838B-DAE2-44F5-868C-1F532949C827}"
 EndProject
@@ -15,6 +15,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gremlin.Net.UnitTest",
"tes
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gremlin.Net.IntegrationTest", "test\Gremlin.Net.IntegrationTest\Gremlin.Net.IntegrationTest.csproj",
"{CC54ABE3-13D2-491C-81E2-4D0355ABFA93}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gremlin.Net.Template", "src\Gremlin.Net.Template\Gremlin.Net.Template.csproj",
"{A9D2567A-6FD0-452B-A2F9-4256FE513ADD}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gremlin.Net.Template.IntegrationTest",
"test\Gremlin.Net.Template.IntegrationTest\Gremlin.Net.Template.IntegrationTest.csproj", "{3BFC3559-E317-4327-AFB7-CFBB31E1C868}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -33,6 +37,14 @@ Global
 		{CC54ABE3-13D2-491C-81E2-4D0355ABFA93}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{CC54ABE3-13D2-491C-81E2-4D0355ABFA93}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{CC54ABE3-13D2-491C-81E2-4D0355ABFA93}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A9D2567A-6FD0-452B-A2F9-4256FE513ADD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A9D2567A-6FD0-452B-A2F9-4256FE513ADD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A9D2567A-6FD0-452B-A2F9-4256FE513ADD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A9D2567A-6FD0-452B-A2F9-4256FE513ADD}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3BFC3559-E317-4327-AFB7-CFBB31E1C868}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3BFC3559-E317-4327-AFB7-CFBB31E1C868}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3BFC3559-E317-4327-AFB7-CFBB31E1C868}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3BFC3559-E317-4327-AFB7-CFBB31E1C868}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -41,5 +53,10 @@ Global
 		{6C1DD34D-E30F-4E37-AACC-BEB8AD2320D8} = {584F838B-DAE2-44F5-868C-1F532949C827}
 		{1FAB781B-B857-4AD2-BEC8-E20C214D9E21} = {1B54FAC2-5411-4BB6-B450-FE2FFD8C4782}
 		{CC54ABE3-13D2-491C-81E2-4D0355ABFA93} = {1B54FAC2-5411-4BB6-B450-FE2FFD8C4782}
+		{A9D2567A-6FD0-452B-A2F9-4256FE513ADD} = {584F838B-DAE2-44F5-868C-1F532949C827}
+		{3BFC3559-E317-4327-AFB7-CFBB31E1C868} = {1B54FAC2-5411-4BB6-B450-FE2FFD8C4782}
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {F0AF408C-2147-434A-80FB-73A1626FC30C}
 	EndGlobalSection
 EndGlobal

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/glv/Gremlin.Net.Template.csproj.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Gremlin.Net.Template.csproj.template b/gremlin-dotnet/glv/Gremlin.Net.Template.csproj.template
new file mode 100644
index 0000000..255520b
--- /dev/null
+++ b/gremlin-dotnet/glv/Gremlin.Net.Template.csproj.template
@@ -0,0 +1,32 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You 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 IS A GENERATED FILE - DO NOT MODIFY THIS FILE DIRECTLY - see pom.xml -->
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>netcoreapp2.0</TargetFramework>
+    <IsPackable>false</IsPackable>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="../Gremlin.Net/Gremlin.Net.csproj" />
+    <PackageReference Include="Gremlin.Net" Version="$projectVersion" />
+  </ItemGroup>
+
+</Project>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/glv/Gremlin.Net.Template.nuspec.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Gremlin.Net.Template.nuspec.template b/gremlin-dotnet/glv/Gremlin.Net.Template.nuspec.template
new file mode 100644
index 0000000..72ad382
--- /dev/null
+++ b/gremlin-dotnet/glv/Gremlin.Net.Template.nuspec.template
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
+    <metadata>
+        <id>Gremlin.Net.Template</id>
+        <title>Gremlin.Net Template</title>
+        <version>$projectVersion</version>
+        <description>Gremlin.Net template to create a console application with dotnet
new.</description>
+        <authors>Apache TinkerPop</authors>
+        <licenseUrl>https://github.com/apache/tinkerpop/blob/master/LICENSE</licenseUrl>
+        <projectUrl>http://tinkerpop.apache.org</projectUrl>
+        <tags>TinkerPop Gremlin Gremlin.Net</tags>
+        <packageTypes>
+            <packageType name="Template" />
+        </packageTypes>
+    </metadata>
+    <files>
+        <file src=".template.config/template.json" target="content/.template.config" />
+        <file src="Gremlin.Net.Template.csproj" target="content" />
+        <file src="*.cs" target="content" />
+</files>
+</package>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 12cfa88..eea8503 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -383,4 +383,10 @@ def determineVersion = {
 def versionToUse = determineVersion()
 def csprojTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/Gremlin.Net.csproj.template")).make(["projectVersion":versionToUse])
 def csprojFile = new File("${projectBaseDir}/src/Gremlin.Net/Gremlin.Net.csproj")
-csprojFile.newWriter().withWriter{ it << csprojTemplate }
\ No newline at end of file
+csprojFile.newWriter().withWriter{ it << csprojTemplate }
+def templateCsprojTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/Gremlin.Net.Template.csproj.template")).make(["projectVersion":versionToUse])
+def templateCsprojFile = new File("${projectBaseDir}/src/Gremlin.Net.Template/Gremlin.Net.Template.csproj")
+templateCsprojFile.newWriter().withWriter{ it << templateCsprojTemplate }
+def nuspecTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/Gremlin.Net.Template.nuspec.template")).make(["projectVersion":versionToUse])
+def nuspecFile = new File("${projectBaseDir}/src/Gremlin.Net.Template/Gremlin.Net.Template.nuspec")
+nuspecFile.newWriter().withWriter{ it << nuspecTemplate }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/src/Gremlin.Net.Template/.template.config/template.json
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net.Template/.template.config/template.json b/gremlin-dotnet/src/Gremlin.Net.Template/.template.config/template.json
new file mode 100644
index 0000000..f1ea667
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net.Template/.template.config/template.json
@@ -0,0 +1,14 @@
+{
+    "$schema": "http://json.schemastore.org/template",
+    "author": "Apache TinkerPop",
+    "classifications": [ "TinkerPop", "Gremlin", "Gremlin.Net" ],
+    "identity": "Gremlin.Net.Template",
+    "name": "Gremlin.Net Template",
+    "shortName": "gremlin",
+    "tags": {
+        "language": "C#",
+        "type": "project"
+    },
+    "sourceName": "Gremlin.Net.Template",
+    "preferNameDirectory": true
+  }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.csproj
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.csproj b/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.csproj
new file mode 100644
index 0000000..3bb1409
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.csproj
@@ -0,0 +1,32 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You 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 IS A GENERATED FILE - DO NOT MODIFY THIS FILE DIRECTLY - see pom.xml -->
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>netcoreapp2.0</TargetFramework>
+    <IsPackable>false</IsPackable>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="../Gremlin.Net/Gremlin.Net.csproj" />
+    <PackageReference Include="Gremlin.Net" Version="3.2.8-SNAPSHOT" />
+  </ItemGroup>
+
+</Project>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.nuspec
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.nuspec b/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.nuspec
new file mode 100644
index 0000000..ee147c8
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.nuspec
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
+    <metadata>
+        <id>Gremlin.Net.Template</id>
+        <title>Gremlin.Net Template</title>
+        <version>3.2.8-SNAPSHOT</version>
+        <description>Gremlin.Net template to create a console application with dotnet
new.</description>
+        <authors>Apache TinkerPop</authors>
+        <licenseUrl>https://github.com/apache/tinkerpop/blob/master/LICENSE</licenseUrl>
+        <projectUrl>http://tinkerpop.apache.org</projectUrl>
+        <tags>TinkerPop Gremlin Gremlin.Net</tags>
+        <packageTypes>
+            <packageType name="Template" />
+        </packageTypes>
+    </metadata>
+    <files>
+        <file src=".template.config/template.json" target="content/.template.config" />
+        <file src="Gremlin.Net.Template.csproj" target="content" />
+        <file src="*.cs" target="content" />
+</files>
+</package>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/src/Gremlin.Net.Template/Program.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net.Template/Program.cs b/gremlin-dotnet/src/Gremlin.Net.Template/Program.cs
new file mode 100644
index 0000000..00f85e4
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net.Template/Program.cs
@@ -0,0 +1,50 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+#endregion
+
+using System;
+using Gremlin.Net.Driver;
+using Gremlin.Net.Driver.Remote;
+using Gremlin.Net.Structure;
+
+namespace Gremlin.Net.Template
+{
+    internal class Program
+    {
+        private const string GremlinServerHostname = "localhost";
+        private const int GremlinServerPort = 45940;
+
+        private static void Main()
+        {
+            using (var client = new GremlinClient(new GremlinServer(GremlinServerHostname,
GremlinServerPort)))
+            {
+                var g = new Graph().Traversal().WithRemote(new DriverRemoteConnection(client));
+                var service = new Service(g);
+                var creators = service.FindCreatorsOfSoftware("lop");
+                foreach (var c in creators)
+                {
+                    Console.WriteLine(c);
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/src/Gremlin.Net.Template/README.md
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net.Template/README.md b/gremlin-dotnet/src/Gremlin.Net.Template/README.md
new file mode 100644
index 0000000..c57f51c
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net.Template/README.md
@@ -0,0 +1,46 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+
+-->
+
+# Gremlin.Net Template
+
+This dotnet template helps getting started with [Gremlin.Net](http://tinkerpop.apache.org/docs/current/reference/#gremlin-DotNet)
- the .NET Gremlin Language Variant (GLV) of Apache TinkerPop™. It creates a new C# console
project that shows how to connect to a [Gremlin Server](http://tinkerpop.apache.org/docs/current/reference/#gremlin-server)
with Gremlin.Net.
+
+## Installation
+
+You can install the template with the dotnet CLI tool:
+
+```bash
+dotnet new -i Gremlin.Net.Template
+```
+
+## Creating a project using the template
+
+After the template is installed, a new project based on this template can be installed:
+
+```bash
+dotnet new gremlin
+```
+
+You can specify the output directory for the new project which will then also be used as
the name of the created project:
+
+```bash
+dotnet new gremlin -o MyFirstGremlinProject
+```
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/src/Gremlin.Net.Template/Service.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net.Template/Service.cs b/gremlin-dotnet/src/Gremlin.Net.Template/Service.cs
new file mode 100644
index 0000000..4ded6d3
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net.Template/Service.cs
@@ -0,0 +1,43 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+#endregion
+
+using System.Collections.Generic;
+using Gremlin.Net.Process.Traversal;
+
+namespace Gremlin.Net.Template
+{
+    public class Service
+    {
+        private readonly GraphTraversalSource _g;
+
+        public Service(GraphTraversalSource g)
+        {
+            _g = g;
+        }
+
+        public IList<string> FindCreatorsOfSoftware(string softwareName)
+        {
+            return _g.V().HasLabel("software").Has("name", softwareName).In("created").Values<string>("name").ToList();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/src/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/pom.xml b/gremlin-dotnet/src/pom.xml
index 0798c04..d80e94d 100644
--- a/gremlin-dotnet/src/pom.xml
+++ b/gremlin-dotnet/src/pom.xml
@@ -89,6 +89,47 @@ limitations under the License.
                             <nugetAddEnabled>false</nugetAddEnabled>
                         </configuration>
                     </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>pack-dotnet-template</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <taskdef resource="net/sf/antcontrib/antcontrib.properties"
/>
+                                        <if>
+                                            <available file="Gremlin.Net/bin/nuget.exe"/>
+                                            <then>
+                                                <echo>nuget.exe already downloaded
and at Gremlin.Net/bin/nuget.exe.</echo>
+                                            </then>
+
+                                            <else>
+                                                <exec dir="Gremlin.Net/bin" executable="wget"
failonerror="true">
+                                                    <arg line="https://dist.nuget.org/win-x86-commandline/v4.4.1/nuget.exe"/>
+                                                </exec>
+                                            </else>
+                                        </if>
+
+                                        <exec dir="Gremlin.Net/bin" executable="mono"
failonerror="true">
+                                            <arg line="nuget.exe pack ../../Gremlin.Net.Template/Gremlin.Net.Template.nuspec"/>
+                                        </exec>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                        <dependencies>
+                            <dependency>
+                                <groupId>ant-contrib</groupId>
+                                <artifactId>ant-contrib</artifactId>
+                                <version>20020829</version>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
                 </plugins>
             </build>
         </profile>
@@ -200,6 +241,12 @@ def engine = new groovy.text.GStringTemplateEngine()
 def csprojTemplate = engine.createTemplate(new File('${project.parent.basedir}/glv/Gremlin.Net.csproj.template')).make(["projectVersion":versionToUse])
 def csprojFile = new File('${project.basedir}/Gremlin.Net/Gremlin.Net.csproj')
 csprojFile.newWriter().withWriter{ it << csprojTemplate }
+def templateCsprojTemplate = engine.createTemplate(new File('${project.parent.basedir}/glv/Gremlin.Net.Template.csproj.template')).make(["projectVersion":versionToUse])
+def templateCsprojFile = new File('${project.basedir}/Gremlin.Net.Template/Gremlin.Net.Template.csproj')
+templateCsprojFile.newWriter().withWriter{ it << templateCsprojTemplate }
+def nuspecTemplate = engine.createTemplate(new File('${project.parent.basedir}/glv/Gremlin.Net.Template.nuspec.template')).make(["projectVersion":versionToUse])
+def nuspecFile = new File('${project.basedir}/Gremlin.Net.Template/Gremlin.Net.Template.nuspec')
+nuspecFile.newWriter().withWriter{ it << nuspecTemplate }
 ]]>
                                         </script>
                                     </scripts>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/Gremlin.Net.Template.IntegrationTest.csproj
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/Gremlin.Net.Template.IntegrationTest.csproj
b/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/Gremlin.Net.Template.IntegrationTest.csproj
new file mode 100644
index 0000000..3607e68
--- /dev/null
+++ b/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/Gremlin.Net.Template.IntegrationTest.csproj
@@ -0,0 +1,20 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netcoreapp2.0</TargetFramework>
+
+    <IsPackable>false</IsPackable>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
+    <PackageReference Include="xunit" Version="2.3.1" />
+    <PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
+    <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\..\src\Gremlin.Net.Template\Gremlin.Net.Template.csproj"
/>
+  </ItemGroup>
+
+</Project>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/ServiceTests.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/ServiceTests.cs b/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/ServiceTests.cs
new file mode 100644
index 0000000..8bf332f
--- /dev/null
+++ b/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/ServiceTests.cs
@@ -0,0 +1,56 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+#endregion
+
+using System.Collections.Generic;
+using Gremlin.Net.Driver;
+using Gremlin.Net.Driver.Remote;
+using Gremlin.Net.Structure;
+using Xunit;
+
+namespace Gremlin.Net.Template.IntegrationTest
+{
+    public class ServiceTests
+    {
+        private const string TestHost = "localhost";
+        private const int TestPort = 45940;
+
+        [Fact]
+        public void ShouldReturnExpectedCreators()
+        {
+            using (var client = CreateClient())
+            {
+                var g = new Graph().Traversal().WithRemote(new DriverRemoteConnection(client));
+                var service = new Service(g);
+            
+                var creators = service.FindCreatorsOfSoftware("lop");
+
+                Assert.Equal(new List<string> {"marko", "josh", "peter"}, creators);
+            }
+        }
+
+        private static IGremlinClient CreateClient()
+        {
+            return new GremlinClient(new GremlinServer(TestHost, TestPort));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46a2a12e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 259f16a..4d9da91 100644
--- a/pom.xml
+++ b/pom.xml
@@ -323,6 +323,8 @@ limitations under the License.
                         <exclude>**/*.csproj</exclude>
                         <exclude>**/.vs/**</exclude>
                         <exclude>**/NuGet.Config</exclude>
+                        <exclude>**/*.nuspec</exclude>
+                        <exclude>**/*.nuspec.template</exclude>
                         <exclude>**/gremlin-javascript/node_modules/**</exclude>
                         <exclude>**/node/node_modules/**</exclude>
                         <exclude>**/node/node</exclude>


Mime
View raw message