nuget_helper 0.0.5 → 0.0.6

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: 0963e8df5adfb39ab6db8f62e762a12dfd79f02e
4
- data.tar.gz: b70a6a85fb477a10f27009dd6e53179d29116ac5
3
+ metadata.gz: eb83ebbad96ab96a700e01f636597bd2575f39cd
4
+ data.tar.gz: 2f1e1f606f3acc7a020b29e9ca5cdb51826b4447
5
5
  SHA512:
6
- metadata.gz: 551d17397b6f64aa628911b5db4def02652c53722b98a716cfe18ea968f289865872accfd85feb86919396a479bc6dce807f881f2ff0ed08f0f37da2c043cbc3
7
- data.tar.gz: 69e03f28c08c19c3fd9ab177e219766b1b7f6570a34dbc70929fb29dd6ef14182b97218d294f96bc2054ba5d9ca84e3934fd91f2fd91682e2c631ab37dbf2092
6
+ metadata.gz: e1a453c6678e2e14c78d9966ec6243ef42551ca70c61864df0ff710fa1a9c3a39fc425a8d58fb5b90b1792460604b77cb031188ed30c43e0f6fbcaeb04b94df1
7
+ data.tar.gz: 3c2685a35c9f63ba5f35cdaa67d093a21d7f994100aa1e5aaa29e87900fdb841c779d11855079194d134fa0099a2d1e6fb6173ebb9522f9bf345fad89517d424
@@ -1,3 +1,3 @@
1
1
  module NugetHelper
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/nuget_helper.rb CHANGED
@@ -26,13 +26,11 @@ module NugetHelper
26
26
  end
27
27
 
28
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
29
+ cmd = self.first_command_path(library, exe)
30
+ if cmd.nil?
34
31
  raise "Could not find #{exe} at the packages/#{library}.*/tools/ path!"
35
32
  end
33
+ return cmd
36
34
  end
37
35
 
38
36
  def self.nunit_path
@@ -40,7 +38,11 @@ module NugetHelper
40
38
  end
41
39
 
42
40
  def self.xunit_path
43
- self.command_path('xunit.runner.console', 'xunit.console.exe')
41
+ old_xunit = self.first_command_path('xunit.runners', 'xunit.console.exe')
42
+ if not old_xunit.nil?
43
+ return old_xunit
44
+ end
45
+ return self.command_path('xunit.runner.console', 'xunit.console.exe')
44
46
  end
45
47
 
46
48
  def self.run_tool(command, parameters=nil)
@@ -62,4 +64,14 @@ module NugetHelper
62
64
  end
63
65
  end
64
66
 
67
+ private
68
+ def self.first_command_path(library, exe)
69
+ cmds = Dir.glob(File.join("**","packages","#{library}.*","tools",exe))
70
+ if cmds.any?
71
+ command = File.expand_path cmds.first
72
+ return command
73
+ else
74
+ return nil
75
+ end
76
+ end
65
77
  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.5
4
+ version: 0.0.6
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-30 00:00:00.000000000 Z
11
+ date: 2015-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler