Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix gem deps, to hopefully not leak anymore

  • Loading branch information...
commit 8e6652979401aad8208e192d7e7cb54ebc18e8e3 1 parent 928cca6
@rdp authored
Showing with 6 additions and 4 deletions.
  1. +2 −2 Rakefile
  2. +4 −2 lib/simple_gui_creator/drive_info.rb
View
4 Rakefile
@@ -10,8 +10,8 @@ Jeweler::Tasks.new do |gem|
gem.homepage = "https://github.com/rdp/ruby_simple_gui_creator"
gem.authors = ["rogerdpack"]
gem.add_dependency 'sane'
- gem.add_dependency 'andand'
-# gem.add_dependency 'launchy'
+ gem.add_dependency 'rdp-ruby-wmi', '> 0.3.1' # windows requirement gem
+# gem.add_dependency 'launchy' # not yet :P
end
Jeweler::RubygemsDotOrgTasks.new
View
6 lib/simple_gui_creator/drive_info.rb
@@ -144,7 +144,7 @@ def self.get_all_drives_as_ostructs_internal
else
require 'ruby-wmi'
disks = WMI::Win32_LogicalDisk.find(:all)
- disks.map{|d| d2 = OpenStruct.new
+ out = disks.map{|d| d2 = OpenStruct.new
d2.Description = d.Description
d2.VolumeName = d.VolumeName
d2.Name = d.Name
@@ -152,7 +152,9 @@ def self.get_all_drives_as_ostructs_internal
d2.MountPoint = d.Name[0..2] # like f:\
d2.DevicePoint = d2.MountPoint
d2
- }
+ }
+ disks.each{|d| d.ole_free} # require rdp-ruby-wmi to not leak here, even with this ole_free...
+ out
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.