adhearsion 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -193,7 +193,8 @@ module Adhearsion
193
193
  end
194
194
 
195
195
  def follows_text_stops
196
- text = @data[@last_seen_value_end..(@current_pointer - "\r\n--END COMMAND--".size)]
196
+ text = @data[@last_seen_value_end..@current_pointer]
197
+ text.sub! /\r?\n--END COMMAND--/, ""
197
198
  @current_message.text_body = text
198
199
  @follows_text_start = nil
199
200
  end
@@ -283,4 +284,4 @@ VVVVVVVVVVVVVVVVVVVVVVVVVVVVV
283
284
  end
284
285
  end
285
286
  end
286
- end
287
+ end
@@ -24,10 +24,10 @@ rest_of_line = (any* -- crlf); # Match all characters until the next line sepera
24
24
 
25
25
  Prompt = "Asterisk Call Manager/" digit+ >version_starts "." digit+ %version_stops crlf;
26
26
 
27
- Key = ((alnum | print) -- (cr | lf))+;
27
+ Key = ((alnum | print) -- (cr | lf | ":"))+;
28
28
  KeyValuePair = Key >key_starts %key_stops colon rest_of_line >value_starts %value_stops crlf;
29
29
 
30
- FollowsDelimiter = crlf "--END COMMAND--";
30
+ FollowsDelimiter = loose_newline "--END COMMAND--";
31
31
 
32
32
  Response = "Response"i colon;
33
33
 
@@ -81,7 +81,7 @@ success := KeyValuePair* crlf @message_received @{fgoto protocol;};
81
81
  response_follows := |*
82
82
  KeyValuePair+;
83
83
  FollowsBody;
84
- crlf @{ message_received; fgoto protocol; };
84
+ crlf @{ message_received @current_message; fgoto protocol; };
85
85
  *|;
86
86
 
87
87
  }%%
@@ -318,7 +318,15 @@ module Adhearsion
318
318
  if Adhearsion::VoIP::DSL::NumericalString.starts_with_leading_zero?(value)
319
319
  Adhearsion::VoIP::DSL::NumericalString.new(value)
320
320
  else
321
- is_float ? value.to_f : value.to_i
321
+ if is_float
322
+ if key == :uniqueid
323
+ value
324
+ else
325
+ value.to_f
326
+ end
327
+ else
328
+ value.to_i
329
+ end
322
330
  end
323
331
  else
324
332
  value
@@ -343,9 +351,10 @@ module Adhearsion
343
351
  end
344
352
 
345
353
  def coerce_request_into_uri_object(variables)
346
- returning variables do
354
+ if variables[:request]
347
355
  variables[:request] = URI.parse(variables[:request]) unless variables[:request].kind_of? URI
348
356
  end
357
+ variables
349
358
  end
350
359
 
351
360
  def coerce_type_of_number_into_symbol(variables)
@@ -356,7 +365,7 @@ module Adhearsion
356
365
 
357
366
  def decompose_uri_query_into_hash(variables)
358
367
  returning variables do
359
- if variables[:request].query
368
+ if variables[:request] && variables[:request].query
360
369
  variables[:query] = variables[:request].query.split('&').inject({}) do |query_string_parameters, key_value_pair|
361
370
  parameter_name, parameter_value = *key_value_pair.match(/(.+)=(.*)/).captures
362
371
  query_string_parameters[parameter_name] = parameter_value
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adhearsion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Phillips
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-21 00:00:00 -06:00
12
+ date: 2008-08-21 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -152,8 +152,10 @@ files:
152
152
  - lib/theatre/version.rb
153
153
  - LICENSE
154
154
  - Rakefile
155
- has_rdoc: false
155
+ has_rdoc: true
156
156
  homepage: http://adhearsion.com
157
+ licenses: []
158
+
157
159
  post_install_message:
158
160
  rdoc_options: []
159
161
 
@@ -174,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
176
  requirements: []
175
177
 
176
178
  rubyforge_project: adhearsion
177
- rubygems_version: 1.3.1
179
+ rubygems_version: 1.3.5
178
180
  signing_key:
179
181
  specification_version: 2
180
182
  summary: Adhearsion, open-source telephony development framework