Module: RedisMonitor
- Defined in:
- lib/version.rb,
lib/redis_monitor.rb,
lib/command_line_parser.rb
Defined Under Namespace
Classes: CommandLineParser
Constant Summary
collapse
- VERSION =
'0.3.3'
Class Method Summary
collapse
Class Method Details
.base_folder ⇒ Object
17
18
19
|
# File 'lib/redis_monitor.rb', line 17
def self.base_folder
File.dirname(__FILE__)
end
|
.environment ⇒ Object
13
14
15
|
# File 'lib/redis_monitor.rb', line 13
def self.environment
'production'
end
|
.parse_arguments ⇒ Object
.rakefile_path ⇒ Object
21
22
23
|
# File 'lib/redis_monitor.rb', line 21
def self.rakefile_path
"#{base_folder}/engine/Rakefile"
end
|
.run ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'lib/redis_monitor.rb', line 25
def self.run
args = parse_arguments
store_arguments(args)
system("#{base_folder}/engine/bin/rake", '-f', rakefile_path, 'db:migrate', "RAILS_ENV=#{environment}")
system("#{base_folder}/engine/bin/delayed_job", 'restart', "RAILS_ENV=#{environment}")
system("#{base_folder}/engine/bin/rails", 's', '-p', args[:http_port].to_s, '-e', environment)
end
|
.store_arguments(args) ⇒ Object
9
10
11
|
# File 'lib/redis_monitor.rb', line 9
def self.store_arguments(args)
ENV['REDIS_MONITOR_OPTS'] = Base64.encode64(Marshal.dump(args))
end
|