Skip to content
Merged

0.17.0 #1204

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
defddcc
made Namespaces collection immutable and relevant methods virtual #1040
lukebuehler May 7, 2015
eaab6df
Word wrap Help Command output of each command description
BlackFrog1 May 14, 2015
935bc70
Merge remote-tracking branch 'upstream/dev' into WordWrap
BlackFrog1 May 15, 2015
516dfb1
Update the Help Command tests to identify the new formatting
BlackFrog1 May 15, 2015
dcea2a3
Add Suppress Message to SplitQuoted method
BlackFrog1 May 18, 2015
5a0c1ec
Refactoring Printers impl to the ScriptEnvironment. Also using DI as …
glennblock Mar 23, 2016
9864117
added missing nuspec
filipw Apr 6, 2016
41fe643
resurrected ScriptCs.Engine.Roslyn/Properties/ScriptCs.Engine.Roslyn.…
filipw Apr 6, 2016
5231b86
version bump
filipw Apr 6, 2016
8476230
fixed name of Roslyn package
filipw Apr 6, 2016
805559f
removed scriptcs_packages
filipw Apr 6, 2016
307b0ed
removed VB dlls
filipw Apr 6, 2016
113d11c
killed ScriptCs.Engine.Common
filipw Apr 6, 2016
42e2642
Merge pull request #1150 from filipw/bugfix/0.16.1
glennblock Apr 6, 2016
519b021
load assembly into appdomain in CSharpPersistentEngine
filipw Apr 7, 2016
84eafdd
Merge pull request #1154 from filipw/bugfix/1153
glennblock Apr 9, 2016
211fbc7
add Env.Print(obj) add Print<T>(obj) move printing to printers
gregoryyoung Apr 19, 2016
539576a
write to _console not Console
gregoryyoung Apr 19, 2016
a252cd4
Merge pull request #1156 from gregoryyoung/printer
glennblock Apr 19, 2016
eb3bddd
Merge pull request #1042 from adamralph/1040
glennblock Jul 29, 2016
b8b689d
Fixes #1172 and #1173 (#1177)
glennblock Sep 6, 2016
cff8f5d
Adding brew build script (#1178)
glennblock Sep 6, 2016
ffcd2ff
Fix for #1018 that sets the global credential provider (#1021)
aarondandy Sep 8, 2016
e31b194
Adds new -e and -eval options which will immediately execute a script…
glennblock Dec 29, 2016
7fcebf2
Small fix
glennblock Jan 3, 2017
2ed8e70
#1143. Char literals does not take escape sequences into account (#1144)
rickardp Jan 3, 2017
e228a88
Adding scriptcs NuGet package (#1062)
glennblock Jan 3, 2017
e7b30c4
Sending Common.Logging to oblivion!
glennblock Jan 9, 2017
99e1431
Merge pull request #1190 from glennblock/1189
glennblock Jan 9, 2017
7d1d9b6
Fixing StyleCop issues. Removing StyleCop form tests. Also adding Sty…
glennblock Jan 9, 2017
a089c1d
Merge pull request #1191 from glennblock/stylecop_fixes
glennblock Jan 9, 2017
4810907
Adding ScriptPath to Env
glennblock Jan 9, 2017
2961634
Adding LoadedScripts for files loaded with #load
glennblock Jan 9, 2017
3bee1cd
Moving ScriptPath to be a first class member on the FilePraseContext …
glennblock Jan 9, 2017
80a4c51
Merge pull request #1192 from glennblock/225
filipw Jan 9, 2017
4edd819
Adding FileProcessorTests
glennblock Jan 10, 2017
49479e7
Adding ScriptExecutorTests
glennblock Jan 12, 2017
6f80483
Merge pull request #1195 from glennblock/225
glennblock Jan 12, 2017
83546bd
Refactoring ScriptEnvironment to use IScriptInfo directly
glennblock Jan 12, 2017
70d1fbb
Merge pull request #1196 from glennblock/225
glennblock Jan 12, 2017
cc72227
Adding Env.ScriptAssembly, a beautiful hack
glennblock Jan 12, 2017
c73d465
Merge pull request #1197 from glennblock/244
filipw Jan 12, 2017
3058aaf
Forcing ScriptAssembly to be set when a script first runs, this way l…
glennblock Jan 21, 2017
bf99766
Merge pull request #1199 from glennblock/244
glennblock Jan 21, 2017
3cfef69
Fix
glennblock Jan 21, 2017
208ac1c
Merge pull request #1200 from glennblock/244
glennblock Jan 21, 2017
c8e6671
Changing DarkRed to Red, fix for #1198
glennblock Jan 21, 2017
d7ee0bd
Merge pull request #1201 from glennblock/1198
glennblock Jan 21, 2017
6b0172a
Merge pull request #1047 from BlackFrog1/WordWrap
glennblock Jan 21, 2017
8fa94c9
Fixing tests I broke and slight refactoring
glennblock Jan 21, 2017
a7525c4
Merge pull request #1202 from glennblock/244
glennblock Jan 21, 2017
ca75153
Adds support for single line comments at the top of a file before dir…
glennblock Jan 21, 2017
d86d5db
Merge pull request #1203 from glennblock/1185
glennblock Jan 21, 2017
9da8773
Upping to 0.17.0
glennblock Jan 21, 2017
a459b4a
Merging to fix props
glennblock Jan 21, 2017
b6c1c1a
Fixes handling of relative paths. Fix for #1193
glennblock Jan 22, 2017
30cb5e8
Merge pull request #1205 from glennblock/1193
glennblock Jan 22, 2017
8b98a1f
Updating to Nuget.Core 2.14.0
glennblock Feb 12, 2017
d742d51
Merge pull request #1208 from glennblock/dev
glennblock Feb 12, 2017
49c912b
Removing automatically showing usage
glennblock Feb 12, 2017
17de08e
Merge pull request #1209 from glennblock/dev
glennblock Feb 12, 2017
6e60f45
Fixing unit test to not expect args
glennblock Feb 12, 2017
29c0480
Merge pull request #1210 from glennblock/dev
glennblock Feb 12, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ mono ./.nuget/NuGet.exe restore ./ScriptCs.sln
# script
mkdir -p artifacts/Release/bin
xbuild ./ScriptCs.sln /property:Configuration=Release /nologo /verbosity:normal
cp src/*/bin/Release/* artifacts/Release/bin/
cp src/ScriptCs/bin/Release/* artifacts/Release/bin/
mono ./packages/xunit.runners.1.9.2/tools/xunit.console.clr4.exe test/ScriptCs.Tests.Acceptance/bin/Release/ScriptCs.Tests.Acceptance.dll /xml artifacts/ScriptCs.Tests.Acceptance.dll.TestResult.xml /html artifacts/ScriptCs.Tests.Acceptance.dll.TestResult.html

1 change: 1 addition & 0 deletions build/Build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
<NuGetProjects Include="$(Root)src\ScriptCs.Hosting\ScriptCs.Hosting.csproj" />
<NuGetProjects Include="$(Root)src\ScriptCs.Engine.Roslyn\ScriptCs.Engine.Roslyn.csproj" />
<NuGetProjects Include="$(Root)src\ScriptCs.Engine.Mono\ScriptCs.Engine.Mono.csproj" />
<NuGetProjects Include="$(Root)src\ScriptCs\ScriptCs.csproj" />
</ItemGroup>
<Message Text="Building NuGet packages..." Importance="high" />
<Exec Command="&quot;$(NuGetExePath)&quot; pack &quot;%(NuGetProjects.Identity)&quot; $(NuGetParameters)" />
Expand Down
4 changes: 2 additions & 2 deletions build/ScriptCs.Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<!-- Use the properties below to control the version of the assemblies created. -->
<PropertyGroup>
<MajorVersion>0</MajorVersion>
<MinorVersion>16</MinorVersion>
<PatchVersion>1</PatchVersion>
<MinorVersion>17</MinorVersion>
<PatchVersion>0</PatchVersion>

<!-- Change this to set the build quality of the project. Use values like "alpha", "beta", "rc1", "rtm", etc. -->
<!-- These values are used in SemVer, so make sure to always increase these alphabetically. -->
Expand Down
Empty file modified build_brew.sh
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions src/ScriptCs.Contracts/FileParserContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ public FileParserContext()
public List<string> LoadedScripts { get; private set; }

public List<string> BodyLines { get; private set; }

public string ScriptPath { get; set; }
}
}
2 changes: 2 additions & 0 deletions src/ScriptCs.Contracts/FilePreProcessorResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public FilePreProcessorResult()

public List<string> References { get; set; }

public string ScriptPath { get; set; }

public string Code { get; set; }
}
}
2 changes: 2 additions & 0 deletions src/ScriptCs.Contracts/IConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ public interface IConsole
void ResetColor();

ConsoleColor ForegroundColor { get; set; }

int Width { get; }
}
}
10 changes: 9 additions & 1 deletion src/ScriptCs.Contracts/IScriptEnvironment.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

Expand All @@ -9,5 +10,12 @@ namespace ScriptCs.Contracts
public interface IScriptEnvironment
{
IReadOnlyList<string> ScriptArgs { get; }
void AddCustomPrinter<T>(Func<T, string> printer);
void Print<T>(T o);
void Print(object o);
string ScriptPath { get; }
string[] LoadedScripts { get; }
Assembly ScriptAssembly { get; }
void Initialize();
}
}
}
2 changes: 1 addition & 1 deletion src/ScriptCs.Contracts/IScriptExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public interface IScriptExecutor
{
AssemblyReferences References { get; }

ICollection<string> Namespaces { get; }
IReadOnlyCollection<string> Namespaces { get; }

IScriptEngine ScriptEngine { get; }

Expand Down
14 changes: 14 additions & 0 deletions src/ScriptCs.Contracts/IScriptInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ScriptCs.Contracts
{
public interface IScriptInfo
{
string ScriptPath { get; set; }
IList<string> LoadedScripts { get; }
}
}
42 changes: 42 additions & 0 deletions src/ScriptCs.Contracts/Printers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;

namespace ScriptCs.Contracts
{
public class Printers
{
private readonly IObjectSerializer _serializer;
private readonly Dictionary<Type, Func<object, string>> _dictionary = new Dictionary<Type, Func<object, string>>();
public Printers(IObjectSerializer serializer)
{
_serializer = serializer;
}

public void AddCustomPrinter<T>(Func<T, string> printer)
{
_dictionary[typeof(T)] = x => printer((T)x);
}

private string GetStringFor(Type t, object obj)
{
Func<object, string> printer;
if (_dictionary.TryGetValue(t, out printer))
{
return printer(obj);
}
else {
return _serializer.Serialize(obj);
}
}

public string GetStringFor(object obj)
{
return GetStringFor(obj.GetType(), obj);
}

public string GetStringFor<T>(T obj)
{
return GetStringFor(typeof(T), obj);
}
}
}
6 changes: 5 additions & 1 deletion src/ScriptCs.Contracts/ScriptCs.Contracts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="App_Packages\LibLog.4.2\LibLog.cs" />
<Compile Include="App_Packages\LibLog.4.2\LibLog.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="AssemblyReferences.cs" />
<Compile Include="BehaviorAfterCode.cs" />
<Compile Include="..\ScriptCs.Core\Guard.cs">
Expand Down Expand Up @@ -79,6 +81,7 @@
<Compile Include="IPackageReference.cs" />
<Compile Include="IRepl.cs" />
<Compile Include="IScriptEnvironment.cs" />
<Compile Include="IScriptInfo.cs" />
<Compile Include="IScriptLibraryComposer.cs" />
<Compile Include="IReplCommand.cs" />
<Compile Include="IReplEngine.cs" />
Expand All @@ -105,6 +108,7 @@
<Compile Include="LogLevel.cs" />
<Compile Include="LogProviderExtensions.cs" />
<Compile Include="ModuleAttribute.cs" />
<Compile Include="Printers.cs" />
<Compile Include="ProjectItem.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ScriptPack.cs" />
Expand Down
1 change: 1 addition & 0 deletions src/ScriptCs.Contracts/ScriptPackSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,6 @@ void IScriptPackSession.ImportNamespace(string @namespace)
{
_namespaces.Add(@namespace);
}

}
}
12 changes: 0 additions & 12 deletions src/ScriptCs.Core/AppDomainAssemblyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@ public class AppDomainAssemblyResolver : IAppDomainAssemblyResolver
private readonly IAssemblyUtility _assemblyUtility;
private readonly IDictionary<string, AssemblyInfo> _assemblyInfoMap;

[Obsolete("Support for Common.Logging types was deprecated in version 0.15.0 and will soon be removed.")]
public AppDomainAssemblyResolver(
Common.Logging.ILog logger,
IFileSystem fileSystem,
IAssemblyResolver resolver,
IAssemblyUtility assemblyUtility,
IDictionary<string, AssemblyInfo> assemblyInfoMap = null,
Func<object, ResolveEventArgs, Assembly> resolveHandler = null)
: this(new CommonLoggingLogProvider(logger), fileSystem, resolver, assemblyUtility, assemblyInfoMap, resolveHandler)
{
}

public AppDomainAssemblyResolver(
ILogProvider logProvider,
IFileSystem fileSystem,
Expand Down
10 changes: 0 additions & 10 deletions src/ScriptCs.Core/AssemblyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ public class AssemblyResolver : IAssemblyResolver
private readonly IAssemblyUtility _assemblyUtility;
private readonly ILog _logger;

[Obsolete("Support for Common.Logging types was deprecated in version 0.15.0 and will soon be removed.")]
public AssemblyResolver(
IFileSystem fileSystem,
IPackageAssemblyResolver packageAssemblyResolver,
IAssemblyUtility assemblyUtility,
Common.Logging.ILog logger)
:this(fileSystem,packageAssemblyResolver,assemblyUtility,new CommonLoggingLogProvider(logger))
{
}

public AssemblyResolver(
IFileSystem fileSystem,
IPackageAssemblyResolver packageAssemblyResolver,
Expand Down
Loading