playoverwatch-scraper 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4ba4b5008c58bd07896e5443795e32044734d99233e7d2ffa76747f3d098de95
4
+ data.tar.gz: 1f8a0fa7d81a5527ff146153269e34903a2733d528dd9aee1bd8c5b050ee1b38
5
+ SHA512:
6
+ metadata.gz: 6d887e89c72c7a94d3eea83617e71e7e79614402d043019cdef86f5ababe8d99195f11cd4494f57d2bd9d1b72ac7211b64776a2ddfcba28dcdb1e24c25fdb9e0
7
+ data.tar.gz: 4972ea7ff6bf8e7a162e5ee1d59cf193762f07c52ee08726bf507d6de644dc38ba246e115ded1acbcfa9a82cd37ea00ced70705655447c6b54d93c473db7f3ee
data/.gitignore ADDED
@@ -0,0 +1,85 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+
13
+
14
+ # Created by https://www.gitignore.io/api/macos,linux,windows
15
+
16
+ ### Linux ###
17
+ *~
18
+
19
+ # temporary files which can be created if a process still has a handle open of a deleted file
20
+ .fuse_hidden*
21
+
22
+ # KDE directory preferences
23
+ .directory
24
+
25
+ # Linux trash folder which might appear on any partition or disk
26
+ .Trash-*
27
+
28
+ # .nfs files are created when an open file is removed but is still being accessed
29
+ .nfs*
30
+
31
+ ### macOS ###
32
+ # General
33
+ .DS_Store
34
+ .AppleDouble
35
+ .LSOverride
36
+
37
+ # Icon must end with two \r
38
+ Icon
39
+
40
+ # Thumbnails
41
+ ._*
42
+
43
+ # Files that might appear in the root of a volume
44
+ .DocumentRevisions-V100
45
+ .fseventsd
46
+ .Spotlight-V100
47
+ .TemporaryItems
48
+ .Trashes
49
+ .VolumeIcon.icns
50
+ .com.apple.timemachine.donotpresent
51
+
52
+ # Directories potentially created on remote AFP share
53
+ .AppleDB
54
+ .AppleDesktop
55
+ Network Trash Folder
56
+ Temporary Items
57
+ .apdisk
58
+
59
+ ### Windows ###
60
+ # Windows thumbnail cache files
61
+ Thumbs.db
62
+ ehthumbs.db
63
+ ehthumbs_vista.db
64
+
65
+ # Dump file
66
+ *.stackdump
67
+
68
+ # Folder config file
69
+ [Dd]esktop.ini
70
+
71
+ # Recycle Bin used on file shares
72
+ $RECYCLE.BIN/
73
+
74
+ # Windows Installer files
75
+ *.cab
76
+ *.msi
77
+ *.msix
78
+ *.msm
79
+ *.msp
80
+
81
+ # Windows shortcuts
82
+ *.lnk
83
+
84
+
85
+ # End of https://www.gitignore.io/api/macos,linux,windows
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.5.1
5
+ before_install: gem install bundler -v 1.16.2
6
+ deploy:
7
+ provider: rubygems
8
+ api_key: $RUBYGEMS_API_KEY
9
+ on:
10
+ tags: true
@@ -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 duncanleo97@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
@@ -0,0 +1,10 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in playoverwatch-scraper.gemspec
6
+ gemspec
7
+
8
+ gem "nokogiri", "~> 1.8"
9
+
10
+ gem "pry", "~> 0.11.3", :group => [:development]
data/Gemfile.lock ADDED
@@ -0,0 +1,45 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ playoverwatch-scraper (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ coderay (1.1.2)
10
+ diff-lcs (1.3)
11
+ method_source (0.9.0)
12
+ mini_portile2 (2.3.0)
13
+ nokogiri (1.8.4)
14
+ mini_portile2 (~> 2.3.0)
15
+ pry (0.11.3)
16
+ coderay (~> 1.1.0)
17
+ method_source (~> 0.9.0)
18
+ rake (10.5.0)
19
+ rspec (3.7.0)
20
+ rspec-core (~> 3.7.0)
21
+ rspec-expectations (~> 3.7.0)
22
+ rspec-mocks (~> 3.7.0)
23
+ rspec-core (3.7.1)
24
+ rspec-support (~> 3.7.0)
25
+ rspec-expectations (3.7.0)
26
+ diff-lcs (>= 1.2.0, < 2.0)
27
+ rspec-support (~> 3.7.0)
28
+ rspec-mocks (3.7.0)
29
+ diff-lcs (>= 1.2.0, < 2.0)
30
+ rspec-support (~> 3.7.0)
31
+ rspec-support (3.7.1)
32
+
33
+ PLATFORMS
34
+ ruby
35
+
36
+ DEPENDENCIES
37
+ bundler (~> 1.16)
38
+ nokogiri (~> 1.8)
39
+ playoverwatch-scraper!
40
+ pry (~> 0.11.3)
41
+ rake (~> 10.0)
42
+ rspec (~> 3.0)
43
+
44
+ BUNDLED WITH
45
+ 1.16.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Duncan Leo
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,51 @@
1
+ # playoverwatch-scraper
2
+ [RubyDocs](https://www.rubydoc.info/github/bottleneckco/playoverwatch-scraper/master)
3
+ [![Build Status](https://travis-ci.org/bottleneckco/playoverwatch-scraper.svg?branch=master)](https://travis-ci.org/bottleneckco/playoverwatch-scraper)
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/playoverwatch/scraper`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'playoverwatch-scraper'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install playoverwatch-scraper
22
+
23
+ ## Usage
24
+
25
+ ```ruby
26
+ scraper = PlayOverwatch::Scraper.new('Someone-1234')
27
+
28
+ # SR
29
+ puts scraper.sr
30
+
31
+ # Level
32
+ puts scraper.player_level
33
+ ```
34
+
35
+ ## Development
36
+
37
+ 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.
38
+
39
+ 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).
40
+
41
+ ## Contributing
42
+
43
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/playoverwatch-scraper. 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.
44
+
45
+ ## License
46
+
47
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
48
+
49
+ ## Code of Conduct
50
+
51
+ Everyone interacting in the Playoverwatch project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/playoverwatch-scraper/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "playoverwatch/scraper"
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 "pry"
14
+ Pry.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,7 @@
1
+ require "playoverwatch/scraper/version"
2
+
3
+ ##
4
+ # This module wraps the Scraper code
5
+ module PlayOverwatch
6
+ require 'playoverwatch/scraper'
7
+ end
@@ -0,0 +1,182 @@
1
+ {
2
+ "918": 0,
3
+ "919": 0,
4
+ "91A": 0,
5
+ "91B": 0,
6
+ "91C": 0,
7
+ "91D": 0,
8
+ "91E": 0,
9
+ "91F": 0,
10
+ "920": 0,
11
+ "921": 0,
12
+ "922": 1,
13
+ "924": 1,
14
+ "925": 1,
15
+ "926": 1,
16
+ "94C": 1,
17
+ "927": 1,
18
+ "928": 1,
19
+ "929": 1,
20
+ "92B": 1,
21
+ "950": 1,
22
+ "92A": 2,
23
+ "92C": 2,
24
+ "937": 2,
25
+ "93B": 2,
26
+ "933": 2,
27
+ "923": 2,
28
+ "944": 2,
29
+ "948": 2,
30
+ "93F": 2,
31
+ "951": 2,
32
+ "92D": 3,
33
+ "930": 3,
34
+ "934": 3,
35
+ "938": 3,
36
+ "940": 3,
37
+ "949": 3,
38
+ "952": 3,
39
+ "94D": 3,
40
+ "945": 3,
41
+ "93C": 3,
42
+ "92E": 4,
43
+ "931": 4,
44
+ "935": 4,
45
+ "93D": 4,
46
+ "946": 4,
47
+ "94A": 4,
48
+ "953": 4,
49
+ "94E": 4,
50
+ "939": 4,
51
+ "941": 4,
52
+ "92F": 5,
53
+ "932": 5,
54
+ "93E": 5,
55
+ "936": 5,
56
+ "93A": 5,
57
+ "942": 5,
58
+ "947": 5,
59
+ "94F": 5,
60
+ "94B": 5,
61
+ "954": 5,
62
+ "956": 6,
63
+ "95C": 6,
64
+ "95D": 6,
65
+ "95E": 6,
66
+ "95F": 6,
67
+ "960": 6,
68
+ "961": 6,
69
+ "962": 6,
70
+ "963": 6,
71
+ "964": 6,
72
+ "957": 7,
73
+ "965": 7,
74
+ "966": 7,
75
+ "967": 7,
76
+ "968": 7,
77
+ "969": 7,
78
+ "96A": 7,
79
+ "96B": 7,
80
+ "96C": 7,
81
+ "96D": 7,
82
+ "958": 8,
83
+ "96E": 8,
84
+ "96F": 8,
85
+ "970": 8,
86
+ "971": 8,
87
+ "972": 8,
88
+ "973": 8,
89
+ "974": 8,
90
+ "975": 8,
91
+ "976": 8,
92
+ "959": 9,
93
+ "977": 9,
94
+ "978": 9,
95
+ "979": 9,
96
+ "97A": 9,
97
+ "97B": 9,
98
+ "97C": 9,
99
+ "97D": 9,
100
+ "97E": 9,
101
+ "97F": 9,
102
+ "95A": 10,
103
+ "980": 10,
104
+ "981": 10,
105
+ "982": 10,
106
+ "983": 10,
107
+ "984": 10,
108
+ "985": 10,
109
+ "986": 10,
110
+ "987": 10,
111
+ "988": 10,
112
+ "95B": 11,
113
+ "989": 11,
114
+ "98A": 11,
115
+ "98B": 11,
116
+ "98C": 11,
117
+ "98D": 11,
118
+ "98E": 11,
119
+ "98F": 11,
120
+ "991": 11,
121
+ "990": 11,
122
+ "992": 12,
123
+ "993": 12,
124
+ "994": 12,
125
+ "995": 12,
126
+ "996": 12,
127
+ "997": 12,
128
+ "998": 12,
129
+ "999": 12,
130
+ "99A": 12,
131
+ "99B": 12,
132
+ "99C": 13,
133
+ "99D": 13,
134
+ "99E": 13,
135
+ "99F": 13,
136
+ "9A0": 13,
137
+ "9A1": 13,
138
+ "9A2": 13,
139
+ "9A3": 13,
140
+ "9A4": 13,
141
+ "9A5": 13,
142
+ "9A6": 14,
143
+ "9A7": 14,
144
+ "9A8": 14,
145
+ "9A9": 14,
146
+ "9AA": 14,
147
+ "9AB": 14,
148
+ "9AC": 14,
149
+ "9AD": 14,
150
+ "9AE": 14,
151
+ "9AF": 14,
152
+ "9B0": 15,
153
+ "9B1": 15,
154
+ "9B2": 15,
155
+ "9B3": 15,
156
+ "9B4": 15,
157
+ "9B5": 15,
158
+ "9B6": 15,
159
+ "9B7": 15,
160
+ "9B8": 15,
161
+ "9B9": 15,
162
+ "9BA": 16,
163
+ "9BB": 16,
164
+ "9BC": 16,
165
+ "9BD": 16,
166
+ "9BE": 16,
167
+ "9BF": 16,
168
+ "9C0": 16,
169
+ "9C1": 16,
170
+ "9C2": 16,
171
+ "9C3": 16,
172
+ "9C4": 17,
173
+ "9C5": 17,
174
+ "9C6": 17,
175
+ "9C7": 17,
176
+ "9C8": 17,
177
+ "9C9": 17,
178
+ "9CA": 17,
179
+ "9CB": 17,
180
+ "9CC": 17,
181
+ "9CD": 17
182
+ }
@@ -0,0 +1,79 @@
1
+ require 'json'
2
+ require 'nokogiri'
3
+ require 'open-uri'
4
+
5
+ CHROME_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36'
6
+
7
+ module PlayOverwatch
8
+ ##
9
+ # This class represents a scraper that can be used to retrieve certain statistics.
10
+ class Scraper
11
+ ##
12
+ # Creates a scraper with a specified battle tag.
13
+ # The +battle_tag+ can be in the hex (#) or hyphenated (-) format. It IS case sensitive.
14
+ def initialize(battle_tag)
15
+ @player_page = Nokogiri::HTML(open("https://playoverwatch.com/en-us/career/pc/#{battle_tag.gsub(/#/, '-')}", "User-Agent" => CHROME_USER_AGENT))
16
+ end
17
+
18
+ ##
19
+ # Retrieve the player's player icon. Returns an image URL.
20
+ def player_icon
21
+ @player_page.css('img.player-portrait').first["src"]
22
+ end
23
+
24
+ ##
25
+ # Retrieve a player's level
26
+ def player_level
27
+ quotient = 0
28
+ remainder = @player_page.css('.player-level .u-vertical-center').first.content.to_i
29
+ player_rank_div = @player_page.css('.player-rank')
30
+ if player_rank_div.any?
31
+ level_stars_image_url_code = player_rank_div.first['style'].scan(/0x0250000000000(.+?)_Rank.png/i).flatten
32
+ if level_stars_image_url_code.any?
33
+ quotient = 100 * rank_map[level_stars_image_url_code.first]
34
+ end
35
+ end
36
+ return quotient + remainder
37
+ end
38
+
39
+ ##
40
+ # Retrieve a player's endorsement level
41
+ def endorsement_level
42
+ @player_page.css('.endorsement-level .u-center').first.content.to_i
43
+ end
44
+
45
+ ##
46
+ # Retrieve a player's current competitive season ranking.
47
+ # Returns -1 if player did not complete placements.
48
+ def sr
49
+ comp_div = @player_page.css('.competitive-rank > .h5')
50
+ return -1 if comp_div.empty?
51
+ content = comp_div.first.content
52
+ content.to_i if Integer(content) rescue -1
53
+ end
54
+
55
+ ##
56
+ # Retrieve player's main Quick Play hero, in lowercase form.
57
+ def main_qp
58
+ hero_img = hidden_mains_style.content.scan(/\.quickplay {.+?url\((.+?)\);/mis).flatten.first
59
+ hero_img.scan(/\/hero\/(.+?)\/career/i).flatten.first
60
+ end
61
+
62
+ ##
63
+ # Retrieve player's main Competitive hero, in lowercase form.
64
+ # You should check if the sr is -1 before attempting to call this.
65
+ def main_comp
66
+ hero_img = hidden_mains_style.content.scan(/\.competitive {.+?url\((.+?)\);/mis).flatten.first
67
+ hero_img.scan(/\/hero\/(.+?)\/career/i).flatten.first
68
+ end
69
+
70
+ private
71
+ def rank_map
72
+ JSON.parse File.read(File.expand_path('./ranks.json', __dir__))
73
+ end
74
+
75
+ def hidden_mains_style
76
+ @player_page.css('style').first
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,3 @@
1
+ module PlayOverwatch
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,38 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "playoverwatch/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "playoverwatch-scraper"
8
+ spec.version = PlayOverwatch::VERSION
9
+ spec.authors = ["Duncan Leo"]
10
+ spec.email = ["duncanleo97@gmail.com"]
11
+
12
+ spec.summary = "Library to get player details"
13
+ spec.description = "Scraper library for playoverwatch.com"
14
+ spec.homepage = "https://github.com/bottleneckco/playoverwatch-scraper"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against " \
23
+ "public gem pushes."
24
+ end
25
+
26
+ # Specify which files should be added to the gem when it is released.
27
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
28
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
29
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
30
+ end
31
+ spec.bindir = "exe"
32
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
+ spec.require_paths = ["lib"]
34
+
35
+ spec.add_development_dependency "bundler", "~> 1.16"
36
+ spec.add_development_dependency "rake", "~> 10.0"
37
+ spec.add_development_dependency "rspec", "~> 3.0"
38
+ end
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: playoverwatch-scraper
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Duncan Leo
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-08-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: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
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
+ description: Scraper library for playoverwatch.com
56
+ email:
57
+ - duncanleo97@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".rspec"
64
+ - ".travis.yml"
65
+ - CODE_OF_CONDUCT.md
66
+ - Gemfile
67
+ - Gemfile.lock
68
+ - LICENSE.txt
69
+ - README.md
70
+ - Rakefile
71
+ - bin/console
72
+ - bin/setup
73
+ - lib/playoverwatch.rb
74
+ - lib/playoverwatch/ranks.json
75
+ - lib/playoverwatch/scraper.rb
76
+ - lib/playoverwatch/version.rb
77
+ - playoverwatch-scraper.gemspec
78
+ homepage: https://github.com/bottleneckco/playoverwatch-scraper
79
+ licenses:
80
+ - MIT
81
+ metadata:
82
+ allowed_push_host: 'TODO: Set to ''http://mygemserver.com'''
83
+ post_install_message:
84
+ rdoc_options: []
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ requirements: []
98
+ rubyforge_project:
99
+ rubygems_version: 2.7.7
100
+ signing_key:
101
+ specification_version: 4
102
+ summary: Library to get player details
103
+ test_files: []