nuget_helper 0.0.12 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/nuget_helper/version.rb +1 -1
- data/lib/nuget_helper.rb +2 -20
- data/spec/nuget_exec_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b032f77374579c4c1b7fa683776a38e6c283ecfe
|
4
|
+
data.tar.gz: d95e85965d896c98ef07500e982ab9ac0a72b41c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 983ec473936ff58d6901b0359854438c0827dab773ac4b16cc374292f53ae2177652348c58e85340da392a83ba00f73d191ef5b511bfa56a92a31974eaf8e976
|
7
|
+
data.tar.gz: ef603f9dbec5bc92c390e46192c75239668036389c7f37c2dfcba669dfa86e07fb0a365bbbd2bbdd342682a0fca147742679e753a7cca764a2822b817f9cc189
|
data/lib/nuget_helper/version.rb
CHANGED
data/lib/nuget_helper.rb
CHANGED
@@ -1,24 +1,6 @@
|
|
1
1
|
require "nuget_helper/version"
|
2
2
|
|
3
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
4
|
def self.exec(parameters)
|
23
5
|
spec = Gem::Specification.find_by_name("nuget")
|
24
6
|
command = File.join(spec.gem_dir, "bin", "nuget.exe")
|
@@ -28,7 +10,7 @@ module NugetHelper
|
|
28
10
|
def self.command_path(library, exe)
|
29
11
|
cmd = self.first_command_path(library, exe)
|
30
12
|
if cmd.nil?
|
31
|
-
raise "Could not find #{exe} at the packages/#{library}
|
13
|
+
raise "Could not find #{exe} at the packages/#{library}*/tools/ path!"
|
32
14
|
end
|
33
15
|
return cmd
|
34
16
|
end
|
@@ -63,7 +45,7 @@ module NugetHelper
|
|
63
45
|
|
64
46
|
def self.run_tool(command, parameters=nil)
|
65
47
|
parameters = '' if parameters.nil?
|
66
|
-
if
|
48
|
+
if Gem.win_platform?
|
67
49
|
system "#{command} #{parameters}"
|
68
50
|
else
|
69
51
|
system "mono --runtime=v4.0 #{command} #{parameters} "
|
data/spec/nuget_exec_spec.rb
CHANGED
@@ -14,7 +14,7 @@ describe "NugetHelper" do
|
|
14
14
|
|
15
15
|
it "can run nunit runner" do
|
16
16
|
cmd = NugetHelper.nunit_path
|
17
|
-
help =
|
17
|
+
help = Gem.win_platform? ? "/help" : "-help"
|
18
18
|
NugetHelper.run_tool cmd, help
|
19
19
|
expect($?.success?).to be true
|
20
20
|
end
|
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
|
4
|
+
version: 0.1.0
|
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-08-
|
11
|
+
date: 2015-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|