team_faker 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +19 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/lib/team_faker/version.rb +3 -0
- data/lib/team_faker.rb +56 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/team_faker_spec.rb +9 -0
- data/team_faker.gemspec +25 -0
- metadata +122 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Matt Augustine
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# TeamFaker
|
2
|
+
|
3
|
+
A module for the fantastic [ffaker gem](https://rubygems.org/gems/ffaker) to generate random team names.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'team_faker'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install team_faker
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
Faker::Team.name
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it ( https://github.com/nosenseworrying/team-faker/fork )
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/lib/team_faker.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
require "ffaker"
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
module Team
|
5
|
+
extend ModuleUtils
|
6
|
+
extend self
|
7
|
+
|
8
|
+
def name
|
9
|
+
case rand(9)
|
10
|
+
when 0 then "#{color} #{animal}"
|
11
|
+
when 1 then "#{adjective} #{animal}"
|
12
|
+
when 2 then "#{adjective} #{color} #{animal}"
|
13
|
+
when 3 then "#{color} #{other}"
|
14
|
+
when 4 then "#{adjective} #{other}"
|
15
|
+
when 5 then "#{adjective} #{color} #{other}"
|
16
|
+
when 7 then "#{color} #{disaster}"
|
17
|
+
when 6 then "#{adjective} #{disaster}"
|
18
|
+
when 7 then "#{color} #{weapon}"
|
19
|
+
when 8 then "#{adjective} #{weapon}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
def color
|
25
|
+
COLORS.sample
|
26
|
+
end
|
27
|
+
|
28
|
+
def animal
|
29
|
+
ANIMALS.sample
|
30
|
+
end
|
31
|
+
|
32
|
+
def disaster
|
33
|
+
DISASTERS.sample
|
34
|
+
end
|
35
|
+
|
36
|
+
def weapon
|
37
|
+
WEAPONS.sample
|
38
|
+
end
|
39
|
+
|
40
|
+
def other
|
41
|
+
OTHER.sample
|
42
|
+
end
|
43
|
+
|
44
|
+
def adjective
|
45
|
+
ADJECTIVES.sample
|
46
|
+
end
|
47
|
+
|
48
|
+
COLORS = k %w[Red Black Silver Magenta Green Blue White Fuschia] unless const_defined? :COLORS
|
49
|
+
ADJECTIVES = k %w[Angry Awesome Mighty Atomic Screaming Scorching Slick Big Giant Speedy Red\ Hot Lil' Rockin' Extreme] unless const_defined? :ADJECTIVES
|
50
|
+
ANIMALS = k %w[Hawks Honeybadgers Mantis\ Shrimps Anteaters Panthers Wolves Lions Eagles Wolverines Gators Scorpions Monkeys Weasels] unless const_defined? :ANIMALS
|
51
|
+
DISASTERS = k %w[Tornados Hurricanes Lightning Thunder Backdraft Fire Firestorms Flames] unless const_defined? :DISASTERS
|
52
|
+
WEAPONS = k %w[Bazookas Machetes Machine\ Guns Daggers Rockets] unless const_defined? :WEAPONS
|
53
|
+
OTHER = k %w[Slayers Bombers Demons Angels X-treme Maniacs Annihilators Rage Bruisers] unless const_defined? :OTHER
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
data/spec/spec_helper.rb
ADDED
data/team_faker.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'team_faker/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "team_faker"
|
8
|
+
gem.version = TeamFaker::VERSION
|
9
|
+
gem.authors = ["Matt Augustine"]
|
10
|
+
gem.email = ["nosenseworrying@gmail.com"]
|
11
|
+
gem.description = "Generates fake team names"
|
12
|
+
gem.summary = "An addon to Faker to generate fake team names"
|
13
|
+
gem.homepage = "https://github.com/nosenseworrying/team-faker"
|
14
|
+
gem.license = "MIT"
|
15
|
+
|
16
|
+
gem.files = `git ls-files`.split($/)
|
17
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
|
+
gem.require_paths = ["lib"]
|
20
|
+
|
21
|
+
gem.add_development_dependency "rspec", "~> 0"
|
22
|
+
gem.add_development_dependency "bundler", "~> 1.5"
|
23
|
+
gem.add_development_dependency "rake", "~> 0"
|
24
|
+
gem.add_dependency "ffaker", "~> 1"
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: team_faker
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Matt Augustine
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-02-21 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: bundler
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.5'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.5'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: ffaker
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '1'
|
78
|
+
description: Generates fake team names
|
79
|
+
email:
|
80
|
+
- nosenseworrying@gmail.com
|
81
|
+
executables: []
|
82
|
+
extensions: []
|
83
|
+
extra_rdoc_files: []
|
84
|
+
files:
|
85
|
+
- .gitignore
|
86
|
+
- Gemfile
|
87
|
+
- LICENSE.txt
|
88
|
+
- README.md
|
89
|
+
- Rakefile
|
90
|
+
- lib/team_faker.rb
|
91
|
+
- lib/team_faker/version.rb
|
92
|
+
- spec/spec_helper.rb
|
93
|
+
- spec/team_faker_spec.rb
|
94
|
+
- team_faker.gemspec
|
95
|
+
homepage: https://github.com/nosenseworrying/team-faker
|
96
|
+
licenses:
|
97
|
+
- MIT
|
98
|
+
post_install_message:
|
99
|
+
rdoc_options: []
|
100
|
+
require_paths:
|
101
|
+
- lib
|
102
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
none: false
|
104
|
+
requirements:
|
105
|
+
- - ! '>='
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '0'
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ! '>='
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
requirements: []
|
115
|
+
rubyforge_project:
|
116
|
+
rubygems_version: 1.8.28
|
117
|
+
signing_key:
|
118
|
+
specification_version: 3
|
119
|
+
summary: An addon to Faker to generate fake team names
|
120
|
+
test_files:
|
121
|
+
- spec/spec_helper.rb
|
122
|
+
- spec/team_faker_spec.rb
|