Module: DaemonKit

Defined in:
lib/daemon_kit.rb,
lib/daemon_kit/em.rb,
lib/daemon_kit/xmpp.rb,
lib/daemon_kit/cron.rb,
lib/daemon_kit/config.rb,
lib/daemon_kit/dk_sqs.rb,
lib/daemon_kit/jabber.rb,
lib/daemon_kit/version.rb,
lib/daemon_kit/dk_amqp.rb,
lib/daemon_kit/pid_file.rb,
lib/daemon_kit/arguments.rb,
lib/daemon_kit/generators.rb,
lib/daemon_kit/exceptions.rb,
lib/daemon_kit/initializer.rb,
lib/daemon_kit/application.rb,
lib/daemon_kit/cucumber/world.rb,
lib/daemon_kit/ruote_workitem.rb,
lib/daemon_kit/generators/base.rb,
lib/daemon_kit/abstract_logger.rb,
lib/daemon_kit/ruote_participants.rb,
lib/daemon_kit/core_ext/configurable.rb,
lib/daemon_kit/ruote_pseudo_participant.rb,
lib/generators/daemon_kit/app/app_generator.rb,
lib/generators/daemon_kit/sqs/sqs_generator.rb,
lib/generators/daemon_kit/xmpp/xmpp_generator.rb,
lib/generators/daemon_kit/amqp/amqp_generator.rb,
lib/generators/daemon_kit/cron/cron_generator.rb,
lib/generators/daemon_kit/rspec/rspec_generator.rb,
lib/generators/daemon_kit/ruote/ruote_generator.rb,
lib/generators/daemon_kit/app/templates/config/boot.rb,
lib/generators/daemon_kit/cucumber/cucumber_generator.rb,
lib/generators/daemon_kit/test_unit/test_unit_generator.rb,
lib/generators/daemon_kit/capistrano/capistrano_generator.rb

Defined Under Namespace

Modules: Configurable, Cucumber, Generators Classes: AMQP, AbstractLogger, Application, Arguments, Boot, Config, Configuration, Cron, DaemonNotFound, EM, Exception, GemBoot, Initializer, Jabber, MissingParticipant, PidFile, RuoteParticipants, RuotePseudoParticipant, RuoteWorkitem, SQS, XMPP

Class Method Summary (collapse)

Class Method Details

+ (Object) arguments



23
24
25
# File 'lib/daemon_kit/initializer.rb', line 23

def arguments
  @arguments
end

+ (Object) arguments=(args)



27
28
29
# File 'lib/daemon_kit/initializer.rb', line 27

def arguments=( args )
  @arguments = args
end

+ (Object) at_shutdown(&block)



35
36
37
# File 'lib/daemon_kit/initializer.rb', line 35

def at_shutdown( &block )
  self.configuration.at_shutdown( &block )
end

+ (Object) boot!



11
12
13
14
15
# File 'lib/generators/daemon_kit/app/templates/config/boot.rb', line 11

def boot!
  unless booted?
    GemBoot.new.run
  end
end

+ (Boolean) booted?

Returns:

  • (Boolean)


17
18
19
# File 'lib/generators/daemon_kit/app/templates/config/boot.rb', line 17

def booted?
  defined? DaemonKit::Initializer
end

+ (Object) configuration



15
16
17
# File 'lib/daemon_kit/initializer.rb', line 15

def configuration
  @configuration
end

+ (Object) configuration=(configuration)



19
20
21
# File 'lib/daemon_kit/initializer.rb', line 19

def configuration=( configuration )
  @configuration = configuration
end

+ (Object) env



52
53
54
# File 'lib/daemon_kit.rb', line 52

def env
  DAEMON_ENV
end

+ (Object) framework_root



56
57
58
# File 'lib/daemon_kit.rb', line 56

def framework_root
  @framework_root ||= File.join( File.dirname(__FILE__), '..' ).to_absolute_path
end

+ (Object) logger



40
41
42
# File 'lib/daemon_kit.rb', line 40

def logger
  @logger
end

+ (Object) logger=(logger)



44
45
46
# File 'lib/daemon_kit.rb', line 44

def logger=( logger )
  @logger = logger
end

+ (Object) root



48
49
50
# File 'lib/daemon_kit.rb', line 48

def root
  DAEMON_ROOT
end

+ (Object) trap(*args, &block)



31
32
33
# File 'lib/daemon_kit/initializer.rb', line 31

def trap( *args, &block )
  self.configuration.trap( *args, &block )
end

+ (Object) version



3
4
5
# File 'lib/daemon_kit/version.rb', line 3

def version
  '0.3.1'
end