Skip to content

Commit

Permalink
update plugin core version + added label & file attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
sudarshan0212 committed Jul 3, 2019
1 parent bfa8491 commit cadc114
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 55 deletions.
42 changes: 0 additions & 42 deletions GingerPythonPluginConsole/Ginger.PluginPackage.Actions.json

This file was deleted.

2 changes: 1 addition & 1 deletion GingerPythonPluginConsole/Ginger.PluginPackage.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Id": "Python",
"Version": "v1.1.0",
"Version": "v1.2",
"ProjectUrl": "https://github.com/Ginger-Automation/Ginger-Python-Plugin",
"Description": "Execute Python script",
"Summary": "Python...",
Expand Down
7 changes: 2 additions & 5 deletions GingerPythonPluginConsole/GingerPythonPluginConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ginger.Plugin.Core" Version="3.3.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Ginger.Plugin.Core" Version="3.3.4" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
</ItemGroup>

<ItemGroup>
Expand All @@ -22,9 +22,6 @@
</ItemGroup>

<ItemGroup>
<None Update="Ginger.PluginPackage.Actions.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Ginger.PluginPackage.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
17 changes: 13 additions & 4 deletions GingerPythonPluginConsole/GingerPythonService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ namespace GingerPythonPlugin
public class GingerPythonService
{



[GingerAction("RunScript", "Run Script")]
public void RunScript(IGingerAction GA, string scriptContent,List<Arg> args=null)
{
public void RunScript(IGingerAction GA,
string scriptContent,
[Label("Python Parameters")]
List<Arg> args)
{
Console.WriteLine("start RunPythonScript");

PythonProcess p = PythonProcess.Builder();
Expand All @@ -40,7 +43,13 @@ public void RunScript(IGingerAction GA, string scriptContent,List<Arg> args=null
}

[GingerAction("RunScriptFile", "Run Script file")]
public void RunScriptFile(IGingerAction GA, string scriptFileName, List<Arg> args=null)
public void RunScriptFile(IGingerAction GA,
[Browse(true)]
[BrowseType(BrowseType =BrowseTypeAttribute.eBrowseType.File)]
[FileType(".py")]
string scriptFileName,
[Label("Python Parameters")]
List<Arg> args)
{
Console.WriteLine("start RunPythonScript");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.1</TargetFramework>
<PublishDir>bin\Debug\netcoreapp2.1\publish\</PublishDir>
<PublishDir>C:\Work\Python\Publish</PublishDir>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.1</TargetFramework>
<PublishDir>bin\Debug\netcoreapp2.1\publish\</PublishDir>
<PublishDir>C:\Work\Python\Publish</PublishDir>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion GingerPythonPluginTest/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void RunScript1()
sum=a+b
print('sum=' + str(sum))";
//Act
service.RunScript(GA, script1);
service.RunScript(GA, script1, null);


//Assert
Expand Down

0 comments on commit cadc114

Please sign in to comment.