NBA_info 0.1.3 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9959ed116b23cb1e9a01da32b67eee5db01d1a86
4
- data.tar.gz: 3fdce1160071820a78f16bcdc950b7d29d71989d
3
+ metadata.gz: 36864b1d2ad1d4ba42644b35c16ff021eb3446e9
4
+ data.tar.gz: d0a761f7c13d5fe992c8241d8f6d5a427eca920b
5
5
  SHA512:
6
- metadata.gz: 1e05228ab75582d6ec0fc346fe1ad4aebe8fedbc0a7331a7216d78490c0aa5d96db3ffaf573eca20bc6c79511b308af3008c83e289d68038c232954592871896
7
- data.tar.gz: 120529b73140814b5d75cca84741ead1b813ae9bad898cc0de8c07fa8b8fd972025e829aceae07351c0a0e1cbd934b8cd2a1d67766778a710d4e56a8c72cd7be
6
+ metadata.gz: 87419857ad3a6238c3d50a29c46fcc0ca4b3ea13fa7ca936ca82269c33e24b1ebaf6401521f663c36dbda9d9c9c25c3e491324b2fafe26332679e4c5a5c76a03
7
+ data.tar.gz: 627a738e66fb398417ee3b186c6782482dfe9bbef13d55389db76be0100a34fa6abc6fb3d01cc99d7a0c53d36a6bf407447dc58da2a5f4bcf7d38e4e7784434c
data/.travis.yml CHANGED
@@ -6,8 +6,8 @@ rvm:
6
6
  - jruby-head
7
7
  - jruby-19mode
8
8
  matrix:
9
- allow_falures:
10
- - rvm: jurby-head
11
- branches:
12
- only:
13
- - master
9
+ allow_failures:
10
+ - rvm: jruby-head
11
+ branches:
12
+ only:
13
+ - master
Binary file
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
- #WebScraper HW
2
- >this assignment scrapes the information and parse HTML directly from websites.
3
- To run this project, you should execute the file from the following path '/lib/application.rb' with Ruby.
1
+ #WebScraper HW - NBA_info
2
+ >This assignment scrapes the information and parse HTML directly from websites. It can help you to collect the imformation of NBA's games and players.
4
3
  ##Choice of website
5
4
  </br>
6
5
  First, we choose the NBA sports infomation on <http://scores.espn.go.com/nba/scoreboard> and scrape each game's starting lineup.
6
+ <br />
7
7
  Second, we use the NBA players website <http://origin.nba.com/players/> to scrape the players' current season stats which user enters.
8
8
  ##Structure of our Code
9
9
  </br>
@@ -11,10 +11,17 @@ We used `Nokogiri` to parse HTML on Ruby, then used `XPATH` to find the tag on H
11
11
 
12
12
  require 'open-uri'
13
13
  require 'nokogiri'
14
- Users can enter '1' to see any players' stats in current season they enter.
14
+
15
+ ##Usage
15
16
  </br>
16
- Users can also enter '2' to see the starting lineup in today's game or see the highest records(PTS, REB, STL) in the final game.
17
+ To run this project, you should install the gem by the following command. Then you can require the library in ruby.
18
+
19
+ gem install NBA_info
20
+
21
+ Users can enter '1' to see the starting lineup in today's game or see the highest records(PTS, REB, STL) in the final game.<br />
22
+ Users can also enter '2' to see any players' stats in current season they enter.
17
23
  ##Collaborator
24
+ </br>
18
25
  * [seanyen0507](https://github.com/seanyen0507)
19
26
  * [hsuchinwang](https://github.com/hsuchinwang)
20
27
  * [poweihuang](https://github.com/poweihuang)
@@ -26,15 +26,15 @@ class Scraper
26
26
  //table[@class='game-stat-overview']//tbody//tr//td")
27
27
  player.each { |p| start_line_up << p.text }
28
28
 
29
- (y.size / 2 - 1).times do |i|
29
+ (y.size / 2).times do |i|
30
30
  z << y[i * 2] + ' v.s ' + y[i * 2 + 1]
31
31
  end
32
32
 
33
- (team_1.size / 2 - 1).times do |i|
33
+ (team_1.size / 2).times do |i|
34
34
  w << team_1[i * 2] + ' v.s ' + team_1[i * 2 + 1]
35
35
  end
36
36
 
37
- (start_line_up.size / 5 - 1).times do |i|
37
+ (start_line_up.size / 5).times do |i|
38
38
  s << start_line_up[i * 5] + "\t" + "#{start_line_up[i * 5 + 1]} "\
39
39
  "#{start_line_up[i * 5 + 2]}" + ' v.s ' + "#{start_line_up[i * 5 + 3]} "\
40
40
  "#{start_line_up[i * 5 + 4]}"
@@ -1,4 +1,4 @@
1
1
  module NBA_INFO
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.5'
3
3
  DATE = '2014-10-24'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: NBA_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - poweihuang
@@ -51,7 +51,7 @@ files:
51
51
  - Gemfile
52
52
  - Gemfile.lock
53
53
  - LICENSE
54
- - NBA_info-0.1.2.gem
54
+ - NBA_info-0.1.4.gem
55
55
  - NBA_info.gemspec
56
56
  - README.md
57
57
  - Rakefile
@@ -80,8 +80,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.2.2
83
+ rubygems_version: 2.4.1
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: NBA information extractor and analyzer
87
- test_files: []
87
+ test_files:
88
+ - spec/test.rb
data/NBA_info-0.1.2.gem DELETED
Binary file