magick_title 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,27 +1,27 @@
1
1
  Magick Title
2
2
  ============
3
3
 
4
- Want beautiful copyright-protected browser-compatible custom-smoothed & kerned fonts? MagickTitle delivers just that by using imagemagick to generate titles based on the options you provide.
4
+ Want beautiful copyright-protected browser-compatible custom-smoothed & kerned fonts? MagickTitle delivers just that by using [imagemagick](http://www.imagemagick.org/script/index.php) to generate titles based on the options you provide.
5
5
 
6
- ** ----- under construction, but getting closer! ----- **
6
+ ** ----- in beta! ----- **
7
7
 
8
8
 
9
9
  Requirements
10
10
  ------------
11
11
 
12
- MagickTitle is framework agnostic but requires imagemagick built with freetype.
12
+ MagickTitle is framework agnostic but requires [imagemagick](http://www.imagemagick.org/script/index.php) built with [freetype](http://www.freetype.org/).
13
13
 
14
14
 
15
15
  Installation
16
16
  ------------
17
17
 
18
- As usual, just use the `gem install command
18
+ As usual, just use the `gem install` command:
19
19
 
20
20
  (sudo) gem install magick_title
21
21
 
22
- Or add magick_title as a gem in your Gemfile
22
+ Or add magick_title as a gem in your Gemfile:
23
23
 
24
- gem 'magick_title', '>= 0.1.4'
24
+ gem 'magick_title', '>= 0.1.6'
25
25
 
26
26
  Then run `bundle install`
27
27
 
@@ -125,10 +125,12 @@ To Do
125
125
  -----
126
126
 
127
127
  * Write more tests
128
+ * Write DSL for options (in progress)
129
+ * Support for multiple preset styles (`MagickTitle.say("Hello!", :subtitle)` or `MagickTitle.say("Hello!", :sidebar_title)`) (in progress)
128
130
  * Smart option validation (:color => 'fff' converts to :color => '#fff' and :color => 'pink' fails)
129
131
  * More documentation
130
132
  * Auto ActiveRecord integration (`has_magick_title` class method)
131
- * Tempfiles and base64
133
+ * Heroku support / tempfiles / base64
132
134
  * Clean up and publish demo app
133
135
 
134
136
 
@@ -83,7 +83,7 @@ module MagickTitle
83
83
 
84
84
  # Checks if the image title is valid
85
85
  def valid?
86
- 1 < @text.strip.length
86
+ 0 < @text.strip.length
87
87
  end
88
88
 
89
89
 
@@ -1,3 +1,3 @@
1
1
  module MagickTitle
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/test/test_image.rb CHANGED
@@ -15,7 +15,7 @@ class TestImage < Test::Unit::TestCase
15
15
  end
16
16
 
17
17
  should "create an instance of MagickTitle::Image" do
18
- @title = MagickTitle::Image.create("create using class method")
18
+ @title = MagickTitle::Image.create("created using class method")
19
19
  end
20
20
 
21
21
  context "an invalid title" do
@@ -182,9 +182,17 @@ class TestImage < Test::Unit::TestCase
182
182
 
183
183
  end
184
184
 
185
- context "a title with long text" do
185
+
186
+
187
+ context "a long or short title" do
188
+
189
+ should "allow one letter titles" do
190
+ @title = MagickTitle::Image.create("a")
191
+ assert @title.valid?
192
+ assert @title.save
193
+ end
186
194
 
187
- should "truncate filename" do
195
+ should "truncate filename when long" do
188
196
  @title = MagickTitle::Image.create("Quisque commodo hendrerit lorem quis egestas. Maecenas quis tortor arcu. Vivamus rutrum nunc non neque consectetur quis placerat neque lobortis. Nam vestibulum, arcu sodales feugiat consectetur, nisl orci bibendum elit, eu euismod magna sapien ut nibh. Donec semper quam scelerisque tortor dictum gravida. In hac habitasse platea dictumst. Nam pulvinar, odio sed rhoncus suscipit, sem diam ultrices mauris, eu consequat purus metus eu velit. Proin metus odio, aliquam eget molestie nec, gravida ut sapien. Phasellus quis est sed turpis sollicitudin venenatis sed eu odio. Praesent eget neque eu eros interdum malesuada non vel leo. Sed fringilla porta ligula egestas tincidunt. Nullam risus magna, ornare vitae varius eget, scelerisque a libero. Morbi eu porttitor ipsum. Nullam lorem nisi, posuere quis volutpat eget, luctus nec massa. Pellentesque aliquam lacinia tellus sit amet bibendum. Ut posuere justo in enim pretium scelerisque. Etiam ornare vehicula euismod. Vestibulum at.")
189
197
  assert @title.filename.length < 100
190
198
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: magick_title
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.5
5
+ version: 0.1.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Spencer Steffen
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-28 00:00:00 -08:00
13
+ date: 2011-03-24 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  requirements: []
107
107
 
108
108
  rubyforge_project: magick_title
109
- rubygems_version: 1.5.0
109
+ rubygems_version: 1.6.2
110
110
  signing_key:
111
111
  specification_version: 3
112
112
  summary: Converts text to an image using imagemagick.