Skip to content

Commit

Permalink
Merge branch 'caiodangelo-master'
Browse files Browse the repository at this point in the history
Pokename should permit creating a new Rails project with the pokemon name #1
  • Loading branch information
lucassaldanha committed Jun 28, 2015
2 parents ccdab0a + 9cf4108 commit 9a60141
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ begin
gem.authors = ["Lucas Saldanha"]
gem.executables = ["pokename"]
gem.license = "MIT"
gem.add_dependency 'slop', '4.2.0'
end
Jeweler::GemcutterTasks.new
rescue LoadError
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.1.0
15 changes: 14 additions & 1 deletion bin/pokename
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
20 changes: 16 additions & 4 deletions pokename.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
# stub: pokename 1.0.0 ruby lib
# stub: pokename 1.1.0 ruby lib

Gem::Specification.new do |s|
s.name = "pokename"
s.version = "1.0.0"
s.version = "1.1.0"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib"]
s.authors = ["Lucas Saldanha"]
s.date = "2015-06-21"
s.date = "2015-06-28"
s.description = "This gem choose one from the 151 Pok\u{e9}mons names (Yeah, just the first generation) to be used in your projects."
s.email = "lucascrsaldanha@gmail"
s.executables = ["pokename"]
Expand All @@ -31,9 +31,21 @@ Gem::Specification.new do |s|
"test/helper.rb",
"test/test_pokename.rb"
]
s.homepage = "http://github.com/lucascrsaldanha/pokename"
s.homepage = "https://github.com/lucassaldanha/pokename"
s.licenses = ["MIT"]
s.rubygems_version = "2.4.5"
s.summary = "Choose a random Pok\u{e9}mon name to name your project"

if s.respond_to? :specification_version then
s.specification_version = 4

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<slop>, ["= 4.2.0"])
else
s.add_dependency(%q<slop>, ["= 4.2.0"])
end
else
s.add_dependency(%q<slop>, ["= 4.2.0"])
end
end

0 comments on commit 9a60141

Please sign in to comment.