makit 0.0.141 → 0.0.143

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5292d7e48fcc8060c1ad09ed8beeb9bb596c6d33fe33075e39f65553480532c2
4
- data.tar.gz: be28ff936d5268a37689bd9f7d581144b755fee9ef310cb24e6ee2c85045517a
3
+ metadata.gz: b330eb74cf41f64e91cbc43ce9331e83b3be0055370731a80071faceed947851
4
+ data.tar.gz: 64ef55b0868cd8a7947d8c99f8c8421f675f4ada08dd39f6e24920a984dcd62a
5
5
  SHA512:
6
- metadata.gz: ce30902a329a81775d0d023597daef878bcd78a692ee6c3de0cb85b325077422813638b28bcdd5a52b5991b677e5ca7966335a6cc8b0c1f6267dfd3ff7d86a6a
7
- data.tar.gz: f16cb9d563051f87fd8b8693afde7415b21e75ac35d7ac98c22264c789d7065035d053d534153872d942b8add3241b34b7aab8c30f81191ff275cd76e58b152f
6
+ metadata.gz: 0d463285ccaf654ff36dfddb0a74f380482bd9c057796042421c4773d0e37ac7314a0550b8a8b40449ee7edb4292757bda6096ce6974c3d6389eae02e66d1221
7
+ data.tar.gz: 5604f3e1dd4345825f248caa6d62c1bdbc70977a271268096a0b0c6944c6de3ccbfcca304d27bf71ea86e76d6823c317d80e582d2c9358b7b3660ce48861d88b
data/lib/makit/auto.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  begin
5
5
  require_relative "../makit"
6
6
  rescue LoadError => e
7
- # If makit can't be loaded (e.g., missing dependencies),
7
+ # If makit can't be loaded (e.g., missing dependencies),
8
8
  # we'll still provide the auto module
9
9
  puts "Warning: Could not load full makit library: #{e.message}"
10
10
  end
@@ -27,12 +27,12 @@ module Makit
27
27
  module Auto
28
28
  # Version of the auto functionality
29
29
  VERSION = "1.0.0"
30
-
30
+
31
31
  # Check if auto functionality is loaded
32
32
  def self.loaded?
33
33
  true
34
34
  end
35
-
35
+
36
36
  # Log that auto mode is enabled
37
37
  def self.enable_auto_mode
38
38
  if defined?(Makit::Logging)
@@ -8,6 +8,7 @@ module Makit
8
8
  class StrategyCommands < Base
9
9
  desc "strategy", "Show current execution strategy information"
10
10
  option ["--verbose", "-v"], :flag, "Show detailed strategy information"
11
+
11
12
  def strategy
12
13
  runner = Makit::Commands::Runner.default
13
14
  info = runner.strategy_info
@@ -15,35 +16,36 @@ module Makit
15
16
  puts "Current Execution Strategy:"
16
17
  puts " Type: #{info[:type]}"
17
18
  puts " Class: #{info[:class]}"
18
-
19
+
19
20
  if options[:verbose]
20
21
  puts "\nFactory Information:"
21
22
  factory_info = info[:factory_info]
22
23
  puts " Current: #{factory_info[:current]}"
23
- puts " Available: #{factory_info[:available].join(', ')}"
24
+ puts " Available: #{factory_info[:available].join(", ")}"
24
25
  puts " ChildProcess Available: #{factory_info[:childprocess_available]}"
25
26
  puts " Open3 Available: #{factory_info[:open3_available]}"
26
27
  end
27
28
 
28
29
  puts "\nEnvironment Variables:"
29
- puts " MAKIT_STRATEGY: #{ENV['MAKIT_STRATEGY'] || 'not set (using auto-detect)'}"
30
+ puts " MAKIT_STRATEGY: #{ENV["MAKIT_STRATEGY"] || "not set (using auto-detect)"}"
30
31
  end
31
32
 
32
33
  desc "strategy test", "Test both strategies and show performance comparison"
33
34
  option ["--timeout", "-t"], "TIMEOUT", "Timeout for test commands", default: "5"
35
+
34
36
  def test
35
37
  timeout = options[:timeout].to_i
36
-
38
+
37
39
  puts "Testing execution strategies..."
38
40
  puts "=" * 50
39
41
 
40
42
  # Test ChildProcess strategy
41
43
  puts "\n1. Testing ChildProcess Strategy:"
42
- childprocess_result = test_strategy('childprocess', timeout)
43
-
44
- # Test Open3 strategy
44
+ childprocess_result = test_strategy("childprocess", timeout)
45
+
46
+ # Test Open3 strategy
45
47
  puts "\n2. Testing Open3 Strategy:"
46
- open3_result = test_strategy('open3', timeout)
48
+ open3_result = test_strategy("open3", timeout)
47
49
 
48
50
  # Show comparison
49
51
  puts "\n" + "=" * 50
@@ -61,143 +63,150 @@ module Makit
61
63
  # @return [Hash] test results
62
64
  def test_strategy(strategy_type, timeout)
63
65
  start_time = Time.now
64
-
66
+
65
67
  begin
66
68
  # Create runner with specific strategy
67
69
  strategy = Makit::Commands::Strategies::Factory.create(strategy: strategy_type)
68
70
  runner = Makit::Commands::Runner.new(strategy: strategy)
69
-
71
+
70
72
  # Test with a simple command
71
73
  request = Makit::Commands::Request.new(
72
74
  command: "echo",
73
75
  arguments: ["Hello from #{strategy_type}!"],
74
- timeout: timeout
76
+ timeout: timeout,
75
77
  )
76
-
78
+
77
79
  result = runner.execute(request)
78
80
  duration = Time.now - start_time
79
-
81
+
80
82
  status = result.success? ? "SUCCESS" : "FAILED"
81
83
  puts " Status: #{status}"
82
84
  puts " Duration: #{duration.round(3)}s"
83
85
  puts " Output: #{result.stdout.strip}"
84
-
86
+
85
87
  if result.failure?
86
88
  puts " Error: #{result.stderr}"
87
89
  end
88
-
90
+
89
91
  { duration: duration.round(3), status: status, success: result.success? }
90
-
91
92
  rescue => e
92
93
  duration = Time.now - start_time
93
94
  puts " Status: ERROR"
94
95
  puts " Duration: #{duration.round(3)}s"
95
96
  puts " Error: #{e.message}"
96
-
97
- { duration: duration.round(3), status: "ERROR", success: false }
97
+
98
+ { duration: duration.round(3), status: "ERROR", success: false }
99
+ end
98
100
  end
99
101
  end
100
102
  end
101
- end
102
103
 
103
- # Add trace commands to the main CLI
104
- module Makit
105
- module Cli
106
- # Commands for managing trace functionality
107
- class TraceCommands < Base
108
- desc "trace", "Show current trace status and configuration"
109
- option ["--verbose", "-v"], :flag, "Show detailed trace information"
110
- def trace
111
- puts "Makit Trace Status:"
112
- puts "=" * 30
113
-
114
- status = Makit::Rake.status
115
-
116
- puts "Enhanced Tracing: #{Makit::Rake.tracing_enabled? ? 'Enabled' : 'Disabled'}"
117
- puts "Rake Trace: #{status[:trace_controller][:rake_trace] || 'Not set'}"
118
- puts "Trace Flag: #{status[:trace_controller][:trace_flag] ? 'Present' : 'Not present'}"
119
- puts "Makit Trace: #{status[:trace_controller][:makit_trace] || 'Not set'}"
120
- puts "Verbose Mode: #{status[:verbose] ? 'Enabled' : 'Disabled'}"
121
-
122
- if options[:verbose]
123
- puts "\nDetailed Information:"
124
- puts " Strategy: #{status[:strategy][:type] || 'Unknown'}"
125
- puts " Class: #{status[:strategy][:class] || 'Unknown'}"
126
- puts " Factory Info: #{status[:strategy][:factory_info] || 'Not available'}"
104
+ # Add trace commands to the main CLI
105
+ module Makit
106
+ module Cli
107
+ # Commands for managing trace functionality
108
+ class TraceCommands < Base
109
+ desc "trace", "Show current trace status and configuration"
110
+ option ["--verbose", "-v"], :flag, "Show detailed trace information"
111
+
112
+ def trace
113
+ puts "Makit Trace Status:"
114
+ puts "=" * 30
115
+
116
+ status = Makit::Rake.status
117
+
118
+ puts "Enhanced Tracing: #{Makit::Rake.tracing_enabled? ? "Enabled" : "Disabled"}"
119
+ puts "Rake Trace: #{status[:trace_controller][:rake_trace] || "Not set"}"
120
+ puts "Trace Flag: #{status[:trace_controller][:trace_flag] ? "Present" : "Not present"}"
121
+ puts "Makit Trace: #{status[:trace_controller][:makit_trace] || "Not set"}"
122
+ puts "Verbose Mode: #{status[:verbose] ? "Enabled" : "Disabled"}"
123
+
124
+ if options[:verbose]
125
+ puts "\nDetailed Information:"
126
+ puts " Strategy: #{status[:strategy][:type] || "Unknown"}"
127
+ puts " Class: #{status[:strategy][:class] || "Unknown"}"
128
+ puts " Factory Info: #{status[:strategy][:factory_info] || "Not available"}"
129
+ end
127
130
  end
128
- end
129
131
 
130
- desc "trace enable", "Enable enhanced tracing"
131
- def enable
132
- ENV['MAKIT_TRACE'] = 'true'
133
- puts "Enhanced tracing enabled"
134
- puts "Run 'rake --trace' to see enhanced output"
135
- end
132
+ desc "trace enable", "Enable enhanced tracing"
136
133
 
137
- desc "trace disable", "Disable enhanced tracing"
138
- def disable
139
- ENV.delete('MAKIT_TRACE')
140
- puts "Enhanced tracing disabled"
141
- end
134
+ def enable
135
+ ENV["MAKIT_TRACE"] = "true"
136
+ puts "Enhanced tracing enabled"
137
+ puts "Run 'rake --trace' to see enhanced output"
138
+ end
142
139
 
143
- desc "trace test", "Test trace functionality with a simple rake task"
144
- def test
145
- puts "Testing trace functionality..."
146
- puts "Run: rake --trace"
147
- puts "You should see [MAKIT] prefixed trace output for makit-related tasks"
140
+ desc "trace disable", "Disable enhanced tracing"
141
+
142
+ def disable
143
+ ENV.delete("MAKIT_TRACE")
144
+ puts "Enhanced tracing disabled"
145
+ end
146
+
147
+ desc "trace test", "Test trace functionality with a simple rake task"
148
+
149
+ def test
150
+ puts "Testing trace functionality..."
151
+ puts "Run: rake --trace"
152
+ puts "You should see [MAKIT] prefixed trace output for makit-related tasks"
153
+ end
148
154
  end
149
- end
150
155
 
151
- # Commands for managing timeout configuration
152
- class TimeoutCommands < Base
153
- desc "timeout", "Show current timeout configuration"
154
- option ["--verbose", "-v"], :flag, "Show detailed timeout information"
155
- def timeout
156
- puts "Makit Timeout Configuration:"
157
- puts "=" * 35
158
-
159
- puts "Global Default: #{Makit::Configuration::Timeout.global_default}s"
160
- puts "Environment: #{ENV['MAKIT_DEFAULT_TIMEOUT'] || 'Not set'}"
161
-
162
- if options[:verbose]
163
- puts "\nOperation-Specific Timeouts:"
164
- Makit::Configuration::Timeout.all_timeouts.each do |operation, timeout|
165
- puts " #{operation.to_s.ljust(20)}: #{timeout}s"
156
+ # Commands for managing timeout configuration
157
+ class TimeoutCommands < Base
158
+ desc "timeout", "Show current timeout configuration"
159
+ option ["--verbose", "-v"], :flag, "Show detailed timeout information"
160
+
161
+ def timeout
162
+ puts "Makit Timeout Configuration:"
163
+ puts "=" * 35
164
+
165
+ puts "Global Default: #{Makit::Configuration::Timeout.global_default}s"
166
+ puts "Environment: #{ENV["MAKIT_DEFAULT_TIMEOUT"] || "Not set"}"
167
+
168
+ if options[:verbose]
169
+ puts "\nOperation-Specific Timeouts:"
170
+ Makit::Configuration::Timeout.all_timeouts.each do |operation, timeout|
171
+ puts " #{operation.to_s.ljust(20)}: #{timeout}s"
172
+ end
166
173
  end
167
174
  end
168
- end
169
175
 
170
- desc "timeout set", "Set global default timeout"
171
- option ["--timeout", "-t"], "TIMEOUT", "Timeout in seconds", required: true
172
- def set
173
- timeout = options[:timeout].to_i
174
- Makit::Configuration::Timeout.validate_timeout(timeout)
175
- ENV['MAKIT_DEFAULT_TIMEOUT'] = timeout.to_s
176
- puts "Global timeout set to #{timeout} seconds"
177
- end
176
+ desc "timeout set", "Set global default timeout"
177
+ option ["--timeout", "-t"], "TIMEOUT", "Timeout in seconds", required: true
178
178
 
179
- desc "timeout reset", "Reset timeout to default value"
180
- def reset
181
- ENV.delete('MAKIT_DEFAULT_TIMEOUT')
182
- puts "Timeout reset to default: #{Makit::Configuration::Timeout.global_default} seconds"
183
- end
179
+ def set
180
+ timeout = options[:timeout].to_i
181
+ Makit::Configuration::Timeout.validate_timeout(timeout)
182
+ ENV["MAKIT_DEFAULT_TIMEOUT"] = timeout.to_s
183
+ puts "Global timeout set to #{timeout} seconds"
184
+ end
184
185
 
185
- desc "timeout test", "Test timeout configuration with a simple command"
186
- option ["--timeout", "-t"], "TIMEOUT", "Timeout for test command", default: "5"
187
- def test
188
- timeout = options[:timeout].to_i
189
- puts "Testing timeout configuration with #{timeout}s timeout..."
190
-
191
- # Test with a simple command
192
- result = Makit::Commands::Runner.default.run("echo", "Timeout test", timeout: timeout)
193
-
194
- if result.success?
195
- puts "✓ Timeout test passed"
196
- else
197
- puts " Timeout test failed: #{result.stderr}"
186
+ desc "timeout reset", "Reset timeout to default value"
187
+
188
+ def reset
189
+ ENV.delete("MAKIT_DEFAULT_TIMEOUT")
190
+ puts "Timeout reset to default: #{Makit::Configuration::Timeout.global_default} seconds"
191
+ end
192
+
193
+ desc "timeout test", "Test timeout configuration with a simple command"
194
+ option ["--timeout", "-t"], "TIMEOUT", "Timeout for test command", default: "5"
195
+
196
+ def test
197
+ timeout = options[:timeout].to_i
198
+ puts "Testing timeout configuration with #{timeout}s timeout..."
199
+
200
+ # Test with a simple command
201
+ result = Makit::Commands::Runner.default.run("echo", "Timeout test", timeout: timeout)
202
+
203
+ if result.success?
204
+ puts "✓ Timeout test passed"
205
+ else
206
+ puts "✗ Timeout test failed: #{result.stderr}"
207
+ end
198
208
  end
199
209
  end
200
210
  end
201
211
  end
202
212
  end
203
- end
@@ -186,8 +186,8 @@ module Makit
186
186
  def strategy_info
187
187
  {
188
188
  class: @strategy.class.name,
189
- type: @strategy.class.name.split('::').last.downcase,
190
- factory_info: Strategies::Factory.strategy_info
189
+ type: @strategy.class.name.split("::").last.downcase,
190
+ factory_info: Strategies::Factory.strategy_info,
191
191
  }
192
192
  end
193
193
 
@@ -332,8 +332,6 @@ module Makit
332
332
  raise ArgumentError, "Strategy must respond to #supports?: #{@strategy.class}"
333
333
  end
334
334
 
335
-
336
-
337
335
  # Log command execution result using the default logger.
338
336
  #
339
337
  # @param request [Request] the executed request
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'childprocess'
4
- require 'tempfile'
3
+ require "childprocess"
4
+ require "tempfile"
5
5
  require_relative "base"
6
6
 
7
7
  module Makit
@@ -57,8 +57,8 @@ module Makit
57
57
 
58
58
  begin
59
59
  # Create temporary files for output
60
- stdout_file = Tempfile.new('makit_stdout')
61
- stderr_file = Tempfile.new('makit_stderr')
60
+ stdout_file = Tempfile.new("makit_stdout")
61
+ stderr_file = Tempfile.new("makit_stderr")
62
62
 
63
63
  # Build the process
64
64
  process = ChildProcess.build(request.command, *request.arguments)
@@ -97,7 +97,6 @@ module Makit
97
97
  stdout: stdout,
98
98
  stderr: stderr,
99
99
  )
100
-
101
100
  rescue ChildProcess::TimeoutError
102
101
  # Handle timeout
103
102
  process&.stop
@@ -105,8 +104,7 @@ module Makit
105
104
  exit_code: 124,
106
105
  stderr: "Command timed out after #{timeout_seconds} seconds",
107
106
  ).add_metadata(:timeout, true)
108
- .add_metadata(:strategy, 'childprocess')
109
-
107
+ .add_metadata(:strategy, "childprocess")
110
108
  rescue => e
111
109
  # Handle other errors
112
110
  process&.stop rescue nil
@@ -114,8 +112,7 @@ module Makit
114
112
  exit_code: 1,
115
113
  stderr: e.message,
116
114
  ).add_metadata(:error_class, e.class.name)
117
- .add_metadata(:strategy, 'childprocess')
118
-
115
+ .add_metadata(:strategy, "childprocess")
119
116
  ensure
120
117
  # Clean up resources
121
118
  [stdout_file, stderr_file].each do |file|
@@ -149,12 +146,12 @@ module Makit
149
146
 
150
147
  original_size = output.bytesize
151
148
  truncated = output.byteslice(0, @max_output_size)
152
-
149
+
153
150
  Makit::Logging.warn(
154
151
  "#{type.capitalize} truncated",
155
152
  original_size: original_size,
156
153
  max_size: @max_output_size,
157
- strategy: 'childprocess'
154
+ strategy: "childprocess",
158
155
  )
159
156
 
160
157
  "#{truncated}\n[#{type.upcase} TRUNCATED - Original size: #{original_size} bytes]"
@@ -24,9 +24,9 @@ module Makit
24
24
  class Factory
25
25
  # Available strategy types
26
26
  STRATEGIES = {
27
- 'childprocess' => 'ChildProcess',
28
- 'open3' => 'Synchronous',
29
- 'auto' => 'AutoDetect'
27
+ "childprocess" => "ChildProcess",
28
+ "open3" => "Synchronous",
29
+ "auto" => "AutoDetect",
30
30
  }.freeze
31
31
 
32
32
  # Get the configured strategy instance
@@ -35,14 +35,14 @@ module Makit
35
35
  # @return [Strategies::Base] configured strategy instance
36
36
  def self.create(options = {})
37
37
  strategy_type = determine_strategy_type
38
-
38
+
39
39
  begin
40
40
  case strategy_type
41
- when 'childprocess'
41
+ when "childprocess"
42
42
  create_childprocess_strategy(options)
43
- when 'open3'
43
+ when "open3"
44
44
  create_open3_strategy(options)
45
- when 'auto'
45
+ when "auto"
46
46
  create_auto_detect_strategy(options)
47
47
  else
48
48
  Makit::Logging.warn("Unknown strategy '#{strategy_type}', falling back to Open3") if defined?(Makit::Logging)
@@ -59,12 +59,12 @@ module Makit
59
59
  #
60
60
  # @return [String] strategy type
61
61
  def self.determine_strategy_type
62
- env_strategy = ENV['MAKIT_STRATEGY']&.downcase
63
-
62
+ env_strategy = ENV["MAKIT_STRATEGY"]&.downcase
63
+
64
64
  if env_strategy && STRATEGIES.key?(env_strategy)
65
65
  env_strategy
66
66
  else
67
- 'auto' # Default to auto-detect
67
+ "auto" # Default to auto-detect
68
68
  end
69
69
  end
70
70
 
@@ -74,7 +74,7 @@ module Makit
74
74
  # @return [Strategies::Base] strategy instance
75
75
  def self.create_childprocess_strategy(options)
76
76
  begin
77
- require_relative 'child_process'
77
+ require_relative "child_process"
78
78
  ChildProcess.new(**options)
79
79
  rescue LoadError, StandardError => e
80
80
  Makit::Logging.warn("Failed to load ChildProcess strategy: #{e.message}")
@@ -115,7 +115,7 @@ module Makit
115
115
  current: determine_strategy_type,
116
116
  available: STRATEGIES.keys,
117
117
  childprocess_available: childprocess_available?,
118
- open3_available: true # Always available
118
+ open3_available: true, # Always available
119
119
  }
120
120
  end
121
121
 
@@ -124,7 +124,7 @@ module Makit
124
124
  # @return [Boolean] true if ChildProcess can be loaded
125
125
  def self.childprocess_available?
126
126
  begin
127
- require 'childprocess'
127
+ require "childprocess"
128
128
  true
129
129
  rescue LoadError
130
130
  false
@@ -7,6 +7,33 @@ module Makit
7
7
  # Project configuration management
8
8
  class DotNetProject
9
9
  attr_accessor :name, :output_dir, :frameworks, :template
10
+
11
+ # set the default values
12
+ def initialize
13
+ @name = "MyClassLib"
14
+ @output_dir = "source/MyClassLib"
15
+ @frameworks = ["net8.0", "net8.0-browser"]
16
+ @template = "classlib"
17
+ end
18
+
19
+ def get_csproj_path
20
+ "#{@output_dir}/#{@name}.csproj"
21
+ end
22
+
23
+ def get_build_commands
24
+ commands = []
25
+ commands << "dotnet build #{get_csproj_path} --configuration Release"
26
+ commands << "dotnet build #{get_csproj_path} --configuration Debug"
27
+ commands
28
+ end
29
+
30
+ def get_publish_commands
31
+ commands = []
32
+ commands << "dotnet publish #{get_csproj_path} --configuration Release --output artifacts/Publish"
33
+ commands << "dotnet publish #{get_csproj_path} --configuration Debug --output artifacts/Publish"
34
+ commands
35
+ end
36
+
10
37
  end
11
38
  end
12
39
  end
@@ -18,13 +18,13 @@ module Makit
18
18
  protoc_generate: 60,
19
19
  gem_build: 300,
20
20
  gem_install: 120,
21
-
21
+
22
22
  # Strategy timeouts
23
23
  childprocess: 30,
24
24
  open3: 30,
25
-
25
+
26
26
  # Example execution timeout
27
- example: 30
27
+ example: 30,
28
28
  }.freeze
29
29
 
30
30
  # Get the default timeout for a specific operation
@@ -39,7 +39,7 @@ module Makit
39
39
  #
40
40
  # @return [Integer] global default timeout in seconds
41
41
  def self.global_default
42
- ENV['MAKIT_DEFAULT_TIMEOUT']&.to_i || DEFAULTS[:command]
42
+ ENV["MAKIT_DEFAULT_TIMEOUT"]&.to_i || DEFAULTS[:command]
43
43
  end
44
44
 
45
45
  # Set a custom timeout for an operation
@@ -64,9 +64,9 @@ module Makit
64
64
  # @raise [ArgumentError] if timeout is invalid
65
65
  def self.validate_timeout(timeout)
66
66
  raise ArgumentError, "Timeout must be a positive integer" unless timeout.is_a?(Integer) && timeout.positive?
67
-
67
+
68
68
  return unless timeout > 3600 # 1 hour max
69
-
69
+
70
70
  raise ArgumentError, "Timeout cannot exceed 3600 seconds (1 hour)"
71
71
  end
72
72
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  # Load all configuration classes
4
4
  require_relative "configuration/project"
5
+ require_relative "configuration/dotnet_project"
5
6
  require_relative "configuration/step"
6
7
  require_relative "configuration/gitlab_helper"
7
8
  require_relative "configuration/rakefile_helper"
@@ -34,9 +34,9 @@ module Makit
34
34
  #
35
35
  # @return [Boolean] true if trace enhancement should be enabled
36
36
  def self.should_enhance_trace?
37
- ENV['RAKE_TRACE'] ||
38
- ARGV.include?('--trace') ||
39
- ENV['MAKIT_TRACE'] == 'true'
37
+ ENV["RAKE_TRACE"] ||
38
+ ARGV.include?("--trace") ||
39
+ ENV["MAKIT_TRACE"] == "true"
40
40
  end
41
41
 
42
42
  # Get current trace status
@@ -44,10 +44,10 @@ module Makit
44
44
  # @return [Hash] trace status information
45
45
  def self.trace_status
46
46
  {
47
- rake_trace: ENV['RAKE_TRACE'],
48
- trace_flag: ARGV.include?('--trace'),
49
- makit_trace: ENV['MAKIT_TRACE'],
50
- enhanced: should_enhance_trace?
47
+ rake_trace: ENV["RAKE_TRACE"],
48
+ trace_flag: ARGV.include?("--trace"),
49
+ makit_trace: ENV["MAKIT_TRACE"],
50
+ enhanced: should_enhance_trace?,
51
51
  }
52
52
  end
53
53
 
@@ -98,7 +98,7 @@ module Makit
98
98
  if makit_related?(message)
99
99
  puts " [MAKIT] Executing: #{message}"
100
100
  puts " [MAKIT] Strategy: #{get_makit_strategy_info}"
101
- puts " [MAKIT] Environment: #{ENV['MAKIT_STRATEGY'] || 'auto'}"
101
+ puts " [MAKIT] Environment: #{ENV["MAKIT_STRATEGY"] || "auto"}"
102
102
  puts " [MAKIT] Working Directory: #{Dir.pwd}"
103
103
  puts " [MAKIT] Timestamp: #{Time.now.iso8601}"
104
104
  puts " [MAKIT] Task: #{name}"
@@ -142,12 +142,12 @@ module Makit
142
142
  # @param message [String] message to check
143
143
  # @return [Boolean] true if message is makit-related
144
144
  def makit_related?(message)
145
- message.downcase.include?('makit') ||
146
- message.include?('bundle') ||
147
- message.include?('gem') ||
148
- message.include?('dotnet') ||
149
- message.include?('protoc') ||
150
- message.include?('git')
145
+ message.downcase.include?("makit") ||
146
+ message.include?("bundle") ||
147
+ message.include?("gem") ||
148
+ message.include?("dotnet") ||
149
+ message.include?("protoc") ||
150
+ message.include?("git")
151
151
  end
152
152
 
153
153
  # Get makit strategy information safely
@@ -171,4 +171,4 @@ module Makit
171
171
  end
172
172
  end
173
173
  end
174
- end
174
+ end
data/lib/makit/rake.rb CHANGED
@@ -26,13 +26,13 @@ module Makit
26
26
  if trace.nil?
27
27
  TraceController.setup
28
28
  elsif trace
29
- ENV['MAKIT_TRACE'] = 'true'
29
+ ENV["MAKIT_TRACE"] = "true"
30
30
  TraceController.setup
31
31
  end
32
32
 
33
33
  # Set up verbose output if requested
34
34
  if verbose
35
- ENV['MAKIT_VERBOSE'] = 'true'
35
+ ENV["MAKIT_VERBOSE"] = "true"
36
36
  end
37
37
 
38
38
  # Log setup completion
@@ -48,8 +48,8 @@ module Makit
48
48
  def status
49
49
  {
50
50
  trace_controller: TraceController.trace_status,
51
- verbose: ENV['MAKIT_VERBOSE'] == 'true',
52
- strategy: get_strategy_info
51
+ verbose: ENV["MAKIT_VERBOSE"] == "true",
52
+ strategy: get_strategy_info,
53
53
  }
54
54
  end
55
55
 
@@ -78,4 +78,4 @@ module Makit
78
78
  end
79
79
  end
80
80
  end
81
- end
81
+ end
@@ -112,7 +112,7 @@ module Makit
112
112
  # # frozen_string_literal: true
113
113
 
114
114
  # module #{project.name.capitalize}
115
- # VERSION = "#{project.version}"
115
+ # VERSION = "#{project.version}"
116
116
  # end
117
117
  #VERSION
118
118
 
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../configuration/project"
4
+
5
+ module Makit
6
+ module Setup
7
+ # A dotnet fluentblazor wasm project that may be published as a static web site
8
+ class Pages
9
+
10
+ end
11
+ end
@@ -25,8 +25,8 @@ module Makit
25
25
 
26
26
  test_project_filename = "tests/#{project.name}.Tests/#{project.name}.Tests.csproj"
27
27
  if (File.exist?(test_project_filename))
28
- Makit::DotNet::Project.new_project("TUnit", "#{project.name}.Tests", "tests/#{project.name}")
29
- dotnet_project = Makit::DotNet::Project.new("tests/#{project.name}/#{project.name}.Tests.csproj")
28
+ Makit::DotNet::Project.new_project("TUnit", "#{project.name}.Tests", "tests/#{project.name}.Tests")
29
+ dotnet_project = Makit::DotNet::Project.new("tests/#{project.name}.Tests/#{project.name}.Tests.csproj")
30
30
  # set the version to project.version
31
31
  dotnet_project.set_version(project.version)
32
32
  # set the frameworks = ["net8.0","net8.0-browser"]
@@ -278,27 +278,27 @@ module Makit
278
278
  # @return [Boolean] true if task should be traced
279
279
  def should_trace_makit_task?
280
280
  # Check if trace is enabled
281
- return false unless ENV['RAKE_TRACE'] || ARGV.include?('--trace') || ENV['MAKIT_TRACE'] == 'true'
282
-
281
+ return false unless ENV["RAKE_TRACE"] || ARGV.include?("--trace") || ENV["MAKIT_TRACE"] == "true"
282
+
283
283
  # Check if task is makit-related
284
284
  makit_related_task?
285
285
  end
286
-
286
+
287
287
  # Check if task is makit-related
288
288
  #
289
289
  # @return [Boolean] true if task is makit-related
290
290
  def makit_related_task?
291
- name.downcase.include?('makit') ||
292
- name.include?('bundle') ||
293
- name.include?('gem') ||
294
- name.include?('dotnet') ||
295
- name.include?('protoc') ||
296
- name.include?('git') ||
297
- name.include?('setup') ||
298
- name.include?('build') ||
299
- name.include?('test')
291
+ name.downcase.include?("makit") ||
292
+ name.include?("bundle") ||
293
+ name.include?("gem") ||
294
+ name.include?("dotnet") ||
295
+ name.include?("protoc") ||
296
+ name.include?("git") ||
297
+ name.include?("setup") ||
298
+ name.include?("build") ||
299
+ name.include?("test")
300
300
  end
301
-
301
+
302
302
  # Get makit strategy information safely
303
303
  #
304
304
  # @return [String] strategy information
@@ -320,12 +320,12 @@ module Makit
320
320
  start_time = Time.now
321
321
  error = nil
322
322
  result = nil
323
-
323
+
324
324
  # Add enhanced trace output for makit-related tasks
325
325
  if should_trace_makit_task?
326
326
  puts " [MAKIT] Executing task: #{name}"
327
327
  puts " [MAKIT] Strategy: #{get_makit_strategy_info}"
328
- puts " [MAKIT] Environment: #{ENV['MAKIT_STRATEGY'] || 'auto'}"
328
+ puts " [MAKIT] Environment: #{ENV["MAKIT_STRATEGY"] || "auto"}"
329
329
  puts " [MAKIT] Working Directory: #{Dir.pwd}"
330
330
  puts " [MAKIT] Timestamp: #{Time.now.iso8601}"
331
331
  end
@@ -2,12 +2,15 @@
2
2
 
3
3
  require_relative "../setup/runner"
4
4
 
5
- if File.exist?(".makit.json")
6
- desc "Setup project files.."
7
- task :setup do
8
- Makit::Logging.default_logger.task_start("setup")
9
- Makit::Setup::Runner.run
5
+ desc "Setup project files.."
6
+ task :setup do
7
+ Makit::Logging.default_logger.task_start("setup")
8
+
9
+ # if a .git directory exists, then make sure we have a .gitignore
10
+ if File.exist?(".git")
11
+ if !File.exist?(".gitignore")
12
+ File.write(".gitignore", Makit::Content::GITIGNORE)
13
+ end
10
14
  end
11
- else
12
- Makit::Logging.default_logger.debug("Project not configured, skipping setup task definition")
15
+ Makit::Setup::Runner.run
13
16
  end
data/lib/makit/version.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Makit
4
4
  # Static version for now to avoid circular dependency issues
5
- VERSION = "0.0.141"
5
+ VERSION = "0.0.143"
6
6
 
7
7
  # Version management utilities for various file formats
8
8
  #
@@ -97,4 +97,4 @@ module Makit
97
97
  end
98
98
  end
99
99
  end
100
- end
100
+ end
data/lib/makit.rb CHANGED
@@ -15,6 +15,7 @@ require_relative "makit/configuration"
15
15
  require_relative "makit/logging"
16
16
  require_relative "makit/commands"
17
17
  require_relative "makit/serializer"
18
+ require_relative "makit/secrets"
18
19
  require_relative "makit/humanize"
19
20
  require_relative "makit/directories"
20
21
  require_relative "makit/files"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.141
4
+ version: 0.0.143
5
5
  platform: ruby
6
6
  authors:
7
7
  - Your Name
@@ -305,6 +305,7 @@ files:
305
305
  - lib/makit/setup.rb
306
306
  - lib/makit/setup/classlib.rb
307
307
  - lib/makit/setup/gem.rb
308
+ - lib/makit/setup/pages.rb
308
309
  - lib/makit/setup/razorclasslib.rb
309
310
  - lib/makit/setup/runner.rb
310
311
  - lib/makit/show.rb
@@ -355,7 +356,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
355
356
  - !ruby/object:Gem::Version
356
357
  version: '0'
357
358
  requirements: []
358
- rubygems_version: 3.7.0
359
+ rubygems_version: 3.6.9
359
360
  specification_version: 4
360
361
  summary: A Ruby gem
361
362
  test_files: []