OpenTransact: Testing OAuth Scopes with Artifice and Cucumber
[blip.tv http://blip.tv/play/AYLP3wMA width=“480” height=“405”]
In this screencast, we’ll improve the code introduced in the previous post OAuth Scopes with UMA Action URLs with the help of our friends Artifice and Cucumber.
Calls to Net::HTTP can be intercepted by Artifice and sent to your rack application instead of the network. If you are developing an OAuth provider, Artifice makes testing the api a lot easier. Since the OAuth ruby gem uses Net::HTTP, we can wrap Artifice blocks around our client calls in tests and Artifice will intercept the calls and route them to our Rails app.
RSpec and CanCan Authorization for Intentional Economics
Not long after moving the Austin Time Exchange to Ruby on Rails, we started receiving requests for a groups feature since some local groups were interested in having their own currency but did not want to run their own instance of the software and their members were already on the existing system.
Since we’re a fork of insoshi, merging the groups feature from another fork is easy. Add some code to make simple payments per-group…Boom! Done.
OsCurrency Heroku Deployment
“Anyone can run their own financial system.” - Bernard Lietaer at the Naropa Intentional Economics workshop.
Thanks to Lee Azzarello, oscurrency can now be deployed to heroku with the master branch. For production use, the edge branch is preferred as previous testing in development and production has been done with edge. Also, two more items need to be worked on for heroku deployment. In edge, search is done with sphinx which heroku does not support. Since a community currency system generally does not need industrial strength search, perhaps this can be replaced with standard database queries. Also, the edge branch uses workling and starling for background processing of newsletter and forum post emails. Heroku uses DJ workers.
OsCurrency Demo Site and Github Repository
At One Web Day Austin on September 22, the idea was offered (see video in previous entry) that it would be relatively straightforward to build a complementary currency system on Insoshi. Shortly after that, Rich and I began a new project in github. The latest code can be found in the edge branch of Oscurrency.
Two weeks ago, the Austin Time Exchange made the switch to running this code. Most of the changes you see in github since then are the result of feedback from the members. This site runs on one 256M slice on slicehost.
