- Switch to using
require_relative
to improve load-times.
- Ensure all character Strings within the {Chars} character sets are encoded as
ASCII-8bit. This prevents transcoding issues when calling
Chars::ASCII.random_string(length)
. - Changed {Chars::CharSet#initialize} to encode bytes greater than 256 as UTF-8. Otherwise, bytes less than 256 will be encoded as ASCII-8bit.
- Removed the space character from {Chars::PUNCTUATION}, as spaces are not technically a punctuation character.
- Removed
\f
,\n
,\r
,\t
, and\v
from {Chars::PRINTABLE}, as other whitespace characters besides space (' '
) are not considered printable characters.
- Added {Chars::WHITESPACE}.
- Added {Chars::DIGITS}.
- Added {Chars::CharSet#each_substring_with_index}.
- Added {Chars::CharSet#substrings_with_indexes}.
- Added {Chars::CharSet#each_substring}.
- Added {Chars::CharSet#substrings}.
- Added {Chars::CharSet#each_string_of_length}.
- Added {Chars::CharSet#strings_of_length}.
- Added {Chars::StringEnumerator}.
- Require ruby >= 2.0.0.
- Added {Chars::CharSet#initialize_copy} to prevent leaking characters between copied {Chars::CharSet} objects.
- Change {Chars::CharSet} to inherit from
Set
, instead ofSortedSet
.
- {Chars::CharSet#initialize} now raises a
TypeError
when given arguments that were neither aString
,Integer
orEnumerable
. - Allow {Chars::CharSet#strings_in} to yield results as they are found.
- Improved the performance of {Chars::CharSet#strings_in} when operating on small Strings.
- Replaced ore-tasks with rubygems-tasks.
- Added {Chars::CharSet.[]}
- Added {Chars::CharSet#<<}.
- Added
Chars::CharSet#byte_to_char
. - Added
Chars::CharSet#char_to_byte
. - Added a cache of characters of the bytes within {Chars::CharSet}.
- Use
String#each_char
to distinguish Unicode from ASCII.
- Make sure all enumerable methods in {Chars::CharSet} return an
Enumerator
object if no block is given.
- Require
hoe
>= 2.3.3. - Require
yard
>= 0.2.3.5. - Require
rspec
>= 1.2.8. - Added {Chars.visible} and {Chars::VISIBLE} (thanks flatline).
- Added {Chars::CharSet#random_distinct_bytes}, {Chars::CharSet#random_distinct_chars}, and {Chars::CharSet#random_distinct_string} (thanks flatline).
- Use
hoe/signing
for signed RubyGems. - Moved to YARD based documentation.
- All specs now pass on JRuby 1.3.1.
- Renamed {Chars::CharSet#=~} to {Chars::CharSet#===}.
- Added an alias from
Chars::CharSet#=~
to {Chars::CharSet#===}.
- Initial release.
- Provides character sets for:
- Numeric
- Octal
- Uppercase Hexadecimal
- Lowercase Hexadecimal
- Hexadecimal
- Uppercase Alpha
- Lowercase Alpha
- Alpha
- Alpha-numeric
- Punctuation
- Symbols
- Space
- Printable
- Control
- ASCII
- Provides convenience methods for testing whether a
String
orInteger
belongs to a certain character set. - Supports random text generation using specific character sets.