#8 ✓resolved
Wildgoose

Detail page stuff is broken

Reported by Wildgoose | December 11th, 2008 @ 08:16 PM

Appears that the detail stuff is broken in trunk (and was in the last gem also)

The bug appears to be a scope issue with moving:

def self.get_current_doc_url

 @@current_doc_url

end

into fetch_action.rb. It then appears not to show the correct result when we call it in mechanize.rb, leading to @@original_host_name never becoming set

I moved it into mechanize.rb which makes that part work again (might not be the only fix though?)

Comments and changes to this ticket

  • Peter Szinek

    Peter Szinek December 15th, 2008 @ 10:21 AM

    • Assigned user set to “Peter Szinek”
    • State changed from “new” to “open”

    Cheers, will check it out!

  • Wildgoose

    Wildgoose December 15th, 2008 @ 10:33 AM

    I have to be honest - I don't actually understand why the scope of @@original_host is being limited in this way?

    Equally I am also not sure why you are using class variables everywhere when it would appear that you have an instance available everywhere to use instead?

    Thanks for scrubyt!

  • Peter Szinek

    Peter Szinek December 15th, 2008 @ 10:48 AM

    Thanks for the honesty - as much as the 'wooow scRUBYt! rocks' type of feedback strokes my ego (and who doesn't need some appreciation :-), it doesn't give me much clues for how should I improve scRUBYt!

    Yeah, I know that using @@ everywhere sucks ass - as I said in response of the other ticket, I was a total Ruby n00b and scRUBYt! was my first bigger Ruby code, started out as a few dozen lines single file which I didn't care to optimize because I didn't know how, and I was just playing around. When scRUBYt! became popular and I got to know Ruby a bit better, I refactored some parts but the @@s are not easy to refactor at all, so we decided to start a new branch with 100% rSpec coverage, optimized/refactored code and leaving the cruft behind. So basically skimr is the answer to all the 'why this and that and this is buggy and tha doesn't work' kind of problems.

  • Peter Szinek

    Peter Szinek January 31st, 2009 @ 10:49 PM

    • State changed from “open” to “resolved”

    resolved in 0.4.11

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A simple to learn and use, yet powerful web scraping toolkit written in Ruby.

People watching this ticket

Attachments

Pages