Skip to content
Browse files

fix gem deps, to hopefully not leak anymore

  • Loading branch information...
1 parent 928cca6 commit 8e6652979401aad8208e192d7e7cb54ebc18e8e3 @rdp committed Jul 12, 2012
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,15 +144,17 @@ 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
d2.FreeSpace = d.FreeSpace.to_i
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

0 comments on commit 8e66529

Please sign in to comment.
Something went wrong with that request. Please try again.