pokename 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 36264504937d76f854d899d13a98cbe601a27e85
4
+ data.tar.gz: 9e96b6c8c030c316414048dbc427aa4064dfdc8e
5
+ SHA512:
6
+ metadata.gz: d5fcb7bd019a7e79ec71e139fdf93237a1d955afbc41789c3e23274927e21b8a7ae530116c57dd541b8de602129deadd08d607bf4a3c2aa791cd0d0d6070edc7
7
+ data.tar.gz: 313318949def28878733bbf90b6cdf118f994fc4050ce878b024f4149efd75ebfd8b69625053afbb61754af042da773a150163466bc77a95f7f06160cd435d7d
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2015 Lucas Saldanha
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,21 @@
1
+ # Pokéname!
2
+
3
+ Choose a random Pokémon name to name your project.
4
+
5
+ This gem choose one from the 151 Pokémons names (Yeah, just the first generation) to be used in your projects.
6
+
7
+ Thanks http://www.dragonflycave.com/ for your awesome [Pokémon name list generator](http://www.dragonflycave.com/list.aspx)
8
+
9
+ ## Usage
10
+
11
+ First install the gem:
12
+
13
+ `gem install pokename`
14
+
15
+ Then just run it:
16
+
17
+ `pokename`
18
+
19
+ ## Copyright
20
+
21
+ Copyright (c) 2015 Lucas Saldanha. See LICENSE for details.
@@ -0,0 +1,53 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "pokename"
8
+ gem.summary = "Choose a random Pokémon name to name your project"
9
+ gem.description = "This gem choose one from the 151 Pokémons names (Yeah, just the first generation) to be used in your projects."
10
+ gem.email = "lucascrsaldanha@gmail"
11
+ gem.homepage = "https://github.com/lucassaldanha/pokename"
12
+ gem.authors = ["Lucas Saldanha"]
13
+ gem.executables = ["pokename"]
14
+ gem.license = "MIT"
15
+ end
16
+ Jeweler::GemcutterTasks.new
17
+ rescue LoadError
18
+ puts "pokename is not available. Install it with: gem install pokename"
19
+ end
20
+
21
+ require 'rake/testtask'
22
+ Rake::TestTask.new(:test) do |test|
23
+ test.libs << 'lib' << 'test'
24
+ test.pattern = 'test/**/test_*.rb'
25
+ test.verbose = true
26
+ end
27
+
28
+ begin
29
+ require 'rcov/rcovtask'
30
+ Rcov::RcovTask.new do |test|
31
+ test.libs << 'test'
32
+ test.pattern = 'test/**/test_*.rb'
33
+ test.verbose = true
34
+ end
35
+ rescue LoadError
36
+ task :rcov do
37
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
38
+ end
39
+ end
40
+
41
+ task :test => :check_dependencies
42
+
43
+ task :default => :test
44
+
45
+ require 'rdoc/task'
46
+ Rake::RDocTask.new do |rdoc|
47
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
+
49
+ rdoc.rdoc_dir = 'rdoc'
50
+ rdoc.title = "pokename #{version}"
51
+ rdoc.rdoc_files.include('README*')
52
+ rdoc.rdoc_files.include('lib/**/*.rb')
53
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pokename'
4
+
5
+ puts Pokename.select_random_name
@@ -0,0 +1,32 @@
1
+ class Pokename
2
+
3
+ @@names = %w[abra aerodactyl alakazam arbok arcanine articuno beedrill
4
+ bellsprout blastoise bulbasaur butterfree caterpie chansey
5
+ charizard charmander charmeleon clefable clefairy cloyster
6
+ cubone dewgong diglett ditto dodrio doduo dragonair dragonite
7
+ dratini drowzee dugtrio eevee ekans electabuzz electrode
8
+ exeggcute exeggutor farfetchd fearow flareon gastly gengar
9
+ geodude gloom golbat goldeen golduck golem graveler grimer
10
+ growlithe gyarados haunter hitmonchan hitmonlee horsea hypno
11
+ ivysaur jigglypuff jolteon jynx kabuto kabutops kadabra kakuna
12
+ kangaskhan kingler koffing krabby lapras lickitung machamp
13
+ machoke machop magikarp magmar magnemite magneton mankey marowak
14
+ meowth metapod mew mewtwo moltres mrmime muk nidoking nidoqueen
15
+ nidoran nidorina nidorino ninetales oddish omanyte omastar onix
16
+ paras parasect persian pidgeot pidgeotto pidgey pikachu pinsir
17
+ poliwag poliwhirl poliwrath ponyta porygon primeape psyduck
18
+ raichu rapidash raticate rattata rhydon rhyhorn sandshrew
19
+ sandslash scyther seadra seaking seel shellder slowbro slowpoke
20
+ snorlax spearow squirtle starmie staryu tangela tauros tentacool
21
+ tentacruel vaporeon venomoth venonat venusaur victreebel
22
+ vileplume voltorb vulpix wartortle weedle weepinbell weezing
23
+ wigglytuff zapdos zubat]
24
+
25
+ def self.select_random_name
26
+ @@names[1 + rand(@@names.count)]
27
+ end
28
+
29
+ def self.names
30
+ @@names
31
+ end
32
+ end
@@ -0,0 +1,39 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+ # stub: pokename 1.0.0 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "pokename"
9
+ s.version = "1.0.0"
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
13
+ s.authors = ["Lucas Saldanha"]
14
+ s.date = "2015-06-21"
15
+ 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."
16
+ s.email = "lucascrsaldanha@gmail"
17
+ s.executables = ["pokename"]
18
+ s.extra_rdoc_files = [
19
+ "LICENSE",
20
+ "README.md"
21
+ ]
22
+ s.files = [
23
+ ".document",
24
+ "LICENSE",
25
+ "README.md",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "bin/pokename",
29
+ "lib/pokename.rb",
30
+ "pokename.gemspec",
31
+ "test/helper.rb",
32
+ "test/test_pokename.rb"
33
+ ]
34
+ s.homepage = "http://github.com/lucascrsaldanha/pokename"
35
+ s.licenses = ["MIT"]
36
+ s.rubygems_version = "2.4.5"
37
+ s.summary = "Choose a random Pok\u{e9}mon name to name your project"
38
+ end
39
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'shoulda'
4
+
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
7
+ require 'pokename'
8
+
9
+ class Test::Unit::TestCase
10
+ end
@@ -0,0 +1,14 @@
1
+ require 'helper'
2
+
3
+ class TestPokename < Test::Unit::TestCase
4
+ should "have 150 pokemon names" do
5
+ assert_equal(150, Pokename.names.count)
6
+ end
7
+
8
+ should "return a name when call select_random_name" do
9
+ @name = Pokename.select_random_name
10
+ assert_not_empty(@name)
11
+ assert_true(Pokename.names.include? @name)
12
+ end
13
+
14
+ end
metadata ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pokename
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Lucas Saldanha
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-06-21 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: This gem choose one from the 151 Pokémons names (Yeah, just the first
14
+ generation) to be used in your projects.
15
+ email: lucascrsaldanha@gmail
16
+ executables:
17
+ - pokename
18
+ extensions: []
19
+ extra_rdoc_files:
20
+ - LICENSE
21
+ - README.md
22
+ files:
23
+ - ".document"
24
+ - LICENSE
25
+ - README.md
26
+ - Rakefile
27
+ - VERSION
28
+ - bin/pokename
29
+ - lib/pokename.rb
30
+ - pokename.gemspec
31
+ - test/helper.rb
32
+ - test/test_pokename.rb
33
+ homepage: http://github.com/lucascrsaldanha/pokename
34
+ licenses:
35
+ - MIT
36
+ metadata: {}
37
+ post_install_message:
38
+ rdoc_options: []
39
+ require_paths:
40
+ - lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ requirements: []
52
+ rubyforge_project:
53
+ rubygems_version: 2.4.5
54
+ signing_key:
55
+ specification_version: 4
56
+ summary: Choose a random Pokémon name to name your project
57
+ test_files: []