dev_suite 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +37 -0
- data/Gemfile +13 -6
- data/Gemfile.lock +9 -1
- data/README.md +66 -2
- data/dev_suite.gemspec +1 -0
- data/lib/dev_suite/cli/commands/base.rb +0 -30
- data/lib/dev_suite/cli/commands/tree.rb +29 -8
- data/lib/dev_suite/cli/commands/version.rb +1 -1
- data/lib/dev_suite/cli/main.rb +12 -9
- data/lib/dev_suite/dev_suite.rb +12 -0
- data/lib/dev_suite/directory_tree/config/config.rb +11 -0
- data/lib/dev_suite/directory_tree/config/configuration.rb +21 -0
- data/lib/dev_suite/directory_tree/config.rb +2 -11
- data/lib/dev_suite/directory_tree/directory_tree.rb +20 -0
- data/lib/dev_suite/directory_tree/renderer/base.rb +0 -6
- data/lib/dev_suite/directory_tree/renderer/simple.rb +3 -3
- data/lib/dev_suite/directory_tree/visualizer/base.rb +13 -0
- data/lib/dev_suite/directory_tree/visualizer/tree.rb +50 -0
- data/lib/dev_suite/directory_tree/visualizer.rb +14 -13
- data/lib/dev_suite/directory_tree.rb +1 -8
- data/lib/dev_suite/performance/analyzer.rb +1 -1
- data/lib/dev_suite/performance/config/config.rb +11 -0
- data/lib/dev_suite/performance/config/configuration.rb +30 -0
- data/lib/dev_suite/performance/config.rb +2 -10
- data/lib/dev_suite/performance/{reportor → reporter}/base.rb +1 -1
- data/lib/dev_suite/performance/{reportor → reporter}/helpers/stat_mappings.rb +1 -1
- data/lib/dev_suite/performance/{reportor → reporter}/helpers/table_builder.rb +1 -1
- data/lib/dev_suite/performance/{reportor → reporter}/helpers.rb +1 -1
- data/lib/dev_suite/performance/{reportor → reporter}/simple.rb +1 -1
- data/lib/dev_suite/performance/reporter.rb +22 -0
- data/lib/dev_suite/performance.rb +1 -1
- data/lib/dev_suite/request_logger/adapter/adapter.rb +27 -0
- data/lib/dev_suite/request_logger/adapter/base.rb +17 -0
- data/lib/dev_suite/request_logger/adapter/net_http.rb +42 -0
- data/lib/dev_suite/request_logger/adapter.rb +9 -0
- data/lib/dev_suite/request_logger/config/config.rb +11 -0
- data/lib/dev_suite/request_logger/config/configuration.rb +24 -0
- data/lib/dev_suite/request_logger/config.rb +9 -0
- data/lib/dev_suite/request_logger/logger.rb +93 -0
- data/lib/dev_suite/request_logger/request_logger.rb +29 -0
- data/lib/dev_suite/request_logger.rb +7 -0
- data/lib/dev_suite/utils/color/color.rb +12 -0
- data/lib/dev_suite/utils/color/config/config.rb +13 -0
- data/lib/dev_suite/utils/color/config/configuration.rb +31 -0
- data/lib/dev_suite/utils/color/config.rb +2 -31
- data/lib/dev_suite/utils/color/strategy/theme.rb +6 -7
- data/lib/dev_suite/utils/color/strategy.rb +2 -4
- data/lib/dev_suite/utils/color.rb +1 -4
- data/lib/dev_suite/utils/construct/config/attribute/attribute.rb +15 -0
- data/lib/dev_suite/utils/construct/config/attribute/manager.rb +63 -0
- data/lib/dev_suite/utils/construct/config/attribute/resolver.rb +31 -0
- data/lib/dev_suite/utils/construct/config/attribute/validator.rb +55 -0
- data/lib/dev_suite/utils/construct/config/attribute.rb +13 -0
- data/lib/dev_suite/utils/construct/config/base.rb +20 -0
- data/lib/dev_suite/utils/construct/config/config.rb +24 -0
- data/lib/dev_suite/utils/construct/config/configuration.rb +13 -0
- data/lib/dev_suite/utils/construct/config/hook/hook.rb +13 -0
- data/lib/dev_suite/utils/construct/config/hook/manager.rb +36 -0
- data/lib/dev_suite/utils/construct/config/hook.rb +13 -0
- data/lib/dev_suite/utils/construct/config/initializer.rb +21 -0
- data/lib/dev_suite/utils/construct/config/manager.rb +33 -0
- data/lib/dev_suite/utils/construct/config/settings/base.rb +59 -0
- data/lib/dev_suite/utils/construct/config/settings/manager.rb +38 -0
- data/lib/dev_suite/utils/construct/config/settings/settings.rb +14 -0
- data/lib/dev_suite/utils/construct/config/settings.rb +13 -0
- data/lib/dev_suite/utils/construct/config.rb +11 -0
- data/lib/dev_suite/utils/construct/construct.rb +9 -0
- data/lib/dev_suite/utils/construct.rb +16 -0
- data/lib/dev_suite/utils/emoji.rb +71 -0
- data/lib/dev_suite/utils/error_handler.rb +24 -0
- data/lib/dev_suite/utils/file_loader/config/config.rb +13 -0
- data/lib/dev_suite/utils/file_loader/config/configuration.rb +33 -0
- data/lib/dev_suite/utils/file_loader/config.rb +11 -0
- data/lib/dev_suite/utils/file_loader/file_loader.rb +23 -0
- data/lib/dev_suite/utils/file_loader/loader/base.rb +21 -0
- data/lib/dev_suite/utils/file_loader/loader/json.rb +21 -0
- data/lib/dev_suite/utils/file_loader/loader/text.rb +21 -0
- data/lib/dev_suite/utils/file_loader/loader/yaml.rb +38 -0
- data/lib/dev_suite/utils/file_loader/loader.rb +41 -0
- data/lib/dev_suite/utils/file_loader/loader_manager.rb +34 -0
- data/lib/dev_suite/utils/file_loader/loader_registry.rb +36 -0
- data/lib/dev_suite/utils/file_loader.rb +9 -0
- data/lib/dev_suite/utils/logger.rb +58 -0
- data/lib/dev_suite/utils/path_matcher/matcher.rb +31 -0
- data/lib/dev_suite/utils/path_matcher/path_matcher.rb +17 -0
- data/lib/dev_suite/utils/path_matcher/pattern.rb +35 -0
- data/lib/dev_suite/utils/path_matcher.rb +9 -0
- data/lib/dev_suite/utils/table/config/config.rb +13 -0
- data/lib/dev_suite/utils/table/config/configuration.rb +32 -0
- data/lib/dev_suite/utils/table/config.rb +2 -23
- data/lib/dev_suite/utils/table/renderer/base.rb +0 -6
- data/lib/dev_suite/utils/table/renderer/simple.rb +9 -5
- data/lib/dev_suite/utils/table/renderer.rb +2 -2
- data/lib/dev_suite/utils/table/table.rb +6 -0
- data/lib/dev_suite/utils/table.rb +0 -6
- data/lib/dev_suite/utils/utils.rb +14 -0
- data/lib/dev_suite/utils.rb +1 -3
- data/lib/dev_suite/version.rb +1 -1
- data/lib/dev_suite.rb +1 -8
- metadata +72 -13
- data/lib/dev_suite/directory_tree/settings.rb +0 -29
- data/lib/dev_suite/performance/reportor.rb +0 -22
- data/lib/dev_suite/utils/config_tools/configuration.rb +0 -41
- data/lib/dev_suite/utils/config_tools/settings.rb +0 -75
- data/lib/dev_suite/utils/config_tools.rb +0 -10
- data/lib/dev_suite/utils/table/settings.rb +0 -34
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DevSuite
|
4
|
+
module Utils
|
5
|
+
module FileLoader
|
6
|
+
module Loader
|
7
|
+
require_relative "loader/base"
|
8
|
+
require_relative "loader/text"
|
9
|
+
require_relative "loader/json"
|
10
|
+
require_relative "loader/yaml"
|
11
|
+
|
12
|
+
class << self
|
13
|
+
def registry_loaders(registry, loader_symbols)
|
14
|
+
loader_classes = map_loaders(loader_symbols)
|
15
|
+
loader_classes.each do |loader|
|
16
|
+
registry.register(loader)
|
17
|
+
end
|
18
|
+
registry
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def map_loaders(loader_symbols)
|
24
|
+
loader_symbols.map do |symbol|
|
25
|
+
case symbol
|
26
|
+
when :json
|
27
|
+
Loader::Json
|
28
|
+
when :text
|
29
|
+
Loader::Text
|
30
|
+
when :yaml
|
31
|
+
Loader::Yaml
|
32
|
+
else
|
33
|
+
raise "Unknown loader: #{symbol}"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DevSuite
|
4
|
+
module Utils
|
5
|
+
module FileLoader
|
6
|
+
class LoaderManager
|
7
|
+
def load(path)
|
8
|
+
loader = find_loader_for(path)
|
9
|
+
loader.load(path)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def find_loader_for(path)
|
15
|
+
extension = extract_extension(path)
|
16
|
+
loader = registry.find_loader(extension)
|
17
|
+
raise LoaderNotFoundError, "No loader registered for #{extension}" unless loader
|
18
|
+
|
19
|
+
loader
|
20
|
+
end
|
21
|
+
|
22
|
+
def extract_extension(path)
|
23
|
+
::File.extname(path).delete_prefix(".")
|
24
|
+
end
|
25
|
+
|
26
|
+
def registry
|
27
|
+
Config.configuration.registry
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
class LoaderNotFoundError < StandardError; end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DevSuite
|
4
|
+
module Utils
|
5
|
+
module FileLoader
|
6
|
+
class LoaderRegistry
|
7
|
+
def initialize
|
8
|
+
@registry = {}
|
9
|
+
end
|
10
|
+
|
11
|
+
def register(loader_class)
|
12
|
+
loader = loader_class.new
|
13
|
+
loader_class.extensions.each do |ext|
|
14
|
+
@registry[ext] = loader
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def clear
|
19
|
+
@registry.clear
|
20
|
+
end
|
21
|
+
|
22
|
+
def find_loader(extension)
|
23
|
+
@registry[extension]
|
24
|
+
end
|
25
|
+
|
26
|
+
def registered_extensions
|
27
|
+
@registry.keys
|
28
|
+
end
|
29
|
+
|
30
|
+
def registered_loaders
|
31
|
+
@registry.values.uniq
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DevSuite
|
4
|
+
module Utils
|
5
|
+
module Logger
|
6
|
+
LOG_DETAILS = {
|
7
|
+
info: { prefix: "[INFO]", color: :green },
|
8
|
+
warn: { prefix: "[WARNING]", color: :yellow },
|
9
|
+
error: { prefix: "[ERROR]", color: :red },
|
10
|
+
debug: { prefix: "[DEBUG]", color: :blue },
|
11
|
+
}.freeze
|
12
|
+
|
13
|
+
class << self
|
14
|
+
# Logs a message with an optional emoji and specified log level.
|
15
|
+
#
|
16
|
+
# @param message [String] The message to log.
|
17
|
+
# @param level [Symbol] The log level (:info, :warn, :error, :debug).
|
18
|
+
# @param emoji [String, Symbol] Optional emoji to prepend to the message.
|
19
|
+
def log(message, level: :info, emoji: nil)
|
20
|
+
emoji_icon = resolve_emoji(emoji)
|
21
|
+
formatted_message = format_message("#{emoji_icon} #{message}", level)
|
22
|
+
output_log(formatted_message)
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
# Resolves the emoji, either from a symbol or directly as a string.
|
28
|
+
#
|
29
|
+
# @param emoji [String, Symbol, nil] The emoji or its symbol key.
|
30
|
+
# @return [String] The resolved emoji or an empty string if none is provided.
|
31
|
+
def resolve_emoji(emoji)
|
32
|
+
return "" unless emoji
|
33
|
+
|
34
|
+
emoji.is_a?(Symbol) ? Emoji.get(emoji) : emoji
|
35
|
+
end
|
36
|
+
|
37
|
+
# Formats the log message with the appropriate prefix and color.
|
38
|
+
#
|
39
|
+
# @param message [String] The message to format.
|
40
|
+
# @param level [Symbol] The log level (:info, :warn, :error, :debug).
|
41
|
+
# @return [String] The formatted log message.
|
42
|
+
def format_message(message, level)
|
43
|
+
details = LOG_DETAILS[level]
|
44
|
+
raise ArgumentError, "Invalid log level: #{level}" unless details
|
45
|
+
|
46
|
+
Utils::Color.colorize("#{details[:prefix]} #{message}", color: details[:color])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Outputs the formatted log message to the console.
|
50
|
+
#
|
51
|
+
# @param formatted_message [String] The message to output.
|
52
|
+
def output_log(formatted_message)
|
53
|
+
puts formatted_message if formatted_message
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DevSuite
|
4
|
+
module Utils
|
5
|
+
module PathMatcher
|
6
|
+
class Matcher
|
7
|
+
def initialize(includes: [], excludes: [])
|
8
|
+
@include_patterns = includes.map { |pattern| Pattern.new(pattern) }
|
9
|
+
@exclude_patterns = excludes.map { |pattern| Pattern.new(pattern) }
|
10
|
+
end
|
11
|
+
|
12
|
+
def match?(path)
|
13
|
+
return false if excluded?(path)
|
14
|
+
return true if included?(path)
|
15
|
+
|
16
|
+
false
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def included?(path)
|
22
|
+
@include_patterns.empty? || @include_patterns.any? { |pattern| pattern.match?(path) }
|
23
|
+
end
|
24
|
+
|
25
|
+
def excluded?(path)
|
26
|
+
@exclude_patterns.any? { |pattern| pattern.match?(path) }
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DevSuite
|
4
|
+
module Utils
|
5
|
+
module PathMatcher
|
6
|
+
require_relative "pattern"
|
7
|
+
require_relative "matcher"
|
8
|
+
|
9
|
+
class << self
|
10
|
+
def match?(path, includes: [], excludes: [])
|
11
|
+
matcher = Matcher.new(includes: includes, excludes: excludes)
|
12
|
+
matcher.match?(path)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DevSuite
|
4
|
+
module Utils
|
5
|
+
module PathMatcher
|
6
|
+
class Pattern
|
7
|
+
def initialize(pattern)
|
8
|
+
@regex = convert_to_regex(pattern)
|
9
|
+
end
|
10
|
+
|
11
|
+
def match?(path)
|
12
|
+
!!(@regex =~ path)
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def convert_to_regex(pattern)
|
18
|
+
# Escape all regex special characters except '*'
|
19
|
+
pattern = Regexp.escape(pattern).gsub('\*', "*")
|
20
|
+
|
21
|
+
# Convert glob patterns to regex:
|
22
|
+
# - '**/' matches any directory level
|
23
|
+
# - '*.txt' matches any .txt file in any directory
|
24
|
+
pattern = pattern.gsub("**", ".*") # ** -> .*
|
25
|
+
pattern = pattern.gsub("*", "[^/]*") # * -> [^/]*
|
26
|
+
|
27
|
+
# Allow '*.txt' to match any .txt file in any directory by prefixing with '.*'
|
28
|
+
pattern = ".*#{pattern}" unless pattern.start_with?(".*")
|
29
|
+
|
30
|
+
Regexp.new("^#{pattern}$")
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DevSuite
|
4
|
+
module Utils
|
5
|
+
module Table
|
6
|
+
module Config
|
7
|
+
class Configuration < BaseConfiguration
|
8
|
+
set_default_settings(
|
9
|
+
colors: {
|
10
|
+
title: :cyan,
|
11
|
+
column: :yellow,
|
12
|
+
row: :default,
|
13
|
+
border: :blue,
|
14
|
+
},
|
15
|
+
# alignments: {
|
16
|
+
# column: :left,
|
17
|
+
# row: :left,
|
18
|
+
# },
|
19
|
+
)
|
20
|
+
|
21
|
+
config_attr :renderer, default_value: :simple, type: :symbol, resolver: :resolve_renderer
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def resolve_renderer(value)
|
26
|
+
Renderer.create(value)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -3,29 +3,8 @@
|
|
3
3
|
module DevSuite
|
4
4
|
module Utils
|
5
5
|
module Table
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
DEFAULT_SETTING = {
|
10
|
-
colors: {
|
11
|
-
title: :cyan,
|
12
|
-
column: :yellow,
|
13
|
-
row: :default,
|
14
|
-
border: :blue,
|
15
|
-
},
|
16
|
-
alignments: {
|
17
|
-
column: :left,
|
18
|
-
row: :left,
|
19
|
-
},
|
20
|
-
}.freeze
|
21
|
-
|
22
|
-
attr_reader :settings, :renderer
|
23
|
-
|
24
|
-
def initialize(settings: {}, renderer: :simple)
|
25
|
-
@settings = Settings.new(settings)
|
26
|
-
@renderer = Renderer.create(renderer, settings: @settings)
|
27
|
-
freeze
|
28
|
-
end
|
6
|
+
module Config
|
7
|
+
require_relative "config/config"
|
29
8
|
end
|
30
9
|
end
|
31
10
|
end
|
@@ -5,12 +5,6 @@ module DevSuite
|
|
5
5
|
module Table
|
6
6
|
module Renderer
|
7
7
|
class Base
|
8
|
-
attr_reader :settings
|
9
|
-
|
10
|
-
def initialize(settings: Settings.new)
|
11
|
-
@settings = settings
|
12
|
-
end
|
13
|
-
|
14
8
|
def render(table)
|
15
9
|
raise NotImplementedError, "Render method must be implemented in subclasses"
|
16
10
|
end
|
@@ -19,6 +19,10 @@ module DevSuite
|
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
+
def settings
|
23
|
+
Config.configuration.settings
|
24
|
+
end
|
25
|
+
|
22
26
|
#
|
23
27
|
# Calculates the widths of the columns
|
24
28
|
#
|
@@ -45,7 +49,7 @@ module DevSuite
|
|
45
49
|
|
46
50
|
total_width = column_widths.sum + column_widths.size * 3 - 1
|
47
51
|
title_str = "| #{table.title.center(total_width - 2)} |"
|
48
|
-
colorize(title_str, settings.
|
52
|
+
colorize(title_str, settings.get("colors.title"))
|
49
53
|
end
|
50
54
|
|
51
55
|
def render_header(table, column_widths)
|
@@ -55,13 +59,13 @@ module DevSuite
|
|
55
59
|
text_align(column.name, column_widths[index])
|
56
60
|
end
|
57
61
|
header_str = "| #{header.join(" | ")} |"
|
58
|
-
colorize(header_str, settings.
|
62
|
+
colorize(header_str, settings.get("colors.column"))
|
59
63
|
end
|
60
64
|
|
61
65
|
def render_separator(column_widths)
|
62
66
|
separator = column_widths.map { |width| "-" * width }.join("-+-")
|
63
67
|
separator_str = "+-#{separator}-+"
|
64
|
-
colorize(separator_str, settings.
|
68
|
+
colorize(separator_str, settings.get("colors.border"))
|
65
69
|
end
|
66
70
|
|
67
71
|
def render_rows(table, column_widths)
|
@@ -69,7 +73,7 @@ module DevSuite
|
|
69
73
|
render_row(row, column_widths)
|
70
74
|
end
|
71
75
|
cells_str = cells.join("\n")
|
72
|
-
colorize(cells_str, settings.
|
76
|
+
colorize(cells_str, settings.get("colors.row"))
|
73
77
|
end
|
74
78
|
|
75
79
|
def render_row(row, column_widths)
|
@@ -77,7 +81,7 @@ module DevSuite
|
|
77
81
|
text_align(cell.to_s, column_widths[index])
|
78
82
|
end
|
79
83
|
cell_str = "| #{cell.join(" | ")} |"
|
80
|
-
colorize(cell_str, settings.
|
84
|
+
colorize(cell_str, settings.get("colors.row"))
|
81
85
|
end
|
82
86
|
end
|
83
87
|
end
|
@@ -8,10 +8,10 @@ module DevSuite
|
|
8
8
|
require_relative "renderer/simple"
|
9
9
|
|
10
10
|
class << self
|
11
|
-
def create(type
|
11
|
+
def create(type)
|
12
12
|
case type
|
13
13
|
when :simple
|
14
|
-
Simple.new
|
14
|
+
Simple.new
|
15
15
|
else
|
16
16
|
raise ArgumentError, "Unknown renderer type: #{type}"
|
17
17
|
end
|
@@ -3,6 +3,12 @@
|
|
3
3
|
module DevSuite
|
4
4
|
module Utils
|
5
5
|
module Table
|
6
|
+
require_relative "column"
|
7
|
+
require_relative "row"
|
8
|
+
require_relative "config"
|
9
|
+
require_relative "formatter"
|
10
|
+
require_relative "renderer"
|
11
|
+
|
6
12
|
class Table
|
7
13
|
attr_accessor :title
|
8
14
|
attr_reader :columns, :rows
|
@@ -4,12 +4,6 @@ module DevSuite
|
|
4
4
|
module Utils
|
5
5
|
module Table
|
6
6
|
require_relative "table/table"
|
7
|
-
require_relative "table/column"
|
8
|
-
require_relative "table/row"
|
9
|
-
require_relative "table/config"
|
10
|
-
require_relative "table/settings"
|
11
|
-
require_relative "table/formatter"
|
12
|
-
require_relative "table/renderer"
|
13
7
|
end
|
14
8
|
end
|
15
9
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DevSuite
|
4
|
+
module Utils
|
5
|
+
require_relative "emoji"
|
6
|
+
require_relative "logger"
|
7
|
+
require_relative "error_handler"
|
8
|
+
require_relative "construct"
|
9
|
+
require_relative "color"
|
10
|
+
require_relative "table"
|
11
|
+
require_relative "file_loader"
|
12
|
+
require_relative "path_matcher"
|
13
|
+
end
|
14
|
+
end
|
data/lib/dev_suite/utils.rb
CHANGED
data/lib/dev_suite/version.rb
CHANGED
data/lib/dev_suite.rb
CHANGED
@@ -1,12 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module DevSuite
|
4
|
-
require_relative "dev_suite/
|
5
|
-
require_relative "dev_suite/cli"
|
6
|
-
require_relative "dev_suite/utils"
|
7
|
-
require_relative "dev_suite/performance"
|
8
|
-
require_relative "dev_suite/directory_tree"
|
9
|
-
|
10
|
-
class Error < StandardError; end
|
11
|
-
# Your code goes here...
|
4
|
+
require_relative "dev_suite/dev_suite"
|
12
5
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dev_suite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Huy Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark
|
@@ -61,6 +61,7 @@ executables:
|
|
61
61
|
extensions: []
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
|
+
- ".github/workflows/ci.yml"
|
64
65
|
- ".gitignore"
|
65
66
|
- ".rspec"
|
66
67
|
- ".rubocop.yml"
|
@@ -83,10 +84,14 @@ files:
|
|
83
84
|
- lib/dev_suite/cli/commands/tree.rb
|
84
85
|
- lib/dev_suite/cli/commands/version.rb
|
85
86
|
- lib/dev_suite/cli/main.rb
|
87
|
+
- lib/dev_suite/dev_suite.rb
|
86
88
|
- lib/dev_suite/directory_tree.rb
|
87
89
|
- lib/dev_suite/directory_tree/builder.rb
|
88
90
|
- lib/dev_suite/directory_tree/builder/base.rb
|
89
91
|
- lib/dev_suite/directory_tree/config.rb
|
92
|
+
- lib/dev_suite/directory_tree/config/config.rb
|
93
|
+
- lib/dev_suite/directory_tree/config/configuration.rb
|
94
|
+
- lib/dev_suite/directory_tree/directory_tree.rb
|
90
95
|
- lib/dev_suite/directory_tree/node.rb
|
91
96
|
- lib/dev_suite/directory_tree/node/base.rb
|
92
97
|
- lib/dev_suite/directory_tree/node/directory.rb
|
@@ -95,11 +100,14 @@ files:
|
|
95
100
|
- lib/dev_suite/directory_tree/renderer.rb
|
96
101
|
- lib/dev_suite/directory_tree/renderer/base.rb
|
97
102
|
- lib/dev_suite/directory_tree/renderer/simple.rb
|
98
|
-
- lib/dev_suite/directory_tree/settings.rb
|
99
103
|
- lib/dev_suite/directory_tree/visualizer.rb
|
104
|
+
- lib/dev_suite/directory_tree/visualizer/base.rb
|
105
|
+
- lib/dev_suite/directory_tree/visualizer/tree.rb
|
100
106
|
- lib/dev_suite/performance.rb
|
101
107
|
- lib/dev_suite/performance/analyzer.rb
|
102
108
|
- lib/dev_suite/performance/config.rb
|
109
|
+
- lib/dev_suite/performance/config/config.rb
|
110
|
+
- lib/dev_suite/performance/config/configuration.rb
|
103
111
|
- lib/dev_suite/performance/data.rb
|
104
112
|
- lib/dev_suite/performance/data/memory_usage.rb
|
105
113
|
- lib/dev_suite/performance/profiler.rb
|
@@ -107,16 +115,29 @@ files:
|
|
107
115
|
- lib/dev_suite/performance/profiler/execution_time.rb
|
108
116
|
- lib/dev_suite/performance/profiler/memory.rb
|
109
117
|
- lib/dev_suite/performance/profiler_manager.rb
|
110
|
-
- lib/dev_suite/performance/
|
111
|
-
- lib/dev_suite/performance/
|
112
|
-
- lib/dev_suite/performance/
|
113
|
-
- lib/dev_suite/performance/
|
114
|
-
- lib/dev_suite/performance/
|
115
|
-
- lib/dev_suite/performance/
|
118
|
+
- lib/dev_suite/performance/reporter.rb
|
119
|
+
- lib/dev_suite/performance/reporter/base.rb
|
120
|
+
- lib/dev_suite/performance/reporter/helpers.rb
|
121
|
+
- lib/dev_suite/performance/reporter/helpers/stat_mappings.rb
|
122
|
+
- lib/dev_suite/performance/reporter/helpers/table_builder.rb
|
123
|
+
- lib/dev_suite/performance/reporter/simple.rb
|
124
|
+
- lib/dev_suite/request_logger.rb
|
125
|
+
- lib/dev_suite/request_logger/adapter.rb
|
126
|
+
- lib/dev_suite/request_logger/adapter/adapter.rb
|
127
|
+
- lib/dev_suite/request_logger/adapter/base.rb
|
128
|
+
- lib/dev_suite/request_logger/adapter/net_http.rb
|
129
|
+
- lib/dev_suite/request_logger/config.rb
|
130
|
+
- lib/dev_suite/request_logger/config/config.rb
|
131
|
+
- lib/dev_suite/request_logger/config/configuration.rb
|
132
|
+
- lib/dev_suite/request_logger/logger.rb
|
133
|
+
- lib/dev_suite/request_logger/request_logger.rb
|
116
134
|
- lib/dev_suite/utils.rb
|
117
135
|
- lib/dev_suite/utils/color.rb
|
136
|
+
- lib/dev_suite/utils/color/color.rb
|
118
137
|
- lib/dev_suite/utils/color/colorizer.rb
|
119
138
|
- lib/dev_suite/utils/color/config.rb
|
139
|
+
- lib/dev_suite/utils/color/config/config.rb
|
140
|
+
- lib/dev_suite/utils/color/config/configuration.rb
|
120
141
|
- lib/dev_suite/utils/color/palette.rb
|
121
142
|
- lib/dev_suite/utils/color/palette/base.rb
|
122
143
|
- lib/dev_suite/utils/color/palette/default.rb
|
@@ -125,12 +146,50 @@ files:
|
|
125
146
|
- lib/dev_suite/utils/color/strategy/basic.rb
|
126
147
|
- lib/dev_suite/utils/color/strategy/rgb.rb
|
127
148
|
- lib/dev_suite/utils/color/strategy/theme.rb
|
128
|
-
- lib/dev_suite/utils/
|
129
|
-
- lib/dev_suite/utils/
|
130
|
-
- lib/dev_suite/utils/
|
149
|
+
- lib/dev_suite/utils/construct.rb
|
150
|
+
- lib/dev_suite/utils/construct/config.rb
|
151
|
+
- lib/dev_suite/utils/construct/config/attribute.rb
|
152
|
+
- lib/dev_suite/utils/construct/config/attribute/attribute.rb
|
153
|
+
- lib/dev_suite/utils/construct/config/attribute/manager.rb
|
154
|
+
- lib/dev_suite/utils/construct/config/attribute/resolver.rb
|
155
|
+
- lib/dev_suite/utils/construct/config/attribute/validator.rb
|
156
|
+
- lib/dev_suite/utils/construct/config/base.rb
|
157
|
+
- lib/dev_suite/utils/construct/config/config.rb
|
158
|
+
- lib/dev_suite/utils/construct/config/configuration.rb
|
159
|
+
- lib/dev_suite/utils/construct/config/hook.rb
|
160
|
+
- lib/dev_suite/utils/construct/config/hook/hook.rb
|
161
|
+
- lib/dev_suite/utils/construct/config/hook/manager.rb
|
162
|
+
- lib/dev_suite/utils/construct/config/initializer.rb
|
163
|
+
- lib/dev_suite/utils/construct/config/manager.rb
|
164
|
+
- lib/dev_suite/utils/construct/config/settings.rb
|
165
|
+
- lib/dev_suite/utils/construct/config/settings/base.rb
|
166
|
+
- lib/dev_suite/utils/construct/config/settings/manager.rb
|
167
|
+
- lib/dev_suite/utils/construct/config/settings/settings.rb
|
168
|
+
- lib/dev_suite/utils/construct/construct.rb
|
169
|
+
- lib/dev_suite/utils/emoji.rb
|
170
|
+
- lib/dev_suite/utils/error_handler.rb
|
171
|
+
- lib/dev_suite/utils/file_loader.rb
|
172
|
+
- lib/dev_suite/utils/file_loader/config.rb
|
173
|
+
- lib/dev_suite/utils/file_loader/config/config.rb
|
174
|
+
- lib/dev_suite/utils/file_loader/config/configuration.rb
|
175
|
+
- lib/dev_suite/utils/file_loader/file_loader.rb
|
176
|
+
- lib/dev_suite/utils/file_loader/loader.rb
|
177
|
+
- lib/dev_suite/utils/file_loader/loader/base.rb
|
178
|
+
- lib/dev_suite/utils/file_loader/loader/json.rb
|
179
|
+
- lib/dev_suite/utils/file_loader/loader/text.rb
|
180
|
+
- lib/dev_suite/utils/file_loader/loader/yaml.rb
|
181
|
+
- lib/dev_suite/utils/file_loader/loader_manager.rb
|
182
|
+
- lib/dev_suite/utils/file_loader/loader_registry.rb
|
183
|
+
- lib/dev_suite/utils/logger.rb
|
184
|
+
- lib/dev_suite/utils/path_matcher.rb
|
185
|
+
- lib/dev_suite/utils/path_matcher/matcher.rb
|
186
|
+
- lib/dev_suite/utils/path_matcher/path_matcher.rb
|
187
|
+
- lib/dev_suite/utils/path_matcher/pattern.rb
|
131
188
|
- lib/dev_suite/utils/table.rb
|
132
189
|
- lib/dev_suite/utils/table/column.rb
|
133
190
|
- lib/dev_suite/utils/table/config.rb
|
191
|
+
- lib/dev_suite/utils/table/config/config.rb
|
192
|
+
- lib/dev_suite/utils/table/config/configuration.rb
|
134
193
|
- lib/dev_suite/utils/table/formatter.rb
|
135
194
|
- lib/dev_suite/utils/table/formatter/column_width_calculator.rb
|
136
195
|
- lib/dev_suite/utils/table/formatter/text_aligner.rb
|
@@ -138,8 +197,8 @@ files:
|
|
138
197
|
- lib/dev_suite/utils/table/renderer/base.rb
|
139
198
|
- lib/dev_suite/utils/table/renderer/simple.rb
|
140
199
|
- lib/dev_suite/utils/table/row.rb
|
141
|
-
- lib/dev_suite/utils/table/settings.rb
|
142
200
|
- lib/dev_suite/utils/table/table.rb
|
201
|
+
- lib/dev_suite/utils/utils.rb
|
143
202
|
- lib/dev_suite/version.rb
|
144
203
|
homepage: https://patrick204nqh.github.io
|
145
204
|
licenses:
|