A smart gem to extend Ruby's String Class to handle complex Texts.
Ruby
Latest commit e4e27c8 Sep 20, 2012 Sebastian ready for rails 2.3.x
Permalink
Failed to load latest commit information.
lib
test
.document
.gitignore
.project
ActionText.gemspec
Gemfile
Gemfile.lock
LICENSE.txt
README
README.rdoc
Rakefile
VERSION

README.rdoc

action_text

In Webapplications, Rails-apps or other Content-Management-systems often you have to deal with Strings. But, in most cases, you have to write many little helper functions for formatting, validations, searches, and so on. In fact, you want your Strings to behave as if they were Texts! A Text is not just an array of characters (this is what a String is meant to be!), it has a common structure, even punctuation (which matters!). Do you have to mess with webcrawlers to find nasty duplicated content? Or a limited database where redundant records matters? Or simply want to count the words in a Text? If you are using such kind of “Text”-Strings or functionality often, have a look which functionality ActionText offers to you:

  • Build nice looking sentences from ugly formatted strings.

  • Check if other strings or even words or whole sentences are included in the text.

  • compare texts for similarity (not just equality!). Very useful if you don't want texts that are too similar! In addition, you can fluently set the degree of accuracy.

  • Ask the text if it is a valid type, eg. if it is a valid email-adress or url.

  • As this gem is developed for usage in Germany, of course the german 'umlauts' are handled naturally.

ANNOTATION:

  • As this gem is still under heavy development, feel free to make suggestions how a Text should behave for you! :)

Contributing to action_text

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet

  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright © 2011 Maximilian Stroh. See LICENSE.txt for further details.