unm 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/unm/version.rb +1 -1
  3. data/lib/unm.rb +2 -2
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e210c2f185a4b235e982cdfe95f5d043825129c1
4
- data.tar.gz: 204db800135e5ff829571691f97ce7b4c2a79ac8
3
+ metadata.gz: 7cdb84e72e5b16e51bcdcfabcce42c30986ef308
4
+ data.tar.gz: 2121cac304a996833e29af84a7a1c0537996668b
5
5
  SHA512:
6
- metadata.gz: 220f63ec9489c701a353d15220227262e0f7d84f134e6c51f095b47fd5b1f6e54b60e427f2ee4da71e1177c4b3eff92ba5a8efa0c312467e216de9757ca1ca9f
7
- data.tar.gz: f5631ce2832d08449ef69229c9d13f6c3041f27258ff25741b5e27ed1c7450186735a2c68e36f408f59ade70b94a9acdd55c41fd1c7e1bcc5802402f5911b2bf
6
+ metadata.gz: 5089838bba96ed4ab8284f3ace747c74c005a45c10df07ba17b88cfbc03a8a756ce62e756267ca79f69688b8d5f9a0cc25f344b3d74f06f7e8d9c763e03f7028
7
+ data.tar.gz: c8d6fca778825dd862ea7d0a467994fb430afd6ff537794c4e25174816afa578cf401f1762aa7e082cd353c4fda6f6d4985b52cd40c4799637c96a4a1e6b2430
data/lib/unm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Unm
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/lib/unm.rb CHANGED
@@ -47,7 +47,7 @@ module Unm
47
47
 
48
48
  def self.get
49
49
  return @catalog if @catalog
50
- subjects = HTTParty.get("http://catalog-devl.unm.edu/catalogs/2015-2016/subjects-and-courses.xml")["data"]["subjects"]["subject"]
50
+ subjects = HTTParty.get("http://catalog.unm.edu/catalogs/2015-2016/subjects-and-courses.xml")["data"]["subjects"]["subject"]
51
51
  @catalog = subjects.map do |subject|
52
52
  courses = subject["course"]
53
53
  name = subject["subjectName"]
@@ -56,7 +56,7 @@ module Unm
56
56
  course_page = Nokogiri::HTML.parse(HTTParty.get(URI.escape course["path"])) rescue course["path"]
57
57
  description = course_page.css('.content > p').first.text rescue "Error loading description. Check #{course["path"]}."
58
58
  prerequisites = find_prerequisites(course_page) rescue "Error loading prerequisites. Check #{course["path"]}."
59
- hours = course_page.css('b').text.match(/\(\D*(\d).*\)/)[1].to_i rescue binding.pry#"Error loading hours. Check #{course["path"]}."
59
+ hours = course_page.css('b').text.match(/\(\D*(\d).*\)/)[1].to_i rescue "Error loading hours. Check #{course["path"]}."
60
60
  { "name" => course_name, "description" => description, "prerequisites" => prerequisites, "hours" => hours }
61
61
  end }
62
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Piro-Rael
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-20 00:00:00.000000000 Z
11
+ date: 2015-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 2.4.6
105
+ rubygems_version: 2.4.8
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Utilities to interact with UNM Interfaces.