Nullcreations.net | Ramblings & Photography of Jerrett Taylor

Pluginizing ActionWebService to work on Edge rails

June 5th, 2007 | 0 comments

I recently updated a project at work to Edge rails to take advantage of ActiveResource - as a result, ActionWebService went away. We've known for a long time AWS was on it's way out, but I was hoping a plugin version would be created prior to it's removal - which in all fairness may still be the case, Edge rails is not exactly a release.

ActiveResource/REST is much nicer, but we needed SOAP... So I set about making it work on Edge. Turns out this is pretty easy - go into your plugins directory, and svn export actionwebservice:

1
2
cd myproject/vendor/plugins
$ svn export http://svn.rubyonrails.org/rails/trunk/actionwebservice/ actionwebservice

Then go into the directory and create a init.rb - this needs to do three things - require AWS, fix the load paths, and require the test helpers when in test environment.

1
2
3
4
5
6
7
require 'action_web_service'

# These need to be in the load path for action_web_service to work
Dependencies.load_paths += ["#{RAILS_ROOT}/app/apis"]
  
# AWS Test helpers
require 'action_web_service/test_invoke' if ENV['RAILS_ENV'] == 'test' 

That's it! I did find another solution on how to hack it back in, but I decided to turn it into a plugin instead.

0 Comments

Musings

04.14.08

Trying to decide where to travel to? Wikitravel.org Random Page has the answers!

02.23.08

sd's embedded_actions has a new home on github

02.18.08

Very cool.

02.17.08

Open Source Food? - looks like a nice recipe site!

02.15.08

For anyone using capistrano with more than one target for deployment (staging, production), check out cap multistage

02.15.08

Wow, I just realized how bad my code blocks break my blog in safari. I should fix that!

01.27.08

Mike has created another nice netbeans theme - go check it out, if you use netbeans!

01.21.08

A handy tool, Rubular is a web based regex editor

01.15.08

Dan put together a sweet code editor plugin for mce with syntax highlighting etc.

12.13.07

On OSX? Add RubyImporter to Spotlight and search your source!

12.04.07

sd has released a new version of embedded_actions

11.27.07

RejectConf videos are online thanks to confreaks!

11.19.07

Good news - we upgraded a project at work to rails 2.0 rc2 and the speed to run specs dropped from 30-35 seconds to 10-15 seconds!

11.08.07

Eigenclass.org has a great big list of Ruby 1.9 changes that is being kept up to date!

11.06.07

Rein is working on a trac replacement in ruby called eskort , and it looks cool. More info on his goals