0.01
No commit activity in last 3 years
No release in over 3 years
A ruby library to regurgitate MOO products
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme
Ruminant
========

WARNING: This Gem is currently hideously out of date and not maintained. If you want to fix it, I will be very grateful.

Aiming to make the moo API almost as easy to use for developers as the moo.com site itself.

Installation
------------

If you've never installed a gem from github before - enter the following and you will eternally be graced by a thousand minds:
gem sources -a http://gems.github.com

Then you can install this like any other gem:
gem install james-ruminant

Usage
-----

All parameters are done in an ActiveRecord attributes style, i.e. they can be passed into new() as a hash, and are all attr-accessors. Note that product objects do not have attributes that are not impossible for that product, and that a Sticker will raise an error if you try to give it text.

Making an order:
require 'rubygems'
require 'moo'
order = Moo::Order.new(:api_key => "your api key")

Adding a product:
moocard = Moo::MiniCard.new(:url => "http://farm...")
order.designs << moocard

Adding text
moocard.text = "This is line 1 \n This is line 2"
moocard.line(1) #=> This is line 1
moocard.line(1).bold = true
moocard.line(1).align = "right"
moocard.line(1).font = "modern"
moocard.line(1).colour = "#444444"
moocard.bold = true # sets bold=true on all lines

Submitting to moo:
order.to_xml # Gives you the generated xml if you want to manually submit it
order.submit
if order.error?
	order.error_string
else
	order.start_url
end

Current Limitations
-------------------

Currently I only support MiniCards and Stickers, but have made it incredibly easy to add the other supported products.
I haven't yet, as I do not have a personal need, so don't feel I can test it. If you have such a need, do let me know, as we can add it.

Manual Cropping is not currently supported for the same reason.

Please please please do feel to give feedback and/or submit patches. I want this library to be as helpful as possible, but can only do that if I know what you want.

Contributors thus far
---------------------
Xenia Kingsley - Naming powers
Chris Mear - Fixing stuff, and provides the wine
Dan Webb - Wisdom
Tom Armitage - adding Moo::Sticker


         (__)
         (oo)
  /-------\/
 / |     ||
*  ||----||
   ~~    ~~