Skip to content

Commit

Permalink
Switched to using require_relative for loading local files (closes #23
Browse files Browse the repository at this point in the history
).
  • Loading branch information
postmodern committed Aug 4, 2024
1 parent 905176c commit 71be293
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 27 deletions.
5 changes: 3 additions & 2 deletions lib/ronin/nmap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/exceptions'
require 'ronin/nmap/importer'
require_relative 'nmap/exceptions'
require_relative 'nmap/importer'

require 'ronin/core/home'
require 'nmap/command'
require 'nmap/xml'
Expand Down
3 changes: 2 additions & 1 deletion lib/ronin/nmap/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/version'
require 'ronin/core/cli/help/banner'

require 'command_kit/commands'
require 'command_kit/commands/auto_load'
require 'command_kit/options/version'

require_relative 'version'

module Ronin
module Nmap
#
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/nmap/cli/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/root'
require_relative '../root'

require 'ronin/core/cli/command'

Expand Down
3 changes: 2 additions & 1 deletion lib/ronin/nmap/cli/commands/completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/root'
require 'ronin/core/cli/completion_command'

require_relative '../../root'

module Ronin
module Nmap
class CLI
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/nmap/cli/commands/convert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/cli/command'
require 'ronin/nmap/converter'
require_relative '../command'
require_relative '../../converter'

module Ronin
module Nmap
Expand Down
6 changes: 3 additions & 3 deletions lib/ronin/nmap/cli/commands/dump.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/cli/command'
require 'ronin/nmap/cli/filtering_options'
require 'nmap/xml'
require_relative '../command'
require_relative '../filtering_options'

require 'nmap/xml'
require 'set'

module Ronin
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/nmap/cli/commands/grep.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/cli/command'
require_relative '../command'

require 'command_kit/colors'
require 'command_kit/printing/indent'
Expand Down
6 changes: 3 additions & 3 deletions lib/ronin/nmap/cli/commands/import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/cli/command'
require 'ronin/nmap/cli/importable'
require 'ronin/nmap/importer'
require_relative '../command'
require_relative '../importable'
require_relative '../../importer'

module Ronin
module Nmap
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/nmap/cli/commands/new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/cli/command'
require 'ronin/nmap/root'
require_relative '../command'
require_relative '../../root'

require 'ronin/core/cli/generator'

Expand Down
5 changes: 3 additions & 2 deletions lib/ronin/nmap/cli/commands/print.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/cli/command'
require 'ronin/nmap/cli/filtering_options'
require_relative '../command'
require_relative '../filtering_options'

require 'nmap/xml'

module Ronin
Expand Down
8 changes: 4 additions & 4 deletions lib/ronin/nmap/cli/commands/scan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/cli/command'
require 'ronin/nmap/cli/importable'
require 'ronin/nmap/converter'
require 'ronin/core/cli/logging'
require_relative '../command'
require_relative '../importable'
require_relative '../../converter'

require 'ronin/core/cli/logging'
require 'tempfile'
require 'set'

Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/nmap/cli/filtering_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/cli/port_list'
require_relative 'port_list'

module Ronin
module Nmap
Expand Down
3 changes: 2 additions & 1 deletion lib/ronin/nmap/cli/importable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/importer'
require_relative '../importer'

require 'ronin/db/cli/database_options'
require 'ronin/db/cli/printing'
require 'ronin/core/cli/logging'
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/nmap/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/converters'
require_relative 'converters'

require 'nmap/xml'

Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/nmap/converters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# along with ronin-nmap. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/nmap/converters/json'
require 'ronin/nmap/converters/csv'
require_relative 'converters/json'
require_relative 'converters/csv'

module Ronin
module Nmap
Expand Down

0 comments on commit 71be293

Please sign in to comment.