No commit activity in last 3 years
No release in over 3 years
Automagically creates an image of your rails model's title using magick_title.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 0.1.0
>= 3.0.0
= 2.11.3
>= 0.9.0.rc7
>= 1.3.3

Runtime

>= 0.2.0.rc1
 Project Readme

Has Magick Title

Installation

Since has_magick_title is to be used with rails, we'll install it by adding the following to your Gemfile and running the bundle command.

gem 'has_magick_title', '>= 0.1.0'

Now bundle up:

bundle

Usage

To automagically generate your model's title attribute into an image, just call the has_magick_title class method.

# assume the defaults (:attribute => :title)
class Post < ActiveRecord::Base
  has_magick_title      
end


# custom attribute and magick_title options
class Person < ActiveRecord::Base
  has_magick_title :name,
    :color => "#e00053", 
    :font_size => 19
end

# custom attribute and magick_title style

MagickTitle.style :h1 do
  font_size   50
  line_height -10
end
    
class Person < ActiveRecord::Base
  has_magick_title :name, :h1
end

See magick_title for more...

Testing

Testing for has_magick_title is done with shoulda, spork and dummier.

Start by cloning the project:

git clone git://github.com/citrus/has_magick_title.git
cd has_magick_title

To get your environment setup, just run the following:

bundle
bundle exec dummier

Now run the unit tests with rake:

rake

If you'd like to spork, you probably already know what to do. Otherwise, skip the rake step and run spork instead:

spork

Now in another window:

cd /to/where/you/cloned/has_magick_title
testdrb test/unit/*.rb

License

Copyright (c) 2011 Spencer Steffen and Citrus, released under the New BSD License All rights reserved.