nuget_helper 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80d51af1ba2cb89c64ac73388d741dfd3f0e60d1
4
- data.tar.gz: f782295edf9b74529e49c97ed52324428298c3b8
3
+ metadata.gz: 7d1b96505b4d30dcdf9adc901a701e363e7d65bc
4
+ data.tar.gz: 355be6f197920ffb13c0ac4790017263d79cbda3
5
5
  SHA512:
6
- metadata.gz: 4763fe4b4d018a0274679947e7b2db4528d83610c33b79a72d6fca74d3dc0d44063cdb97880ceb36df9e113d9e009265584f55317d14d2bee091752e9dd07e03
7
- data.tar.gz: 5e7df9842fc3dfef68f5bb636295b54d56b2c11e51672f60715f4a3e31df1e86761b3b6ae9480cf31de8db4df3d6acaf15f5a846d67d655ba431bdeab88a03ae
6
+ metadata.gz: 01e1941e70977892fde834d61774d02324f5ffe9c799d4bd458e081e675f702219fcee290947dc5497e32252833c9acd3f914ad7b3e53952ad50122515a44c1e
7
+ data.tar.gz: 5657d004e7a38f34589f60e716f61034462ff71c90a72abf66817d2b5eb8d6d5d963c3211d641d77c7953ce19631602f20391e80b659ed92e917f5db7b82e59d
data/.gitattributes CHANGED
@@ -1,63 +1,63 @@
1
- ###############################################################################
2
- # Set default behavior to automatically normalize line endings.
3
- ###############################################################################
4
- * text=auto
5
-
6
- ###############################################################################
7
- # Set default behavior for command prompt diff.
8
- #
9
- # This is need for earlier builds of msysgit that does not have it on by
10
- # default for csharp files.
11
- # Note: This is only used by command line
12
- ###############################################################################
13
- #*.cs diff=csharp
14
-
15
- ###############################################################################
16
- # Set the merge driver for project and solution files
17
- #
18
- # Merging from the command prompt will add diff markers to the files if there
19
- # are conflicts (Merging from VS is not affected by the settings below, in VS
20
- # the diff markers are never inserted). Diff markers may cause the following
21
- # file extensions to fail to load in VS. An alternative would be to treat
22
- # these files as binary and thus will always conflict and require user
23
- # intervention with every merge. To do so, just uncomment the entries below
24
- ###############################################################################
25
- #*.sln merge=binary
26
- #*.csproj merge=binary
27
- #*.vbproj merge=binary
28
- #*.vcxproj merge=binary
29
- #*.vcproj merge=binary
30
- #*.dbproj merge=binary
31
- #*.fsproj merge=binary
32
- #*.lsproj merge=binary
33
- #*.wixproj merge=binary
34
- #*.modelproj merge=binary
35
- #*.sqlproj merge=binary
36
- #*.wwaproj merge=binary
37
-
38
- ###############################################################################
39
- # behavior for image files
40
- #
41
- # image files are treated as binary by default.
42
- ###############################################################################
43
- #*.jpg binary
44
- #*.png binary
45
- #*.gif binary
46
-
47
- ###############################################################################
48
- # diff behavior for common document formats
49
- #
50
- # Convert binary document formats to text before diffing them. This feature
51
- # is only available from the command line. Turn it on by uncommenting the
52
- # entries below.
53
- ###############################################################################
54
- #*.doc diff=astextplain
55
- #*.DOC diff=astextplain
56
- #*.docx diff=astextplain
57
- #*.DOCX diff=astextplain
58
- #*.dot diff=astextplain
59
- #*.DOT diff=astextplain
60
- #*.pdf diff=astextplain
61
- #*.PDF diff=astextplain
62
- #*.rtf diff=astextplain
63
- #*.RTF diff=astextplain
1
+ ###############################################################################
2
+ # Set default behavior to automatically normalize line endings.
3
+ ###############################################################################
4
+ * text=auto
5
+
6
+ ###############################################################################
7
+ # Set default behavior for command prompt diff.
8
+ #
9
+ # This is need for earlier builds of msysgit that does not have it on by
10
+ # default for csharp files.
11
+ # Note: This is only used by command line
12
+ ###############################################################################
13
+ #*.cs diff=csharp
14
+
15
+ ###############################################################################
16
+ # Set the merge driver for project and solution files
17
+ #
18
+ # Merging from the command prompt will add diff markers to the files if there
19
+ # are conflicts (Merging from VS is not affected by the settings below, in VS
20
+ # the diff markers are never inserted). Diff markers may cause the following
21
+ # file extensions to fail to load in VS. An alternative would be to treat
22
+ # these files as binary and thus will always conflict and require user
23
+ # intervention with every merge. To do so, just uncomment the entries below
24
+ ###############################################################################
25
+ #*.sln merge=binary
26
+ #*.csproj merge=binary
27
+ #*.vbproj merge=binary
28
+ #*.vcxproj merge=binary
29
+ #*.vcproj merge=binary
30
+ #*.dbproj merge=binary
31
+ #*.fsproj merge=binary
32
+ #*.lsproj merge=binary
33
+ #*.wixproj merge=binary
34
+ #*.modelproj merge=binary
35
+ #*.sqlproj merge=binary
36
+ #*.wwaproj merge=binary
37
+
38
+ ###############################################################################
39
+ # behavior for image files
40
+ #
41
+ # image files are treated as binary by default.
42
+ ###############################################################################
43
+ #*.jpg binary
44
+ #*.png binary
45
+ #*.gif binary
46
+
47
+ ###############################################################################
48
+ # diff behavior for common document formats
49
+ #
50
+ # Convert binary document formats to text before diffing them. This feature
51
+ # is only available from the command line. Turn it on by uncommenting the
52
+ # entries below.
53
+ ###############################################################################
54
+ #*.doc diff=astextplain
55
+ #*.DOC diff=astextplain
56
+ #*.docx diff=astextplain
57
+ #*.DOCX diff=astextplain
58
+ #*.dot diff=astextplain
59
+ #*.DOT diff=astextplain
60
+ #*.pdf diff=astextplain
61
+ #*.PDF diff=astextplain
62
+ #*.rtf diff=astextplain
63
+ #*.RTF diff=astextplain
data/LICENSE CHANGED
@@ -1,22 +1,22 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 Oskar Gewalli
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Oskar Gewalli
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/README.md CHANGED
@@ -1,31 +1,47 @@
1
- # NugetHelper
2
-
3
- TODO: Write a gem description
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'nuget_helper'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install nuget_helper
20
-
21
- ## Usage
22
-
23
- TODO: Write usage instructions here
24
-
25
- ## Contributing
26
-
27
- 1. Fork it ( https://github.com/[my-github-username]/nuget_helper/fork )
28
- 2. Create your feature branch (`git checkout -b my-new-feature`)
29
- 3. Commit your changes (`git commit -am 'Add some feature'`)
30
- 4. Push to the branch (`git push origin my-new-feature`)
31
- 5. Create a new Pull Request
1
+ # NugetHelper
2
+
3
+ Helper library to simplify the use of nuget in a mixed os environment. It uses [nuget](https://rubygems.org/gems/nuget).
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'nuget_helper'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install nuget_helper
20
+
21
+ ## Usage
22
+
23
+ ```ruby
24
+ desc "Install missing NuGet packages."
25
+ task :install_packages do
26
+ NugetHelper.exec("restore LogViewer.sln")
27
+ end
28
+ ```
29
+
30
+ To test together with [albacore](https://github.com/Albacore/albacore)
31
+
32
+ ```ruby
33
+ desc "test using console"
34
+ test_runner :test => [:build] do |runner|
35
+ runner.exe = NugetHelper.nunit_path
36
+ files = Dir.glob(File.join($dir,"*Tests","bin","**","*Tests.dll"))
37
+ runner.files = files
38
+ end
39
+ ```
40
+
41
+ ## Contributing
42
+
43
+ 1. Fork it ( https://github.com/wallymathieu/nuget_helper/fork )
44
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
45
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
46
+ 4. Push to the branch (`git push origin my-new-feature`)
47
+ 5. Create a new Pull Request
@@ -1,3 +1,3 @@
1
- module NugetHelper
2
- VERSION = "0.0.2"
3
- end
1
+ module NugetHelper
2
+ VERSION = "0.0.3"
3
+ end
data/lib/nuget_helper.rb CHANGED
@@ -1,54 +1,58 @@
1
- require "nuget_helper/version"
2
-
3
- module NugetHelper
4
- def self.os
5
- @os ||= (
6
- host_os = RbConfig::CONFIG['host_os']
7
- case host_os
8
- when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
9
- :windows
10
- when /darwin|mac os/
11
- :macosx
12
- when /linux/
13
- :linux
14
- when /solaris|bsd/
15
- :unix
16
- else
17
- raise "unknown os: #{host_os.inspect}"
18
- end
19
- )
20
- end
21
-
22
- def self.exec(parameters)
23
- spec = Gem::Specification.find_by_name("nuget")
24
- command = File.join(spec.gem_dir, "bin", "nuget.exe")
25
- self.run_tool(command, parameters)
26
- end
27
-
28
- def self.command_path(library, exe)
29
- cmds = Dir.glob(File.join("**","packages","#{library}.*","tools",exe))
30
- if cmds.any?
31
- command = File.expand_path cmds.first
32
- return command
33
- else
34
- raise "Could not find #{exe} at the packages/#{library}.*/tools/ path!"
35
- end
36
- end
37
-
38
- def self.nunit_path
39
- self.command_path('NUnit.Runners', 'nunit-console.exe')
40
- end
41
-
42
- def self.xunit_path
43
- self.command_path('xunit.runners', 'xunit.console.clr4.exe')
44
- end
45
-
46
- def self.run_tool(command, parameters=nil)
47
- parameters = '' if parameters.nil?
48
- if self.os == :windows
49
- system "#{command} #{parameters}"
50
- else
51
- system "mono --runtime=v4.0.30319 #{command} #{parameters} "
52
- end
53
- end
54
- end
1
+ require "nuget_helper/version"
2
+
3
+ module NugetHelper
4
+ def self.os
5
+ @os ||= (
6
+ host_os = RbConfig::CONFIG['host_os']
7
+ case host_os
8
+ when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
9
+ :windows
10
+ when /darwin|mac os/
11
+ :macosx
12
+ when /linux/
13
+ :linux
14
+ when /solaris|bsd/
15
+ :unix
16
+ else
17
+ raise "unknown os: #{host_os.inspect}"
18
+ end
19
+ )
20
+ end
21
+
22
+ def self.exec(parameters)
23
+ spec = Gem::Specification.find_by_name("nuget")
24
+ command = File.join(spec.gem_dir, "bin", "nuget.exe")
25
+ self.run_tool(command, parameters)
26
+ end
27
+
28
+ def self.command_path(library, exe)
29
+ cmds = Dir.glob(File.join("**","packages","#{library}.*","tools",exe))
30
+ if cmds.any?
31
+ command = File.expand_path cmds.first
32
+ return command
33
+ else
34
+ raise "Could not find #{exe} at the packages/#{library}.*/tools/ path!"
35
+ end
36
+ end
37
+
38
+ def self.nunit_path
39
+ self.command_path('NUnit.Runners', 'nunit-console.exe')
40
+ end
41
+
42
+ def self.xunit_path
43
+ self.command_path('xunit.runners', 'xunit.console.clr4.exe')
44
+ end
45
+
46
+ def self.run_tool(command, parameters=nil)
47
+ parameters = '' if parameters.nil?
48
+ if self.os == :windows
49
+ system "#{command} #{parameters}"
50
+ else
51
+ system "mono --runtime=v4.0.30319 #{command} #{parameters} "
52
+ end
53
+ end
54
+
55
+ def self.version_of(file)
56
+ file.gsub(/[a-zA-Z]\.?/,'').split(/\./).map do |i| i.to_i end
57
+ end
58
+ end
data/nuget_helper.gemspec CHANGED
@@ -1,24 +1,24 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'nuget_helper/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "nuget_helper"
8
- spec.version = NugetHelper::VERSION
9
- spec.authors = ["Oskar Gewalli"]
10
- spec.email = ["gewalli@gmail.com"]
11
- spec.summary = %q{Helper Gem to simplify work with nuget.}
12
- spec.homepage = ""
13
- spec.license = "MIT"
14
-
15
- spec.files = `git ls-files -z`.split("\x0")
16
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
- spec.require_paths = ["lib"]
19
-
20
- spec.add_development_dependency "bundler", "~> 1.7"
21
- spec.add_development_dependency "rake", "~> 10.0"
22
- spec.add_development_dependency 'rspec', '>= 3.2'
23
- spec.add_dependency "nuget", '~> 2.8.50126.400'
24
- end
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'nuget_helper/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "nuget_helper"
8
+ spec.version = NugetHelper::VERSION
9
+ spec.authors = ["Oskar Gewalli"]
10
+ spec.email = ["gewalli@gmail.com"]
11
+ spec.summary = %q{Helper Gem to simplify work with nuget.}
12
+ spec.homepage = "https://github.com/wallymathieu/nuget_helper"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_development_dependency "bundler", "~> 1.7"
21
+ spec.add_development_dependency "rake", "~> 10.0"
22
+ spec.add_development_dependency 'rspec', '>= 3.2'
23
+ spec.add_dependency "nuget", '~> 2.8.50126.400'
24
+ end
@@ -1,10 +1,10 @@
1
- *.orig
2
- *.suo
3
- *.user
4
- *.pidb
5
- *.userprefs
6
- bin/
7
- obj/
8
- _ReSharper*/
9
- packages/
10
- .vs
1
+ *.orig
2
+ *.suo
3
+ *.user
4
+ *.pidb
5
+ *.userprefs
6
+ bin/
7
+ obj/
8
+ _ReSharper*/
9
+ packages/
10
+ .vs
@@ -1,5 +1,5 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <packages>
3
- <package id="NUnit.Runners" version="2.6.4" />
4
- <package id="xunit.runners" version="1.9.2" />
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <packages>
3
+ <package id="NUnit.Runners" version="2.6.4" />
4
+ <package id="xunit.runners" version="1.9.2" />
5
5
  </packages>
@@ -1,59 +1,59 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
- <PropertyGroup>
5
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7
- <ProjectGuid>{23FEB2A0-EB44-403B-996C-D06F74767EEC}</ProjectGuid>
8
- <OutputType>Library</OutputType>
9
- <AppDesignerFolder>Properties</AppDesignerFolder>
10
- <RootNamespace>ClassLibraryWithDependency</RootNamespace>
11
- <AssemblyName>ClassLibraryWithDependency</AssemblyName>
12
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13
- <FileAlignment>512</FileAlignment>
14
- </PropertyGroup>
15
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16
- <DebugSymbols>true</DebugSymbols>
17
- <DebugType>full</DebugType>
18
- <Optimize>false</Optimize>
19
- <OutputPath>bin\Debug\</OutputPath>
20
- <DefineConstants>DEBUG;TRACE</DefineConstants>
21
- <ErrorReport>prompt</ErrorReport>
22
- <WarningLevel>4</WarningLevel>
23
- </PropertyGroup>
24
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25
- <DebugType>pdbonly</DebugType>
26
- <Optimize>true</Optimize>
27
- <OutputPath>bin\Release\</OutputPath>
28
- <DefineConstants>TRACE</DefineConstants>
29
- <ErrorReport>prompt</ErrorReport>
30
- <WarningLevel>4</WarningLevel>
31
- </PropertyGroup>
32
- <ItemGroup>
33
- <Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
34
- <SpecificVersion>False</SpecificVersion>
35
- <HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
36
- </Reference>
37
- <Reference Include="System" />
38
- <Reference Include="System.Core" />
39
- <Reference Include="System.Xml.Linq" />
40
- <Reference Include="System.Data.DataSetExtensions" />
41
- <Reference Include="Microsoft.CSharp" />
42
- <Reference Include="System.Data" />
43
- <Reference Include="System.Xml" />
44
- </ItemGroup>
45
- <ItemGroup>
46
- <Compile Include="Properties\AssemblyInfo.cs" />
47
- </ItemGroup>
48
- <ItemGroup>
49
- <None Include="packages.config" />
50
- </ItemGroup>
51
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
52
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
53
- Other similar extension points exist, see Microsoft.Common.targets.
54
- <Target Name="BeforeBuild">
55
- </Target>
56
- <Target Name="AfterBuild">
57
- </Target>
58
- -->
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
+ <PropertyGroup>
5
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7
+ <ProjectGuid>{23FEB2A0-EB44-403B-996C-D06F74767EEC}</ProjectGuid>
8
+ <OutputType>Library</OutputType>
9
+ <AppDesignerFolder>Properties</AppDesignerFolder>
10
+ <RootNamespace>ClassLibraryWithDependency</RootNamespace>
11
+ <AssemblyName>ClassLibraryWithDependency</AssemblyName>
12
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13
+ <FileAlignment>512</FileAlignment>
14
+ </PropertyGroup>
15
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16
+ <DebugSymbols>true</DebugSymbols>
17
+ <DebugType>full</DebugType>
18
+ <Optimize>false</Optimize>
19
+ <OutputPath>bin\Debug\</OutputPath>
20
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
21
+ <ErrorReport>prompt</ErrorReport>
22
+ <WarningLevel>4</WarningLevel>
23
+ </PropertyGroup>
24
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25
+ <DebugType>pdbonly</DebugType>
26
+ <Optimize>true</Optimize>
27
+ <OutputPath>bin\Release\</OutputPath>
28
+ <DefineConstants>TRACE</DefineConstants>
29
+ <ErrorReport>prompt</ErrorReport>
30
+ <WarningLevel>4</WarningLevel>
31
+ </PropertyGroup>
32
+ <ItemGroup>
33
+ <Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
34
+ <SpecificVersion>False</SpecificVersion>
35
+ <HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
36
+ </Reference>
37
+ <Reference Include="System" />
38
+ <Reference Include="System.Core" />
39
+ <Reference Include="System.Xml.Linq" />
40
+ <Reference Include="System.Data.DataSetExtensions" />
41
+ <Reference Include="Microsoft.CSharp" />
42
+ <Reference Include="System.Data" />
43
+ <Reference Include="System.Xml" />
44
+ </ItemGroup>
45
+ <ItemGroup>
46
+ <Compile Include="Properties\AssemblyInfo.cs" />
47
+ </ItemGroup>
48
+ <ItemGroup>
49
+ <None Include="packages.config" />
50
+ </ItemGroup>
51
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
52
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
53
+ Other similar extension points exist, see Microsoft.Common.targets.
54
+ <Target Name="BeforeBuild">
55
+ </Target>
56
+ <Target Name="AfterBuild">
57
+ </Target>
58
+ -->
59
59
  </Project>
@@ -1,36 +1,36 @@
1
- using System.Reflection;
2
- using System.Runtime.CompilerServices;
3
- using System.Runtime.InteropServices;
4
-
5
- // General Information about an assembly is controlled through the following
6
- // set of attributes. Change these attribute values to modify the information
7
- // associated with an assembly.
8
- [assembly: AssemblyTitle("ClassLibraryWithDependency")]
9
- [assembly: AssemblyDescription("")]
10
- [assembly: AssemblyConfiguration("")]
11
- [assembly: AssemblyCompany("")]
12
- [assembly: AssemblyProduct("ClassLibraryWithDependency")]
13
- [assembly: AssemblyCopyright("Copyright © 2015")]
14
- [assembly: AssemblyTrademark("")]
15
- [assembly: AssemblyCulture("")]
16
-
17
- // Setting ComVisible to false makes the types in this assembly not visible
18
- // to COM components. If you need to access a type in this assembly from
19
- // COM, set the ComVisible attribute to true on that type.
20
- [assembly: ComVisible(false)]
21
-
22
- // The following GUID is for the ID of the typelib if this project is exposed to COM
23
- [assembly: Guid("e440fead-ff68-407c-a76c-897c74f4299b")]
24
-
25
- // Version information for an assembly consists of the following four values:
26
- //
27
- // Major Version
28
- // Minor Version
29
- // Build Number
30
- // Revision
31
- //
32
- // You can specify all the values or you can default the Build and Revision Numbers
33
- // by using the '*' as shown below:
34
- // [assembly: AssemblyVersion("1.0.*")]
35
- [assembly: AssemblyVersion("1.0.0.0")]
36
- [assembly: AssemblyFileVersion("1.0.0.0")]
1
+ using System.Reflection;
2
+ using System.Runtime.CompilerServices;
3
+ using System.Runtime.InteropServices;
4
+
5
+ // General Information about an assembly is controlled through the following
6
+ // set of attributes. Change these attribute values to modify the information
7
+ // associated with an assembly.
8
+ [assembly: AssemblyTitle("ClassLibraryWithDependency")]
9
+ [assembly: AssemblyDescription("")]
10
+ [assembly: AssemblyConfiguration("")]
11
+ [assembly: AssemblyCompany("")]
12
+ [assembly: AssemblyProduct("ClassLibraryWithDependency")]
13
+ [assembly: AssemblyCopyright("Copyright © 2015")]
14
+ [assembly: AssemblyTrademark("")]
15
+ [assembly: AssemblyCulture("")]
16
+
17
+ // Setting ComVisible to false makes the types in this assembly not visible
18
+ // to COM components. If you need to access a type in this assembly from
19
+ // COM, set the ComVisible attribute to true on that type.
20
+ [assembly: ComVisible(false)]
21
+
22
+ // The following GUID is for the ID of the typelib if this project is exposed to COM
23
+ [assembly: Guid("e440fead-ff68-407c-a76c-897c74f4299b")]
24
+
25
+ // Version information for an assembly consists of the following four values:
26
+ //
27
+ // Major Version
28
+ // Minor Version
29
+ // Build Number
30
+ // Revision
31
+ //
32
+ // You can specify all the values or you can default the Build and Revision Numbers
33
+ // by using the '*' as shown below:
34
+ // [assembly: AssemblyVersion("1.0.*")]
35
+ [assembly: AssemblyVersion("1.0.0.0")]
36
+ [assembly: AssemblyFileVersion("1.0.0.0")]
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <packages>
3
- <package id="NUnit" version="2.6.4" targetFramework="net45" />
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <packages>
3
+ <package id="NUnit" version="2.6.4" targetFramework="net45" />
4
4
  </packages>
@@ -1,27 +1,27 @@
1
- 
2
- Microsoft Visual Studio Solution File, Format Version 12.00
3
- # Visual Studio 2013
4
- VisualStudioVersion = 12.0.31101.0
5
- MinimumVisualStudioVersion = 10.0.40219.1
6
- Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibraryWithDependency", "ClassLibraryWithDependency\ClassLibraryWithDependency.csproj", "{23FEB2A0-EB44-403B-996C-D06F74767EEC}"
7
- EndProject
8
- Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B6617D84-7072-4F54-A40E-AA10059BDA9C}"
9
- ProjectSection(SolutionItems) = preProject
10
- .nuget\packages.config = .nuget\packages.config
11
- EndProjectSection
12
- EndProject
13
- Global
14
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
15
- Debug|Any CPU = Debug|Any CPU
16
- Release|Any CPU = Release|Any CPU
17
- EndGlobalSection
18
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
19
- {23FEB2A0-EB44-403B-996C-D06F74767EEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20
- {23FEB2A0-EB44-403B-996C-D06F74767EEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
21
- {23FEB2A0-EB44-403B-996C-D06F74767EEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
22
- {23FEB2A0-EB44-403B-996C-D06F74767EEC}.Release|Any CPU.Build.0 = Release|Any CPU
23
- EndGlobalSection
24
- GlobalSection(SolutionProperties) = preSolution
25
- HideSolutionNode = FALSE
26
- EndGlobalSection
27
- EndGlobal
1
+ 
2
+ Microsoft Visual Studio Solution File, Format Version 12.00
3
+ # Visual Studio 2013
4
+ VisualStudioVersion = 12.0.31101.0
5
+ MinimumVisualStudioVersion = 10.0.40219.1
6
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibraryWithDependency", "ClassLibraryWithDependency\ClassLibraryWithDependency.csproj", "{23FEB2A0-EB44-403B-996C-D06F74767EEC}"
7
+ EndProject
8
+ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B6617D84-7072-4F54-A40E-AA10059BDA9C}"
9
+ ProjectSection(SolutionItems) = preProject
10
+ .nuget\packages.config = .nuget\packages.config
11
+ EndProjectSection
12
+ EndProject
13
+ Global
14
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
15
+ Debug|Any CPU = Debug|Any CPU
16
+ Release|Any CPU = Release|Any CPU
17
+ EndGlobalSection
18
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
19
+ {23FEB2A0-EB44-403B-996C-D06F74767EEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20
+ {23FEB2A0-EB44-403B-996C-D06F74767EEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
21
+ {23FEB2A0-EB44-403B-996C-D06F74767EEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
22
+ {23FEB2A0-EB44-403B-996C-D06F74767EEC}.Release|Any CPU.Build.0 = Release|Any CPU
23
+ EndGlobalSection
24
+ GlobalSection(SolutionProperties) = preSolution
25
+ HideSolutionNode = FALSE
26
+ EndGlobalSection
27
+ EndGlobal
@@ -0,0 +1,26 @@
1
+ require_relative 'spec_helper'
2
+
3
+ describe "NugetHelper" do
4
+ describe "with restored packages" do
5
+ let(:xunit_versions) do
6
+ ["xunit.runners.1.9.3","xunit.runners.1.9.2","xunit.runners.1.9.1"]
7
+ end
8
+ let(:nunit_versions) do
9
+ ["nunit.runners.2.6.1","nunit.runners.2.6.4","nunit.runners.2.3.6","nunit.runners.1.9.1"]
10
+ end
11
+
12
+
13
+ it "can find latest xunit" do
14
+ xunit = xunit_versions.sort_by do |xunit| NugetHelper.version_of xunit end.last
15
+ expect(xunit).to eq 'xunit.runners.1.9.3'
16
+ end
17
+ it "can find latest nunit" do
18
+ xunit = nunit_versions.sort_by do |nunit| NugetHelper.version_of nunit end.last
19
+ expect(xunit).to eq 'nunit.runners.2.6.4'
20
+ end
21
+
22
+ it "can parse out version" do
23
+ expect( NugetHelper.version_of 'somelib.something.35.63.7').to eq [35,63,7]
24
+ end
25
+ end
26
+ end
@@ -1,34 +1,34 @@
1
- require_relative 'spec_helper'
2
- $vs_2013_solution = File.join(File.dirname(__FILE__), "Vs2013Solution", "Vs2013Solution.sln")
3
-
4
- describe "NugetHelper" do
5
- describe "execute system nuget" do
6
- it "can restore packages" do
7
- NugetHelper.exec("restore #{$vs_2013_solution}")
8
- end
9
-
10
- describe "with restored packages" do
11
- before(:all) do
12
- NugetHelper.exec("restore #{$vs_2013_solution}")
13
- end
14
-
15
- it "can run nunit runner" do
16
- cmd = NugetHelper.nunit_path
17
- help = NugetHelper.os != :windows ? "-help" : "/help"
18
- NugetHelper.run_tool cmd, help
19
- expect($?.success?).to be true
20
- end
21
-
22
- it "can run xunit runner" do
23
- cmd = NugetHelper.xunit_path
24
- c = NugetHelper.run_tool cmd
25
- expect(c).to be false
26
- if NugetHelper.os != :windows
27
- expect($?.exitstatus).to be 255
28
- else
29
- expect($?.exitstatus).to be nil
30
- end
31
- end
32
- end
33
- end
1
+ require_relative 'spec_helper'
2
+ $vs_2013_solution = File.join(File.dirname(__FILE__), "Vs2013Solution", "Vs2013Solution.sln")
3
+
4
+ describe "NugetHelper" do
5
+ describe "execute system nuget" do
6
+ it "can restore packages" do
7
+ NugetHelper.exec("restore #{$vs_2013_solution}")
8
+ end
9
+
10
+ describe "with restored packages" do
11
+ before(:all) do
12
+ NugetHelper.exec("restore #{$vs_2013_solution}")
13
+ end
14
+
15
+ it "can run nunit runner" do
16
+ cmd = NugetHelper.nunit_path
17
+ help = NugetHelper.os != :windows ? "-help" : "/help"
18
+ NugetHelper.run_tool cmd, help
19
+ expect($?.success?).to be true
20
+ end
21
+
22
+ it "can run xunit runner" do
23
+ cmd = NugetHelper.xunit_path
24
+ c = NugetHelper.run_tool cmd
25
+ expect(c).to be false
26
+ if NugetHelper.os != :windows
27
+ expect($?.exitstatus).to be 255
28
+ else
29
+ expect($?.exitstatus).to be nil
30
+ end
31
+ end
32
+ end
33
+ end
34
34
  end
data/spec/spec_helper.rb CHANGED
@@ -1 +1 @@
1
- require_relative '../lib/nuget_helper'
1
+ require_relative '../lib/nuget_helper'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nuget_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oskar Gewalli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-14 00:00:00.000000000 Z
11
+ date: 2015-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -89,9 +89,10 @@ files:
89
89
  - spec/Vs2013Solution/ClassLibraryWithDependency/Properties/AssemblyInfo.cs
90
90
  - spec/Vs2013Solution/ClassLibraryWithDependency/packages.config
91
91
  - spec/Vs2013Solution/Vs2013Solution.sln
92
+ - spec/get_version_of_spec.rb
92
93
  - spec/nuget_exec_spec.rb
93
94
  - spec/spec_helper.rb
94
- homepage: ''
95
+ homepage: https://github.com/wallymathieu/nuget_helper
95
96
  licenses:
96
97
  - MIT
97
98
  metadata: {}
@@ -111,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
112
  version: '0'
112
113
  requirements: []
113
114
  rubyforge_project:
114
- rubygems_version: 2.4.5
115
+ rubygems_version: 2.4.6
115
116
  signing_key:
116
117
  specification_version: 4
117
118
  summary: Helper Gem to simplify work with nuget.
@@ -122,5 +123,6 @@ test_files:
122
123
  - spec/Vs2013Solution/ClassLibraryWithDependency/Properties/AssemblyInfo.cs
123
124
  - spec/Vs2013Solution/ClassLibraryWithDependency/packages.config
124
125
  - spec/Vs2013Solution/Vs2013Solution.sln
126
+ - spec/get_version_of_spec.rb
125
127
  - spec/nuget_exec_spec.rb
126
128
  - spec/spec_helper.rb