Skip to content

Commit ff06815

Browse files
author
Zachary Scott
committed
Generate a gitignore
1 parent e0a166c commit ff06815

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

bintest/mruby-cli.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
assert_true status.success?, "Process did not exit cleanly"
1313
assert_true Dir.exist?(app_name)
1414
Dir.chdir(app_name) do
15-
(%w(mrbgem.rake build_config.rb Rakefile Dockerfile docker-compose.yml) + ["tools/#{app_name}/#{app_name}.c", "mrblib/#{app_name}.rb", "bintest/#{app_name}.rb"]).each do |file|
15+
(%w(.gitignore mrbgem.rake build_config.rb Rakefile Dockerfile docker-compose.yml) + ["tools/#{app_name}/#{app_name}.c", "mrblib/#{app_name}.rb", "bintest/#{app_name}.rb"]).each do |file|
1616
assert_true(File.exist?(file), "Could not find #{file}")
1717
assert_include output, " create #{file}"
1818
end
@@ -30,7 +30,7 @@
3030
Dir.chdir(app_name) do
3131
output, status = Open3.capture2("rake compile")
3232
assert_true status.success?, "Process did not exit cleanly"
33-
33+
3434
output, status = Open3.capture2("mruby/bin/#{app_name}")
3535
assert_true status.success?, "Process did not exit cleanly"
3636
assert_include output, "Hello World"

mrblib/setup.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def initialize(name, output)
88
def run
99
Dir.mkdir(@name) unless Dir.exist?(@name)
1010
Dir.chdir(@name) do
11+
write_file(".gitignore", gitignore)
1112
write_file("mrbgem.rake", mrbgem_rake)
1213
write_file("build_config.rb", build_config_rb)
1314
write_file("Rakefile", rakefile)
@@ -104,6 +105,12 @@ def mrbgem_rake
104105
MRBGEM_RAKE
105106
end
106107

108+
def gitignore
109+
<<IGNORE
110+
mruby/
111+
IGNORE
112+
end
113+
107114
def build_config_rb
108115
<<BUILD_CONFIG_RB
109116
def gem_config(conf)

0 commit comments

Comments
 (0)