Skip to content

Commit

Permalink
adds executable to create project without need to know the template path
Browse files Browse the repository at this point in the history
  • Loading branch information
mistersourcerer committed Apr 16, 2012
1 parent 86665d9 commit d61c25b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bin/gnarus_activity
@@ -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
2 changes: 2 additions & 0 deletions gnarus_exercise.gemspec
Expand Up @@ -20,4 +20,6 @@ Gem::Specification.new do |s|
# s.add_dependency "jquery-rails"

s.add_development_dependency "sqlite3"

s.executables = ["gnarus_activity"]
end

0 comments on commit d61c25b

Please sign in to comment.