osu-cc-scraper 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 249521473c390b840b723d3addd3cdbe65c4f88f
4
- data.tar.gz: a6209d7b623c86def354ccd106426d07a4072c32
3
+ metadata.gz: d043f4714c11306e409b3b41d64c8eaaa08e8ef5
4
+ data.tar.gz: 409904c69c2dc0efc345f96430021aa89561afbf
5
5
  SHA512:
6
- metadata.gz: 7b10d2b470cb85feaec5c92d3c7b0b8720021c72dc4d0e5ada2db76b8088c6523c2401ee53e06766173420adca1f3265cd36038dcbca1bd56066b53ceb2ea325
7
- data.tar.gz: 2234e682072400a0cce797c35b82fa391221a00dfd109ea01cdae7bd7db1479c7aae6b24c023c27fb534be94a49637f000784ca5ea31400bfd3c1f66a0440ffc
6
+ metadata.gz: 5e884a9cf2d71cb581d8b3455956020c1ee77b09dc4b327f564e1349ed665ae2fba7f3a66d948ce638928cc39ac90ecda2403e79221e7e8f34a697d566dbee54
7
+ data.tar.gz: 1c95e3923d27996cb6ac5d2b8bb7118dc0aaf226c48e8f7b7766bd8843929e00999e11843f8db86defaff7a8cb493203e03c2037664f0ab5252ee4474eb6272a
@@ -3,6 +3,8 @@ require "nokogiri"
3
3
  require "osu-cc-scraper/course"
4
4
 
5
5
  class OsuCcScraper::Department
6
+ # @return [String]
7
+ attr_accessor :name
6
8
  # @return [String]
7
9
  attr_accessor :subject_code
8
10
 
@@ -35,7 +37,8 @@ class OsuCcScraper::Department
35
37
  ng = Nokogiri::HTML(html)
36
38
  ng.xpath("//tr/td/font/a").map{ |department|
37
39
  OsuCcScraper::Department.new({
38
- subject_code: department.content[/\(.*?\)/][1..-2]
40
+ subject_code: department.content[/\(.*?\)/][1..-2],
41
+ name: department.content[/([^(]+)/].strip
39
42
  })
40
43
  }.sort { |a,b|
41
44
  a.subject_code.downcase <=> b.subject_code.downcase
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osu-cc-scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonah George
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-29 00:00:00.000000000 Z
11
+ date: 2015-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -54,9 +54,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  version: '0'
55
55
  requirements: []
56
56
  rubyforge_project:
57
- rubygems_version: 2.4.8
57
+ rubygems_version: 2.4.5.1
58
58
  signing_key:
59
59
  specification_version: 4
60
60
  summary: OSU Course Catalog Scraper
61
61
  test_files: []
62
- has_rdoc: