about 2 months ago - No comments
This is a follow-on from my piece on how I got the (development version of) Catapult Magazine up and running with Rails 3.0pre. If you haven’t already done so, I’d recommend you read that first.
Catapult makes use of the permalink_fu plugin which fails in Rails 3. It fails because of a reliance on the evaluate_attribute_method More >
about 2 months ago - 1 comment
I used to be a strong adherent to tracking edge rails. Up until the release of rails 2.3 I let most of my frequently updated projects track edge with a vendored copy of rails, and it rarely caused me any trouble. When 2.3 hit I rethought all that.
With Rails 3 development ramping up I More >
about 7 months ago - Comments Off
I’m up to my usual using-ruby-tools-to-test-other-environments tricks, using cucumber and my wordpress activerecord classes to do acceptance testing against a highly-customised wordpress install.
I’m hoping to write a bit more about that soon, once I’ve put it through its paces a little more and cleaned up some of the code, but I wanted to quickly mention More >
about 7 months ago - Comments Off
As mentioned in yesterday’s announcement I’m pulling some content across from this blog (running on wordpress) into the new Ket Lai site (a merb app). I’ve found myself doing similar things a few times lately, such as on Only Connect (on which more, soon) and so have built out a selection of ActiveRecord models to More >
about 11 months ago - Comments Off
Somewhere between Ruby on Rails versions 2.3.0 (RC1) and 2.3.2 (final) a change was made to the arguments required for one of the methods the theme_support plugin requires. I must confess I hadn’t spotted it, but github user knapo kindly sent me a message with a patch. That patch is now applied in the main More >
about 1 year ago - 4 comments
I seem to be spending a lot of time with wordpress at the moment. It’s become so ubiquitous that it often makes far more sense to set it up and integrate with an existing app than to set up some other blogging system and re-train users. As a result I’ve been writing a few wordpress More >
about 1 year ago - 11 comments
In my ongoing efforts to bring my fork of theme_support in line with Rails 2.3 I’ve covered the core views and email, but when I left off earlier today layouts still weren’t working.
The key problem with overriding layouts is that the process of identifying them relies on some class methods on ActionController::Base (provided in the More >
about 1 year ago - 6 comments
Stage 2 of fixing up theme_support for Rails 2.3 was making sure that ActionMailer picked up themed templates (for stage 1 information see here). That’s something I’d not quite cracked in the 2.2 version, so starting afresh with 2.3 forced me to spend the time to look through the full render path and figure out More >
about 2 years ago
This plugin looks interesting and just what I’m after for a current project. Sadly the svn repository is inaccessible, I’m asked for a login and password.
Is this a glitch, or is the code no longer available?
Thanks
Steve
about 2 years ago
Sorry Steve. I’ve been moving to a new server and a few things aren’t yet configured as they should be. I’ll try and get onto that first thing tomorrow.
about 2 years ago
This sounds like it’d be a great plugin. As soon as the svn repo is accessible, I’ll be downloading it.
The repo is asking for HTTP Basic creds. Is there an anonymous account perhaps?
about 2 years ago
Sorry about that. Anonymous access should be working now.
about 2 years ago
Hi James,
In the example you showed how to get the author, title, isbn, publisher and pubdate attributes of a book.
I want to get other attributes but don’t know what values to use to gat that data. Specifically I want the image of the book cover. How do I get that information?
about 2 years ago
Ben – The mapping is between the attribute names in Amazon’s Associate web services (previously E-commerce services) return values and the value you want it to be in your model.
I believe the URL for a small image is in the smallimage attribute (but I may well be wrong as it’s a while since I looked at the API) so in that case you’d use:
maps_to_amazon_attribute :image_url => ’smallimage’
Let me know how you get on. It’s been quite a while since I last worked with the plugin so it may well be due an overhaul.
about 1 year ago
Hi James, thanks for posting this plug-in It looks like its exactly what I need.
I’m new to Ruby and have not used the Amazon Associate Web Services before.
Like Ben, my interest is in books. Users will enter ISBN, or title, or author, and I want to get back the balance of the info about a book including the cover thumbnail.
I’m reading this http://docs.amazonwebservices.com/AWSECommerceService/2008-03-03/GSG/
(given that I am noob :)) I am wondering where all that SETUP stuff is done in the case of your plugin (where keys are passed, etc)?
Thanks.
about 1 year ago
roupen – at the moment those values aren’t configured anywhere, so you need to pass them into each method call:
Model.load_from_amazon(asin_value, dev_key, associates_id)
At some point I hope to rework the plugin to use the amazon-ecs gem (since that supports ECS 4) and at that point I aim to make this configurable to DRY up code. Since I don’t currently use this plugin in any active projects, it’s taking a while to get to the new version, but hopefully with time…
about 1 year ago
Hi, I’ve been trying to get the example working but I get an error from the amazon lib, any ideas?
Book.load_from_amazon(‘0439785960′, ‘xxxxxxxxxxxx’)
Amazon::Search::Request::HTTPError: HTTP response code 410
from /opt/local/lib/ruby/site_ruby/1.8/amazon/search.rb:991:in `get_page’
from /opt/local/lib/ruby/site_ruby/1.8/amazon/search.rb:1013:in `search’
from /opt/local/lib/ruby/site_ruby/1.8/amazon/search.rb:647:in `asin_search’
from /home/dbc602e2/fbpoc/vendor/plugins/loads_from_amazon/lib/loads_from_amazon.rb:65:in `load_from_amazon’
from (irb):30
about 1 year ago
albemuth – it’s been quite a while since I used the plugin since the project I created it for is long since defunct. As I understand it the amazon ECS library I built it on top of isn’t maintained any more so it could well be using a version of the API that amazon no longer support.
As mentioned above, if/when time allows I’d love to port it to use the amazon-ecs gem but I’m very busy at the moment so there’s no telling when I’ll get to it. It’s probably not a huge amount of work, so you might like to check out the gem and see whether you can hack it together?