Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 978 Bytes

CHANGELOG.md

File metadata and controls

34 lines (25 loc) · 978 Bytes

Version 1.0

This version is not compatible with previous versions. The following are main changes and migration guide:

  1. Keyword parameter strictness for both profane? and profanity_count is replaced by strategies.

    # 'strict mode' before
    pf.profane?('text', strictness: :strict)
    
    # 'strict mode' now
    pf.profane?('text', strategies: :all)
    
    # 'tolerant mode' before
    pf.profane?('text', strictness: :tolerant)
    
    # 'tolerant mode' now
    pf.profane?('text', strategies: :basic)
  2. We can compose our own strategies:

    # the below two are exactly the same:
    pf.profane?('text', strategies: [:leet, :allow_symbol, :duplicate_characters, :partial_match])
    pf.profane?('text', strategies: :all)
  3. Now the default mode has full support for partial match

    # before it passes our filter, but now it's marked as profane.
    pf.profane?('youasshole')

That's it. Enjoy!