lib/ruby_ami/lexer.rb in ruby_ami-2.3.0 vs lib/ruby_ami/lexer.rb in ruby_ami-2.4.0
- old
+ new
@@ -1,10 +1,10 @@
# encoding: utf-8
module RubyAMI
class Lexer
STANZA_BREAK = "\r\n\r\n"
- PROMPT = /Asterisk Call Manager\/(\d+\.\d+)\r\n/
+ PROMPT = /Asterisk Call Manager\/(\d+(\.\d+)*)\r\n/
KEYVALUEPAIR = /^([[[:alnum:]]-_ ]+): *(.*)\r\n/
FOLLOWSDELIMITER = /\r?\n?--END COMMAND--\r\n\r\n/
SUCCESS = /response: *success/i
PONG = /response: *pong/i
EVENT = /event: *(?<event_name>.*)?/i