Browse Source

Wrap comments at 80

James Lee 5 years ago
parent
commit
6a72572237
No account linked to committer's email address

+ 11
- 7
lib/metasploit/framework/command.rb View File

@@ -2,21 +2,25 @@
2 2
 # Gems
3 3
 #
4 4
 
5
-# have to be exact so minimum is loaded prior to parsing arguments which could influence loading.
5
+# have to be exact so minimum is loaded prior to parsing arguments which could
6
+# influence loading.
6 7
 require 'active_support/dependencies/autoload'
7 8
 
8
-# @note Must use the nested declaration of the {Metasploit::Framework::Command} namespace because commands need to be
9
-# able to be required directly without any other part of metasploit-framework besides config/boot so that the commands
10
-# can parse arguments, setup RAILS_ENV, and load config/application.rb correctly.
9
+# @note Must use the nested declaration of the
10
+# {Metasploit::Framework::Command} namespace because commands need to be able
11
+# to be required directly without any other part of metasploit-framework
12
+# besides config/boot so that the commands can parse arguments, setup
13
+# RAILS_ENV, and load config/application.rb correctly.
11 14
 module Metasploit
12 15
   module Framework
13 16
     module Command
14
-      # Namespace for commands for metasploit-framework.  There are corresponding classes in the
15
-      # {Metasploit::Framework::ParsedOptions} namespace, which handle for parsing the options for each command.
17
+      # Namespace for commands for metasploit-framework.  There are
18
+      # corresponding classes in the {Metasploit::Framework::ParsedOptions}
19
+      # namespace, which handle for parsing the options for each command.
16 20
       extend ActiveSupport::Autoload
17 21
 
18 22
       autoload :Base
19 23
       autoload :Console
20 24
     end
21 25
   end
22
-end
26
+end

+ 9
- 6
lib/metasploit/framework/command/base.rb View File

@@ -34,11 +34,13 @@ class Metasploit::Framework::Command::Base
34 34
   # Class Methods
35 35
   #
36 36
 
37
-  # @note {require_environment!} should be called to load `config/application.rb` to so that the RAILS_ENV can be set
38
-  #   from the command line options in `ARGV` prior to `Rails.env` being set.
37
+  # @note {require_environment!} should be called to load
38
+  #   `config/application.rb` to so that the RAILS_ENV can be set from the
39
+  #   command line options in `ARGV` prior to `Rails.env` being set.
39 40
   # @note After returning, `Rails.application` will be defined and configured.
40 41
   #
41
-  # Parses `ARGV` for command line arguments to configure the `Rails.application`.
42
+  # Parses `ARGV` for command line arguments to configure the
43
+  # `Rails.application`.
42 44
   #
43 45
   # @return (see parsed_options)
44 46
   def self.require_environment!
@@ -50,8 +52,9 @@ class Metasploit::Framework::Command::Base
50 52
     # @see https://github.com/rails/rails/blob/v3.2.17/railties/lib/rails/commands.rb#L39-L40
51 53
     require Pathname.new(__FILE__).parent.parent.parent.parent.parent.join('config', 'application')
52 54
 
53
-    # have to configure before requiring environment because config/environment.rb calls initialize! and the initializers
54
-    # will use the configuration from the parsed options.
55
+    # have to configure before requiring environment because
56
+    # config/environment.rb calls initialize! and the initializers will use
57
+    # the configuration from the parsed options.
55 58
     parsed_options.configure(Rails.application)
56 59
 
57 60
     # support disabling the database
@@ -104,4 +107,4 @@ class Metasploit::Framework::Command::Base
104 107
   def start
105 108
     raise NotImplementedError
106 109
   end
107
-end
110
+end

+ 10
- 7
lib/metasploit/framework/parsed_options.rb View File

@@ -4,15 +4,18 @@
4 4
 
5 5
 require 'active_support/dependencies/autoload'
6 6
 
7
-# # @note Must use the nested declaration of the {Metasploit::Framework::ParsedOptions} namespace because commands,
8
-# which use parsed options, need to be able to be required directly without any other part of metasploit-framework
9
-# besides config/boot so that the commands can parse arguments, setup RAILS_ENV, and load config/application.rb
10
-# correctly.
7
+# @note Must use the nested declaration of the
8
+#   {Metasploit::Framework::ParsedOptions} namespace because commands, which
9
+#   use parsed options, need to be able to be required directly without any
10
+#   other part of metasploit-framework besides config/boot so that the
11
+#   commands can parse arguments, setup RAILS_ENV, and load
12
+#   config/application.rb correctly.
11 13
 module Metasploit
12 14
   module Framework
13
-    # Namespace for parsed options for {Metasploit::Framework::Command commands}.  The names of `Class`es in this
14
-    # namespace correspond to the name of the `Class` in the {Metasploit::Framework::Command} namespace for which this
15
-    # namespace's `Class` parses options.
15
+    # Namespace for parsed options for {Metasploit::Framework::Command
16
+    # commands}.  The names of `Class`es in this namespace correspond to the
17
+    # name of the `Class` in the {Metasploit::Framework::Command} namespace
18
+    # for which this namespace's `Class` parses options.
16 19
     module ParsedOptions
17 20
       extend ActiveSupport::Autoload
18 21
 

+ 5
- 4
lib/metasploit/framework/parsed_options/base.rb View File

@@ -17,14 +17,15 @@ require 'active_support/ordered_options'
17 17
 require 'metasploit/framework/parsed_options'
18 18
 require 'msf/base/config'
19 19
 
20
-# Options parsed from the command line that can be used to change the `Metasploit::Framework::Application.config` and
21
-# `Rails.env`
20
+# Options parsed from the command line that can be used to change the
21
+# `Metasploit::Framework::Application.config` and `Rails.env`
22 22
 class Metasploit::Framework::ParsedOptions::Base
23 23
   #
24 24
   # CONSTANTS
25 25
   #
26 26
 
27
-  # msfconsole boots in production mode instead of the normal rails default of development.
27
+  # msfconsole boots in production mode instead of the normal rails default of
28
+  # development.
28 29
   DEFAULT_ENVIRONMENT = 'production'
29 30
 
30 31
   #
@@ -179,4 +180,4 @@ class Metasploit::Framework::ParsedOptions::Base
179 180
       end
180 181
     }
181 182
   end
182
-end
183
+end

+ 1
- 1
lib/metasploit/framework/parsed_options/console.rb View File

@@ -70,4 +70,4 @@ class Metasploit::Framework::ParsedOptions::Console < Metasploit::Framework::Par
70 70
 
71 71
     @option_parser
72 72
   end
73
-end
73
+end

Loading…
Cancel
Save