Class: Commands::Init::SystemSettingsModel
- Defined in:
- lib/commands/init/system_settings_model.rb
Instance Attribute Summary collapse
-
#configure_settings ⇒ Object
readonly
Returns the value of attribute configure_settings.
-
#security_level ⇒ Object
readonly
Returns the value of attribute security_level.
-
#unicode ⇒ Object
readonly
Returns the value of attribute unicode.
Class Method Summary collapse
Instance Method Summary collapse
-
#execute(p4, super_user) ⇒ Object
If the security level is > 0, we generate the super_user first, change security, then reset the super’s password.
-
#initialize ⇒ SystemSettingsModel
constructor
A new instance of SystemSettingsModel.
-
#rank ⇒ Object
Internal implementation - don’t mess with this ========================================================================.
Methods inherited from InitModel
inheritable_attributes, inherited, run
Constructor Details
#initialize ⇒ SystemSettingsModel
Returns a new instance of SystemSettingsModel.
39 40 41 42 43 |
# File 'lib/commands/init/system_settings_model.rb', line 39 def initialize @unicode = self.class.unicode @security_level = self.class.security_level @configure_settings = self.class.configure_settings end |
Instance Attribute Details
#configure_settings ⇒ Object (readonly)
Returns the value of attribute configure_settings.
37 38 39 |
# File 'lib/commands/init/system_settings_model.rb', line 37 def configure_settings @configure_settings end |
#security_level ⇒ Object (readonly)
Returns the value of attribute security_level.
37 38 39 |
# File 'lib/commands/init/system_settings_model.rb', line 37 def security_level @security_level end |
#unicode ⇒ Object (readonly)
Returns the value of attribute unicode.
37 38 39 |
# File 'lib/commands/init/system_settings_model.rb', line 37 def unicode @unicode end |
Class Method Details
.abstract ⇒ Object
33 34 35 |
# File 'lib/commands/init/system_settings_model.rb', line 33 def self.abstract true end |
Instance Method Details
#execute(p4, super_user) ⇒ Object
If the security level is > 0, we generate the super_user first, change security, then reset the super’s password. The p4 connection is established here with whatever credentials we end up with the super user as.
49 50 51 52 53 54 |
# File 'lib/commands/init/system_settings_model.rb', line 49 def execute(p4, super_user) puts 'initializing system settings' set_unicode_mode(p4) set_security_and_super_user(p4, super_user) create_default_protections(p4) end |
#rank ⇒ Object
Internal implementation - don’t mess with this
29 30 31 |
# File 'lib/commands/init/system_settings_model.rb', line 29 def rank 0 end |