-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
69 lines (53 loc) · 1.47 KB
/
Copy pathRakefile
File metadata and controls
69 lines (53 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
task default: :spec
# Custom tasks for CodeHealer gem
namespace :code_healer do
desc "Run all tests"
task test: :spec
desc "Check code quality with RuboCop"
task :rubocop do
system("bundle exec rubocop")
end
desc "Generate documentation with YARD"
task :docs do
system("bundle exec yard doc")
end
desc "Build the gem"
task :build do
system("gem build code_healer.gemspec")
end
desc "Install the gem locally"
task :install => :build do
system("gem install code_healer-*.gem")
end
desc "Push to RubyGems"
task :release => :build do
system("gem push self_evolving-*.gem")
end
desc "Clean build artifacts"
task :clean do
FileUtils.rm_f(Dir.glob("code_healer-*.gem"))
FileUtils.rm_rf("doc") if Dir.exist?("doc")
FileUtils.rm_rf("coverage") if Dir.exist?("coverage")
end
desc "Setup development environment"
task :setup do
puts "Setting up CodeHealer development environment..."
# Install dependencies
system("bundle install")
# Create necessary directories
FileUtils.mkdir_p("tmp")
FileUtils.mkdir_p("log")
puts "✅ Development environment setup complete!"
end
desc "Run example"
task :example do
puts "Running basic usage example..."
system("ruby examples/basic_usage.rb")
end
end
# Add RuboCop to default task
task default: [:spec, :rubocop]