Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds executable to create project without need to know the template path
- Loading branch information
1 parent
86665d9
commit d61c25b
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env ruby | ||
lib = File.expand_path("../../lib", __FILE__) | ||
$:.unshift lib unless $:.include?(lib) | ||
|
||
template = File.expand_path("../../template.rb", __FILE__) | ||
|
||
if !ARGV[0] | ||
puts "qual o nome do projeto?" | ||
else | ||
command = "rails new #{ARGV[0]} -m #{template}" | ||
puts "executando: #{command}" | ||
system(command) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters