faker-game 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/Gemfile +4 -0
- data/README.md +67 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/faker-game.gemspec +22 -0
- data/lib/faker/game.rb +70 -0
- data/lib/faker/game/version.rb +5 -0
- metadata +99 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d5df9d6e889533031c5625a783dd1f1bcef551c5
|
4
|
+
data.tar.gz: 467d241b707d41e3bcd76b77cdce10c3308109fc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7644d8ae28a66f114dd0406ea031a69f495eae0ce64fb9b43ee2e74c63198fbdf96c92d4f12261c2fdb11d30d86fdf784c15b407d35ef9e353ebd9594b06b01b
|
7
|
+
data.tar.gz: 5f11251ee2a9fe79664906e961aa6647f6376f689a4dd031054424ad8cd49376c1a3124a53ca8b36d5722f8edba928cd34f910477a695eb5d56ec1280adb54b1
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Faker::Game
|
2
|
+
|
3
|
+
## Game Franchise Name
|
4
|
+
|
5
|
+
```ruby
|
6
|
+
Faker::Game.franchise # => "Titan Battler"
|
7
|
+
```
|
8
|
+
|
9
|
+
## Game Ability Measurement
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
Faker::Game.ability_measurement # => "Mana"
|
13
|
+
```
|
14
|
+
|
15
|
+
## Game Currency
|
16
|
+
|
17
|
+
Generates the singular form of an in-game currency.
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
Faker::Game.currency # => "Gem"
|
21
|
+
```
|
22
|
+
|
23
|
+
## Hero
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
Faker::Game.hero # => "Knight"
|
27
|
+
```
|
28
|
+
|
29
|
+
## Enemy
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
Faker::Game.enemy # => "Ghoul"
|
33
|
+
```
|
34
|
+
|
35
|
+
## Complex Game Name Prefix
|
36
|
+
|
37
|
+
Includes the name of a fictitious game creator.
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
Faker::Game.prefix # => "Ryley Lang's Witch Fighter"
|
41
|
+
```
|
42
|
+
|
43
|
+
## Game Subtitle
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
Faker::Game.subtitle # => "Silver Titans"
|
47
|
+
```
|
48
|
+
|
49
|
+
## Game Name
|
50
|
+
|
51
|
+
Generates a full game name, sometimes with a franchise title.
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
Faker::Game.name # => "Ghoul Killer IV"
|
55
|
+
```
|
56
|
+
|
57
|
+
## Game Name with Franchise
|
58
|
+
|
59
|
+
Forces a franchise prefix.
|
60
|
+
|
61
|
+
```ruby
|
62
|
+
Faker::Game.name_with_franchise # => "Aida Bahringer's Insurgent Hunter 4: Iron Tangos"
|
63
|
+
```
|
64
|
+
|
65
|
+
## Contributing
|
66
|
+
|
67
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/chrisb/faker-game.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "faker/game"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/faker-game.gemspec
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'faker/game/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "faker-game"
|
8
|
+
spec.version = Faker::Game::VERSION
|
9
|
+
spec.authors = ["Chris Bielinski"]
|
10
|
+
spec.email = ["cbielinski@payoff.com"]
|
11
|
+
spec.summary = 'Faker extension for generating game names, player usernames, achievements, etc.'
|
12
|
+
spec.description = 'Faker extension for generating game names, player usernames, achievements, etc. Useful for faking anything related to games though specfically focused on shooters and RPG-type elements.'
|
13
|
+
spec.homepage = 'https://github.com/chrisb/faker-game'
|
14
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
15
|
+
spec.bindir = "exe"
|
16
|
+
spec.licenses = %w(MIT)
|
17
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
|
+
spec.require_paths = ["lib"]
|
19
|
+
spec.add_dependency 'faker', '~> 1'
|
20
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
21
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
22
|
+
end
|
data/lib/faker/game.rb
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'faker'
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
module Game
|
5
|
+
class << self
|
6
|
+
def franchise
|
7
|
+
"#{enemy} #{verb_noun}"
|
8
|
+
end
|
9
|
+
|
10
|
+
def ability_measurement
|
11
|
+
%w(Renown Mana XP Experience Power).sample
|
12
|
+
end
|
13
|
+
|
14
|
+
def currency
|
15
|
+
%w(Credit Point Gem Orb)
|
16
|
+
end
|
17
|
+
|
18
|
+
def adjective
|
19
|
+
%w(Gold Golden Bloodied Bloody Mighty Powerful Damaged Dark Black Silver Iron).sample
|
20
|
+
end
|
21
|
+
|
22
|
+
def noun
|
23
|
+
%w(Power War Heart Darkness Soul Lost).sample
|
24
|
+
end
|
25
|
+
|
26
|
+
def hero
|
27
|
+
%w(Soldier Hero Knight Savior Commander).sample
|
28
|
+
end
|
29
|
+
|
30
|
+
def verb_noun
|
31
|
+
%w(Killer Destroyer Fighter Battler Vanquisher Hunter Commander Collector).sample
|
32
|
+
end
|
33
|
+
|
34
|
+
def enemy
|
35
|
+
%w(Ghost Titan Banshee Witch Insurgent Thief Ghoul Monster Tango Terrorist).sample
|
36
|
+
end
|
37
|
+
|
38
|
+
def suffix
|
39
|
+
(%w(II III IV V VI X SE HD Remastered 2 3 4) << nil).sample
|
40
|
+
end
|
41
|
+
|
42
|
+
def prefix
|
43
|
+
"#{creator}'s #{franchise}"
|
44
|
+
end
|
45
|
+
|
46
|
+
def subtitle
|
47
|
+
[ "The #{verb_noun} of #{enemy.pluralize}",
|
48
|
+
"#{adjective} #{enemy.pluralize}",
|
49
|
+
"#{adjective} #{hero}" ].sample
|
50
|
+
end
|
51
|
+
|
52
|
+
def name
|
53
|
+
[ "The #{verb_noun} of #{enemy.pluralize}",
|
54
|
+
"#{franchise} #{suffix}".strip,
|
55
|
+
"#{enemy} #{verb_noun}",
|
56
|
+
"#{adjective} #{hero}",
|
57
|
+
franchise,
|
58
|
+
"#{prefix}", nil ].sample || name_with_franchise
|
59
|
+
end
|
60
|
+
|
61
|
+
def name_with_franchise
|
62
|
+
"#{creator}'s #{franchise} #{suffix}: #{subtitle}".squish
|
63
|
+
end
|
64
|
+
|
65
|
+
def creator
|
66
|
+
"#{Faker::Name.first_name} #{Faker::Name.last_name}"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
metadata
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: faker-game
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chris Bielinski
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-12-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faker
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.11'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.11'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description: Faker extension for generating game names, player usernames, achievements,
|
56
|
+
etc. Useful for faking anything related to games though specfically focused on shooters
|
57
|
+
and RPG-type elements.
|
58
|
+
email:
|
59
|
+
- cbielinski@payoff.com
|
60
|
+
executables: []
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- ".gitignore"
|
65
|
+
- Gemfile
|
66
|
+
- README.md
|
67
|
+
- Rakefile
|
68
|
+
- bin/console
|
69
|
+
- bin/setup
|
70
|
+
- faker-game.gemspec
|
71
|
+
- lib/faker/game.rb
|
72
|
+
- lib/faker/game/version.rb
|
73
|
+
homepage: https://github.com/chrisb/faker-game
|
74
|
+
licenses:
|
75
|
+
- MIT
|
76
|
+
metadata: {}
|
77
|
+
post_install_message:
|
78
|
+
rdoc_options: []
|
79
|
+
require_paths:
|
80
|
+
- lib
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
requirements: []
|
92
|
+
rubyforge_project:
|
93
|
+
rubygems_version: 2.4.5.1
|
94
|
+
signing_key:
|
95
|
+
specification_version: 4
|
96
|
+
summary: Faker extension for generating game names, player usernames, achievements,
|
97
|
+
etc.
|
98
|
+
test_files: []
|
99
|
+
has_rdoc:
|