Skip to content

Commit

Permalink
Switched to require_relative for loading local files (closes #79).
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Aug 4, 2024
1 parent 7b96e3f commit bd3e0fd
Show file tree
Hide file tree
Showing 32 changed files with 62 additions and 60 deletions.
6 changes: 3 additions & 3 deletions lib/ronin/db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
# along with ronin-db. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/db/exceptions'
require 'ronin/db/config_file'
require 'ronin/db/version'
require_relative 'db/exceptions'
require_relative 'db/config_file'
require_relative 'db/version'

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

require 'ronin/db/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 DB
#
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/db/cli/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-db. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/db/root'
require_relative '../root'

require 'ronin/core/cli/command'

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

require 'ronin/db/cli/command'
require 'ronin/db/cli/uri_methods'
require 'ronin/db/config_file'
require_relative '../command'
require_relative '../uri_methods'
require_relative '../../config_file'

require 'command_kit/options/verbose'
require 'command_kit/printing'
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/db/cli/commands/asn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
# along with ronin-db. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/db/cli/model_command'
require 'ronin/core/cli/logging'
require_relative '../model_command'

require 'ronin/core/cli/logging'
require 'ronin/support/network/asn'
require 'ronin/support/network/asn/list'

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

require 'ronin/db/cli/model_command'
require_relative '../model_command'

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

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

require_relative '../../root'

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

require 'ronin/db/cli/model_command'
require 'ronin/db/cli/modifiable'
require_relative '../model_command'
require_relative '../modifiable'

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

require 'ronin/db/cli/command'
require 'ronin/db/config_file'
require_relative '../command'
require_relative '../../config_file'

require 'command_kit/edit'

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

require 'ronin/db/cli/model_command'
require 'ronin/db/cli/modifiable'
require_relative '../model_command'
require_relative '../modifiable'

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

require 'ronin/db/cli/model_command'
require 'ronin/db/cli/modifiable'
require_relative '../model_command'
require_relative '../modifiable'

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

require 'ronin/db/cli/model_command'
require 'ronin/db/cli/modifiable'
require_relative '../model_command'
require_relative '../modifiable'

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

require 'ronin/db/cli/command'
require 'ronin/db/cli/database_options'
require 'ronin/db/cli/ruby_shell'
require_relative '../command'
require_relative '../database_options'
require_relative '../ruby_shell'

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

require 'ronin/db/cli/command'
require 'ronin/db/config_file'
require_relative '../command'
require_relative '../../config_file'

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

require 'ronin/db/cli/command'
require 'ronin/db/cli/database_options'
require 'ronin/db'
require_relative '../command'
require_relative '../database_options'
require_relative '../../../db'

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

require 'ronin/db/cli/model_command'
require_relative '../model_command'

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

require 'ronin/db/cli/model_command'
require_relative '../model_command'

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

require 'ronin/db/cli/model_command'
require 'ronin/db/cli/modifiable'
require_relative '../model_command'
require_relative '../modifiable'

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

require 'ronin/db/cli/model_command'
require 'ronin/db/cli/modifiable'
require_relative '../model_command'
require_relative '../modifiable'

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

require 'ronin/db/cli/model_command'
require 'ronin/db/cli/modifiable'
require_relative '../model_command'
require_relative '../modifiable'

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

require 'ronin/db/cli/model_command'
require 'ronin/db/cli/modifiable'
require_relative '../model_command'
require_relative '../modifiable'

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

require 'ronin/db/cli/command'
require 'ronin/db/config_file'
require_relative '../command'
require_relative '../../config_file'

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

require 'ronin/db/cli/model_command'
require 'ronin/db/cli/modifiable'
require_relative '../model_command'
require_relative '../modifiable'

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

require 'ronin/db/cli/model_command'
require_relative '../model_command'

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

require 'ronin/db/cli/model_command'
require_relative '../model_command'

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

require 'ronin/db/cli/model_command'
require 'ronin/db/cli/modifiable'
require_relative '../model_command'
require_relative '../modifiable'

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

require 'ronin/db/cli/model_command'
require_relative '../model_command'

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

require 'ronin/db/cli/uri_methods'
require 'ronin/db'
require_relative 'uri_methods'
require_relative '../../db'

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

require 'ronin/db/cli/command'
require 'ronin/db/cli/database_options'
require 'ronin/core/cli/logging'
require_relative 'command'
require_relative 'database_options'

require 'ronin/core/cli/logging'
require 'command_kit/options/verbose'

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

require 'ronin/db/cli/deletable'
require 'ronin/db/cli/importable'
require_relative 'deletable'
require_relative 'importable'

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

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

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

require 'ronin/db/exceptions'
require 'ronin/db/home'
require_relative 'exceptions'
require_relative 'home'

require 'fileutils'
require 'yaml'
Expand Down

0 comments on commit bd3e0fd

Please sign in to comment.