Skip to content

Commit 8500eae

Browse files
committed
add OS functions to host
1 parent fdd2c65 commit 8500eae

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

arduino_ci.gemspec

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Gem::Specification.new do |spec|
2323
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
2424
spec.require_paths = ["lib"]
2525

26+
spec.add_dependency "os", "~> 1.0"
27+
2628
spec.add_development_dependency "bundler", "~> 1.15"
2729
spec.add_development_dependency "rspec", "~> 3.0"
2830
spec.add_development_dependency 'rubocop', '~>0.49.0'

lib/arduino_ci/host.rb

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'os'
2+
13
module ArduinoCI
24

35
# Tools for interacting with the host machine
@@ -31,5 +33,11 @@ def self.run(*args, **kwargs)
3133
ret
3234
end
3335

36+
def self.os
37+
return :osx if OS.osx?
38+
return :linux if OS.linux?
39+
return :windows if OS.windows?
40+
end
41+
3442
end
3543
end

0 commit comments

Comments
 (0)