Module: Wonkavision

Defined in:
lib/wonkavision.rb,
lib/wonkavision/event.rb,
lib/wonkavision/facts.rb,
lib/wonkavision/plugins.rb,
lib/wonkavision/version.rb,
lib/wonkavision/aggregation.rb,
lib/wonkavision/event_binding.rb,
lib/wonkavision/event_context.rb,
lib/wonkavision/event_handler.rb,
lib/wonkavision/message_mapper.rb,
lib/wonkavision/event_namespace.rb,
lib/wonkavision/local_job_queue.rb,
lib/wonkavision/plugins/timeline.rb,
lib/wonkavision/event_coordinator.rb,
lib/wonkavision/extensions/symbol.rb,
lib/wonkavision/persistence/mongo.rb,
lib/wonkavision/plugins/callbacks.rb,
lib/wonkavision/event_path_segment.rb,
lib/wonkavision/message_mapper/map.rb,
lib/wonkavision/acts_as_oompa_loompa.rb,
lib/wonkavision/plugins/event_handling.rb,
lib/wonkavision/plugins/analytics/facts.rb,
lib/wonkavision/plugins/analytics/query.rb,
lib/wonkavision/plugins/analytics/cellset.rb,
lib/wonkavision/plugins/business_activity.rb,
lib/wonkavision/persistence/mongoid_adapter.rb,
lib/wonkavision/plugins/analytics/aggregation.rb,
lib/wonkavision/plugins/analytics/member_filter.rb,
lib/wonkavision/persistence/mongo_mapper_adapter.rb,
lib/wonkavision/message_mapper/indifferent_access.rb,
lib/wonkavision/plugins/analytics/persistence/store.rb,
lib/wonkavision/plugins/analytics/aggregation/measure.rb,
lib/wonkavision/plugins/analytics/aggregation/attribute.rb,
lib/wonkavision/plugins/analytics/aggregation/dimension.rb,
lib/wonkavision/plugins/business_activity/event_binding.rb,
lib/wonkavision/plugins/analytics/persistence/hash_store.rb,
lib/wonkavision/plugins/analytics/persistence/mongo_store.rb,
lib/wonkavision/plugins/analytics/handlers/apply_aggregation.rb,
lib/wonkavision/plugins/analytics/aggregation/aggregation_spec.rb,
lib/wonkavision/plugins/analytics/handlers/split_by_aggregation.rb

Overview

This class is based off of github.com/josephruscio/aggregate and github.com/afurmanov/aggregate

Copyright © 2009 Joseph Ruscio

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Defined Under Namespace

Modules: ActsAsOompaLoompa, Aggregation, Analytics, EventHandler, Extensions, Facts, MessageMapper, Mongo, Mongoid, Persistence, Plugins Classes: Event, EventBinding, EventContext, EventCoordinator, EventNamespace, EventPathSegment, LocalJobQueue, WonkavisionError

Constant Summary collapse

NaN =
0.0 / 0.0
VERSION =
'0.6.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.event_path_separatorObject

Returns the value of attribute event_path_separator.



61
62
63
# File 'lib/wonkavision.rb', line 61

def event_path_separator
  @event_path_separator
end

Class Method Details

.event_coordinatorObject



63
64
65
# File 'lib/wonkavision.rb', line 63

def event_coordinator
  @event_coordinator ||= Wonkavision::EventCoordinator.new
end

.is_absolute_path(path) ⇒ Object



75
76
77
# File 'lib/wonkavision.rb', line 75

def is_absolute_path(path)
  path.to_s[0..0] == event_path_separator
end

.join(*args) ⇒ Object



83
84
85
86
# File 'lib/wonkavision.rb', line 83

def join (*args)
  args.map!{|segment|normalize_event_path(segment)}
  args.reject{|segment|segment.blank?}.join(event_path_separator)
end

.namespace_wildcard_characterObject



71
72
73
# File 'lib/wonkavision.rb', line 71

def namespace_wildcard_character
  @namespace_wildcard_character = "*"
end

.normalize_event_path(event_path) ⇒ Object



79
80
81
# File 'lib/wonkavision.rb', line 79

def normalize_event_path(event_path)
  event_path.to_s.split(event_path_separator).map{|s|s.underscore}.join(event_path_separator)
end

.split(event_path) ⇒ Object



88
89
90
# File 'lib/wonkavision.rb', line 88

def split(event_path)
  event_path.split(event_path_separator)
end