Module: RedStorm

Defined in:
lib/red_storm/version.rb,
lib/red_storm/loggable.rb,
lib/red_storm/application.rb,
lib/red_storm/environment.rb,
lib/red_storm/simple_bolt.rb,
lib/red_storm/configurator.rb,
lib/red_storm/simple_spout.rb,
lib/red_storm/configuration.rb,
lib/red_storm/simple_topology.rb,
lib/red_storm/simple_drpc_topology.rb

Defined Under Namespace

Modules: Configuration, Loggable Classes: Application, Configurator, InputBoltDefinition, SimpleBolt, SimpleDRPCTopology, SimpleSpout, SimpleTopology, TopologyDefinitionError

Constant Summary collapse

VERSION =
'0.6.6'
LAUNCH_PATH =
File.expand_path(File.dirname(__FILE__))
JAR_CONTEXT =
!!(LAUNCH_PATH =~ /\.jar!\/red_storm$/)
BASE_PATH =
Dir.pwd
REDSTORM_HOME =
File.expand_path(LAUNCH_PATH + '/../..')
TARGET_PATH =
"#{BASE_PATH}/target"
GEM_PATH =
"#{TARGET_PATH}/gems/"

Class Method Summary collapse

Class Method Details

.current_ruby_modeObject



22
23
24
25
26
# File 'lib/red_storm/environment.rb', line 22

def current_ruby_mode
  RUBY_VERSION =~ /(\d+\.\d+)(\.\d+)*/
  raise("unknown Ruby version #{$1}") unless $1 == "1.8" || $1 == "1.9"
  $1
end

.jruby_mode_token(ruby_version = nil) ⇒ Object



28
29
30
31
# File 'lib/red_storm/environment.rb', line 28

def jruby_mode_token(ruby_version = nil)
  version_map = {"1.8" => "RUBY1_8", "--1.8" => "RUBY1_8", "1.9" => "RUBY1_9", "--1.9" => "RUBY1_9"}
  version_map[ruby_version.to_s] || version_map[RedStorm.current_ruby_mode]
end