-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pokename should permit creating a new Rails project with the pokemon name #1
- Loading branch information
Showing
4 changed files
with
32 additions
and
6 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
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 |
---|---|---|
@@ -1 +1 @@ | ||
1.0.0 | ||
1.1.0 |
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 |
---|---|---|
@@ -1,5 +1,18 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'pokename' | ||
require "slop" | ||
|
||
puts Pokename.select_random_name | ||
opts = Slop.parse do |o| | ||
o.bool '-v', '--version', 'display version' | ||
o.bool '-p', '--print', 'only print a random pokename' | ||
end | ||
|
||
if opts.version? | ||
version = File.exist?('VERSION') ? File.read('VERSION') : "?" | ||
puts "pokename v#{version}" | ||
elsif opts.print? | ||
puts Pokename.select_random_name | ||
else | ||
system "rails new #{Pokename.select_random_name}" | ||
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