gpa 0.0.1 → 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.
data/lib/gpa.rb CHANGED
@@ -3,14 +3,7 @@ require "gpa/course"
3
3
 
4
4
  require 'dmorrill10-utils/enumerable'
5
5
  require 'yaml'
6
-
7
- module YAML
8
- # Load the document contained in +filename+. Returns the yaml contained in
9
- # +filename+ as a ruby object
10
- def self.load_stream_from_file filename
11
- File.open(filename, 'r:bom|utf-8') { |f| self.load_stream f, filename }
12
- end
13
- end
6
+ require 'dmorrill10-utils/yaml'
14
7
 
15
8
  class Array
16
9
  # @param [Integer] num_most_recent_units
@@ -1,12 +1,3 @@
1
- # @todo Move to utils
2
- class Object
3
- def to_h
4
- Hash[instance_variables.map do |var|
5
- [var[1..-1].to_sym, instance_variable_get(var)]
6
- end]
7
- end
8
- end
9
-
10
1
  class String
11
2
  # @returns [Numeric] Number of grade points for this grade
12
3
  def points
@@ -185,7 +176,7 @@ class Course
185
176
  # @returns [String]
186
177
  :faculty
187
178
  )
188
- # @todo thing-to-do
179
+
189
180
  def initialize(
190
181
  subject,
191
182
  number,
@@ -1,3 +1,3 @@
1
1
  module Gpa
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -20,7 +20,7 @@ ExpectedCourse = Struct.new(
20
20
  # @returns [Numeric]
21
21
  :grade_points
22
22
  )
23
-
23
+ # TODO
24
24
  describe Course do
25
25
  it "should initialize properly" do
26
26
  @expected_course = ExpectedCourse.new(
@@ -3,6 +3,8 @@ require_relative 'support/spec_helper'
3
3
 
4
4
  require_relative '../lib/gpa'
5
5
 
6
+ require 'dmorrill10-utils/object'
7
+
6
8
  describe Gpa do
7
9
  it "should load courses from a YAML file properly" do
8
10
  Gpa.load_courses_from_file(TEST_COURSES_FILE).map do |course|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gpa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-05 00:00:00.000000000 Z
12
+ date: 2013-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dmorrill10-utils