nuget_helper 0.0.12 → 0.1.0

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: ce726842462363144601e11016f9f29adb1c6ab7
4
- data.tar.gz: f0723df826002b45c324bcc225b26e66383424f4
3
+ metadata.gz: b032f77374579c4c1b7fa683776a38e6c283ecfe
4
+ data.tar.gz: d95e85965d896c98ef07500e982ab9ac0a72b41c
5
5
  SHA512:
6
- metadata.gz: f523b37def96b493f8e217651b512e92543f1b59674b76e3ad066fc4a2cae50516d8761a2e8212a1befd30041c74c130302e854fae75a107672f7cadef590b57
7
- data.tar.gz: 0b2b2dd825d55e49cb0e39074abe5413472b3795f3b00900e06541f1fd370fb192216105fa7bf840ede094309ed26c03b6d84b7f26cbcef16e7a5565eeb200aa
6
+ metadata.gz: 983ec473936ff58d6901b0359854438c0827dab773ac4b16cc374292f53ae2177652348c58e85340da392a83ba00f73d191ef5b511bfa56a92a31974eaf8e976
7
+ data.tar.gz: ef603f9dbec5bc92c390e46192c75239668036389c7f37c2dfcba669dfa86e07fb0a365bbbd2bbdd342682a0fca147742679e753a7cca764a2822b817f9cc189
@@ -1,3 +1,3 @@
1
1
  module NugetHelper
2
- VERSION = "0.0.12"
2
+ VERSION = "0.1.0"
3
3
  end
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}.*/tools/ path!"
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 self.os == :windows
48
+ if Gem.win_platform?
67
49
  system "#{command} #{parameters}"
68
50
  else
69
51
  system "mono --runtime=v4.0 #{command} #{parameters} "
@@ -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 = NugetHelper.os != :windows ? "-help" : "/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.12
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-15 00:00:00.000000000 Z
11
+ date: 2015-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler