coursegen 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +16 -16
  3. data/lib/coursegen/course/helpers/content_helpers.rb +31 -0
  4. data/lib/coursegen/templates.rb +0 -3
  5. data/lib/coursegen/version.rb +1 -1
  6. data/templates/Guardfile +3 -3
  7. data/templates/Rules +21 -42
  8. data/templates/cg_config.rb +2 -1
  9. data/templates/cg_config.rb_sample +24 -30
  10. data/templates/content/bootstrap/css/custom.css +65 -23
  11. data/templates/content/bootstrap/css/full-width-pics.css +64 -0
  12. data/templates/content/bootstrap/css/prettyquote.css +31 -0
  13. data/templates/content/bootstrap/css/tipuesearch.css +163 -0
  14. data/templates/content/bootstrap/images/image1.jpg +0 -0
  15. data/templates/content/bootstrap/images/image10.jpg +0 -0
  16. data/templates/content/bootstrap/images/image2.jpg +0 -0
  17. data/templates/content/bootstrap/images/image22.jpg +0 -0
  18. data/templates/content/bootstrap/images/image3.png +0 -0
  19. data/templates/content/bootstrap/images/image4.jpg +0 -0
  20. data/templates/content/bootstrap/images/image8.jpg +0 -0
  21. data/templates/content/bootstrap/images/image8.png +0 -0
  22. data/templates/content/bootstrap/images/image9.jpg +0 -0
  23. data/templates/content/{tipuesearch/img → bootstrap/images}/loader.gif +0 -0
  24. data/templates/content/bootstrap/images/search.png +0 -0
  25. data/templates/content/{tipuesearch/tipuesearchnomin.js → bootstrap/js/tipuesearch.js} +106 -171
  26. data/templates/content/bootstrap/js/tipuesearch.min.js +12 -0
  27. data/templates/content/bootstrap/js/tipuesearch_content.js +13 -0
  28. data/templates/content/{tipuesearch → bootstrap/js}/tipuesearch_set.js +8 -7
  29. data/templates/content/content/intro/course_toc.md.erb +1 -0
  30. data/templates/layouts/banner.html.erb +9 -0
  31. data/templates/layouts/body_header.html.erb +4 -3
  32. data/templates/layouts/bottom_includes.html.erb +15 -0
  33. data/templates/layouts/course.html.erb +44 -0
  34. data/templates/layouts/main_navbar.html.erb +1 -1
  35. data/templates/layouts/nav-menus.html.erb +37 -0
  36. data/templates/layouts/sidebar.html.erb +14 -0
  37. data/templates/layouts/top_includes.html.erb +31 -0
  38. metadata +26 -16
  39. data/templates/body_footer.html +0 -8
  40. data/templates/body_header.html.erb +0 -6
  41. data/templates/content/chalkmark/chalkmark.js +0 -30
  42. data/templates/content/tipuesearch/img/search.png +0 -0
  43. data/templates/content/tipuesearch/tipuesearchmin.js +0 -14
  44. data/templates/content/tipuesearch_logic/search.md.erb +0 -8
  45. data/templates/content/tipuesearch_logic/tipuesearch_content.js.erb +0 -6
  46. data/templates/course.html +0 -59
  47. data/templates/helpful_box.html +0 -3
  48. data/templates/layouts/course.html +0 -59
  49. data/templates/main_navbar.html.erb +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f43b0f80990f635e97e2296a59c46a5e9f0c2249ad0fef72e7bd528707ba0136
4
- data.tar.gz: db0bcc6dcd65415aaed98d45f2946598740e353759ded2ef1d0d0c91122bcd5d
3
+ metadata.gz: 543b0fef5c5c04eb2f10cbb9f8a9ba89f740e50822ee15e88f0f6989928503b8
4
+ data.tar.gz: 345f95242fdf23f71c87fc5351369ee1711f46d460ede6572815c7de43bbe34d
5
5
  SHA512:
6
- metadata.gz: ac65332cfd6c2761b3369afadc9f8f30f4d8a0a20b8d7b6dd58eb7c7fe7517089d20a2059143e02c65a8f53eb35deac930a025cfead8d2c0bad06d0920d63ea4
7
- data.tar.gz: b6b55c082e8390e209532a21a6907fba1b7e39aa348a8c43bd067d5a56ad2fd646019292628b73c13fb3f1970521874906ef639e5153934879e44660602f3dce
6
+ metadata.gz: 388aa33947d9be4fde1f0f7024edd51ad78019fcb8d909a8c64fecdc4642f8f0fa255114316ab6090cc2731a24e265acee8db3b16c6c7bf7965eaeb5ac709957
7
+ data.tar.gz: 94ee16cbe750e7b24e54a5648ccf0a3fb158512db59fe3e6cbf560971b1098f1433efcceb20a3c244982273574feb731f7befe030f67cc27f1c0b34c657b1621
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coursegen (0.7.4)
4
+ coursegen (0.7.5)
5
5
  activesupport
6
6
  adsf
7
7
  byebug
@@ -19,27 +19,27 @@ PATH
19
19
  GEM
20
20
  remote: https://rubygems.org/
21
21
  specs:
22
- activesupport (5.2.2)
22
+ activesupport (5.2.3)
23
23
  concurrent-ruby (~> 1.0, >= 1.0.2)
24
24
  i18n (>= 0.7, < 2)
25
25
  minitest (~> 5.1)
26
26
  tzinfo (~> 1.1)
27
- addressable (2.5.2)
27
+ addressable (2.6.0)
28
28
  public_suffix (>= 2.0.2, < 4.0)
29
29
  adsf (1.4.1)
30
30
  rack (>= 1.0.0, < 3.0.0)
31
- byebug (10.0.2)
31
+ byebug (11.0.1)
32
32
  coderay (1.1.2)
33
33
  colored (1.2)
34
- concurrent-ruby (1.1.4)
35
- cri (2.15.2)
34
+ concurrent-ruby (1.1.5)
35
+ cri (2.15.3)
36
36
  colored (~> 1.2)
37
37
  ddmemoize (1.0.0)
38
38
  ddmetrics (~> 1.0)
39
39
  ref (~> 2.0)
40
40
  ddmetrics (1.0.1)
41
41
  ddplugin (1.0.2)
42
- ffi (1.9.25)
42
+ ffi (1.10.0)
43
43
  formatador (0.2.5)
44
44
  guard (2.15.0)
45
45
  formatador (>= 0.2.4)
@@ -56,14 +56,14 @@ GEM
56
56
  guard-compat (~> 1.0)
57
57
  hamster (3.0.0)
58
58
  concurrent-ruby (~> 1.0)
59
- i18n (1.5.3)
59
+ i18n (1.6.0)
60
60
  concurrent-ruby (~> 1.0)
61
- icalendar (2.5.2)
61
+ icalendar (2.5.3)
62
62
  ice_cube (~> 0.16)
63
63
  ice_cube (0.16.3)
64
- json (2.1.0)
65
- json_schema (0.19.1)
66
- kramdown (1.17.0)
64
+ json (2.2.0)
65
+ json_schema (0.20.4)
66
+ kramdown (2.1.0)
67
67
  listen (3.1.5)
68
68
  rb-fsevent (~> 0.9, >= 0.9.4)
69
69
  rb-inotify (~> 0.9, >= 0.9.7)
@@ -85,24 +85,24 @@ GEM
85
85
  slow_enumerator_tools (~> 1.0)
86
86
  tomlrb (~> 1.2)
87
87
  nenv (0.3.0)
88
- nokogiri (1.9.1)
88
+ nokogiri (1.10.2)
89
89
  mini_portile2 (~> 2.4.0)
90
90
  notiffany (0.1.1)
91
91
  nenv (~> 0.1)
92
92
  shellany (~> 0.0)
93
- parallel (1.12.1)
93
+ parallel (1.17.0)
94
94
  pry (0.12.2)
95
95
  coderay (~> 1.1.0)
96
96
  method_source (~> 0.9.0)
97
97
  public_suffix (3.0.3)
98
- rack (2.0.6)
98
+ rack (2.0.7)
99
99
  rake (11.3.0)
100
100
  rb-fsevent (0.10.3)
101
101
  rb-inotify (0.10.0)
102
102
  ffi (~> 1.0)
103
103
  ref (2.0.0)
104
104
  ruby_dep (1.5.0)
105
- rubytree (1.0.0)
105
+ rubytree (1.0.1)
106
106
  json (~> 2.1)
107
107
  structured_warnings (~> 0.3)
108
108
  shellany (0.0.1)
@@ -1,4 +1,5 @@
1
1
  # Helpers to be used to annotate content
2
+ require 'byebug'
2
3
  module ContentHelpers
3
4
  def include_topic(item_symbol)
4
5
  incorporated_topic = lookup_nitem("topics", item_symbol.to_s)
@@ -271,4 +272,34 @@ HTMLSTRING
271
272
  filecontents = File.new(filename).read
272
273
  code_string filecontents
273
274
  end
275
+
276
+ def postit_begin title
277
+ "<div class=\"postit\">" + "<h5>" + title + "</h5>"
278
+ end
279
+
280
+ def postit_end
281
+ "</div>"
282
+ end
283
+
284
+ def ul_begin
285
+ "<ul>"
286
+ end
287
+
288
+ def ul_end
289
+ "</ul>"
290
+ end
291
+
292
+ def ul body
293
+ "<ul>#{body}</ul>"
294
+ end
295
+
296
+ def list_items *items
297
+ items.reduce("") do |s, i|
298
+ if i.start_with?("<ul>")
299
+ s + i
300
+ else
301
+ s + "<li>" + i + "</li>"
302
+ end
303
+ end
304
+ end
274
305
  end
@@ -8,7 +8,6 @@ module CourseGen
8
8
  copy_template_dir("layouts", "layouts")
9
9
  copy_template_dir("content/bootstrap", "content/bootstrap")
10
10
  copy_template_dir("content/content", "content/content")
11
- copy_template_dir("content/chalkmark", "content/chalkmark")
12
11
  delete_target_file("lib/default.rb")
13
12
  copy_template_dir("lib", "lib")
14
13
  delete_target_file("Rules")
@@ -21,8 +20,6 @@ module CourseGen
21
20
  delete_target_file("content/index.html")
22
21
  delete_target_file("layouts/default.html")
23
22
  create_empty_dir("content/images")
24
- copy_template_dir("content/tipuesearch", "content/tipuesearch")
25
- copy_template_dir("content/tipuesearch_logic", "content/tipuesearch_logic")
26
23
  end
27
24
 
28
25
  def valid_cg_directory?
@@ -1,3 +1,3 @@
1
1
  module Coursegen
2
- VERSION = "0.7.4"
2
+ VERSION = "0.7.5"
3
3
  end
data/templates/Guardfile CHANGED
@@ -2,8 +2,8 @@
2
2
  # watch(%r{file/path}) { `command(s)` }
3
3
  #
4
4
  guard :shell do
5
- clearing :on
6
- directories %w(. /mydev/cg-topics)
5
+ directories %w(. /mydev/cg-topics)
7
6
  watch(/.erb/) { |m| `cg compile` }
8
- watch(/(cg_config.rb|Rules)/) { |m| `cg reset; cg compile`}
7
+ watch(/.rb/) { |m| `cg compile` }
8
+ watch(/Rules/) { |m| `cg compile` }
9
9
  end
data/templates/Rules CHANGED
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require './cg_config.rb'
4
2
 
5
3
  preprocess do
@@ -10,47 +8,39 @@ compile '/bootstrap/**/*' do
10
8
  nil
11
9
  end
12
10
 
13
- compile '/content/scripts/**/*' do
11
+ compile '/extras/**/*' do
14
12
  nil
15
13
  end
16
14
 
17
- compile '/chalkmark/**/*' do
15
+ compile '/content/topics/robotcode/**/*' do
18
16
  nil
19
17
  end
20
18
 
21
- compile '/tipuesearch/**/*' do
19
+ compile '/content/scripts/**/*' do
22
20
  nil
23
21
  end
24
22
 
25
- compile "/tipuesearch_logic/tipuesearch_content.*" do
23
+ compile "/content/tipuesearch/tipuesearch_content.js.erb" do
26
24
  filter :erb
27
25
  end
28
26
 
29
- compile "/content/**/*.ical.erb" do
27
+ compile '/**/*.ical.erb' do
30
28
  filter :erb
31
29
  end
32
30
 
31
+ compile '/**/*.{md,ical}.erb' do
32
+ if item[:status] != "hidden"
33
+ filter :erb
34
+ filter :kramdown, coderay_line_numbers: nil
35
+ layout '/course.*'
36
+ else
37
+ nil
38
+ end
39
+ end
40
+
33
41
  compile '/**/*' do
34
42
  if item.binary? || item[:status] == "hidden"
35
43
  nil
36
- elsif item[:status] == "hidden"
37
- nil
38
- elsif item[:type] == "subsection"
39
- nil
40
- elsif item[:extension] == "haml"
41
- filter :haml;
42
- layout '/course.*'
43
- else
44
- item[:extension].split('.').reverse.each do
45
- |f|
46
- case f
47
- when 'md', 'markdown'
48
- filter :kramdown, coderay_tab_width: 3
49
- when 'erb'
50
- filter :erb
51
- end
52
- end
53
- layout '/course.*'
54
44
  end
55
45
  end
56
46
 
@@ -62,27 +52,17 @@ route '/tipuesearch/**/*' do
62
52
  @item.identifier.to_s
63
53
  end
64
54
 
65
- route "/tipuesearch_logic/tipuesearch_content.*" do
55
+ route "/content/tipuesearch/tipuesearch_content.*" do
66
56
  '/tipuesearch/tipuesearch_content.js'
67
57
  end
68
58
 
69
-
70
- route '/chalkmark/**/*' do
71
- @item.identifier.to_s
72
- end
73
-
74
59
  # Output the search page
75
- route '/tipuesearch_logic/search.md.erb' do
76
- '/tipuesearch_logic/search/index.html'
77
- end
78
-
79
- route '/**/*.ical.erb' do
80
- @item.identifier.without_ext
60
+ route '/tipuesearch/search.md.erb' do
61
+ '/tipuesearch/search/index.html'
81
62
  end
82
63
 
83
-
84
64
  # Select which .md.erb becomes the home page of the site
85
- route '/content/index.md.erb' do
65
+ route HOME_PAGE do
86
66
  '/index.html'
87
67
  end
88
68
 
@@ -91,15 +71,14 @@ route '/**/*' do
91
71
  raise RuntimeError, "Missing required extension: \".#{item.identifier}\""
92
72
  elsif item.binary?
93
73
  item.identifier.to_s
94
- elsif item.identifier == "/search_logic/tipuesearch_content/"
95
- item.identifier.chop + '.' + item[:extension] rescue fail "in route * in Rules"
74
+ elsif item.identifier == "/searchtipuesearch_content/"
75
+ item.identifier.chop + '.' + item[:extension] rescue fail "in route * in Rules"
96
76
  elsif item[:status] == "hidden"
97
77
  nil
98
78
  elsif item[:type] == "subsection"
99
79
  nil
100
80
  elsif item[:extension] != "css"
101
81
  item.identifier.without_ext + '/index.html'
102
-
103
82
  end
104
83
  end
105
84
 
@@ -1,7 +1,7 @@
1
1
  require 'coursegen'
2
2
 
3
3
  # Copyright string
4
- COPYRIGHT_STRING = "Copyright (2013-2014) R. Pito Salas, pitosalas@gmail.com"
4
+ COPYRIGHT_STRING = "Copyright (2013-2019) R. Pito Salas, pitosalas@gmail.com"
5
5
 
6
6
  # Course short name
7
7
  COURSE_SHORT_NAME = "Sample Course"
@@ -27,3 +27,4 @@ SECTION_CONFIG = [
27
27
  # Options are:
28
28
  # bullet_style: css style for each bullet
29
29
  STYLING_CONFIG = {bullet_style: "\"font-size: 60%; width: 10px; color: grey\""}
30
+ HELPFUL_BOX = false
@@ -1,44 +1,38 @@
1
1
  require 'coursegen'
2
2
 
3
- # bucket for AWS Deployment of the course
4
- AWS_BUCKET = "cosi236b.courses.salas.com"
5
-
6
- # Local directory path for directory of content
7
- CONTENT_PATH = "/mydev/cosi236b"
8
-
9
3
  # Copyright string
10
- COPYRIGHT_STRING = "Copyright (2013-2014) R. Pito Salas, pitosalas@gmail.com"
4
+ COPYRIGHT_STRING = "Copyright (2014-2019) R. Pito Salas, pitosalas@brandeis.edu".freeze
5
+
6
+ # bucket for AWS Deployment of the course
7
+ AWS_BUCKET = "cosi105b".freeze
11
8
 
12
9
  # Course short name
13
- COURSE_SHORT_NAME = "COSI 236B"
14
- COURSE_LONG_NAME = "Software Engineering"
10
+ COURSE_SHORT_NAME = "Cosi 105b".freeze
11
+ COURSE_LONG_NAME = "Software Engineering for Scalability ".freeze
12
+ COURSE_ABBREV = "cs105".freeze
15
13
 
16
14
  # Schedule information. Note that Monday is day 0
17
15
  LECTURES_SCHEDULE_CONFIG = ScheduleDef.new(
18
- first_day: "jan-14-2014",
19
- weekdays: [:tuesday, :friday],
20
- number: 26,
21
- skips: ["feb-18-2014", "feb-21-2014", "apr-15-2014", "apr-18-2014", "apr-22-2014"])
22
-
23
- LABS_SCHEDULE_CONFIG = ScheduleDef.new(
24
- first_day: "jan-16-2014",
25
- weekdays: [:thursday],
26
- number: 13,
27
- skips: ["feb-20-2014", "apr-17-2014"])
16
+ first_day: "jan-15-2019",
17
+ weekdays: [:tuesday, :thursday],
18
+ number: 30,
19
+ start_times: ["15:30", "15:30"],
20
+ end_times: ["16:50", "16:50"],
21
+ start_time: "15:30",
22
+ end_time: "16:50",
23
+ skips: ["jan-22-2019", "feb-19-2019", "feb-21-2019", "apr-23-2019", "apr-25-2019", "may-2-2019"])
28
24
 
29
25
  # Sections in the right hand margin of the page
30
26
  SECTION_CONFIG = [
31
- SectionDef.new("Lectures", "lectures", type: :lecture, schedule: LECTURES_SCHEDULE_CONFIG),
32
- SectionDef.new("Labs", "lab", type: :lecture, schedule: LABS_SCHEDULE_CONFIG),
33
- SectionDef.new("Incubator", "incubator", type: :section),
34
- SectionDef.new("PA", "pa", type: :section),
35
- SectionDef.new("Crib Sheets", "cribsheets", type: :section),
36
- SectionDef.new("Background", "background", type: :section),
37
- SectionDef.new("Root", "root", hidden: true, type: :section),
38
- SectionDef.new("Topics", "topics", hidden: true, type: :section),
39
- SectionDef.new("Hidden", "hidden", hidden: true, type: :section)
40
- ]
27
+ SectionDef.new("Intro", "intro", type: :section, bullet: :star),
28
+ SectionDef.new("Lectures", "lectures", type: :lecture, schedule: LECTURES_SCHEDULE_CONFIG,
29
+ bullet: :dash),
30
+ SectionDef.new("Topics", "topics", hidden: true, type: :section),
31
+ SectionDef.new("Extras", "extras", hidden: true, type: :section)
32
+ ].freeze
41
33
 
42
34
  # Options are:
43
35
  # bullet_style: css style for each bullet
44
- STYLING_CONFIG = {bullet_style: "\"font-size: 60%; width: 10px; color: grey\""}
36
+ STYLING_CONFIG = {bullet_style: %("font-size: 60%; width: 10px; color: grey")}.freeze
37
+ HOME_PAGE = "/content/intro/05_syllabus.md.erb".freeze
38
+ HELPFUL_BOX = false
@@ -1,16 +1,56 @@
1
+ @import url("prettyquote.css");
2
+ @import url("full-width-pics.css");
1
3
  @import url(//fonts.googleapis.com/css?family=Telex);
2
4
 
3
5
  .themefg {
4
- color: rgb(47, 86, 111);
6
+ color: rgb(64,56,207);
5
7
  }
6
8
 
7
9
  .themebg {
8
- background-color: rgb(47, 86, 111);
10
+ background-color: rgb(64,56,207);
11
+ }
12
+ .nav-menus {
13
+ height: 0px;
14
+ }
15
+
16
+ .navbar-inverse .navbar-nav > li > a {
17
+ padding-top: 4px;
18
+ padding-bottom: 0px;
19
+ color: white;
20
+ }
21
+
22
+ .navbar-inverse .navbar-nav > li > a:hover {
23
+ font-weight: bold;
24
+ }
25
+
26
+ a {
27
+ color: rgb(64,56,207);
9
28
  }
10
29
 
11
30
  .navbar a.navbar-title {
12
- color: white;
13
- padding-top: 7px;
31
+ font-family: telex;
32
+ float: left;
33
+ margin-top: 20px;
34
+ padding-left: 10px;
35
+ padding-right: 10px;
36
+ font-size: 28px;
37
+ color: white;
38
+ white-space: nowrap;
39
+ background-color: rgba(18, 0, 0, 0.3);
40
+ }
41
+
42
+ .nav-menus a.navbar-brand {
43
+ padding: 4px 10px;
44
+ color: white;
45
+ }
46
+
47
+ .nav-menus a.navbar-brand:hover {
48
+ font-weight: bold;
49
+ }
50
+
51
+ .nav-btn.btn-mini {
52
+ font-size: 16px;
53
+ color: white;
14
54
  }
15
55
 
16
56
  .navbar {
@@ -18,50 +58,52 @@
18
58
  margin-bottom: 1px;
19
59
  }
20
60
 
21
-
22
61
  .navbar a:hover {
23
62
  color: white;
63
+ text-decoration: none;
24
64
  }
25
65
 
26
- .navbar a {
27
- padding: 6px;
28
- color: light-blue;
66
+ .navbar .input-group-sm input{
67
+ height: 22px;
68
+ width: 150px;
69
+ margin-top: 4px;
29
70
  }
30
71
 
31
- .navbar-title {
32
- float: left;
33
- height: 30px;
34
- font-size: 18px;
35
- line-height: 20px
72
+ .header-main {
73
+ padding-left: 45px;
36
74
  }
37
75
 
38
- .navbar .input-group-sm input{
39
- height: 22px;
40
- width: 150px;
41
- margin-top: 6px;
76
+ .body-main {
77
+ padding-left: 45px;
42
78
  }
43
79
 
44
80
  h1, h2, h3, h4, h5{
45
81
  font-family: telex;
46
- color: rgb(21, 123, 207);
82
+ color: rgb(64,56,207);
47
83
  }
48
84
 
49
85
  h3 {
50
- margin-bottom: 15px;
86
+ padding-top: 20px;
87
+ /* padding-bottom: 10px; */
51
88
  }
52
89
 
53
- h3.body-header {
54
- margin-bottom: -5px;
55
- }
90
+ /* h3.body-header {
91
+ margin-left: -15px;
92
+ margin-top: -10px;
93
+ margin-right: -15px;
94
+ margin-bottom: -22px;
95
+ } */
56
96
 
57
97
  h4 {
58
98
  margin-top: 20px;
59
- border-top: gainsboro solid 1px;
99
+ border-top: rgb(64,56,207) solid 3px;
60
100
  padding-top: 5px;
61
101
  }
62
102
 
63
103
  h5 {
64
104
  margin-top: 15px;
105
+ font-weight: bold;
106
+ font-variant: small-caps;
65
107
  }
66
108
 
67
109
  body {