makit 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/.makit.project.json +4 -0
  3. data/.makit.project.yml +2 -0
  4. data/.rubocop.yml +22 -0
  5. data/.ruby-version +1 -0
  6. data/CHANGELOG.md +8 -0
  7. data/CODE_OF_CONDUCT.md +84 -0
  8. data/LICENSE +21 -0
  9. data/README.md +119 -0
  10. data/Rakefile +190 -0
  11. data/docs/Commands.md +50 -0
  12. data/docs_/Commands.md +166 -0
  13. data/docs_/Minitest.Timeouts.md +332 -0
  14. data/examples/protoc/Rakefile +31 -0
  15. data/examples/rake_default/Rakefile +5 -0
  16. data/examples/rubygem-foo/.gitkeep +0 -0
  17. data/examples/rubygem-foo/Rakefile +3 -0
  18. data/examples/run_mp/Rakefile +8 -0
  19. data/exe/makit +5 -0
  20. data/lib/makit/apache.rb +32 -0
  21. data/lib/makit/cli/clean.rb +14 -0
  22. data/lib/makit/cli/clone.rb +59 -0
  23. data/lib/makit/cli/init.rb +38 -0
  24. data/lib/makit/cli/main.rb +33 -0
  25. data/lib/makit/cli/make.rb +54 -0
  26. data/lib/makit/cli/new.rb +37 -0
  27. data/lib/makit/cli/nuget_cache.rb +38 -0
  28. data/lib/makit/cli/pull.rb +31 -0
  29. data/lib/makit/cli/setup.rb +71 -0
  30. data/lib/makit/cli/work.rb +21 -0
  31. data/lib/makit/command_runner.rb +237 -0
  32. data/lib/makit/commands.rb +21 -0
  33. data/lib/makit/content/default_gitignore.rb +5 -0
  34. data/lib/makit/content/default_gitignore.txt +222 -0
  35. data/lib/makit/content/default_rakefile.rb +11 -0
  36. data/lib/makit/content/gem_rakefile.rb +14 -0
  37. data/lib/makit/content/ruby_gitlab-ci.yml +15 -0
  38. data/lib/makit/data.rb +50 -0
  39. data/lib/makit/directories.rb +140 -0
  40. data/lib/makit/directory.rb +120 -0
  41. data/lib/makit/dotnet.rb +16 -0
  42. data/lib/makit/environment.rb +123 -0
  43. data/lib/makit/files.rb +47 -0
  44. data/lib/makit/git.rb +66 -0
  45. data/lib/makit/gitlab_runner.rb +60 -0
  46. data/lib/makit/humanize.rb +89 -0
  47. data/lib/makit/logging.rb +96 -0
  48. data/lib/makit/markdown.rb +75 -0
  49. data/lib/makit/mp/basic_object_mp.rb +16 -0
  50. data/lib/makit/mp/project_mp.rb +160 -0
  51. data/lib/makit/mp/string_mp.rb +101 -0
  52. data/lib/makit/nuget.rb +57 -0
  53. data/lib/makit/protoc.rb +61 -0
  54. data/lib/makit/serializer.rb +70 -0
  55. data/lib/makit/storage.rb +131 -0
  56. data/lib/makit/symbols.rb +149 -0
  57. data/lib/makit/tasks.rb +63 -0
  58. data/lib/makit/tree.rb +37 -0
  59. data/lib/makit/v1/makit.v1.proto +103 -0
  60. data/lib/makit/v1/makit.v1_pb.rb +30 -0
  61. data/lib/makit/v1/makit.v1_services_pb.rb +26 -0
  62. data/lib/makit/version.rb +12 -0
  63. data/lib/makit/wix.rb +92 -0
  64. data/lib/makit/zip.rb +17 -0
  65. data/lib/makit.rb +243 -0
  66. data/makit.generated.sln +30 -0
  67. data/makit.sln +69 -0
  68. data/pages/.gitignore +5 -0
  69. data/pages/404.html +25 -0
  70. data/pages/Gemfile +33 -0
  71. data/pages/Gemfile.lock +88 -0
  72. data/pages/_config.yml +55 -0
  73. data/pages/_layouts/default.html +1 -0
  74. data/pages/_posts/2024-10-05-welcome-to-jekyll.markdown +29 -0
  75. data/pages/about.markdown +18 -0
  76. data/pages/index.markdown +6 -0
  77. data/sig/makit.rbs +4 -0
  78. data/src/ClassLib/Class1.cs +6 -0
  79. data/src/ClassLib/ClassLib.csproj +13 -0
  80. metadata +251 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 003a54dbf33616f760ac7443aea7d74e1b70f0b95809ab345be5c54fdabcadfa
4
+ data.tar.gz: 123f91fdb376123091b57b4e596d0e0bc67a4b9ae0a2f592a30ba344ed4a9119
5
+ SHA512:
6
+ metadata.gz: d96b5ea88cd6dd16bbd62dd94bdf31ac47a8677a33fe9f9b5229ab847d0785941a9ed951fe4d920038ac3df33fb194d3d356b676d147e7f0bbd4f32cef7fc590
7
+ data.tar.gz: af5cb838de899f9e19e03221fee0fb61d9d5e87644447c919c463246487f06b6aef544d2d3a59990f4fc581e00d86de97b8c8fe98901073d4206a8821f66bea4
@@ -0,0 +1,4 @@
1
+ {
2
+ "gitRemoteUrl": "https://gitlab.com/gems-rb/makit.git",
3
+ "name": "Makit"
4
+ }
@@ -0,0 +1,2 @@
1
+ gitRemoteUrl: https://gitlab.com/gems-rb/makit.git
2
+ name: Makit
data/.rubocop.yml ADDED
@@ -0,0 +1,22 @@
1
+ require:
2
+ - rubocop-minitest
3
+ - rubocop-rake
4
+
5
+ # Configuration for rubocop-minitest
6
+ Minitest/AssertNil:
7
+ Enabled: true
8
+
9
+ # Configuration for rubocop-rake
10
+ Rake/Desc:
11
+ Enabled: true
12
+
13
+ AllCops:
14
+ TargetRubyVersion: 3.0
15
+ Exclude:
16
+ - 'lib/makit_pb.rb'
17
+
18
+ Style/StringLiterals:
19
+ EnforcedStyle: double_quotes
20
+
21
+ Style/StringLiteralsInInterpolation:
22
+ EnforcedStyle: double_quotes
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.3.5
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ ## [Unreleased]
2
+
3
+ ## Todo
4
+ - [ ] makit new command: command to initialize new projects
5
+
6
+ ## [0.0.0] - 2024-05-25
7
+
8
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at TODO: Write your email address. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Louis Parslow
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,119 @@
1
+ # [Makit](https://gems-rb.gitlab.io/makit/)
2
+
3
+ Makit allows CI/CI tasks to be easily and clearly managed by a single Rakefile
4
+
5
+ Primary objective: CLEAN,CONCISE,READABLE Rakefile
6
+
7
+
8
+ CI/CD DevOps
9
+ move fast, keep it simple, shift left, flatten, test, deliver
10
+
11
+ <details>
12
+ <summary>✔ git --version</summary>
13
+
14
+ ```shell
15
+ git version 2.39.3 (Apple Git-146)
16
+ ```
17
+
18
+
19
+
20
+ </details>
21
+
22
+
23
+ <span style="color:green">✔</span> <span style="color:yellow">git</span> --version
24
+
25
+
26
+
27
+ - [ ] .proto
28
+ - [ ] artifacts: nuget, docker image, console application, desktop Application
29
+ - [ ] docker container management
30
+ - [ ] program installation management
31
+ - [ ] CI/CD build management
32
+
33
+ - [ ] rapid dev in ruby, as features settle, let a rust cli incorporate features
34
+
35
+
36
+ ## Local NuGet Server
37
+
38
+ [LiGet](https://github.com/ai-traders/liget)
39
+
40
+ # directory code/data/liget/data
41
+
42
+ require "raykit"
43
+
44
+ task :setup do
45
+ run "docker pull loicsharma/baget"
46
+ end
47
+ task :start_nuget_server do
48
+ # https://loic-sharma.github.io/BaGet/installation/docker/
49
+ FileUtils.mkdir_p "baget" unless Dir.exist? "baget"
50
+ run "docker run --rm --name nuget-server -p 5555:80 --env-file baget.env -v \"C:/Users/lparslow/code/localhost_services/baget/baget-data:/var/baget\" loicsharma/baget:latest"
51
+
52
+ # dotnet nuget push -s http://localhost:5555/v3/index.json -k NUGET-SERVER-API-KEY package.1.0.0.nupkg
53
+ # dotnet nuget push -s http://localhost:5555/v3/index.json -k NUGET-SERVER-API-KEY symbol.package.1.0.0.snupkg
54
+ end
55
+
56
+ task :update_baget_packages => [:start_nuget_server] do
57
+ start_task :update_baget_packages
58
+ nuget_source_dir = "P:/code/nuget"
59
+ baget_push_url = ENV["BAGET_PUSH_URL"]
60
+ baget_api_key = ENV["BAGET_API_KEY"]
61
+
62
+ # Check if local NuGet directory exists
63
+ unless Dir.exist?(nuget_source_dir)
64
+ puts "NuGet source directory does not exist."
65
+ exit 1
66
+ end
67
+
68
+ if baget_push_url && baget_api_key && !baget_api_key.empty?
69
+ packages = latest_packages(nuget_source_dir)
70
+ puts "Found #{packages.length} packages to push to BaGet."
71
+ push_packages(nuget_source_dir, packages, baget_push_url, baget_api_key)
72
+ else
73
+ puts "Missing BaGet API key or push URL."
74
+ end
75
+ end
76
+
77
+ # Method to identify the latest version of each package
78
+ def latest_packages(nuget_source_dir)
79
+ packages = {}
80
+
81
+ puts "scanning #{nuget_source_dir} for packages..."
82
+ Dir.glob("#{nuget_source_dir}/**/*.nupkg").each do |file|
83
+ filename = File.basename(file, ".nupkg")
84
+ relative_filename = file.sub("#{nuget_source_dir}/", "")
85
+ # the name if the first segment of the relative_filename
86
+ name = relative_filename.split("/").first
87
+ parts = filename.split(".")
88
+ version = parts.pop
89
+ id = parts.join(".")
90
+
91
+ if packages[id].nil? || Gem::Version.new(version) > Gem::Version.new(packages[id])
92
+ #packages[id] = version
93
+ #puts "Found #{id} version #{version}."
94
+ #puts "file #{file}"
95
+ #puts "rel_file #{relative_filename}"
96
+ #puts "name #{name}"
97
+ #puts "version #{version}"
98
+ packages[name] = filename
99
+ end
100
+ end
101
+
102
+ packages
103
+ end
104
+
105
+ # Push the latest packages to BaGet
106
+ def push_packages(nuget_source_dir, packages, baget_push_url, baget_api_key)
107
+ packages.each do |name, filename|
108
+ package_filename = filename #"#{nuget_source_dir}/#{id}.#{version}.nupkg"
109
+ push_command = "dotnet nuget push -s #{baget_push_url} -k #{baget_api_key} --skip-duplicate #{package_filename}"
110
+ puts "Pushing #{filename}..."
111
+ system(push_command)
112
+
113
+ if $?.success?
114
+ puts "Package #{filename} pushed successfully."
115
+ else
116
+ puts "Failed to push package #{filename}."
117
+ end
118
+ end
119
+ end
data/Rakefile ADDED
@@ -0,0 +1,190 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/makit"
4
+
5
+ desc "setup the environment"
6
+ task :setup do
7
+ puts ":setup".colorize(:blue)
8
+ "bundle install".run
9
+
10
+ # setup jekyll static web site
11
+ "jekyll new pages --skip-bundle".run unless Dir.exist?("pages")
12
+ FileUtils.mkdir_p("pages/_layouts") unless Dir.exist?("pages/_layouts")
13
+ Dir.chdir("pages/_layouts") do
14
+ "curl -O https://raw.githubusercontent.com/jekyll/minima/master/_layouts/default.html".run
15
+ end
16
+ raise "pages/_layouts/default.html not found" unless File.exist?("pages/_layouts/default.html")
17
+
18
+ Makit::Protoc::setup
19
+ end
20
+
21
+ desc "generate code from proto file"
22
+ task :generate do
23
+ puts ":generate".colorize(:blue)
24
+
25
+ "protoc --ruby_out=. lib/makit/v1/makit.v1.proto".run
26
+ #puts " grpc_tools_ruby_protoc -I . --ruby_out=. --grpc_out=. lib/makit/v1/makit.v1.proto"
27
+ #"grpc_tools_ruby_protoc -I . --ruby_out=. --grpc_out=. lib/makit/v1/makit.v1.proto".run
28
+
29
+ puts " replacing require statement in makit.v1_services.rb"
30
+ # replace the require 'lib/makit/makit_pb' with require_relative 'makit_pb'
31
+ # require 'lib/makit/v1/makit.v1_pb'
32
+ File.write("lib/makit/v1/makit.v1_services_pb.rb",
33
+ File.read("lib/makit/v1/makit.v1_services_pb.rb").gsub("require 'lib/makit/v1/makit.v1_pb'",
34
+ "require_relative 'makit.v1_pb'"))
35
+ end
36
+
37
+ desc "build the gem"
38
+ task :build => [:generate] do
39
+ puts ":build".colorize(:blue)
40
+ "gem build makit.gemspec".run
41
+
42
+ Dir.chdir("pages") do
43
+ #"bundle exec jekyll build -d ../artifacts/pages".run
44
+ #"jekyll build -d ../artifacts/website".run
45
+ end
46
+ end
47
+
48
+ desc "test the gem"
49
+ task :test do
50
+ puts ":test".colorize(:blue)
51
+ puts " rakefile is " + "#{Rake.application.rakefile}".colorize(:green)
52
+
53
+ `ruby -r minitest/autorun test/test_makit.rb -- --fail-fast > artifacts/test_makit.log 2>&1`
54
+ "ruby -r minitest/autorun test/test_makit.rb -- --fail-fast".run
55
+ #"bundle exec rake".run
56
+ end
57
+
58
+ desc "test the examples"
59
+ task :test_examples do
60
+ start_time = Time.now
61
+ puts "=" * 80
62
+ puts ":test_examples".colorize(:blue) + " started at #{start_time}"
63
+ puts "=" * 80
64
+ # loop over each directory in the examples directory and print out its name
65
+ Dir.glob("examples/*").each do |dir|
66
+ puts "#{dir}".colorize(:bold)
67
+ Dir.chdir(dir) do
68
+ # run the rake command in each directory
69
+ "rake".run
70
+ # delete the .gitignore file in each directory
71
+ File.delete(".gitignore") if File.exist? ".gitignore"
72
+ end
73
+ end
74
+ puts "=" * 80
75
+ puts ":test_examples".colorize(:blue) + " completed in #{Time.now - start_time} seconds"
76
+ puts "=" * 80
77
+ end
78
+
79
+ desc "update the project"
80
+ task :update do # : "rubocop:autocorrect_all" do
81
+ "rufo .".run({ exit_on_error: false })
82
+ "bundle update".run
83
+ end
84
+
85
+ desc "install the gem"
86
+ task :install => [:build] do
87
+ puts ":install".colorize(:blue)
88
+ "gem uninstall makit -a -x".run
89
+ "gem install makit-#{Makit::VERSION}.gem".run
90
+ # publish to [HOME]/code/artifacts/rubygems
91
+ if (Dir.exist?(File.join(Makit::Directories::HOME, "code", "artifacts", "rubygems")))
92
+ puts " copying gem to [HOME]/code/artifacts/rubygems".colorize(:green)
93
+ FileUtils.cp("makit-#{Makit::VERSION}.gem", File.join(Makit::Directories::HOME, "code", "artifacts", "rubygems"))
94
+ end
95
+ # publish to [ONEDRIVE]/code/rubygems
96
+ if (Dir.exist?(File.join(Makit::Directories::ONEDRIVE, "code", "artifacts", "rubygems")))
97
+ puts " copying gem to [ONEDRIVE]/code/artifacts/rubygems".colorize(:green)
98
+ FileUtils.cp("makit-#{Makit::VERSION}.gem", File.join(Makit::Directories::ONEDRIVE, "code", "artifacts", "rubygems"))
99
+ end
100
+ end
101
+
102
+ task :publish => [:build,:test, :integrate] do
103
+ puts ":publish".colorize(:blue)
104
+ gem = "makit-#{Makit::VERSION}.gem"
105
+ puts "gem file #{gem} does not exist" unless File.exist?(gem)
106
+
107
+ gem_list_text =`gem list --remote makit`# Raykit::Command::new("gem list --remote makit").run.output
108
+ if gem_list_text.include?("makit")
109
+ "gem list --remote makit".run
110
+ latest_published_version =''
111
+ makit_list= `gem list --remote makit`.gsub(" ruby", "").strip
112
+ if(makit_list.length > 0)
113
+ # check if scan is empty
114
+ if(makit_list.scan(/makit \(([\d.]+)\)/).empty?)
115
+ latest_published_version = ""
116
+ else
117
+ latest_published_version = makit_list.scan(/makit \(([\d.]+)\)/).last.first
118
+ end
119
+ end
120
+ all_versions = `gem list --remote makit --all`
121
+ puts " last published version #{latest_published_version}"
122
+ if Makit::VERSION == latest_published_version || all_versions.include?("#{Makit::VERSION}")
123
+ puts " gem #{gem} already published"
124
+ else
125
+ "gem push #{gem}".run
126
+ end
127
+ else
128
+ puts " unable to list Makit::VERSION from --remote, internet may not be available"
129
+ end
130
+ end
131
+
132
+
133
+ task :info do
134
+ puts ":info".colorize(:blue)
135
+
136
+ # collect all tasks that have been defined in the Rakefile and display them
137
+ #puts " tasks defined in the Rakefile"
138
+ #Rake.application.tasks.each do |task|
139
+ # puts " #{task.name}"
140
+ #end
141
+
142
+ largest_ruby_file = "?"
143
+ largest_ruby_file_size = 0
144
+ largest_ruby_file_loc = 0
145
+ Dir.glob("**/*.rb").each do |file|
146
+ file_size = File.size(file)
147
+ if (file_size > largest_ruby_file_size)
148
+ largest_ruby_file = file
149
+ largest_ruby_file_size = file_size
150
+ end
151
+ end
152
+
153
+ largest_ruby_file_loc = Makit::Directory::get_line_count(largest_ruby_file)
154
+
155
+ puts " largest ruby file " + largest_ruby_file.colorize(:green) + " is #{largest_ruby_file_size} bytes" + " #{largest_ruby_file_loc} loc"
156
+ end
157
+
158
+ desc "execute the default tasks for the project"
159
+ task default: %i[setup generate build test integrate sync install info] do
160
+ SHARED_ARTIFACTS = File.join(Makit::Directories::ONEDRIVE, "artifacts")
161
+ if (Dir.exist?(SHARED_ARTIFACTS))
162
+ #puts " copying gem to #{SHARED_ARTIFACTS}".colorize(:green)
163
+ #FileUtils.cp("makit-#{Makit::VERSION}.gem", SHARED_ARTIFACTS)
164
+ end
165
+ Makit::LOGGER.info("completed in #{Time.now - Makit::STARTTIME} seconds")
166
+ #system("bundle outdated")
167
+ #puts `bundle outdated`
168
+
169
+ end
170
+
171
+ #
172
+ #
173
+ #
174
+ #
175
+ #
176
+ #
177
+ #
178
+ #
179
+ #
180
+ #
181
+ #
182
+ # Register the at_exit hook for cleanup
183
+ at_exit do
184
+ puts "Performing cleanup..."
185
+ # Add your cleanup code here
186
+ # For example, close files, remove temporary files, etc.
187
+ json_filename = File.join(Makit::Directories::PROJECT_ROOT, ".makit.project.json")
188
+ puts "Saving project state to #{json_filename}"
189
+ Makit::PROJECT.save_as(json_filename)
190
+ end
data/docs/Commands.md ADDED
@@ -0,0 +1,50 @@
1
+ # Markdown Examples
2
+
3
+ <details>
4
+ <summary>✓ pwd </summary>
5
+
6
+ <table><tr><th>output</th></tr><tr><td>
7
+
8
+ ```shell
9
+ /Users/louie/code/work/gitlab/gems-rb/makit
10
+
11
+ ```
12
+
13
+ </td></tr></table>
14
+
15
+ | exit code | started at | duration | user | device | os | directory |
16
+ | --- | --- | --- | --- | --- | --- | --- |
17
+ | 0 | 2024-10-05 10:37:22 | 0h 0m 0.0s | | | | /Users/louie/code/work/gitlab/gems-rb/makit |
18
+ </details>
19
+ <details>
20
+ <summary>✓ git --version</summary>
21
+
22
+ <table><tr><th>output</th></tr><tr><td>
23
+
24
+ ```shell
25
+ git version 2.39.5 (Apple Git-154)
26
+
27
+ ```
28
+
29
+ </td></tr></table>
30
+
31
+ | exit code | started at | duration | user | device | os | directory |
32
+ | --- | --- | --- | --- | --- | --- | --- |
33
+ | 0 | 2024-10-05 10:37:22 | 0h 0m 0.01s | | | | /Users/louie/code/work/gitlab/gems-rb/makit |
34
+ </details>
35
+ <details>
36
+ <summary>✓ ruby --version</summary>
37
+
38
+ <table><tr><th>output</th></tr><tr><td>
39
+
40
+ ```shell
41
+ ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin23]
42
+
43
+ ```
44
+
45
+ </td></tr></table>
46
+
47
+ | exit code | started at | duration | user | device | os | directory |
48
+ | --- | --- | --- | --- | --- | --- | --- |
49
+ | 0 | 2024-10-05 10:37:22 | 0h 0m 0.01s | | | | /Users/louie/code/work/gitlab/gems-rb/makit |
50
+ </details>