From noreply at rubyforge.org Sat Jul 7 22:02:13 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 7 Jul 2007 22:02:13 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Support Requests-12080 ] How would one add these packages as a dependency to a cross-platform gem? Message-ID: <20070708020213.DDCB3A970014@rubyforge.org> Support Requests item #12080, was opened at 2007-07-07 19:02 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=412&aid=12080&group_id=85 Category: Install Problem (example) Group: None Status: Open Resolution: None Priority: 3 Submitted By: Luke Bayes (lukebayes) Assigned to: Nobody (None) Summary: How would one add these packages as a dependency to a cross-platform gem? Initial Comment: I am building a ruby application that is expected to work across all supported platforms (mac/win/linux). Since my application needs to download and install myriad other external applications, I have made extensive use of the fork and open3 features - which forced me to use the win32-open3 implementations from you guys (I'm immensely grateful for your hard work btw). Now I'm trying to distribute my application as a rubygem, but when I add win32-open3 as a dependency, I'm afraid users on all of the other platforms are going to get prompted to install it - and subsequently fail the installation. When I try to install locally on OS X with the dependency activated, it complains and fails. Do you folks know how to distribute gems that depend on your packages only for windows users? Here's my project by the way - it's coming along nicely: http://code.google.com/p/projectsprouts ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=412&aid=12080&group_id=85 From djberg96 at gmail.com Sun Jul 29 09:16:30 2007 From: djberg96 at gmail.com (Daniel Berger) Date: Sun, 29 Jul 2007 07:16:30 -0600 Subject: [Win32utils-devel] A couple quick announcements Message-ID: <46AC932E.1090509@gmail.com> Hi all, It's been quiet for a bit, so I thought I would mention a couple of things. First, I've been putting out minor releases for many of the Win32Utils libraries. These are just organizational and doc updates, where I've finally decided to get with the program and setup a Rakefile for those projects that were missing them. I've also been more aggressive about getting better and more organized documentation out there. Take a look under the 'Docs' tab on the project page to see what I mean. I've also started the "official" project home page at http://win32utils.rubyforge.org. It's not fancy, but it's better than what I had there before, i.e. nothing. Comments or suggestions welcome. Regards, Dan From gthiesfeld at gmail.com Mon Jul 30 17:33:04 2007 From: gthiesfeld at gmail.com (Gordon Thiesfeld) Date: Mon, 30 Jul 2007 16:33:04 -0500 Subject: [Win32utils-devel] Win32 namespace Message-ID: I've been working on a library called ruby-wmi, that is basically just an abstraction layer around wmi. I'm a windows sys admin, and I use wmi scripts a lot at work. My code looks like this: disks = WMI::Win32_LogicalDisk.find(:all, :conditions => {:drivetype => 5}) It's supposed to mimic the active_record interface, and it works pretty well. My next thought was to do something like this: disks = Win32::LogicalDisk.find(:all, :conditions => {:drivetype => 5}) Which I liked a lot, but then I realized that I might be stepping on a namespace that was already in use. That's why I'm posting here. Should I not do this? Is it a bad idea? Thanks, Gordon From Daniel.Berger at qwest.com Mon Jul 30 18:02:22 2007 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Mon, 30 Jul 2007 17:02:22 -0500 Subject: [Win32utils-devel] Win32 namespace In-Reply-To: Message-ID: <7524A45A1A5B264FA4809E2156496CFBE72D12@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Gordon Thiesfeld > Sent: Monday, July 30, 2007 3:33 PM > To: win32utils-devel at rubyforge.org > Subject: [Win32utils-devel] Win32 namespace > > > I've been working on a library called ruby-wmi, that is > basically just an abstraction layer around wmi. I'm a > windows sys admin, and I use wmi scripts a lot at work. > > My code looks like this: > > disks = WMI::Win32_LogicalDisk.find(:all, :conditions => > {:drivetype => 5}) > > It's supposed to mimic the active_record interface, and it > works pretty well. Hey, I like that. > My next thought was to do something like this: > > disks = Win32::LogicalDisk.find(:all, :conditions => > {:drivetype => 5}) > > Which I liked a lot, but then I realized that I might be stepping on a > namespace that was already in use. That's why I'm posting here. > Should I not do this? Is it a bad idea? How about this: Win32::WMI::LogicalDisk.find(:all, :conditions => {:drivetype => 5}) And, if you 'include Win32', it boils down to: WMI::LogicalDisk.find(:all, :conditions => {:drivetype => 5}) I think this approach makes sense, i.e. WMI is part of Win32, and LogicalDisk is part of WMI. Mind you, I certainly don't own the Win32 namespace so you can do as you wish, but I think this is the best approach, as it puts your code effectively under the "Win32::WMI" namespace, which should eliminate any potential namespace conflicts. What do you think? Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From gthiesfeld at gmail.com Mon Jul 30 18:28:39 2007 From: gthiesfeld at gmail.com (Gordon Thiesfeld) Date: Mon, 30 Jul 2007 17:28:39 -0500 Subject: [Win32utils-devel] Win32 namespace In-Reply-To: <7524A45A1A5B264FA4809E2156496CFBE72D12@ITOMAE2KM01.AD.QINTRA.COM> References: <7524A45A1A5B264FA4809E2156496CFBE72D12@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: > Hey, I like that. Thanks. All of my code is in svn on rubyforge if you're interested. http://rubyforge.org/projects/ruby-wmi/ > I think this approach makes sense, i.e. WMI is part of Win32, and > LogicalDisk is part of WMI. > > Mind you, I certainly don't own the Win32 namespace so you can do as you > wish, but I think this is the best approach, as it puts your code > effectively under the "Win32::WMI" namespace, which should eliminate any > potential namespace conflicts. > > What do you think? I think this is a good idea, but it won't work the way I've written it. I'm using const_missing to create WMI classes as needed. Win32_LogicalDisk is a WMI class, and it doesn't exist in ruby until you invoke #find on it. It would have to be: Win32::WMI::Win32_LogicalDisk And that doesn't look right to me. So, I think I'll stick with WMI::class_name. It's only a few extra bytes, after all. Thanks for your time, Gordon