Class: RedmineInstaller::Environment
- Inherits:
-
TaskModule
- Object
- TaskModule
- RedmineInstaller::Environment
- Defined in:
- lib/redmine-installer/environment.rb
Constant Summary
Constants included from Utils
Instance Attribute Summary
Attributes inherited from TaskModule
Instance Method Summary collapse
Methods inherited from TaskModule
Methods included from Utils
#class_name, #create_dir, #env_user, #error, #logger, #ok, #pastel, #print_title, #prompt, #run_command
Constructor Details
This class inherits a constructor from RedmineInstaller::TaskModule
Instance Method Details
#check ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/redmine-installer/environment.rb', line 4 def check if user_is_root? && !task..enable_user_root error 'You cannot install redmine under root. Please change user.' end if Gem::Version.new(RUBY_VERSION) < Gem::Version.new(RedmineInstaller::MIN_SUPPORTED_RUBY) error "You are using unsupported ruby. Please install at least #{RedmineInstaller::MIN_SUPPORTED_RUBY}." end logger.info 'Environemnt checked' end |
#user_is_root? ⇒ Boolean
16 17 18 |
# File 'lib/redmine-installer/environment.rb', line 16 def user_is_root? Process.euid == 0 end |