regis 0.0.6 → 0.0.7

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDE1ZDFmYzA4YmRkN2I0NmY0Mzg3YTg2ZGI5NTI0OThhYmYxMjI4ZA==
4
+ YzE1MGQ0MmI1NTliMjRjY2YwYzhkMDRlMDEwZjA5NWNiMDA3ZjdjOA==
5
5
  data.tar.gz: !binary |-
6
- YmU5OWYyZmQ5Mjk4ZGRhNzVkNDgwZTNlMDczNzdjMTA3ZmExY2I5Nw==
6
+ MzExNTA5YzI3NjdiYjk4ODliOTE1OTExMDg0OTUwY2M0MWFjY2ZmMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2Y2YmZmNGM1ZjdlYTFmNDAwN2I2YWVlZmVjMDE5Y2Y1Zjg5NWZlZTcwN2Yx
10
- ZDE3YjJiYjYxMTM2NjE2ODg4ZGI4ZTdmM2MyMDlmMjQzNmJiODc1NWM5N2M0
11
- OWE1YWQ4Y2I0YWUxMTkyYTgzZTVkNWJiNGIwMzdhMTRiYTA5ODk=
9
+ MjQ3YWViMDRhY2M1MzM0NmNjZWZiM2ZmN2U1ZjZhZGRiNDYyODBiNTAyZDhj
10
+ ZjA3MDQ0ZjkyOTY0ZjVlZDk3ZWEwYjIyZjBjZTMwYjUyZGEwMjQzN2Q0OTRh
11
+ NTBiZGNmY2Q0NGYwZDk1MmJmNjk2N2JlNDM3YWU5M2U4YTg5Y2E=
12
12
  data.tar.gz: !binary |-
13
- NzlkNDA2ZTg4YWY0NmVlZjhmYmZhMzA3NTQxM2IwNmM5MzYyYzQ0MmViN2Yx
14
- M2YwZWY0NWMzNDg3NjAxMTg4YzNlODMyZWRhZGQ5MjI2Y2ZmMjhhY2U2MDM2
15
- MmQwNzZiZTM3Yjk5MDJiMzk5ZWRjMmMwOGJiMmU0ZThmMDgyYmY=
13
+ ZmIxNjViYmYzODRkMjBjNGVkZDEwN2I1Njg4NGFjZWRhMjRiNjZmMzI1MGIw
14
+ NDA5OTY4YTcxMThlNTg5N2UwNGJjZjNmODcxN2MzMmUzYjVkOTNiYjcyOTky
15
+ NDZiNTczZDY3NmY0NzRkOWE4YmZiNzQ0YjU4YWM5MTg4NDMyYmQ=
@@ -48,6 +48,43 @@ module Regis
48
48
 
49
49
  @instructors = parse(@instructors, Instructor)
50
50
  end
51
+
52
+ def formatted_start_date(format="%b %-d")
53
+ DateTime.strptime(self[:start_date],"%m\/%d\/%y").strftime(format)
54
+ end
55
+
56
+ def formatted_end_date(format="%b %-d")
57
+ DateTime.strptime(self[:end_date],"%m\/%d\/%y").strftime(format)
58
+ end
59
+
60
+ def self.formatted_term(value)
61
+ return value.gsub("WI"," Winter Term").gsub("SUR"," Summer Term").gsub("SU", " Summer (Distance)").gsub("FA"," Fall Term").gsub("SP", " Spring Session").gsub("SS", " Summer Session")
62
+ end
63
+
64
+ def formatted_term
65
+ if self.term["SU"] and self.location_code["VAN"]
66
+ Section.formatted_term(self.term.gsub("SU","SUR")) # on-campus "SU" courses are guided studies, theses, major projects, etc. Term needs to not translate as Distance.
67
+ else
68
+ Section.formatted_term(self.term)
69
+ end
70
+ end
71
+
72
+ def self.formatted_location(value)
73
+ return value.gsub("VAN"," Vancouver").gsub("AUDIO", " Distance").gsub("PARA", " Para-church").gsub("IV", " Intervarsity").gsub("SKAG", " Skagit Valley").gsub("KENYA", " Kenya").gsub("CAM", " Costa Rica").gsub("EU", " France").gsub("ME", " Israel & Palestine")
74
+ end
75
+
76
+ def formatted_location
77
+ self[:location].present?? Section.formatted_location(self[:location]) : ""
78
+ end
79
+
80
+ def formatted_instructors(options = {:linked => true })
81
+ ret = Array.new
82
+ for i in self.instructors
83
+ ret << "#{i.full_name} "
84
+ end
85
+ end
86
+ return ret
87
+ end
51
88
  end
52
89
  end
53
90
  end
@@ -1,3 +1,3 @@
1
1
  module Regis
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regis
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
  - Cameron Tucker