roll_for_initiative 0.2.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.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +45 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/roll_for_initiative +5 -0
- data/bin/setup +8 -0
- data/lib/roll_for_initiative/cli.rb +129 -0
- data/lib/roll_for_initiative/klass.rb +39 -0
- data/lib/roll_for_initiative/scraper.rb +46 -0
- data/lib/roll_for_initiative/version.rb +3 -0
- data/lib/roll_for_initiative.rb +15 -0
- data/roll_for_initiative.gemspec +38 -0
- metadata +137 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e62492691000b2a5c25727f66a96cc8188b5e3b1e6f3b3a403206e0ff3e9c1f6
|
4
|
+
data.tar.gz: 04fff12b84be6696c751ab0251ebe8ed0b5b8d337726916663c0cc425fff8276
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2f7bcae5407e1856dc910dacbc1b468d92c019d2faf83e988160086ea8d31f7a0886095bd775aa3a3f871cae6816795d024ef5455cb284848a059b29bc713551
|
7
|
+
data.tar.gz: 4b501980663625cf664397dce76b001aeef2269bc24745fd23087d8cdbab8b8441ffc58d5277b783fcd92b7a01f9ca6b459527f86bc55fe31fb46c3d4a5f059a
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at m.calkins576@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
roll_for_initiative (0.2.0)
|
5
|
+
nokogiri (~> 1.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
coderay (1.1.2)
|
11
|
+
diff-lcs (1.3)
|
12
|
+
method_source (0.9.2)
|
13
|
+
mini_portile2 (2.4.0)
|
14
|
+
nokogiri (1.10.5)
|
15
|
+
mini_portile2 (~> 2.4.0)
|
16
|
+
pry (0.12.2)
|
17
|
+
coderay (~> 1.1.0)
|
18
|
+
method_source (~> 0.9.0)
|
19
|
+
rake (10.5.0)
|
20
|
+
rspec (3.9.0)
|
21
|
+
rspec-core (~> 3.9.0)
|
22
|
+
rspec-expectations (~> 3.9.0)
|
23
|
+
rspec-mocks (~> 3.9.0)
|
24
|
+
rspec-core (3.9.0)
|
25
|
+
rspec-support (~> 3.9.0)
|
26
|
+
rspec-expectations (3.9.0)
|
27
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
+
rspec-support (~> 3.9.0)
|
29
|
+
rspec-mocks (3.9.0)
|
30
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
+
rspec-support (~> 3.9.0)
|
32
|
+
rspec-support (3.9.0)
|
33
|
+
|
34
|
+
PLATFORMS
|
35
|
+
ruby
|
36
|
+
|
37
|
+
DEPENDENCIES
|
38
|
+
bundler (~> 2.0)
|
39
|
+
pry (~> 0.12)
|
40
|
+
rake (~> 10.0)
|
41
|
+
roll_for_initiative!
|
42
|
+
rspec (~> 3.0)
|
43
|
+
|
44
|
+
BUNDLED WITH
|
45
|
+
2.0.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 c-mike576
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# RollForInitiative
|
2
|
+
|
3
|
+
This is just a small project that scrapes the classes from D&D from the site dndbeyond. It then lets you choose a class and gives a short scenario(again sraped from dndbeyond).
|
4
|
+
You can confirm or choose again. After it gives you a random monster to fight scraped from http://www.chaoticshiny.com/monstergen.php win or lose you can fight another random monster.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'roll_for_initiative'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install roll_for_initiative
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
Type your name when prompted 'exit' will work anywhere that input taken.
|
25
|
+
|
26
|
+
## Development
|
27
|
+
|
28
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
29
|
+
|
30
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
31
|
+
|
32
|
+
## Contributing
|
33
|
+
|
34
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/roll_for_initiative. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
35
|
+
|
36
|
+
## License
|
37
|
+
|
38
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
39
|
+
|
40
|
+
## Code of Conduct
|
41
|
+
|
42
|
+
Everyone interacting in the RollForInitiative project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/roll_for_initiative/blob/master/CODE_OF_CONDUCT.md).
|
43
|
+
# roll-for-initiative
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "roll_for_initiative"
|
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(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
#CLI controller
|
2
|
+
class RollForInitiative::CLI
|
3
|
+
attr_accessor :player_name, :klasses
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
@@site = "https://www.dndbeyond.com/classes"
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
def call
|
12
|
+
RollForInitiative::Scraper.new.klasses(@@site)
|
13
|
+
RollForInitiative::Klass.get_klass_names
|
14
|
+
welcome_msg
|
15
|
+
klass_list
|
16
|
+
end
|
17
|
+
|
18
|
+
def welcome_msg
|
19
|
+
puts "Welcome to The Dragon Province!"
|
20
|
+
puts "'exit' can be entered at any time to leave"
|
21
|
+
sleep(1)
|
22
|
+
puts "Please, enter your name:"
|
23
|
+
@player_name = gets.strip
|
24
|
+
if @player_name.downcase == 'exit'
|
25
|
+
goodbye
|
26
|
+
end
|
27
|
+
sleep(2)
|
28
|
+
puts "What a curious name..."
|
29
|
+
sleep(2)
|
30
|
+
end
|
31
|
+
|
32
|
+
def klass_list
|
33
|
+
puts "Choose your class mortal:"
|
34
|
+
sleep(1)
|
35
|
+
@klasses = RollForInitiative::Klass.all
|
36
|
+
@klasses.each do |klass|
|
37
|
+
puts "#{klass.name} - #{klass.short}"
|
38
|
+
end
|
39
|
+
sleep(1)
|
40
|
+
klass_choose
|
41
|
+
end
|
42
|
+
|
43
|
+
def klass_choose
|
44
|
+
puts "I'm a very particular god the class must be spelled right. OR ELSE!!!"
|
45
|
+
@klass_picked = nil
|
46
|
+
@klass_picked = gets.strip.downcase
|
47
|
+
|
48
|
+
if RollForInitiative::Klass.klass_name_list.include?(@klass_picked)
|
49
|
+
RollForInitiative::Klass.all.each do |type|
|
50
|
+
if type.name == @klass_picked.split.map(&:capitalize).join(' ')
|
51
|
+
RollForInitiative::Scraper.new.grab_encounter(@@site.gsub('/classes', type.klass_url))
|
52
|
+
puts "#{RollForInitiative::Scraper.encounter}"
|
53
|
+
sleep(2)
|
54
|
+
puts "Does this sound like you? (y/n)"
|
55
|
+
input = gets.strip.downcase
|
56
|
+
case input
|
57
|
+
when "y"
|
58
|
+
@chosen_klass = type
|
59
|
+
picked
|
60
|
+
when "n"
|
61
|
+
klass_list
|
62
|
+
when "exit"
|
63
|
+
goodbye
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
elsif @klass_picked == 'exit'
|
68
|
+
goodbye
|
69
|
+
else
|
70
|
+
puts "You are trying my patience. Check your spelling!"
|
71
|
+
sleep(2)
|
72
|
+
klass_list
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def picked
|
77
|
+
puts "Time for adventure #{@player_name} the #{@chosen_klass.name}."
|
78
|
+
sleep(1)
|
79
|
+
adventure
|
80
|
+
end
|
81
|
+
|
82
|
+
def adventure
|
83
|
+
RollForInitiative::Scraper.new.who_you_fight
|
84
|
+
puts "Let's see who you fight:\n#{RollForInitiative::Scraper.fight} Will you 'Fight' or 'Run'?"
|
85
|
+
sleep(1)
|
86
|
+
while input = gets.strip.downcase
|
87
|
+
case input
|
88
|
+
when "fight"
|
89
|
+
puts "you strike down your opponent. You win!"
|
90
|
+
sleep(1)
|
91
|
+
fight_again
|
92
|
+
when "run"
|
93
|
+
puts "Your enemy strikes you while your back is turned. You Lose"
|
94
|
+
sleep(1)
|
95
|
+
fight_again
|
96
|
+
when "exit"
|
97
|
+
goodbye
|
98
|
+
else
|
99
|
+
puts "I don't understand your command only enter 'Fight' or 'run'"
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
def fight_again
|
105
|
+
puts "would you like to fight again?(y/n)"
|
106
|
+
while input = gets.strip.downcase
|
107
|
+
case input
|
108
|
+
when 'y'
|
109
|
+
adventure
|
110
|
+
when 'n'
|
111
|
+
goodbye
|
112
|
+
when 'exit'
|
113
|
+
goodbye
|
114
|
+
else
|
115
|
+
puts "I don't understand the command only enter 'y' or 'n'."
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
def goodbye
|
122
|
+
puts "Goodbye...for now."
|
123
|
+
exit
|
124
|
+
end
|
125
|
+
|
126
|
+
|
127
|
+
end
|
128
|
+
|
129
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
class RollForInitiative::Klass
|
2
|
+
attr_accessor :name, :short, :klass_url, :more_info
|
3
|
+
|
4
|
+
#this is the container holding the objects
|
5
|
+
@@all = []
|
6
|
+
|
7
|
+
#this should be just the array of klass names as strings
|
8
|
+
@@klass_name_list = []
|
9
|
+
|
10
|
+
|
11
|
+
def initialize(name)
|
12
|
+
@name = name
|
13
|
+
@@all << self
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
def self.get_klass_names
|
19
|
+
|
20
|
+
klass_list = RollForInitiative::Scraper.doc.search(".listing-card__content")
|
21
|
+
klass_list.each do |klass_info|
|
22
|
+
new_klass = RollForInitiative::Klass.new(klass_info.search(".listing-card__title").text.strip)
|
23
|
+
@@klass_name_list << klass_info.search(".listing-card__title").text.strip.downcase
|
24
|
+
new_klass.short = klass_info.search(".listing-card__description p").first.text.strip
|
25
|
+
new_klass.klass_url = klass_info.search("a").first["href"] #>/classes/'theclass'
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.all
|
32
|
+
@@all
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.klass_name_list
|
36
|
+
@@klass_name_list
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
class RollForInitiative::Scraper
|
2
|
+
|
3
|
+
@@site = "https://www.dndbeyond.com/classes"
|
4
|
+
|
5
|
+
def klasses(site)
|
6
|
+
|
7
|
+
@@doc = Nokogiri::HTML(open(site, "User-Agent" => "Mozilla/5.0 (Windows NT 6.0; rv:12.0) Gecko/20100101 Firefox/12.0 FirePHP/0.7.1"))
|
8
|
+
|
9
|
+
end
|
10
|
+
|
11
|
+
def grab_encounter(site)
|
12
|
+
|
13
|
+
more_info = Nokogiri::HTML(open(site, "User-Agent" => "Mozilla/5.0 (Windows NT 6.0; rv:12.0) Gecko/20100101 Firefox/12.0 FirePHP/0.7.1"))
|
14
|
+
@@encounter = more_info.search(".content-container p")[1].text
|
15
|
+
end
|
16
|
+
|
17
|
+
def who_you_fight
|
18
|
+
oppenent = Nokogiri::HTML(open("http://www.chaoticshiny.com/monstergen.php"))
|
19
|
+
@@fight = oppenent.search("#output").text.strip
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.doc
|
23
|
+
@@doc
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.encounter
|
27
|
+
@@encounter
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.fight
|
31
|
+
@@fight
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
#"https://www.dndbeyond.com/classes"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
require 'open-uri'
|
3
|
+
require 'pry'
|
4
|
+
|
5
|
+
require_relative "./roll_for_initiative/version"
|
6
|
+
require_relative './roll_for_initiative/cli'
|
7
|
+
require_relative './roll_for_initiative/klass'
|
8
|
+
require_relative './roll_for_initiative/scraper'
|
9
|
+
|
10
|
+
module RollForInitiative
|
11
|
+
class Error < StandardError; end
|
12
|
+
# Your code goes here...
|
13
|
+
end
|
14
|
+
|
15
|
+
RollForInitiative::CLI.new.call
|
@@ -0,0 +1,38 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "roll_for_initiative/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "roll_for_initiative"
|
7
|
+
spec.version = RollForInitiative::VERSION
|
8
|
+
spec.authors = ["c-mike576"]
|
9
|
+
spec.email = ["m.calkins576@gmail.com"]
|
10
|
+
spec.summary = "Small little project that scrapes D&D classes"
|
11
|
+
spec.description = "This is just a small project that scrapes the classes from D&D from the site dndbeyond. It then lets you choose a class and gives a short scenario(again sraped from dndbeyond.com).
|
12
|
+
You can confirm or choose again. After it gives you a random monster to fight scraped from http://www.chaoticshiny.com/monstergen.php win or lose you can fight another random monster."
|
13
|
+
spec.homepage = "https://github.com/C-Mike576/roll-for-initiative"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org/"
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/C-Mike576/roll-for-initiative"
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/C-Mike576/roll-for-initiative/commits/master"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
end
|
27
|
+
spec.bindir = "exe"
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ["lib"]
|
30
|
+
|
31
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
32
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
33
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
34
|
+
spec.add_development_dependency "pry", "~> 0.12"
|
35
|
+
|
36
|
+
|
37
|
+
spec.add_dependency "nokogiri", "~> 1.0"
|
38
|
+
end
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: roll_for_initiative
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- c-mike576
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-12-05 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: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
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
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.12'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.12'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: nokogiri
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.0'
|
83
|
+
description: |-
|
84
|
+
This is just a small project that scrapes the classes from D&D from the site dndbeyond. It then lets you choose a class and gives a short scenario(again sraped from dndbeyond.com).
|
85
|
+
You can confirm or choose again. After it gives you a random monster to fight scraped from http://www.chaoticshiny.com/monstergen.php win or lose you can fight another random monster.
|
86
|
+
email:
|
87
|
+
- m.calkins576@gmail.com
|
88
|
+
executables: []
|
89
|
+
extensions: []
|
90
|
+
extra_rdoc_files: []
|
91
|
+
files:
|
92
|
+
- ".gitignore"
|
93
|
+
- ".rspec"
|
94
|
+
- ".travis.yml"
|
95
|
+
- CODE_OF_CONDUCT.md
|
96
|
+
- Gemfile
|
97
|
+
- Gemfile.lock
|
98
|
+
- LICENSE.txt
|
99
|
+
- README.md
|
100
|
+
- Rakefile
|
101
|
+
- bin/console
|
102
|
+
- bin/roll_for_initiative
|
103
|
+
- bin/setup
|
104
|
+
- lib/roll_for_initiative.rb
|
105
|
+
- lib/roll_for_initiative/cli.rb
|
106
|
+
- lib/roll_for_initiative/klass.rb
|
107
|
+
- lib/roll_for_initiative/scraper.rb
|
108
|
+
- lib/roll_for_initiative/version.rb
|
109
|
+
- roll_for_initiative.gemspec
|
110
|
+
homepage: https://github.com/C-Mike576/roll-for-initiative
|
111
|
+
licenses:
|
112
|
+
- MIT
|
113
|
+
metadata:
|
114
|
+
allowed_push_host: https://rubygems.org/
|
115
|
+
homepage_uri: https://github.com/C-Mike576/roll-for-initiative
|
116
|
+
source_code_uri: https://github.com/C-Mike576/roll-for-initiative
|
117
|
+
changelog_uri: https://github.com/C-Mike576/roll-for-initiative/commits/master
|
118
|
+
post_install_message:
|
119
|
+
rdoc_options: []
|
120
|
+
require_paths:
|
121
|
+
- lib
|
122
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
requirements: []
|
133
|
+
rubygems_version: 3.0.6
|
134
|
+
signing_key:
|
135
|
+
specification_version: 4
|
136
|
+
summary: Small little project that scrapes D&D classes
|
137
|
+
test_files: []
|