Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion filewatch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
end

spec.name = "filewatch"
spec.version = "0.8.1"
spec.version = "0.9.0"
spec.summary = "filewatch - file watching for ruby"
spec.description = "Watch files and directories in ruby. Also supports tailing and glob file patterns."
spec.files = files
Expand Down
4 changes: 3 additions & 1 deletion lib/filewatch/buftok.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
# end

module FileWatch; class BufferedTokenizer
class BufferFullError < StandardError; end

# New BufferedTokenizers will operate on lines delimited by "\n" by default
# or allow you to specify any delimiter token you so choose, which will then
# be used by String#split to tokenize the input data
Expand Down Expand Up @@ -67,7 +69,7 @@ def extract(data)

# Check to see if the buffer has exceeded capacity, if we're imposing a limit
if @size_limit
raise 'input buffer full' if @input_size + entities.first.size > @size_limit
raise BufferFullError, 'input buffer full' if @input_size + entities.first.size > @size_limit
@input_size += entities.first.size
end

Expand Down