queri 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -0
  3. data/lib/queri/aggregate_report_helpers.rb +5 -7
  4. data/lib/queri/composite_agent_level_report_helpers.rb +6 -10
  5. data/lib/queri/composite_report_helpers.rb +4 -6
  6. data/lib/queri/stats/agents_and_sessions/agent_availability.rb +1 -1
  7. data/lib/queri/stats/answered_calls/agents_on_queue.rb +1 -1
  8. data/lib/queri/stats/answered_calls/all_calls.rb +1 -1
  9. data/lib/queri/stats/answered_calls/answered_calls_by_direction.rb +1 -1
  10. data/lib/queri/stats/answered_calls/answered_calls_by_queue.rb +1 -1
  11. data/lib/queri/stats/answered_calls/answered_calls_by_stints.rb +1 -1
  12. data/lib/queri/stats/answered_calls/calls_fully_within_the_given_time_interval.rb +1 -2
  13. data/lib/queri/stats/answered_calls/disconnection_causes.rb +1 -1
  14. data/lib/queri/stats/answered_calls/dnis_used.rb +1 -1
  15. data/lib/queri/stats/answered_calls/ivr_selection.rb +1 -1
  16. data/lib/queri/stats/answered_calls/music_on_hold_by_agent.rb +1 -1
  17. data/lib/queri/stats/answered_calls/queue_position.rb +1 -1
  18. data/lib/queri/stats/answered_calls/service_level_agreement.rb +1 -1
  19. data/lib/queri/stats/answered_calls/transfers.rb +1 -1
  20. data/lib/queri/stats/details_of_agent_sessions_and_pauses/detail_of_agent_pauses.rb +1 -1
  21. data/lib/queri/stats/details_of_agent_sessions_and_pauses/detail_of_agent_sessions.rb +1 -1
  22. data/lib/queri/stats/details_of_answered_calls/queue_details.rb +1 -1
  23. data/lib/queri/stats/details_of_unanswered_calls/detail_of_unanswered_calls.rb +1 -1
  24. data/lib/queri/stats/distributions/acd_attempts_by_queue.rb +27 -0
  25. data/lib/queri/stats/distributions/acd_attempts_by_terminal.rb +27 -0
  26. data/lib/queri/stats/distributions/inbound_acd_call_attempts.rb +31 -0
  27. data/lib/queri/stats/distributions.rb +11 -0
  28. data/lib/queri/stats/unanswered_calls/all_calls.rb +1 -1
  29. data/lib/queri/stats/unanswered_calls/all_calls_by_stints.rb +1 -1
  30. data/lib/queri/stats/unanswered_calls/call_overview.rb +1 -1
  31. data/lib/queri/stats/unanswered_calls/calls_fully_within_the_given_time_interval.rb +1 -1
  32. data/lib/queri/stats/unanswered_calls/disconnection_causes.rb +1 -1
  33. data/lib/queri/stats/unanswered_calls/dnis_used.rb +1 -1
  34. data/lib/queri/stats/unanswered_calls/dnis_used_for_all_calls.rb +1 -1
  35. data/lib/queri/stats/unanswered_calls/enter_queue_position.rb +1 -1
  36. data/lib/queri/stats/unanswered_calls/enter_queue_position_for_all_calls.rb +1 -1
  37. data/lib/queri/stats/unanswered_calls/inclusive_answered_service_level_agreement.rb +1 -1
  38. data/lib/queri/stats/unanswered_calls/inclusive_service_level_agreement.rb +1 -1
  39. data/lib/queri/stats/unanswered_calls/ivr_selection.rb +1 -1
  40. data/lib/queri/stats/unanswered_calls/ivr_selection_for_all_calls.rb +1 -1
  41. data/lib/queri/stats/unanswered_calls/unanswered_calls_by_key_press.rb +1 -1
  42. data/lib/queri/stats/unanswered_calls/unanswered_calls_by_queue.rb +1 -1
  43. data/lib/queri/stats/unanswered_calls/unanswered_calls_by_stints.rb +1 -1
  44. data/lib/queri/stats/unanswered_calls/unanswered_calls_distribution_by_length.rb +1 -1
  45. data/lib/queri/stats/unanswered_calls/unanswered_outbound_calls_by_agent.rb +1 -1
  46. data/lib/queri/version.rb +1 -1
  47. data/lib/queri.rb +1 -0
  48. data/queri.gemspec +2 -0
  49. data/spec/stats/distributions/acd_attempts_by_queue_spec.rb +20 -0
  50. data/spec/stats/distributions/acd_attempts_by_terminal_spec.rb +20 -0
  51. data/spec/stats/distributions/distributions_spec.rb +7 -0
  52. data/spec/stats/distributions/inbound_acd_call_attempts_spec.rb +20 -0
  53. metadata +27 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3137db1cebb8de92a7b303b2fb18f9a0d4542167
4
- data.tar.gz: 2a04babeb6af42e90bc65df0c5ee2b4608baa33f
3
+ metadata.gz: cb616a6c90427ff7c15dc01e4561c0f818ba5864
4
+ data.tar.gz: b48087e47fbfc68cd0099c8185af258dd98b2e66
5
5
  SHA512:
6
- metadata.gz: 94a372d916a402d90e4341b9b1587f22107bf1f50b4f24a553540d24863d4ad490744c85ef1bc8fc2babb71b4db4f36c7eadd70a7a7f76923a05e1a27c04f1f2
7
- data.tar.gz: 5aa0605efaadc134d74a41079a9840a852c24d6a1e91c2146c0fc8ffb2308d6dbd5f78a305adb63b42f397817760cb76e0244e2a256f1c46f1fea58c51612e85
6
+ metadata.gz: e18faa24b9b4b53c497bfb99649695cc3239820cfcae3bc827fb327a7df1c93d9a60ba5ed8ec17d2cddb4b9edf94c05c9c592752aae1d405bda2f62b10ea3f57
7
+ data.tar.gz: 808db2b1aa8d157c03fc6bd8298ef2cca3bf8a76f6a06fbc02af71f966a47cf155a00a5e63924ff4ede0f834d45ad1c5e15c07618c3ab4d274f0715bd0ca87d9
data/README.md CHANGED
@@ -70,6 +70,10 @@ Currently returns analyses from two methods: QM.stats and QM.realtime.
70
70
  * QueueDetails
71
71
  * DetailsOfUnansweredCalls
72
72
  * DetailOfUnansweredCalls
73
+ * Distributions
74
+ * AcdAttemptsByQueue
75
+ * AcdAttemptsByTerminal
76
+ * InboundAcdCallAttempts
73
77
  * UnansweredCalls
74
78
  * AllCalls
75
79
  * AllCallsByStints
@@ -138,6 +142,8 @@ Composite aggregate reports return an Array of Hashes, each Hash corresponding t
138
142
  * UnansweredCalls
139
143
  * AllCalls
140
144
  * CallsFullyWithinTheGivenTimeInterval
145
+ * Distributions
146
+ * InboundAcdCallAttempts
141
147
  * Composite aggregate reports
142
148
  * Stats
143
149
  * AnsweredCalls
@@ -150,6 +156,9 @@ Composite aggregate reports return an Array of Hashes, each Hash corresponding t
150
156
  * QueuePosition
151
157
  * ServiceLevelAgreement
152
158
  * Transfers
159
+ * Distributions
160
+ * AcdAttemptsByQueue
161
+ * AcdAttemptsByTerminal
153
162
  * UnansweredCalls
154
163
  * AllCallsByStints
155
164
  * CallOverview
@@ -3,13 +3,11 @@ module AggregateReportHelpers
3
3
 
4
4
  def parse_response
5
5
  r = Queri.send_request(@queues, self, @period_start, @period_end)
6
- xml_keys_to_human_readable_keys = self.class.key_translations.invert
7
- r.each_with_index do |metric,i|
8
- if i > 0
9
- metric[0] = xml_keys_to_human_readable_keys[ metric[0] ]
10
- end
11
- end
6
+ pairs = self.class.key_translations.each_pair
12
7
  r.shift
13
- Hash[*r.flatten]
8
+ new_metrics = r.map do |metric|
9
+ [pairs.next[0], metric[1]]
10
+ end
11
+ Hash[*new_metrics.flatten]
14
12
  end
15
13
  end
@@ -3,17 +3,13 @@ module CompositeAgentLevelReportHelpers
3
3
 
4
4
  def parse_response
5
5
  r = Queri.send_request(@queues, self, @period_start, @period_end)
6
- xml_keys_to_human_readable_keys = self.class.key_translations.invert
7
- new_keys = r.shift.map {|k| xml_keys_to_human_readable_keys[k]}
8
- agent_metrics = []
6
+ new_keys = self.class.keys
7
+ r.shift
8
+ new_metrics = Hash.new {|h,k| h[k] = []}
9
9
  r.each do |agent|
10
- agent_metrics << Hash[new_keys.zip(agent)]
10
+ m = Hash[new_keys.zip(agent)]
11
+ new_metrics[ m[:agent] ] << m
11
12
  end
12
- agents = agent_metrics.map {|a| a[:agent]}.uniq
13
- parsed_metrics = Hash.new
14
- agents.each do |agent|
15
- parsed_metrics[agent] = agent_metrics.select {|m| m[:agent] == agent}
16
- end
17
- return parsed_metrics
13
+ new_metrics
18
14
  end
19
15
  end
@@ -3,12 +3,10 @@ module CompositeReportHelpers
3
3
 
4
4
  def parse_response
5
5
  r = Queri.send_request(@queues, self, @period_start, @period_end)
6
- xml_keys_to_human_readable_keys = self.class.key_translations.invert
7
- new_keys = r.shift.map {|k| xml_keys_to_human_readable_keys[k]}
8
- agent_metrics = []
9
- r.each do |agent|
10
- agent_metrics << Hash[new_keys.zip(agent)]
6
+ new_keys = self.class.keys
7
+ r.shift
8
+ r.map do |agent|
9
+ Hash[new_keys.zip(agent)]
11
10
  end
12
- return agent_metrics
13
11
  end
14
12
  end
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :level, "Level",
15
15
  :agent, "Agent",
16
16
  :time, "Time",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :agent, "Agent",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_all_calls_handled, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :calls_answered, "N. calls answered by operators:",
15
15
  :average_call_length, "Average call length:",
16
16
  :minimum_call_length, "Min call length:",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :direction_icon, "&nbsp;",
15
15
  :direction, "Direction",
16
16
  :number_of_calls, "N. Calls",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :empty_column, "&nbsp;",
15
15
  :queue, "Queue",
16
16
  :number_of_calls, "N. Calls",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :number_of_stints, "Number of stints",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,8 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
14
- :calls_fully_within_the_given_time_interval, "Calls fully within the given time interval:",
13
+ ActiveSupport::OrderedHash[
15
14
  :calls_answered, "N. calls answered by operators:",
16
15
  :average_call_length, "Average call length:",
17
16
  :minimum_call_length, "Min call length:",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :disconnection_cause, "Cause",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :dnis, "DNIS",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :ivr_selection, "IVR",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :agent, "Agent",
15
15
  :total_hold_events, "Total Events",
16
16
  :hold_events_per_call, "Events per Call",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :initial_queue_position, "Position at enter",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :time_interval, "Answer",
15
15
  :calls_taken_in_time_interval, "N. Calls",
16
16
  :calls_between_lower_interval, "Delta",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :extension_transffered_to, "Transfer to",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :agent, "Agent",
15
15
  :extension, "Ext.",
16
16
  :pause_code, "Code",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :agent, "Agent",
15
15
  :clock_in, "Start hour",
16
16
  :clock_out, "End hour",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :date, "Date",
15
15
  :caller_id, "Caller",
16
16
  :queue, "Queue",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :date, "Date",
15
15
  :agent, "Agent",
16
16
  :caller_id, "Caller",
@@ -0,0 +1,27 @@
1
+ module Queri
2
+ class Stats
3
+ class Distributions
4
+ class AcdAttemptsByQueue < Queri::Stats
5
+ include CompositeReportHelpers
6
+
7
+ class << self
8
+ def xml_code
9
+ Distributions.xml_code + ".AcdByQueue"
10
+ end
11
+
12
+ def key_translations
13
+ ActiveSupport::OrderedHash[
14
+ :queue, "Queue",
15
+ :number_of_lost_agent_attempts, "N. lost",
16
+ :average_ring_time_for_lost_attempts, "Avg ring",
17
+ :total_ring_time_for_lost_attempts, "Ring (s)",
18
+ :number_of_taken_agent_attempts, "N. Taken",
19
+ :average_ring_time_for_taken_attempts, "Avg ring",
20
+ :total_ring_time_for_taken_attempts, "Ring (s)"
21
+ ]
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,27 @@
1
+ module Queri
2
+ class Stats
3
+ class Distributions
4
+ class AcdAttemptsByTerminal < Queri::Stats
5
+ include CompositeReportHelpers
6
+
7
+ class << self
8
+ def xml_code
9
+ Distributions.xml_code + ".AcdByTerminals"
10
+ end
11
+
12
+ def key_translations
13
+ ActiveSupport::OrderedHash[
14
+ :agent, "Agent",
15
+ :number_of_lost_attempts, "N. lost",
16
+ :average_ring_time_for_lost_attempts, "Avg ring",
17
+ :total_ring_time_for_lost_attempts, "Ring (s)",
18
+ :number_of_taken_attempts, "N. Taken",
19
+ :average_ring_time_for_taken_attempts, "Avg ring",
20
+ :total_ring_time_for_taken_attempts, "Ring (s)"
21
+ ]
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,31 @@
1
+ module Queri
2
+ class Stats
3
+ class Distributions
4
+ class InboundAcdCallAttempts < Queri::Stats
5
+ include AggregateReportHelpers
6
+
7
+ class << self
8
+ def xml_code
9
+ Distributions.xml_code + ".ReportAcd"
10
+ end
11
+
12
+ def key_translations
13
+ ActiveSupport::OrderedHash[
14
+ :total_attempts_sent_to_operators, "Total ACD attempts sent to operators:",
15
+ :placeholder_for_taken_calls, "Taken calls",
16
+ :average_attempts_for_taken_calls, "Average attempts:",
17
+ :minimum_attempts_for_taken_calls, "Min attempts:",
18
+ :maximum_attempts_for_taken_calls, "Max attempts:",
19
+ :total_attempts_for_taken_calls, "Total attempts:",
20
+ :placeholder_for_lost_calls, "Lost calls",
21
+ :average_attempts_for_lost_calls, "Average attempts:",
22
+ :minimum_attempts_for_lost_calls, "Min attempts:",
23
+ :maximum_attempts_for_lost_calls, "Max attempts:",
24
+ :total_attempts_for_lost_calls, "Total attempts:"
25
+ ]
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,11 @@
1
+ module Queri
2
+ class Stats
3
+ class Distributions
4
+ @@xml_code = "DistrDO"
5
+
6
+ def self.xml_code
7
+ @@xml_code
8
+ end
9
+ end
10
+ end
11
+ end
@@ -14,7 +14,7 @@ module Queri
14
14
  end
15
15
 
16
16
  def key_translations
17
- Hash[
17
+ ActiveSupport::OrderedHash[
18
18
  :calls_unanswered, "N.of unanswered calls:",
19
19
  :average_wait_before_disconnect, "Average wait time before disconnection:",
20
20
  :minimum_wait_before_disconnect, "Min wait time before disconnection:",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :number_of_stints, "Number of stints",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :empty, "&nbsp;",
15
15
  :queue, "Queue",
16
16
  :number_of_calls_to_hit_queue, "Calls offered",
@@ -14,7 +14,7 @@ module Queri
14
14
  end
15
15
 
16
16
  def key_translations
17
- Hash[
17
+ ActiveSupport::OrderedHash[
18
18
  :calls_fully_within_the_given_time_interval, "Calls fully within the given time interval:",
19
19
  :calls_unanswered, "N.of unanswered calls:",
20
20
  :average_call_waiting_time, "Average wait time before disconnection:",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :disconnection_cause, "Cause",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :dnis, "DNIS",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :dnis, "DNIS",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :initial_queue_position, "Position at enter",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :initial_queue_position, "Position at enter",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :time_interval, "Hangup",
15
15
  :calls_taken_in_time_interval, "N. Calls",
16
16
  :calls_between_lower_interval, "Delta",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :time_interval, "Hangup",
15
15
  :calls_taken_in_time_interval, "N. Calls",
16
16
  :calls_between_lower_interval, "Delta",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :ivr_selection, "IVR",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :ivr_selection, "IVR",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :key_pressed, "Key",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :empty_column, "&nbsp;",
15
15
  :queue, "Queue",
16
16
  :number_of_calls, "N. Calls",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :number_of_stints, "Number of stints",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :time_interval, "Hangup",
15
15
  :calls_taken_in_time_interval, "N. Calls",
16
16
  :calls_between_lower_interval, "Delta",
@@ -10,7 +10,7 @@ module Queri
10
10
  end
11
11
 
12
12
  def key_translations
13
- Hash[
13
+ ActiveSupport::OrderedHash[
14
14
  :agent, "Agent",
15
15
  :number_of_calls, "N. Calls",
16
16
  :percentage_of_calls, "&nbsp;",
data/lib/queri/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Queri
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/queri.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "queri/version"
2
2
  require "yaml"
3
3
  require "xmlrpc/client"
4
+ require 'active_support/ordered_hash'
4
5
 
5
6
  Dir[ File.join( File.dirname(__FILE__), "**", "*.rb" ) ].each {|f| require f}
6
7
 
data/queri.gemspec CHANGED
@@ -19,6 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
+ spec.add_dependency "activesupport"
23
+
22
24
  spec.add_development_dependency "bundler", "~> 1.3"
23
25
  spec.add_development_dependency "rake"
24
26
  spec.add_development_dependency "rspec", "~> 2.14.1"
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+
3
+ describe Queri::Stats::Distributions::AcdAttemptsByQueue do
4
+ let(:report_class) { Queri::Stats::Distributions::AcdAttemptsByQueue }
5
+ let(:xml_code) { report_class.xml_code }
6
+
7
+ before { Queri.configure_with(File.join(File.dirname(__FILE__), '..', '..', 'config.yml')) }
8
+
9
+ it_behaves_like "a report class"
10
+
11
+ it_behaves_like "a report method"
12
+
13
+ it_behaves_like "a queuemetrics report"
14
+
15
+ it_behaves_like "a stats report"
16
+
17
+ describe "An instance of", Queri::Stats::Distributions::AcdAttemptsByQueue do
18
+ it_behaves_like "a composite aggregate report instance"
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+
3
+ describe Queri::Stats::Distributions::AcdAttemptsByTerminal do
4
+ let(:report_class) { Queri::Stats::Distributions::AcdAttemptsByTerminal }
5
+ let(:xml_code) { report_class.xml_code }
6
+
7
+ before { Queri.configure_with(File.join(File.dirname(__FILE__), '..', '..', 'config.yml')) }
8
+
9
+ it_behaves_like "a report class"
10
+
11
+ it_behaves_like "a report method"
12
+
13
+ it_behaves_like "a queuemetrics report"
14
+
15
+ it_behaves_like "a stats report"
16
+
17
+ describe "An instance of", Queri::Stats::Distributions::AcdAttemptsByTerminal do
18
+ it_behaves_like "a composite aggregate report instance"
19
+ end
20
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe Queri::Stats::Distributions do
4
+ let(:report_class) { Queri::Stats::Distributions }
5
+
6
+ it_behaves_like "a report class"
7
+ end
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+
3
+ describe Queri::Stats::Distributions::InboundAcdCallAttempts do
4
+ let(:report_class) { Queri::Stats::Distributions::InboundAcdCallAttempts }
5
+ let(:xml_code) { report_class.xml_code }
6
+
7
+ before { Queri.configure_with(File.join(File.dirname(__FILE__), '..', '..', 'config.yml')) }
8
+
9
+ it_behaves_like "a report class"
10
+
11
+ it_behaves_like "a report method"
12
+
13
+ it_behaves_like "a queuemetrics report"
14
+
15
+ it_behaves_like "a stats report"
16
+
17
+ describe "An instance of", Queri::Stats::Distributions::InboundAcdCallAttempts do
18
+ it_behaves_like "an aggregate report instance"
19
+ end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Rice
@@ -10,6 +10,20 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -97,6 +111,10 @@ files:
97
111
  - lib/queri/stats/details_of_answered_calls/queue_details.rb
98
112
  - lib/queri/stats/details_of_unanswered_calls.rb
99
113
  - lib/queri/stats/details_of_unanswered_calls/detail_of_unanswered_calls.rb
114
+ - lib/queri/stats/distributions.rb
115
+ - lib/queri/stats/distributions/acd_attempts_by_queue.rb
116
+ - lib/queri/stats/distributions/acd_attempts_by_terminal.rb
117
+ - lib/queri/stats/distributions/inbound_acd_call_attempts.rb
100
118
  - lib/queri/stats/unanswered_calls.rb
101
119
  - lib/queri/stats/unanswered_calls/all_calls.rb
102
120
  - lib/queri/stats/unanswered_calls/all_calls_by_stints.rb
@@ -146,6 +164,10 @@ files:
146
164
  - spec/stats/details_of_answered_calls/queue_details_spec.rb
147
165
  - spec/stats/details_of_unanswered_calls/detail_of_unanswered_calls_spec.rb
148
166
  - spec/stats/details_of_unanswered_calls/details_of_unanswered_calls_spec.rb
167
+ - spec/stats/distributions/acd_attempts_by_queue_spec.rb
168
+ - spec/stats/distributions/acd_attempts_by_terminal_spec.rb
169
+ - spec/stats/distributions/distributions_spec.rb
170
+ - spec/stats/distributions/inbound_acd_call_attempts_spec.rb
149
171
  - spec/stats/stats_spec.rb
150
172
  - spec/stats/unanswered_calls/all_calls_by_stints_spec.rb
151
173
  - spec/stats/unanswered_calls/all_calls_spec.rb
@@ -231,6 +253,10 @@ test_files:
231
253
  - spec/stats/details_of_answered_calls/queue_details_spec.rb
232
254
  - spec/stats/details_of_unanswered_calls/detail_of_unanswered_calls_spec.rb
233
255
  - spec/stats/details_of_unanswered_calls/details_of_unanswered_calls_spec.rb
256
+ - spec/stats/distributions/acd_attempts_by_queue_spec.rb
257
+ - spec/stats/distributions/acd_attempts_by_terminal_spec.rb
258
+ - spec/stats/distributions/distributions_spec.rb
259
+ - spec/stats/distributions/inbound_acd_call_attempts_spec.rb
234
260
  - spec/stats/stats_spec.rb
235
261
  - spec/stats/unanswered_calls/all_calls_by_stints_spec.rb
236
262
  - spec/stats/unanswered_calls/all_calls_spec.rb