Skip to content
Check for uniquely created content in a Redis set
Find file
Failed to load latest commit information.
lib fix the gem dependencies
test perfect
LICENSE perfect Edited via GitHub
Rakefile perfect
unique_content_set.gemspec Release 0.1.0

Unique Content Set

Check for uniquely created content in a Redis set.


gem install unique_content_set


# uses a Redis Set named something like "unique:5:messages"
set =, :messages

if set.add(@message.body, @message.created_at)
  # this message body is unique!

if set.exist?(@message.body)
  # this message body has been posted before, do something!

# Purge old message content.


If you'd like to hack on UniqueContentSet, start by forking the repo on GitHub:

The best way to get your changes merged back into core is as follows:

  • Clone down your fork
  • Create a thoughtfully named topic branch to contain your change
  • Hack away
  • Add tests and make sure everything still passes by running rake
  • If you are adding new functionality, document it in the README
  • Do not change the version number, I will do that on my end
  • If necessary, rebase your commits into logical chunks, without errors
  • Push the branch up to GitHub
  • Send a pull request to the technoweenie/unique_content_set project.
Something went wrong with that request. Please try again.