tableau 0.0.1 → 0.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: 78a2bd4d06b44a5c5fac93cc6eb728f0b405e9e7
4
- data.tar.gz: 44763957d728478811a5f91c9509f334f3966752
3
+ metadata.gz: 1b4dc3f01c379d9bcafad1374e7090c6ff9215dd
4
+ data.tar.gz: d8a7f4c9698c20af11981dcdf3e4e561a1fcdb4a
5
5
  SHA512:
6
- metadata.gz: 28b0d5f1082b31434cf4debb8b463a2c4bd823c9ab93b6e9ac6a51a70bcd9ff1672639f0d6c375cfa2c892f3a27cecf54df162702f60b95c44244dbc3b7c890d
7
- data.tar.gz: f0e570d93e64733397d197f6d64d356312796b317534abe3bd88f44e92152c5f039835864e08f79f95ebebd980d077f6bca606b32df09ab7a5e3f9777020092b
6
+ metadata.gz: b5aa1def9629c016e1a6a15454032202403abb0ac5be294a0bc786ce021273cec5acc6dafe9c78ef66620b1ee38a459b50de6f24ddd37f75eaf8d645c3286026
7
+ data.tar.gz: 59a06348470c02dbc4050f5c8c4f26a22ff2c0c8a2ea53d0731396661d66e37c97e33c2cab0f548764c2a0bf4bbe397ca65f99b465141fa4e6d860a88c3c0988
@@ -1,11 +1,13 @@
1
1
  require 'json'
2
2
  require 'tableau/timetable'
3
3
  require 'tableau/moduleparser'
4
+ require 'tableau/timetableparser'
4
5
  require 'tableau/tablebuilder'
5
6
 
6
7
  module Tableau
7
8
  class << self
8
9
 
10
+ # Generates the HTML version of a timetable of modules
9
11
  def generate(table_id, module_codes)
10
12
  timetable = Tableau::Timetable.new(table_id, module_codes)
11
13
  builder = Tableau::TableBuilder.new(timetable)
@@ -17,5 +19,10 @@ module Tableau
17
19
  Tableau::ModuleParser.new(module_code).module_info
18
20
  end
19
21
 
22
+ # Returns a Timetable object with the core timetable parsed
23
+ def core_timetable(course_code)
24
+ Tableau::TimetableParser.new(course_code).parse
25
+ end
26
+
20
27
  end
21
28
  end
@@ -24,7 +24,7 @@ module Tableau
24
24
  @options[:timetable_template] = "Module%20Individual%20SOC"
25
25
  end
26
26
 
27
- @options[:weeks] = ENV["TABLEAU_SEMESTER"] == 1 ? '10-25' : '26-42'
27
+ @options[:weeks] = ENV["TABLEAU_SEMESTER"] == "1" ? '10-25' : '26-42'
28
28
  end
29
29
 
30
30
  def read
@@ -1,3 +1,3 @@
1
1
  module Tableau
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tableau
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Ryder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-26 00:00:00.000000000 Z
11
+ date: 2013-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails