[MacRuby-devel] Concurrent SSL requests -> segfault

2011-04-05 Thread Andre Lewis
Think I found a bug with Net:HTTP on MacRuby 0.10. Code is here:
https://gist.github.com/904320. In a nutshell:

* Multiple, concurrent SSL http requests generate a segfault
* Multiple, concurrent non-SSL http requests are OK
* Multiple, sequential SSL http requests are OK

All the scenarios run fine on 1.9.2. Should I file a bug on trac?

Andre
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] Computer Serial Number

2011-04-05 Thread Robert Rice
Hi Gang:

Could anyone help me to read the computer's serial number from a MacRuby 
program. Since I don't know Objective C, I haven't been able to figure out how 
to access it.

Thanks,
Bob Rice

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Computer Serial Number

2011-04-05 Thread Henry Maddocks

On 6/04/2011, at 9:10 AM, Robert Rice wrote:

> Hi Gang:
> 
> Could anyone help me to read the computer's serial number from a MacRuby 
> program. Since I don't know Objective C, I haven't been able to figure out 
> how to access it.

system_profile = `system_profiler SPHardwareDataType`
serial_number = system_profile.match(/Serial Number.*: (.*)/)[1]

Henry


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Concurrent SSL requests -> segfault

2011-04-05 Thread Andre Lewis
Hm. trying something similar within Xcode gives the following:
https://gist.github.com/904634

Looks like there's a hardcoded path to /Users/lrz/src/macruby-0.10 s
omewhere.


On Tue, Apr 5, 2011 at 12:37 PM, Andre Lewis  wrote:

> Think I found a bug with Net:HTTP on MacRuby 0.10. Code is here:
> https://gist.github.com/904320. In a nutshell:
>
> * Multiple, concurrent SSL http requests generate a segfault
> * Multiple, concurrent non-SSL http requests are OK
> * Multiple, sequential SSL http requests are OK
>
> All the scenarios run fine on 1.9.2. Should I file a bug on trac?
>
> Andre
>
>


-- 
Scout Web Monitoring and Reporting ~ http://scoutapp.com
blog: http://blog.scoutapp.com
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Computer Serial Number

2011-04-05 Thread Terry Moore


There is no BridgeSupport for IOkit... so ruby is out for now.

like Henry said you can escape to a shell.. or wrap this snippet in an objc 
class...

#include 
#include 

// Returns the serial number as a CFString.
// It is the caller's responsibility to release the returned CFString when done 
with it.
void CopySerialNumber(CFStringRef *serialNumber)
{
if (serialNumber != NULL) {
*serialNumber = NULL;

io_service_tplatformExpert = 
IOServiceGetMatchingService(kIOMasterPortDefault,
   
IOServiceMatching("IOPlatformExpertDevice"));

if (platformExpert) {
CFTypeRef serialNumberAsCFString =
IORegistryEntryCreateCFProperty(platformExpert,

CFSTR(kIOPlatformSerialNumberKey),
kCFAllocatorDefault, 0);
if (serialNumberAsCFString) {
*serialNumber = serialNumberAsCFString;
}

IOObjectRelease(platformExpert);
}
}
}
Quote form MacRuby Dev 17/1/2011
"Looks like I talked too fast, there isn't any BridgeSupport file for IOKit, 
even in Preview 2. I will look into it, as I'm planning to roll out a new 
version soon.

Laurent
"
On 6/04/2011, at 9:26 AM, Henry Maddocks wrote:

> 
> On 6/04/2011, at 9:10 AM, Robert Rice wrote:
> 
>> Hi Gang:
>> 
>> Could anyone help me to read the computer's serial number from a MacRuby 
>> program. Since I don't know Objective C, I haven't been able to figure out 
>> how to access it.
> 
> system_profile = `system_profiler SPHardwareDataType`
> serial_number = system_profile.match(/Serial Number.*: (.*)/)[1]
> 
> Henry
> 
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Concurrent SSL requests -> segfault

2011-04-05 Thread James Chen
I also had this issue when implementing https wrapped in NSOperation for
Gmail Notifr: https://gist.github.com/791984

Regards,
James Chen
ashchan.com | @ashchan 


On Wed, Apr 6, 2011 at 5:43 AM, Andre Lewis  wrote:

> Hm. trying something similar within Xcode gives the following:
> https://gist.github.com/904634
>
> Looks like there's a hardcoded path to /Users/lrz/src/macruby-0.10 s
> omewhere.
>
>
> On Tue, Apr 5, 2011 at 12:37 PM, Andre Lewis wrote:
>
>> Think I found a bug with Net:HTTP on MacRuby 0.10. Code is here:
>> https://gist.github.com/904320. In a nutshell:
>>
>> * Multiple, concurrent SSL http requests generate a segfault
>> * Multiple, concurrent non-SSL http requests are OK
>> * Multiple, sequential SSL http requests are OK
>>
>> All the scenarios run fine on 1.9.2. Should I file a bug on trac?
>>
>> Andre
>>
>>
>
>
> --
> Scout Web Monitoring and Reporting ~ http://scoutapp.com
> blog: http://blog.scoutapp.com
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [ANN] TrackerBot 1.0 in App Store -- tested with MacRuby!

2011-04-05 Thread Graham Davison
Hi Christian,

I've been fighting with MacRuby and cucumber for a while, and have
never been able to build cuke under MacRuby. What versions of both
tools did you use? Were there any special tweaks you had to make?

Thanks,
Graham

On Wednesday, March 16, 2011, Christian Niles  wrote:
> Hey All,
>
> One of the reasons I've gotten so in love with MacRuby is that it's let me 
> BDD my Cocoa projects, in particular an app I just released to the App Store, 
> called TrackerBot [1]. TrackerBot is an iPad and iPhone interface to Pivotal 
> Tracker, the well-known agile project management tool [2].
>
> While I can't run my MacRuby/RSpec2 specs on the actual device, I've ben able 
> to move a majority of my code into an iPhone compatible framework that I do 
> test with MacRuby. I'm beginning to use Frank for UI automation tests on the 
> device and am developing a gem that tries to make all the XCode configuration 
> and setup painless for new users who want to get started with 
> MacRuby/XCode/Cocoa development.
>
> So, in addition to the release announcement, I just wanted to thank you all 
> for making it possible to use all the Ruby BDD tools I love with Cocoa. It 
> has made me far more productive, and the development far less frustrating.
>
> Thanks!
> christian.
>
> [1] http://vulpinelabs.com/trackerbot
> [2] http://www.pivotaltracker.com/
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel