Rails plugin that provides attr_similar helper to declare similarity-matching attributes on a model
Ruby JavaScript CSS
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
Gemfile.rails3
Gemfile.rails3.lock
Gemfile.rails4
Gemfile.rails4.lock
LICENSE
README.md
Rakefile
attr_similar.gemspec

README.md

attr_similar

Install gem Build status Coverage status

Rails plugin that provides attr_similar helper to declare similarity-matching attributes on a model.

Rails support

attr_similar works with Rails 3.2.x and Rails 4.0.x and is tested against Ruby versions 1.9.3, 2.0.0 and 2.1.0.

Installation

Add gem 'attr_similar' to your Rails' Gemfile and run bundle install.

Contributing

See .travis.yml for details of the commands that are run as part of the Travis-CI build of this project. The minimum bar for all push requests is that the Travis-CI build must pass. Please also consider adding new tests to cover any new functionality introduced into the project.

To manually run the Travis-CI verification steps on your local machine, you can use the following sequence of commands for Rails 3.2.x:

# Ensure gem dependencies are installed
BUNDLE_GEMFILE=Gemfile.rails3 bundle install
# Reset database
BUNDLE_GEMFILE=Gemfile.rails3 bundle exec rake test_db_reset
# Run tests
BUNDLE_GEMFILE=Gemfile.rails3 bundle exec rake test
# Build the gem
BUNDLE_GEMFILE=Gemfile.rails3 bundle exec gem build attr_similar.gemspec

To test against Rails 4.0.x, use:

# Ensure gem dependencies are installed
BUNDLE_GEMFILE=Gemfile.rails4 bundle install
# Reset database
BUNDLE_GEMFILE=Gemfile.rails4 bundle exec rake test_db_reset
# Run tests
BUNDLE_GEMFILE=Gemfile.rails4 bundle exec rake test
# Build the gem
BUNDLE_GEMFILE=Gemfile.rails4 bundle exec gem build attr_similar.gemspec

Licence

attr_similar is released under the MIT licence.