azeroth_faker 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d021f3fa0655433ea0e839e0fc311f5809951996
4
+ data.tar.gz: c0a8d61b4c3ea48eca55a52a7e311cc329f7b53d
5
+ SHA512:
6
+ metadata.gz: 3ec6ef7a6fbb56fd0eb0e9ecba3df48d943fc817873d8ee2a3af163baabdea24904c104929ef457d7c892029d316bac400223cef1b1d7df7e3c736507f4b7e71
7
+ data.tar.gz: 387b7d4e5a71aec0257a7caa8c9f8820f8de5f586c67df62ee17d97020f3dfc8b96ad32c07225662210577aa297972fe7fec08e5e85c02703c36722d98ded1ec
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ -2.0.0
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ #Specify your dependencies in azeroth_faker.gemspec
4
+ gemspec
5
+ gem 'nokogiri'
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Ganesh Balaji
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,24 @@
1
+ # Azeroth_Faker
2
+
3
+ An Azeorth Faker gem that provides data from the Warcraft universe
4
+
5
+ #Installing:
6
+ gem install azeroth_faker
7
+
8
+ #Usage:
9
+ ``` ruby
10
+ AZEROTHFaker::Character.random_name #=>"Illidan Stormrage"
11
+
12
+ AZEROTHFaker::Race.name #=> "Orc"
13
+ ```
14
+
15
+ ##AZEROTHFaker::Character
16
+
17
+ * #random_name
18
+ * #first_name
19
+ * #last_name
20
+
21
+
22
+ ##AZEROTHFaker::Race
23
+
24
+ * #name
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
Binary file
@@ -0,0 +1,28 @@
1
+ # coding
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ require 'azeroth_faker/version'
6
+
7
+
8
+ Gem::Specification.new do |spec|
9
+ spec.name = "azeroth_faker"
10
+ spec.version = AzerothFaker::VERSION
11
+ spec.author = ["Ganesh Balaji"]
12
+ spec.email = ["ganeshkbalaji0112@gmail.com"]
13
+ spec.licenses = ['MIT']
14
+ spec.homepage = 'https://github.com/ganeshkbalaji/azeroth_faker.git'
15
+ spec.summary = %q(Generate fake data from Azeroth and the Warcraft universe)
16
+ spec.description = %q(Faker for data from the Warcraft Universe)
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ if spec.respond_to?(:metadata)
23
+ spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
24
+ end
25
+
26
+ spec.add_development_dependency "bundler", "~> 1.9"
27
+ spec.add_development_dependency "rake", "~> 10.0"
28
+ end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "azeroth_faker"
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
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,8 @@
1
+ require 'azeroth_faker/version'
2
+
3
+ require 'azeroth_faker/character'
4
+ require 'azeroth_faker/race'
5
+
6
+
7
+ module AZEROTHFaker
8
+ end
@@ -0,0 +1,26 @@
1
+ require 'nokogiri'
2
+ require 'open-uri'
3
+
4
+ module AZEROTHFaker
5
+ class Character
6
+ noko = Nokogiri::HTML(open("http://wowwiki.wikia.com/wiki/Major_characters"))
7
+ @names = noko.search('#mw-content-text > a').map {|name| name.inner_text}
8
+
9
+ def self.random_name
10
+ @names.sample
11
+ end
12
+
13
+ def self.first_name
14
+ @name = @names.sample.split
15
+ return name[0]
16
+ end
17
+
18
+ def self.last_name
19
+ name = @names.sample.split
20
+ while name.length < 1
21
+ name = @names.sample
22
+ end
23
+ return name[-1]
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,21 @@
1
+ module AZEROTHFaker
2
+ class Race
3
+ def self.name
4
+ [
5
+ 'Orc',
6
+ 'Troll',
7
+ 'Undead',
8
+ 'Tauren',
9
+ 'Blood elf',
10
+ 'Goblin',
11
+ 'Pandaren',
12
+ 'Human',
13
+ 'Night elf',
14
+ 'Dwarf',
15
+ 'Gnome',
16
+ 'Draenei',
17
+ 'Worgen'
18
+ ].sample
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,3 @@
1
+ module AzerothFaker
2
+ VERSION = "0.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: azeroth_faker
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ganesh Balaji
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.9'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: Faker for data from the Warcraft Universe
42
+ email:
43
+ - ganeshkbalaji0112@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - .travis.yml
49
+ - Gemfile
50
+ - LICENSE
51
+ - README.md
52
+ - Rakefile
53
+ - azeroth_faker-0.1.0.gem
54
+ - azeroth_faker.gemspec
55
+ - bin/console
56
+ - bin/setup
57
+ - lib/azeroth_faker.rb
58
+ - lib/azeroth_faker/character.rb
59
+ - lib/azeroth_faker/race.rb
60
+ - lib/azeroth_faker/version.rb
61
+ homepage: https://github.com/ganeshkbalaji/azeroth_faker.git
62
+ licenses:
63
+ - MIT
64
+ metadata:
65
+ allowed_push_host: 'TODO: Set to ''http://mygemserver.com'' to prevent pushes to
66
+ rubygems.org, or delete to allow pushes to any server.'
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubyforge_project:
83
+ rubygems_version: 2.0.14
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: Generate fake data from Azeroth and the Warcraft universe
87
+ test_files: []