[NWRUG] Re: Rails training - what would you want?

2008-10-07 Thread doug livesey
> If it were free, would people > be interested in becoming a guinea pig and helping me improve the > material so I could go and sell it? Hell, yes! As for how to structure it, what you have outlined would address what I would be looking for perfectly. 2008/10/7 Paul Robinson <[EMAIL PROTECTED]>

[NWRUG] Re: Rails training - what would you want?

2008-10-08 Thread doug livesey
> I think it's a separate course that must be attended after a couple of weeks of being a Railista (shoot me now) and falling off that comfortable log a few times. You could be right, but perhaps a worked example showing an introduced error being caught, identified, & solved using good BDD / TDD co

[NWRUG] Re: Rails training - what would you want?

2008-10-09 Thread doug livesey
Yeah, just always use #destroy & .destroy_all, etc., instead of their delete counterparts. 2008/10/9 Francis Fish <[EMAIL PROTECTED]> > On Thu, Oct 9, 2008 at 8:20 AM, Peter Morris <[EMAIL PROTECTED]>wrote: > >> >> On 8 Oct 2008, at 09:22, Francis Fish wrote: >> >> On Wed, Oct 8, 2008 at 6:43 AM,

[NWRUG] How to tell what a class has been extended by

2008-10-22 Thread doug livesey
Hi.If you extend a class like this: MyClass.extend( MyModule ) or this: class MyClass class << self include MyModule end end it won't show up in a call to MyClass.included_modules(). Does anyone know a simple way to see if a class has been extended by a given module? (Other than testin

[NWRUG] Re: How to tell what a class has been extended by

2008-10-22 Thread doug livesey
class.included_modules say? I think you're at the wrong >> level. >> >> >> On Wed, Oct 22, 2008 at 11:09 AM, doug livesey <[EMAIL PROTECTED]> wrote: >> >>> Hi.If you extend a class like this: >>> >>> MyClass.extend( MyModule ) >>

[NWRUG] Re: NWRUG Quiz? (Exercise 1: Fibonacci numbers)

2008-10-22 Thread doug livesey
Yeah -- it'd be rude to just crib everyone else's code & not offer my own up for ridicule. 2008/10/22 Paul Robinson <[EMAIL PROTECTED]> > > On 22 Oct 2008, at 15:31, Francis Fish wrote: > > > Small point, and I'd have to check, but I don't think it *has* to > > start from 1, any pair of positive

[NWRUG] Re: NWRUG Quiz? (Exercise 1: Fibonacci numbers)

2008-10-28 Thread doug livesey
Can I be first to offer my excuses?Whilst maintaining that this is a good idea? 2008/10/23 Jim Neath <[EMAIL PROTECTED]> > If I have time I'll have a blast over the weekend. > > > On Thu, Oct 23, 2008 at 9:37 AM, Cameron, Gemma (UK) < > [EMAIL PROTECTED]> wrote: > >> >> Ooooh fun, fun, fun :D

[NWRUG] Re: NWRUG Quiz? (Exercise 1: Fibonacci numbers)

2008-10-28 Thread doug livesey
ed Office: Warwick House, PO Box 87, Farnborough Aerospace Centre, > Farnborough, Hants, GU14 6YU, UK > Registered in England & Wales No: 3456325 > > > -- > *From:* nwrug-members@googlegroups.com [mailto: > [EMAIL PROTECTED] *On Behalf Of *doug l

[NWRUG] Scanning all defined modules?

2008-11-07 Thread doug livesey
Hi.I'm pretty sure this is possible, but it's years since I read it. Can anyone tell me how I scan the Ruby namespace for all defined modules? Cheers, Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" g

[NWRUG] Re: Scanning all defined modules?

2008-11-09 Thread doug livesey
Cheers, man -- that does indeed look like the ticket! 2008/11/9 Carl Drinkwater | 29degrees <[EMAIL PROTECTED]> > > Hi Doug, > > > Hi.I'm pretty sure this is possible, but it's years since I read it. > > Can anyone tell me how I scan the Ruby namespace for all defined > > modules? > > Using the u

[NWRUG] Re: Andrew J Calvert/Norwich Union/North East/RAC Motoring Services is out of the office.

2008-12-16 Thread doug livesey
And we're off! 2008/12/16 Andrew J Calvert > I will be out of the office from 12/12/2008 until 18/12/2008. > > Please contact Ben Challinor in my absence > > http://www.rac.co.uk http://www.rac.co.uk/business http://www.bsm.co.uk > > Any opinions expressed in this e-mail are those of the individ

[NWRUG] Rails apps sharing sessions (& authentication)

2008-12-19 Thread doug livesey
Hi -- has anyone any experience of running 2 or more authenticated RoR apps under 1 login, so that the end user sees only one application as they navigate around?I guess this would involve sharing sessions between the apps, and I'm pretty sure it can be done (don't people do it with Rails & Merb?).

[NWRUG] Re: Rails apps sharing sessions (& authentication)

2008-12-19 Thread doug livesey
ope that helps. > -- Jamie > > On 19 Dec 2008, at 11:13, doug livesey wrote: > > > Hi -- has anyone any experience of running 2 or more authenticated > > RoR apps under 1 login, so that the end user sees only one > > application as they navigate around? > > I gu

[NWRUG] Re: View testing with Cucumber/RSpec stories

2008-12-20 Thread doug livesey
To reiterate a point made several times on this list, we is all *begging* for talks / courses on RSpec & Cucumber -- if anyone knew of any, I'd be grateful if they could let us know.Myself, I use & love RSpec, but have made no inroads into Cucumber -- I wish there were some best practices out there

[NWRUG] Re: View testing with Cucumber/RSpec stories

2008-12-20 Thread doug livesey
so hard to send me on that! > Right now the best resource is the rspec-users list Just signed up, cheers. 2008/12/20 Ashley Moran > > > On Dec 20, 2008, at 4:38 pm, doug livesey wrote: > > > To reiterate a point made several times on this list, we is all > > *begging

[NWRUG] Re: Holy shit! (Ruby on Rails and Merb merging)

2008-12-23 Thread doug livesey
Shit the bed!Typically, I decided to use the Christmas break to learn Merb! Has anyone suggested how long it might take to get to Rails 3.0 / Merb 2.0? I might just hang back for that & spend some quality time with an old flame (relearning C++ properly). Doug. 2008/12/23 Anthony Green > > > I

[NWRUG] Re: Holy shit! (Ruby on Rails and Merb merging)

2008-12-23 Thread doug livesey
nts unfold. 2008/12/23 Ashley Moran > > > On Dec 23, 2008, at 10:48 pm, doug livesey wrote: > > > Typically, I decided to use the Christmas break to learn Merb! > > Has anyone suggested how long it might take to get to Rails 3.0 / > > Merb 2.0? > > I might just

[NWRUG] OT -- Game coding languages / frameworks (was Holy Shit!)

2008-12-24 Thread doug livesey
> Ah interesting. May I ask why Gosu, if game programming is your > thing? There's a stack of game libraries around now. Have you > thought about one that will let you use Lua or Python? The honest answer is that I'm probably unaware of them! But Gosu (with C++ & Boost) seemed like an obvious c

[NWRUG] Re: Next NWRUG is very soon

2009-01-05 Thread doug livesey
Rock harder -- there's time enough for sleep when you're dead! 2009/1/5 Ashley Moran > > > On Jan 05, 2009, at 10:55 pm, Will Jessop wrote: > > > Your new-years resolutions need work ;) > > Lol, your suggested changes are? :) > > Ashley > > -- > http://www.patchspace.co.uk/ > http://aviewfromafa

[NWRUG] Template is missing -- oh no it isn't!

2009-01-11 Thread doug livesey
Can anyone spot what I'm doing wrong here, or is this a weird error?I have, in a brand new 2.2.2 Rails app, a route like this: map.home 'home', :controller => 'home', :action => 'index' And I have the world's simplest controller like this: http://pastie.org/357928 Yet when I try to go to http

[NWRUG] Re: Template is missing -- oh no it isn't!

2009-01-11 Thread doug livesey
Oh, God, really?Hang on -- I'll look ... 2009/1/11 Paul Wilson > > > > > The file app/views/home/index.erb.html absolutely *does* exist! > > > > I think your extensions are in the wrong order. Have you tried > renaming it to index.html.erb ? > > > > > Paul Wilson > http://mere

[NWRUG] Re: Template is missing -- oh no it isn't!

2009-01-11 Thread doug livesey
Yup. Shoot me now.Cheers for that, man! Doug. 2009/1/11 doug livesey > Oh, God, really?Hang on -- I'll look ... > > 2009/1/11 Paul Wilson > > >> > >> > The file app/views/home/index.erb.html absolutely *does* exist! >> > >> >> I thi

[NWRUG] Re: Rails apps sharing sessions (& authentication)

2009-01-11 Thread doug livesey
eeds. I guess you could set up redirected tables in MySQL if you couldn't use the same db, or something. Cheers, Doug. 2008/12/19 doug livesey > Cheers for those -- I can see I've got some learnin' to do! Doug. > > 2008/12/19 Jamie van Dyke > > >>

[NWRUG] Re: Tonight

2009-01-15 Thread doug livesey
Balls, is that tonight?Damn'! Am I missing an RSpec or cloud computing talk? Please say no ... 2009/1/15 Will Jessop > > Raise your hand if you're going! > > /me raises hand > > -- > Will Jessop > Super Shiny Robot Limited - Professional web design and development > > t: 07939 547 962 > w: http:

[NWRUG] Re: Tonight

2009-01-15 Thread doug livesey
Just saw the other thread -- phew for not missing talks, but still damn' that I'm so disorganised I arranged to have tea with my Aunty Glad tonight.Having said that, it's always rather lovely to see my Aunty Glad, and she cooks a mean tea, so I'll not be entirely inconsolable

[NWRUG] Using symbolic links to model files in Rails (to share selected models)

2009-01-20 Thread doug livesey
Hi -- I'm rather gutted to find that my symlinks to model files aren't being picked up by rails.I've symlinked the models folder before & that was fine, and I could almost swear I've had symlinked files work before (almost), but apparently neither Rails nor Textmate like just the files doing this.

[NWRUG] Re: Using symbolic links to model files in Rails (to share selected models)

2009-01-20 Thread doug livesey
heers for the assurance that symlinks should work -- I needed a little prodding to investigate the null hypothesis* a little more. Doug. * Me being a maroon. 2009/1/20 Francis Fish > On Tue, Jan 20, 2009 at 12:34 PM, doug livesey wrote: > >> Hi -- I'm rather gutted to find th

[NWRUG] Re: RSpec Advice

2009-01-23 Thread doug livesey
Thank random convergence for this thread!*Spec. The. API.* Man, that's untangled alot of what I was trying to do! 2009/1/23 Ashley Moran > > > On 23 Jan 2009, at 09:03, Francis Fish wrote: > > > Forgot to mention - you can easily end up writing the code in twice > > (as in once as a set of expe

[NWRUG] get every match and perform block on each instance?

2009-01-23 Thread doug livesey
There must be a simple Ruby way to do this, but I don't know it.I would be after something like: my_regexp.each_match do |matched_substring| # do something with matched_substring end So that a block can be applied against each match -- and if there was something that gave you access to re-appli

[NWRUG] Re: get every match and perform block on each instance?

2009-01-23 Thread doug livesey
String#scan()! 2009/1/23 doug livesey > There must be a simple Ruby way to do this, but I don't know it.I would be > after something like: > > my_regexp.each_match do |matched_substring| > # do something with matched_substring > end > > So that a block can be appl

[NWRUG] Re: Regular Expression Help

2009-01-27 Thread doug livesey
I didn't get any attachments, either. 2009/1/27 Adam Holt > > Not sure, it went up to google groups fine, so looks like it's > something on your side, maybe? > > On 27 Jan 2009, at 17:31, Ashley Moran wrote: > > > > > > > On 27 Jan 2009, at 17:26, Adam Holt wrote: > > > >> I attached it to the e

[NWRUG] Resetting / Cleansing a Rails session

2009-02-05 Thread doug livesey
Hi -- I'm playing with writing a method that resets a session in Rails, and my google-fu is weak, as I can't find how to do it.Is there anyone out there who can advise me? (On this question.) Cheers, Doug. --~--~-~--~~~---~--~~ You received this message because y

[NWRUG] Re: Resetting / Cleansing a Rails session

2009-02-05 Thread doug livesey
So I used my twitter-fu!(I'm not really getting away with claiming a resource as a skillset there, am I?) Anyway, it is ActionController::Base#reset_session(). Cheers xbaz on twitter! Doug. 2009/2/5 doug livesey > Hi -- I'm playing with writing a method that resets a session

[NWRUG] Re: Next NWRUG meeting, Thursday February 19th - Nanite (and an introduction to cloud computing)

2009-02-19 Thread doug livesey
Aaaagggh! I'm stuck in the office again! Hope it goes really well, & really wish I wasn't about to miss it -- I've been looking forwards to this for months! Sorry. Doug. 2009/2/6 Will Jessop > > I will be talking about Nanite. Nanite is a new way of thinking about > building cloud ready web a

[NWRUG] Re: Next NWRUG meeting, Thursday February 19th - Nanite (and an introduction to cloud computing)

2009-02-20 Thread doug livesey
Thanks for those -- that'll be my weekend reading. How did it go? 2009/2/20 Will Jessop > > On 19 Feb 2009, at 17:34, doug livesey wrote: > > Aaaagggh! > > I'm stuck in the office again! > > Hope it goes really well, & really wish I wasn't about to m

[NWRUG] Ruby desktop development (maybe for a PDA)

2009-03-05 Thread doug livesey
Hi -- I'm going to *very* quickly need to develop an application for a PDA, and am thinking that the fastest route for me to get there would be with Ruby, as that is the language I know best. Can anyone recommend any frameworks for Ruby desktop dev? Is shoes stable enough? What would you go with? C

[NWRUG] Re: Ruby desktop development (maybe for a PDA)

2009-03-05 Thread doug livesey
I hadn't, but that looks pretty cool. 2009/3/5 Matt Roberts > Have you considered http://rhomobile.com/ ? > > > > > On Thu, Mar 5, 2009 at 10:13 AM, doug livesey wrote: > >> Hi -- I'm going to *very* quickly need to develop an application for a >>

[NWRUG] Re: Ruby desktop development (maybe for a PDA)

2009-03-05 Thread doug livesey
n > offline browser app. > > Or you could use The Compact .NET framework like I had to do here at work, > and feel the pain. > > > > > On Thu, Mar 5, 2009 at 10:56 AM, doug livesey wrote: > >> I hadn't, but that looks pretty cool. >> >> 2009/3

[NWRUG] Ruby CMS

2009-03-23 Thread doug livesey
There's probably been a million threads on this, but I thought I'd petition for an up-to-date response. What are people's opinions of the various Ruby-based CMS systems available? Cheers, Doug. --~--~-~--~~~---~--~~ You received this message because you are subsc

[NWRUG] Re: Ruby CMS

2009-03-25 Thread doug livesey
Cheers for those, & sorry for the late reply -- was off on site. I've heard a few places that Ruby CMSes aren't too hot, mainly because all effort seems to be divided between them. We're just looking into a CMS at the minute & wanted to suggest an opensource one I could customise & maintain without

[NWRUG] Re: Ruby CMS

2009-03-27 Thread doug livesey
bandoning ruby for CMS work: > http://www.google.co.uk/search?q=drupal+ruby > > May I ask why it is that you're interested in a ruby-based CMS? > > On Mar 25, 10:06 am, doug livesey wrote: > > Cheers for those, & sorry for the late reply -- was off on site. > > I

[NWRUG] Re: Ruby CMS

2009-03-27 Thread doug livesey
arepoint as it really is awful. If you do use it I > recommend using a hosted version from someone like Apptix - we've had > a nightmare hosting it ourselves. > > MK > > 2009/3/27 doug livesey : > >> May I ask why it is that you're interested in a ruby-based CMS?

[NWRUG] Re: Meeting tonight

2009-04-16 Thread doug livesey
*Really* wish I could make it -- is there any chance anyone will be recording it? 2009/4/16 Will Jessop > > On 16 Apr 2009, at 10:37, Asa Calow wrote: > > I'm in! > > > I've added you to the list! > > -- > Will Jessop > Super Shiny Robot Limited - Professional web design and development > > t: 0

[NWRUG] Re: Meeting tonight

2009-04-16 Thread doug livesey
Curses! Will have to start a MBY-RUG* that's easier to attend! Ah, well -- hope it goes well. Doug. * My Back Yard Ruby Users Group. The only other attendee is my cat, & she's more freak than geek. 2009/4/16 Will Jessop > > On 16 Apr 2009, at 10:40, doug livesey wrote:

[NWRUG] How do you set active record database sessions in Rails 2.3.2?

2009-04-20 Thread doug livesey
Hi -- first time on a brand new Rails app for a bit, and I find that the line you usually uncomment in config/environment.rb to store sessions in the database has vanished in Rails 2.3.2. Is there a new way of doing this? Has the database-based session handling changed radically, so far as anyone k

[NWRUG] Re: How do you set active record database sessions in Rails 2.3.2?

2009-04-20 Thread doug livesey
Ah, now I see it! Cheers, man! Doug. 2009/4/20 Caius Durling > On 20 Apr 2009, at 11:46, doug livesey wrote: > > Is there a new way of doing this? > > > Its moved out of config/environment.rb > into config/initializers/session_store.rb > > Julius:src(master) ca

[NWRUG] Is there a nice way to identify broken symlinks in Ruby?

2009-04-20 Thread doug livesey
I really need to be more terse in my subject lines -- they leave me nothing to say in the body, except: Cheers, Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email

[NWRUG] Re: Is there a nice way to identify broken symlinks in Ruby?

2009-04-20 Thread doug livesey
Brilliant -- I was, but I didn't spot File.readlink() there (even though I'm using File.symlink!). Cheers, man. Doug. 2009/4/20 Lee Hambley > Try looking at the File class. > http://www.ruby-doc.org/core/classes/File.html#M002557 > - Lee > > 2009/4/20 doug lives

[NWRUG] Re: Fwd: [GeekUp] upcoming dojo.talk() || dojo.beer() in manchester

2009-04-20 Thread doug livesey
Yeah, already registered, cheers. Hope I can bloody make it along to something for a change, as I'd kick myself over missing this one as much as I did for missing your RSpec & Cucumber talk! 2009/4/20 Ashley Moran > > May be of interest to people here - I'm itching for a chance to try > Dojo. >

[NWRUG] Altering the id that my rails models are identified by -- to_param alone not sufficient

2009-04-28 Thread doug livesey
Hi -- I've overwritten to_param on a couple of my models to have them use something more friendly to the eye in the browser address bar. I thought this would then appear in any routes I generated from *_path, but apparently not, as I have one route that I generate with this method call: job_proce

[NWRUG] Re: Altering the id that my rails models are identified by -- to_param alone not sufficient

2009-04-28 Thread doug livesey
Indeed! Cheers. But I think this could be an RSpec issue, as it is mocked models that I am having this issue with. 2009/4/28 Asa Calow > > That might be a typo - it's to_params rather than to_param. > > Asa > > On 28 Apr 2009, at 16:01, doug livesey wrote: > > >

[NWRUG] Re: Altering the id that my rails models are identified by -- to_param alone not sufficient

2009-04-29 Thread doug livesey
Not sure entirely what happened, but stubbing to_param out on my mock models seemed to fix things. Gift horse, mouth, not looking -- I'll reply back shortly, when my lack of investigation bites me again! ;) 2009/4/29 Lee Hambley > Thanks Paul [?] > > 2009/4/29 Paul Horsfall > > Does anyone kno

[NWRUG] multiple apps on a phusion passenger server

2009-05-06 Thread doug livesey
Hi -- could anyone point me in the right direction for instructions on how to configure a phusion passenger server for multiple apps? It will initially be on a local network, so I need to know how to differentiate between them in the browser. Would I need to do that with the DNC server? Or can I te

[NWRUG] Re: multiple apps on a phusion passenger server

2009-05-06 Thread doug livesey
Cheers for both responses -- I shall be cracking on those tomorrow -- although I think I'll install ghost today -- it looks well useful! 2009/5/6 Caius Durling > > On 6 May 2009, at 08:40, Will Jessop wrote: > > (/etc/hosts mangling on your local machine might be required). > > > Install the gho

[NWRUG] Re: multiple apps on a phusion passenger server

2009-05-07 Thread doug livesey
Still not sure about this, having looked at my local apache2.conf & sites-available/ & not seeing where I would set it up for two apps. I have it set up so that app1.local and app2.local work calling different apps, but what I want is to have the app server on a network, and call apps with somethin

[NWRUG] Re: multiple apps on a phusion passenger server

2009-05-07 Thread doug livesey
Okay, so in Will's example there, if I sent my browser to "name1", and the local DNS (?) was set up to send that to the application server, the application server would then know to launch the name1 app? Sorry if I'm being dense -- there's something I'm really missing, here. (Could be a brain ...)

[NWRUG] Re: multiple apps on a phusion passenger server

2009-05-07 Thread doug livesey
Brilliant, cheers -- I'll be putting this all to work tomorrow in th'office. Thanks again, Doug. 2009/5/7 Lee Hambley > The ghost gem is for winners. > > 2009/5/7 Will Jessop > > >> On 7 May 2009, at 15:16, doug livesey wrote: >> > Okay, so in Will&

[NWRUG] odd behaviour with integer fields

2009-05-11 Thread doug livesey
Hi -- has anyone else noticed (or am I really late noticing) that there's a bug in ActiveRecord in Rails 2.3.2? I have an integer field (called position), and when I try to set it to the value "12.34", it actually only sets to 12 in the model instance. I would expect that it should store the value

[NWRUG] Re: odd behaviour with integer fields

2009-05-11 Thread doug livesey
I'm (almost) certian that it never used to do that. I'm sure I've specced validates_numericality_of with integer fields before in the same way I tried here, and the model instance stored the value "12.34" as an instance variable. Naturally, it wouldn't have saved, but it would keep the erroneous va

[NWRUG] Re: odd behaviour with integer fields

2009-05-11 Thread doug livesey
I should add -- I'm not trying to persist the value to the db -- just setting it in the model instance. 2009/5/11 doug livesey > I'm (almost) certian that it never used to do that. > I'm sure I've specced validates_numericality_of with integer fields before > in t

[NWRUG] Sharing sessions across apps -- again for 2.3.2!

2009-05-13 Thread doug livesey
Hi -- I've asked & resolved this before, but now I'm stuck again after a Rails update. Basically, I want to be able to share session data across a couple of apps. The way I did this in 2.2 was to create a view called sessions in the second app that read the sessions table of the first app. This don

[NWRUG] Re: Sharing sessions across apps -- again for 2.3.2!

2009-05-13 Thread doug livesey
#x27;ll have to do some research to get my head around that, and maybe not tonight -- 12hr days seem to be catching up! Cheers, Doug. 2009/5/13 Caius Durling > On 13 May 2009, at 17:57, doug livesey wrote: > > Basically, I want to be able to share session data across a couple of apps. &g

[NWRUG] Re: Sharing sessions across apps -- again for 2.3.2!

2009-05-14 Thread doug livesey
Okay, I think I may be seeing sense. Rather than worry about rails internals, and seeing that it is only logon information (a user id) that I need to share, I've decided to roll my own solution. Bearing in mind that the apps I'm talking about are all internal, this is what I'm going to do: Create a

[NWRUG] Re: Altering the id that my rails models are identified by -- to_param alone not sufficient

2009-05-17 Thread doug livesey
so I am posting it here in his stead. > >- >http://apidock.com/rails/ActionController/PolymorphicRoutes/polymorphic_url > > - Lee > > 2009/4/29 doug livesey > > Not sure entirely what happened, but stubbing to_param out on my mock >> models seemed to fix

[NWRUG] a way to see the sql generated by find* methods on active record?

2009-05-19 Thread doug livesey
Hi -- does anyone know of an easy & quick way to see the sql created by active record find* methods? One that they're willing to tell me about? Cheers, Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG"

[NWRUG] Re: a way to see the sql generated by find* methods on active record?

2009-05-19 Thread doug livesey
Cheers -- I was hoping to be even more lazy than that, but you're right. ;) Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-members@googlegroups.com T

[NWRUG] Re: I'm at NWRUG…

2009-05-22 Thread doug livesey
It persuaded me I'd been in the office too long, anyway, so that was a winner. :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-members@googlegroups.com To u

[NWRUG] Re: Next NWRUG - 18th June – Code Surgery and an introduction to Zsh

2009-06-11 Thread doug livesey
Really wish I could make it, but I'll be in a tent by the sea getting arseholed on real ale & playing music. Although, from past form, now that I've announced that I'll be elsewhere, perhaps the fates will conspire to engineer a sequence of events that will ensure my attendance, for once. --~--~--

[NWRUG] Re: Next NWRUG - 18th June – Code Surgery and an introduction to Zsh

2009-06-11 Thread doug livesey
Yeah -- I'm guessing it's gonna rain. :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-members@googlegroups.com To unsubscribe from this group, send email to

[NWRUG] Anyone on the list using SalesForce w/ Ruby & ActiveSalesforce?

2009-06-17 Thread doug livesey
Hi -- is anyone using (& got anywhere with) ActiveSalesforce on here? If so, I wouldn't admit it, or I'll be blagging you for advice. ;) Cheers, Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group.

[NWRUG] Using HAML to output resources as XML for ActiveResource -- newlines & whitespace

2009-06-23 Thread doug livesey
Hi -- I'm using HAML to generate some custom xml that I'm then using for ActiveResource, which is going swimmingly, except that the attributes of the models I'm getting in the ActiveResource models have whitespace and newlines in them, like so: #"\n N0001\n", "job_name"=>"\n Test DJL

[NWRUG] Re: Using HAML to output resources as XML for ActiveResource -- newlines & whitespace

2009-06-23 Thread doug livesey
The quick & dirty solution is to use content_tag in the HAML template when defining the fields. Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-member

[NWRUG] parse an xml snippet to a hash

2009-07-02 Thread doug livesey
Hi -- I have a custom ActiveResource action that returns the following xml: "\n \n<1>a08200HqJzUAAV\n <2>a08200HqJzsAAF\n<3>a08200HqJzVAAV\n \n \n \n\n" Is there a quick & easy way to turn this into the following hash? { "result" { "successes" => { "1" => "a08200HqJzUA

[NWRUG] Re: parse an xml snippet to a hash

2009-07-02 Thread doug livesey
Interesting, cheers! Probably a little heavy-duty for me right now, but bookmarked for future reference. Cheers, Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send emai

[NWRUG] Re: parse an xml snippet to a hash

2009-07-02 Thread doug livesey
> Although your <1>, <2>, <3> style XML grammar feels a bit odd and doesn't really lend itself to xpath or css selection ... Just realising that, now! Bit of a rethink on the return document, I think! --~--~-~--~~~---~--~~ You received this message because you are

[NWRUG] Re: parse an xml snippet to a hash

2009-07-02 Thread doug livesey
> Activesupport adds Hash.from_xml which should do what you want. > > Or you could try the cobravsmongoose gem: http://cobravsmongoose.rubyforge.org/ cobravsmongoose looks very interesting for the future, but for now the Hash.from_xml is damn' near perfect! Just returns a blank hash as the string

[NWRUG] Running rake as a cron job (with puts)

2009-07-06 Thread doug livesey
Hi -- millions of years ago (or thereabouts), I seem to remember hearing that if you put a "puts" in a task you were going to schedule in a cron job to run as a daemon, that could cause issues. Has anyone found this? Or did I dream it? Because I want to do that very thing in a rake task I'm going t

[NWRUG] Re: Running rake as a cron job (with puts)

2009-07-06 Thread doug livesey
Actually, the email would be great. I guess I'll need to set up an email server first, though. What would be the easiest to get into place for just this purpose on Ubuntu? (Secure machine, so no security concerns, really.) Doug. --~--~-~--~~~---~--~~ You received

[NWRUG] Re: Running rake as a cron job (with puts)

2009-07-06 Thread doug livesey
I shall be looking at both lockrun & exim -- thanks very much for all the replies. Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-members@googlegroup

[NWRUG] ActiveResource -- pass failure reason back with 500 response.

2009-07-08 Thread doug livesey
Hi -- I'm using ActiveResource, and I want to be able, when a model fails to create, to return the failure reason to the caller with the 500 response. Can this be done? I'm currently calling : render( :xml => { :error => model.errors.full_messages.join( " -- " ) }, :status => :internal_server_err

[NWRUG] Re: ActiveResource -- pass failure reason back with 500 response.

2009-07-08 Thread doug livesey
unprocessable_entity it is, then, cheers! Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-members@googlegroups.com To unsubscribe from this group, se

[NWRUG] Recommendations for Ruby XPath library for HTML (not necessarily well-formed)

2009-07-15 Thread doug livesey
Hi -- what do people use for xpath searches of HTML docs in Ruby, that they would recommend? Cheers, Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-m

[NWRUG] Re: Recommendations for Ruby XPath library for HTML (not necessarily well-formed)

2009-07-15 Thread doug livesey
Loving nokogiri -- cheers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-members@googlegroups.com To unsubscribe from this group, send email to nwrug-member

[NWRUG] Re: Recommendations for Ruby XPath library for HTML (not necessarily well-formed)

2009-07-16 Thread doug livesey
Cheers, I would, but I've been meaning to learn basic xpath for ages. Good to have CSS for backup, though, if anything proves too much of a time sink! Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" g

[NWRUG] Re: Recommendations for Ruby XPath library for HTML (not necessarily well-formed)

2009-07-16 Thread doug livesey
One problem I've had (that an update may fix) is an error in webrat, where nested have_selector blocks don't work properly -- they only inspect the immediate children of the selector that is the block parameter. I've been meaning to see if I can work around or even fix this with a little xpath stuf

[NWRUG] Re: Not gonna make it, again

2009-07-16 Thread doug livesey
> Shame! Will Doug make it, I wonder? :) Would love to, but guess who's stuck in the office for the next 3 hours at least. :( Just off to the local Asda to buy me a microwave meal to eat at my desk -- feel the pathos! Have oodles of fun, everyone. Doug. PS -- Have just found out that the comp

[NWRUG] SOAP call -- wrong number of arguments?

2009-07-21 Thread doug livesey
Hi -- I'm having to consume a SOAP service (ugh!), and am running into some difficulty. I'm using Ruby's SOAP libs to do this. I've created a SOAP::RPC::Driver with the wsdl using the SOAP::WSDLDriverFactory, and it seems to have all the methods I expect from the API I have when I call #methods on

[NWRUG] still stumped on a SOAP call

2009-07-27 Thread doug livesey
Hi – can anyone advise on what maybe I need to be passing to this SOAP API. I'm using Ruby's SOAP4R, and have used the wsdl2ruby.rb script to generate the classes I need. The documentation shows the login method requiring two parameters, a username & password, but when I try that, I get a wrong n

[NWRUG] Re: still stumped on a SOAP call

2009-07-27 Thread doug livesey
Looking at it in soapUI (managed to get it working on OSX in the end -- kept crashing on Ubuntu), and seeing how the xml requests are crafted.So does that mean I need to copy that XML & pass that to the various methods? If I copy the xml from soapUI's xml version of login (or whatever), that is wha

[NWRUG] Re: still stumped on a SOAP call

2009-07-28 Thread doug livesey
Ah, I'm with you, cheers -- and from playing a little with soapUI, it looks well useful, and even seems to suggest that there are parameters I need to be passing that are not in the published API -- for instance, the API talks about login( username, password ), whereas the xml snippet that soapUI r

[NWRUG] Re: still stumped on a SOAP call

2009-07-28 Thread doug livesey
> Oh the joys of working with SOAP... Let's just say I am *definitely* putting in a feature request for a RESTful interface to the service I'm trying to consume, here! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[NWRUG] Re: still stumped on a SOAP call

2009-07-28 Thread doug livesey
osed > is actually correct..which they often aren't :( ) > > - cj. > > > > > > On Tue, Jul 28, 2009 at 10:05 AM, doug livesey > wrote: > > > > Ah, I'm with you, cheers -- and from playing a little with soapUI, it > looks well useful, and even seem

[NWRUG] More SOAP problems

2009-07-30 Thread doug livesey
Sorry for being a soapy spammer.*In my never-ending quest to get to the bottom of a particular SOAP API, I am now working through some Java and .Net examples using this API, converting them as I go to Ruby SOAP4R code. I've got the login working, but after that, the examples want me to set the head

[NWRUG] Advice on https in Rails apps

2009-07-31 Thread doug livesey
As I write mainly internal apps, I haven't really put anything out into the wild, yet, but that's all about to change.One of my children is to be released into the wide web (I'm so proud!), and I find myself having to think about security. Basically, I'm after advice on how people get Rails apps re

[NWRUG] Re: Advice on https in Rails apps

2009-07-31 Thread doug livesey
That looks well useful, cheers.So that's it? Cool! :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-members@googlegroups.com To unsubscribe from this group,

[NWRUG] Re: Advice on https in Rails apps

2009-08-02 Thread doug livesey
Lazy sounds like my thing! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-members@googlegroups.com To unsubscribe from this group, send email to nwrug-member

[NWRUG] Cannot seem to include my own module & classes into Rails app

2009-08-02 Thread doug livesey
Hi -- I've got a class called SF::SOAP that gets defined at /lib/wsdl/sandbox/defaultDriver.rbIt is defined like: module SF class SOAP # ... end end How do I include this in my Rails app so that I can (for instance) call SF::SOAP.new without getting an unintitialised constant (f

[NWRUG] Re: Cannot seem to include my own module & classes into Rails app

2009-08-02 Thread doug livesey
The final solution did it, which I could have sworn I'd tried, but I guess not.Cheers for rescuing me from my world of stupid! Doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this gr

[NWRUG] Existing asset tracking software written in RoR (or something Ruby-ish)

2009-08-12 Thread doug livesey
Hi -- I have a wee minion (office junior), and one of the tasks I'd like him to complete is to document what we have in the way of machines and software.It would be nice to keep track of vehicles, site hardware, and miscellaneous stuff, too. So I guess we want some asset management app. I'll be pos

[NWRUG] Re: Why the luck stiff disappeared?

2009-08-20 Thread doug livesey
Do we have any idea who?I have an urge to go post abusive comments. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-members@googlegroups.com To unsubscribe fro

  1   2   3   >