makit 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/lib/makit/apache.rb +32 -32
  3. data/lib/makit/cli/clean.rb +14 -14
  4. data/lib/makit/cli/clone.rb +59 -59
  5. data/lib/makit/cli/init.rb +38 -38
  6. data/lib/makit/cli/main.rb +33 -33
  7. data/lib/makit/cli/make.rb +54 -54
  8. data/lib/makit/cli/new.rb +37 -37
  9. data/lib/makit/cli/nuget_cache.rb +38 -38
  10. data/lib/makit/cli/pull.rb +31 -31
  11. data/lib/makit/cli/setup.rb +71 -71
  12. data/lib/makit/cli/work.rb +21 -21
  13. data/lib/makit/command_runner.rb +274 -237
  14. data/lib/makit/commands.rb +21 -21
  15. data/lib/makit/content/default_gitignore.rb +5 -5
  16. data/lib/makit/content/default_rakefile.rb +11 -11
  17. data/lib/makit/content/gem_rakefile.rb +14 -14
  18. data/lib/makit/data.rb +50 -50
  19. data/lib/makit/directories.rb +140 -140
  20. data/lib/makit/directory.rb +151 -120
  21. data/lib/makit/dotnet.rb +83 -75
  22. data/lib/makit/environment.rb +123 -123
  23. data/lib/makit/files.rb +47 -47
  24. data/lib/makit/git.rb +66 -66
  25. data/lib/makit/gitlab_runner.rb +60 -60
  26. data/lib/makit/humanize.rb +89 -89
  27. data/lib/makit/logging.rb +96 -96
  28. data/lib/makit/markdown.rb +75 -75
  29. data/lib/makit/mp/basic_object_mp.rb +16 -16
  30. data/lib/makit/mp/command_request.mp.rb +13 -0
  31. data/lib/makit/mp/project_mp.rb +156 -149
  32. data/lib/makit/mp/string_mp.rb +101 -101
  33. data/lib/makit/nuget.rb +57 -57
  34. data/lib/makit/protoc.rb +61 -61
  35. data/lib/makit/serializer.rb +115 -70
  36. data/lib/makit/storage.rb +131 -131
  37. data/lib/makit/symbols.rb +149 -149
  38. data/lib/makit/tasks.rb +67 -67
  39. data/lib/makit/tree.rb +37 -37
  40. data/lib/makit/v1/makit.v1_pb.rb +5 -5
  41. data/lib/makit/v1/makit.v1_services_pb.rb +25 -25
  42. data/lib/makit/version.rb +12 -12
  43. data/lib/makit/wix.rb +95 -95
  44. data/lib/makit/zip.rb +17 -17
  45. data/lib/makit.rb +243 -243
  46. metadata +4 -39
  47. data/.makit.project.json +0 -4
  48. data/.makit.project.yml +0 -2
  49. data/.rubocop.yml +0 -22
  50. data/.ruby-version +0 -1
  51. data/CHANGELOG.md +0 -8
  52. data/CODE_OF_CONDUCT.md +0 -84
  53. data/LICENSE +0 -21
  54. data/README.md +0 -119
  55. data/Rakefile +0 -200
  56. data/docs/Commands.md +0 -50
  57. data/docs_/Commands.md +0 -166
  58. data/docs_/Minitest.Timeouts.md +0 -332
  59. data/examples/protoc/Rakefile +0 -31
  60. data/examples/rake_default/Rakefile +0 -6
  61. data/examples/rubygem-foo/.gitkeep +0 -0
  62. data/examples/rubygem-foo/Rakefile +0 -3
  63. data/examples/run_mp/Rakefile +0 -8
  64. data/exe/makit +0 -5
  65. data/lib/makit/content/default_gitignore.txt +0 -222
  66. data/lib/makit/content/ruby_gitlab-ci.yml +0 -15
  67. data/lib/makit/v1/makit.v1.proto +0 -103
  68. data/makit.generated.sln +0 -30
  69. data/makit.sln +0 -69
  70. data/pages/.gitignore +0 -5
  71. data/pages/404.html +0 -25
  72. data/pages/Gemfile +0 -33
  73. data/pages/Gemfile.lock +0 -88
  74. data/pages/_config.yml +0 -55
  75. data/pages/_layouts/default.html +0 -1
  76. data/pages/_posts/2024-10-05-welcome-to-jekyll.markdown +0 -29
  77. data/pages/about.markdown +0 -18
  78. data/pages/index.markdown +0 -6
  79. data/sig/makit.rbs +0 -4
  80. data/src/ClassLib/Class1.cs +0 -6
  81. data/src/ClassLib/ClassLib.csproj +0 -13
data/lib/makit.rb CHANGED
@@ -1,243 +1,243 @@
1
- # frozen_string_literal: true
2
-
3
- require "rake/clean"
4
- require "logger"
5
- require "json"
6
- require "yaml"
7
-
8
- %w[makit makit/v1 makit/cli makit/content makit/mp].each do |dir|
9
- Dir[File.join(__dir__, dir, "*.rb")].each do |file|
10
- require_relative file
11
- end
12
- end
13
-
14
- module Makit
15
- class Error < StandardError; end
16
-
17
- # Constants
18
- #PROJECT = Makit::V1::Project.create
19
-
20
- STARTTIME = Time.now
21
- IS_GIT_REPO = Dir.exist? ".git"
22
- DETACHED = `git status`.include?("detached")
23
- IS_READ_ONLY = !IS_GIT_REPO || DETACHED
24
- RUNTIME_IDENTIFIER = Makit::Environment::get_runtime_identifier
25
- DEVICE = Socket.gethostname
26
- LOGGER = Makit::Logging::MultiLogger.create_logger
27
-
28
- # Git Commit and Branch/Tag constants
29
- ENV["COMMIT_SHA"] = Makit::Git::commitsha
30
- ENV["COMMIT_BRANCH"] = Makit::Git::branch
31
-
32
- RUNNER = CommandRunner.new
33
- #RUNNER.log_to_artifacts = true
34
- # Variables
35
- log_level = Logger::INFO
36
- package_type = Makit::V1::PackageType::GEM
37
- commands = Makit::Commands.new
38
-
39
- # methods
40
- #
41
- # initialize a git repository
42
- def self.init(directory)
43
- if !Dir.exist?(directory)
44
- FileUtils.mkdir_p(directory)
45
- end
46
- raise Makit::Error.new("directory does not exist: #{directory}") if !Dir.exist?(directory)
47
- Dir.chdir(directory) do
48
- File.write(".gitignore", Makit::Content::GITIGNORE) unless File.exist?(".gitignore")
49
- init = Makit::RUNNER.execute "git init"
50
- if init.exit_code != 0
51
- raise Makit::Error.new("failed to initialize local repository: #{directory}\n#{Makit::Humanize.get_command_summary(init)}")
52
- end
53
- init
54
- end
55
- end
56
-
57
- # clone a git repository to a local directory in Directories::CLONE
58
- # returns the Makit::V1::Command for 'git clone ...'
59
- def self.clone(git_repository)
60
- commands = []
61
- # make sure a local clone of the repository exists
62
- clone_dir = Directories::get_clone_directory(git_repository)
63
- if (!Dir.exist?(clone_dir))
64
- commands << Makit::RUNNER.execute("git clone #{git_repository} #{clone_dir}")
65
- end
66
- commands
67
- end
68
-
69
- # pull the latest changes from the remote repository to a local clone in Directories::CLONE
70
- def self.pull(git_repository)
71
- clone_dir = Directories::get_clone_directory(git_repository)
72
- raise Makit::Error.new("clone directory does not exist: #{clone_dir}") if !Dir.exist?(clone_dir)
73
- Dir.chdir(clone_dir) do
74
- request = Makit::V1::CommandRequest.new(
75
- name: "git",
76
- arguments: ["pull"],
77
- directory: clone_dir,
78
- )
79
- pull_command = Makit::RUNNER.execute(request)
80
- raise Makit::Error.new(Makit::Humanize::get_command_details(pull_command)) if pull_command.exit_code != 0
81
- return pull_command
82
- end
83
- end
84
-
85
- def self.clone_or_pull(git_repository)
86
- commands = []
87
- clone_dir = Directories::get_clone_directory(git_repository)
88
- if Dir.exist?(clone_dir)
89
- commands << pull(git_repository)
90
- else
91
- commands << clone(git_repository)
92
- end
93
- commands
94
- end
95
-
96
- # log information about a specific repository
97
- # return an array of GitLogEntry objects
98
- def self.log(git_repository, limit, skip)
99
- entries = []
100
- clone_dir = Directories::get_clone_directory(git_repository)
101
- raise Makit::Error.new("clone directory does not exist: #{clone_dir}") if !Dir.exist?(clone_dir)
102
- Dir.chdir(clone_dir) do
103
- log_command = Makit::RUNNER.execute("git log -n #{limit} --skip #{skip} --date=iso")
104
- if log_command.exit_code != 0
105
- lines = log_command.stderr.split("\n")
106
- # iterate over the lines, generating a GitLogEntry for each commit
107
- lines.each do |line|
108
- if line.start_with?("commit")
109
- commit = line.split(" ")[1]
110
- entries << GitLogEntry.new(commit)
111
- end
112
- if line.start_with?("Author:")
113
- entries.last.author = line.split(" ")[1..-1].join(" ")
114
- end
115
- if line.start_with?("Date:")
116
- entries.last.date = line.split(" ")[1..-1].join(" ")
117
- end
118
- if line.start_with?(" ")
119
- entries.last.message += line[4..-1]
120
- end
121
- end
122
- end
123
- end
124
- entries
125
- end
126
-
127
- # work on a local clone of a git repository
128
- # if the repository does not exist, clone it
129
- # if the repository exists, pull the latest changes
130
- # if a build command can be found, execute it and return the result Makit::V1::WorkResult
131
- def self.work(repository)
132
- commands = []
133
- work_dir = Makit::Directories::get_work_directory(repository)
134
- commands << clone_or_pull(repository)
135
- clone_dir = Makit::Directories::get_clone_directory(repository)
136
- if !Dir.exist?(work_dir)
137
- # make the parent directory for work_dir if it does not exist
138
- FileUtils.mkdir_p(File.dirname(work_dir)) unless Dir.exist?(File.dirname(work_dir))
139
- Makit::RUNNER::execute "git clone #{clone_dir} #{work_dir}"
140
- end
141
- Dir.chdir(work_dir) do
142
- # if there is no .gitignore file, create one
143
- File.write(".gitignore", Makit::Content::GITIGNORE) unless File.exist?(".gitignore")
144
- end
145
- nil?
146
- end
147
-
148
- def self.enable_monkey_patch
149
- %w[makit/mp].each do |dir|
150
- Dir[File.join(__dir__, dir, "*.rb")].each do |file|
151
- require_relative file
152
- end
153
- end
154
- end
155
- # Given a git repository URL and a commit id, create a new MakeResult object.
156
- def self.make(url, commit, force = false)
157
- log_filename = File.join(Directories::get_log_directory(url), commit, +"#{RUNTIME_IDENTIFIER}.#{DEVICE}.json")
158
- if File.exist?(log_filename) && !force && commit != "latest"
159
- begin
160
- # deserialize the log file to a Makite::V1::MakeResult object
161
- make_result = Makit::V1::MakeResult.decode_json(File.read(log_filename))
162
- return make_result
163
- rescue => e
164
- # if deserialization fails, delete the log file and continue
165
- FileUtils.rm(log_filename)
166
- end
167
- else
168
- commands = []
169
- begin
170
- clone_or_pull(url).each do |command|
171
- commands << command
172
- end
173
- # make sure a local clone of the repository exists
174
- clone_dir = Directories::get_clone_directory(url)
175
- raise Makit::Error.new("clone directory does not exist: #{clone_dir}") if !Dir.exist?(clone_dir)
176
-
177
- if (commit == "latest")
178
- Dir.chdir(clone_dir) do
179
- git_log = Makit::RUNNER.execute("git log -n 1 --date=iso")
180
-
181
- commands << git_log
182
- # assert that the commit is valid
183
- commit = git_log.output.match(/^commit ([0-9a-f]{40})$/i)[1]
184
- raise Makit::Error.new("invalid commit: #{commit}") if commit.nil? || commit.empty? || !commit.match?(/\A[0-9a-f]{40}\z/i)
185
- log_filename = File.join(Directories::get_log_directory(url), commit, +"#{RUNTIME_IDENTIFIER}.#{DEVICE}.json")
186
- end
187
- end
188
-
189
- # clone a fresh copy of the repository to a make directory
190
- make_dir = Directories::get_make_commit_directory(url, commit)
191
- FileUtils.rm_rf(make_dir) if Dir.exist?(make_dir)
192
- commands << Makit::RUNNER.execute("git clone #{clone_dir} #{make_dir}")
193
- raise Makit::Error.new("failed to clone repository: #{url} to #{make_dir}") if !Dir.exist?(make_dir)
194
- Dir.chdir(make_dir) do
195
- commands << Makit::RUNNER.execute("git reset --hard #{commit}")
196
- commands << Makit::RUNNER.execute("git log -n 1")
197
-
198
- commands << Makit::RUNNER.execute("bundle install") if File.exist? "Gemfile"
199
- if File.exist? ("Rakefile")
200
- commands << Makit::RUNNER.execute("rake default")
201
- else
202
- commands << Makit::RUNNER.execute("rake default") if File.exist? "rakefile.rb"
203
- end
204
-
205
- make_result = Makit::V1::MakeResult.new(
206
- repository: url,
207
- commit: commit,
208
- branch: "?",
209
- tag: "?",
210
- device: DEVICE,
211
- runtime_identifier: RUNTIME_IDENTIFIER,
212
- )
213
- commands.flatten.each do |command|
214
- make_result.commands << command
215
- end
216
-
217
- # save the MakeResult object to a log file as pretty printed json
218
- FileUtils.mkdir_p(File.dirname(log_filename)) unless Dir.exist?(File.dirname(log_filename))
219
- File.write(log_filename, make_result.to_json)
220
-
221
- return make_result
222
- end
223
- rescue => e
224
- message = "error raised attempting to make repository: #{url} commit: #{commit}\n\n"
225
- message += "#{e.message}\n"
226
- backtrace = e.backtrace.join("\n")
227
- message += "#{backtrace}\n\n"
228
- message += "commands:\n"
229
- commands.flatten.each do |command|
230
- message += Makit::Humanize::get_command_details(command)
231
- end
232
- raise Makit::Error.new(message)
233
- end
234
- end
235
- end
236
- end
237
-
238
- if !File.exist?(".gitignore")
239
- Makit::LOGGER.info("added .gitignore file")
240
- File.open(".gitignore", "w") do |file|
241
- file.puts Makit::Content::GITIGNORE
242
- end
243
- end
1
+ # frozen_string_literal: true
2
+
3
+ require "rake/clean"
4
+ require "logger"
5
+ require "json"
6
+ require "yaml"
7
+
8
+ %w[makit makit/v1 makit/cli makit/content makit/mp].each do |dir|
9
+ Dir[File.join(__dir__, dir, "*.rb")].each do |file|
10
+ require_relative file
11
+ end
12
+ end
13
+
14
+ module Makit
15
+ class Error < StandardError; end
16
+
17
+ # Constants
18
+ #PROJECT = Makit::V1::Project.create
19
+
20
+ STARTTIME = Time.now
21
+ IS_GIT_REPO = Dir.exist? ".git"
22
+ DETACHED = `git status`.include?("detached")
23
+ IS_READ_ONLY = !IS_GIT_REPO || DETACHED
24
+ RUNTIME_IDENTIFIER = Makit::Environment::get_runtime_identifier
25
+ DEVICE = Socket.gethostname
26
+ LOGGER = Makit::Logging::MultiLogger.create_logger
27
+
28
+ # Git Commit and Branch/Tag constants
29
+ ENV["COMMIT_SHA"] = Makit::Git::commitsha
30
+ ENV["COMMIT_BRANCH"] = Makit::Git::branch
31
+
32
+ RUNNER = CommandRunner.new
33
+ #RUNNER.log_to_artifacts = true
34
+ # Variables
35
+ log_level = Logger::INFO
36
+ package_type = Makit::V1::PackageType::GEM
37
+ commands = Makit::Commands.new
38
+
39
+ # methods
40
+ #
41
+ # initialize a git repository
42
+ def self.init(directory)
43
+ if !Dir.exist?(directory)
44
+ FileUtils.mkdir_p(directory)
45
+ end
46
+ raise Makit::Error.new("directory does not exist: #{directory}") if !Dir.exist?(directory)
47
+ Dir.chdir(directory) do
48
+ File.write(".gitignore", Makit::Content::GITIGNORE) unless File.exist?(".gitignore")
49
+ init = Makit::RUNNER.execute "git init"
50
+ if init.exit_code != 0
51
+ raise Makit::Error.new("failed to initialize local repository: #{directory}\n#{Makit::Humanize.get_command_summary(init)}")
52
+ end
53
+ init
54
+ end
55
+ end
56
+
57
+ # clone a git repository to a local directory in Directories::CLONE
58
+ # returns the Makit::V1::Command for 'git clone ...'
59
+ def self.clone(git_repository)
60
+ commands = []
61
+ # make sure a local clone of the repository exists
62
+ clone_dir = Directories::get_clone_directory(git_repository)
63
+ if (!Dir.exist?(clone_dir))
64
+ commands << Makit::RUNNER.execute("git clone #{git_repository} #{clone_dir}")
65
+ end
66
+ commands
67
+ end
68
+
69
+ # pull the latest changes from the remote repository to a local clone in Directories::CLONE
70
+ def self.pull(git_repository)
71
+ clone_dir = Directories::get_clone_directory(git_repository)
72
+ raise Makit::Error.new("clone directory does not exist: #{clone_dir}") if !Dir.exist?(clone_dir)
73
+ Dir.chdir(clone_dir) do
74
+ request = Makit::V1::CommandRequest.new(
75
+ name: "git",
76
+ arguments: ["pull"],
77
+ directory: clone_dir,
78
+ )
79
+ pull_command = Makit::RUNNER.execute(request)
80
+ raise Makit::Error.new(Makit::Humanize::get_command_details(pull_command)) if pull_command.exit_code != 0
81
+ return pull_command
82
+ end
83
+ end
84
+
85
+ def self.clone_or_pull(git_repository)
86
+ commands = []
87
+ clone_dir = Directories::get_clone_directory(git_repository)
88
+ if Dir.exist?(clone_dir)
89
+ commands << pull(git_repository)
90
+ else
91
+ commands << clone(git_repository)
92
+ end
93
+ commands
94
+ end
95
+
96
+ # log information about a specific repository
97
+ # return an array of GitLogEntry objects
98
+ def self.log(git_repository, limit, skip)
99
+ entries = []
100
+ clone_dir = Directories::get_clone_directory(git_repository)
101
+ raise Makit::Error.new("clone directory does not exist: #{clone_dir}") if !Dir.exist?(clone_dir)
102
+ Dir.chdir(clone_dir) do
103
+ log_command = Makit::RUNNER.execute("git log -n #{limit} --skip #{skip} --date=iso")
104
+ if log_command.exit_code != 0
105
+ lines = log_command.stderr.split("\n")
106
+ # iterate over the lines, generating a GitLogEntry for each commit
107
+ lines.each do |line|
108
+ if line.start_with?("commit")
109
+ commit = line.split(" ")[1]
110
+ entries << GitLogEntry.new(commit)
111
+ end
112
+ if line.start_with?("Author:")
113
+ entries.last.author = line.split(" ")[1..-1].join(" ")
114
+ end
115
+ if line.start_with?("Date:")
116
+ entries.last.date = line.split(" ")[1..-1].join(" ")
117
+ end
118
+ if line.start_with?(" ")
119
+ entries.last.message += line[4..-1]
120
+ end
121
+ end
122
+ end
123
+ end
124
+ entries
125
+ end
126
+
127
+ # work on a local clone of a git repository
128
+ # if the repository does not exist, clone it
129
+ # if the repository exists, pull the latest changes
130
+ # if a build command can be found, execute it and return the result Makit::V1::WorkResult
131
+ def self.work(repository)
132
+ commands = []
133
+ work_dir = Makit::Directories::get_work_directory(repository)
134
+ commands << clone_or_pull(repository)
135
+ clone_dir = Makit::Directories::get_clone_directory(repository)
136
+ if !Dir.exist?(work_dir)
137
+ # make the parent directory for work_dir if it does not exist
138
+ FileUtils.mkdir_p(File.dirname(work_dir)) unless Dir.exist?(File.dirname(work_dir))
139
+ Makit::RUNNER::execute "git clone #{clone_dir} #{work_dir}"
140
+ end
141
+ Dir.chdir(work_dir) do
142
+ # if there is no .gitignore file, create one
143
+ File.write(".gitignore", Makit::Content::GITIGNORE) unless File.exist?(".gitignore")
144
+ end
145
+ nil?
146
+ end
147
+
148
+ def self.enable_monkey_patch
149
+ %w[makit/mp].each do |dir|
150
+ Dir[File.join(__dir__, dir, "*.rb")].each do |file|
151
+ require_relative file
152
+ end
153
+ end
154
+ end
155
+ # Given a git repository URL and a commit id, create a new MakeResult object.
156
+ def self.make(url, commit, force = false)
157
+ log_filename = File.join(Directories::get_log_directory(url), commit, +"#{RUNTIME_IDENTIFIER}.#{DEVICE}.json")
158
+ if File.exist?(log_filename) && !force && commit != "latest"
159
+ begin
160
+ # deserialize the log file to a Makite::V1::MakeResult object
161
+ make_result = Makit::V1::MakeResult.decode_json(File.read(log_filename))
162
+ return make_result
163
+ rescue => e
164
+ # if deserialization fails, delete the log file and continue
165
+ FileUtils.rm(log_filename)
166
+ end
167
+ else
168
+ commands = []
169
+ begin
170
+ clone_or_pull(url).each do |command|
171
+ commands << command
172
+ end
173
+ # make sure a local clone of the repository exists
174
+ clone_dir = Directories::get_clone_directory(url)
175
+ raise Makit::Error.new("clone directory does not exist: #{clone_dir}") if !Dir.exist?(clone_dir)
176
+
177
+ if (commit == "latest")
178
+ Dir.chdir(clone_dir) do
179
+ git_log = Makit::RUNNER.execute("git log -n 1 --date=iso")
180
+
181
+ commands << git_log
182
+ # assert that the commit is valid
183
+ commit = git_log.output.match(/^commit ([0-9a-f]{40})$/i)[1]
184
+ raise Makit::Error.new("invalid commit: #{commit}") if commit.nil? || commit.empty? || !commit.match?(/\A[0-9a-f]{40}\z/i)
185
+ log_filename = File.join(Directories::get_log_directory(url), commit, +"#{RUNTIME_IDENTIFIER}.#{DEVICE}.json")
186
+ end
187
+ end
188
+
189
+ # clone a fresh copy of the repository to a make directory
190
+ make_dir = Directories::get_make_commit_directory(url, commit)
191
+ FileUtils.rm_rf(make_dir) if Dir.exist?(make_dir)
192
+ commands << Makit::RUNNER.execute("git clone #{clone_dir} #{make_dir}")
193
+ raise Makit::Error.new("failed to clone repository: #{url} to #{make_dir}") if !Dir.exist?(make_dir)
194
+ Dir.chdir(make_dir) do
195
+ commands << Makit::RUNNER.execute("git reset --hard #{commit}")
196
+ commands << Makit::RUNNER.execute("git log -n 1")
197
+
198
+ commands << Makit::RUNNER.execute("bundle install") if File.exist? "Gemfile"
199
+ if File.exist? ("Rakefile")
200
+ commands << Makit::RUNNER.execute("rake default")
201
+ else
202
+ commands << Makit::RUNNER.execute("rake default") if File.exist? "rakefile.rb"
203
+ end
204
+
205
+ make_result = Makit::V1::MakeResult.new(
206
+ repository: url,
207
+ commit: commit,
208
+ branch: "?",
209
+ tag: "?",
210
+ device: DEVICE,
211
+ runtime_identifier: RUNTIME_IDENTIFIER,
212
+ )
213
+ commands.flatten.each do |command|
214
+ make_result.commands << command
215
+ end
216
+
217
+ # save the MakeResult object to a log file as pretty printed json
218
+ FileUtils.mkdir_p(File.dirname(log_filename)) unless Dir.exist?(File.dirname(log_filename))
219
+ File.write(log_filename, make_result.to_json)
220
+
221
+ return make_result
222
+ end
223
+ rescue => e
224
+ message = "error raised attempting to make repository: #{url} commit: #{commit}\n\n"
225
+ message += "#{e.message}\n"
226
+ backtrace = e.backtrace.join("\n")
227
+ message += "#{backtrace}\n\n"
228
+ message += "commands:\n"
229
+ commands.flatten.each do |command|
230
+ message += Makit::Humanize::get_command_details(command)
231
+ end
232
+ raise Makit::Error.new(message)
233
+ end
234
+ end
235
+ end
236
+ end
237
+
238
+ if !File.exist?(".gitignore")
239
+ Makit::LOGGER.info("added .gitignore file")
240
+ File.open(".gitignore", "w") do |file|
241
+ file.puts Makit::Content::GITIGNORE
242
+ end
243
+ end
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.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
@@ -139,29 +139,10 @@ dependencies:
139
139
  description: CI/CD tools for Ruby developers.
140
140
  email:
141
141
  - lou.parslow@gmail.com
142
- executables:
143
- - makit
142
+ executables: []
144
143
  extensions: []
145
144
  extra_rdoc_files: []
146
145
  files:
147
- - ".makit.project.json"
148
- - ".makit.project.yml"
149
- - ".rubocop.yml"
150
- - ".ruby-version"
151
- - CHANGELOG.md
152
- - CODE_OF_CONDUCT.md
153
- - LICENSE
154
- - README.md
155
- - Rakefile
156
- - docs/Commands.md
157
- - docs_/Commands.md
158
- - docs_/Minitest.Timeouts.md
159
- - examples/protoc/Rakefile
160
- - examples/rake_default/Rakefile
161
- - examples/rubygem-foo/.gitkeep
162
- - examples/rubygem-foo/Rakefile
163
- - examples/run_mp/Rakefile
164
- - exe/makit
165
146
  - lib/makit.rb
166
147
  - lib/makit/apache.rb
167
148
  - lib/makit/cli/clean.rb
@@ -177,10 +158,8 @@ files:
177
158
  - lib/makit/command_runner.rb
178
159
  - lib/makit/commands.rb
179
160
  - lib/makit/content/default_gitignore.rb
180
- - lib/makit/content/default_gitignore.txt
181
161
  - lib/makit/content/default_rakefile.rb
182
162
  - lib/makit/content/gem_rakefile.rb
183
- - lib/makit/content/ruby_gitlab-ci.yml
184
163
  - lib/makit/data.rb
185
164
  - lib/makit/directories.rb
186
165
  - lib/makit/directory.rb
@@ -193,6 +172,7 @@ files:
193
172
  - lib/makit/logging.rb
194
173
  - lib/makit/markdown.rb
195
174
  - lib/makit/mp/basic_object_mp.rb
175
+ - lib/makit/mp/command_request.mp.rb
196
176
  - lib/makit/mp/project_mp.rb
197
177
  - lib/makit/mp/string_mp.rb
198
178
  - lib/makit/nuget.rb
@@ -202,26 +182,11 @@ files:
202
182
  - lib/makit/symbols.rb
203
183
  - lib/makit/tasks.rb
204
184
  - lib/makit/tree.rb
205
- - lib/makit/v1/makit.v1.proto
206
185
  - lib/makit/v1/makit.v1_pb.rb
207
186
  - lib/makit/v1/makit.v1_services_pb.rb
208
187
  - lib/makit/version.rb
209
188
  - lib/makit/wix.rb
210
189
  - lib/makit/zip.rb
211
- - makit.generated.sln
212
- - makit.sln
213
- - pages/.gitignore
214
- - pages/404.html
215
- - pages/Gemfile
216
- - pages/Gemfile.lock
217
- - pages/_config.yml
218
- - pages/_layouts/default.html
219
- - pages/_posts/2024-10-05-welcome-to-jekyll.markdown
220
- - pages/about.markdown
221
- - pages/index.markdown
222
- - sig/makit.rbs
223
- - src/ClassLib/Class1.cs
224
- - src/ClassLib/ClassLib.csproj
225
190
  homepage: https://gitlab.com/gems-rb/makit
226
191
  licenses:
227
192
  - MIT
@@ -244,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
209
  - !ruby/object:Gem::Version
245
210
  version: '0'
246
211
  requirements: []
247
- rubygems_version: 3.5.20
212
+ rubygems_version: 3.5.16
248
213
  signing_key:
249
214
  specification_version: 4
250
215
  summary: CI/CD tools for Ruby developers.
data/.makit.project.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "gitRemoteUrl": "https://gitlab.com/gems-rb/makit.git",
3
- "name": "Makit"
4
- }
data/.makit.project.yml DELETED
@@ -1,2 +0,0 @@
1
- gitRemoteUrl: https://gitlab.com/gems-rb/makit.git
2
- name: Makit
data/.rubocop.yml DELETED
@@ -1,22 +0,0 @@
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 DELETED
@@ -1 +0,0 @@
1
- 3.3.5
data/CHANGELOG.md DELETED
@@ -1,8 +0,0 @@
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