coursegen 0.9.17 → 0.9.21

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
  SHA256:
3
- metadata.gz: e1c4769dbe98129a6d08cb35c8c87c100071c87479c0e0a517e286d361eb892a
4
- data.tar.gz: e695fdcf6ea62e9a17241926c91b5e10a4635845da56f2d118448d63adf34a36
3
+ metadata.gz: 6b56c0b807e916341052ecd96905c1bc871865fee63f7c71815fcf9d7814d27b
4
+ data.tar.gz: 39f5a5c2f4dbd30a4e0c68c55d02e39dfa53fadaa22a468211fdb44a95216086
5
5
  SHA512:
6
- metadata.gz: 9f1f6f58aa999ddacd3bbf5735104b41f0551589ddf4179aa2bad85f6ec567a01f8b6ce654f2ad87a166be93f397d16075543aee229528388c41f81c1a832f1a
7
- data.tar.gz: 0175deec4cfbe7caa22c95fc1d352567b1624122354b08346cea1d929ee34107f404ee59e68224fae37bd2fb83f5205aababe4b32f1fd9e026fa82c04990ca99
6
+ metadata.gz: 251bdf602d00a8cc6ad043768148ccf30fdc7a47b27c22050d2f014ce3c9b61736d4fb2ba1c990e485f33b9eb6ee28041ffe59edb971e87996fdb202e575999b
7
+ data.tar.gz: 17bf9af7c79f545d474b4f7b11e7145ed8ada2547443e387d25e04df860d94e501b275429f4301ef02458c53c0566eb1e1e076f81de2f3b8a407fc530a8dcffd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coursegen (0.9.17)
4
+ coursegen (0.9.21)
5
5
  activesupport
6
6
  adsf
7
7
  byebug
@@ -11,6 +11,7 @@ PATH
11
11
  icalendar
12
12
  kramdown
13
13
  nanoc
14
+ nanoc-live
14
15
  nokogiri
15
16
  rubytree
16
17
  thor
@@ -19,84 +20,92 @@ PATH
19
20
  GEM
20
21
  remote: https://rubygems.org/
21
22
  specs:
22
- activesupport (6.1.3.1)
23
+ activesupport (7.0.1)
23
24
  concurrent-ruby (~> 1.0, >= 1.0.2)
24
25
  i18n (>= 1.6, < 2)
25
26
  minitest (>= 5.1)
26
27
  tzinfo (~> 2.0)
27
- zeitwerk (~> 2.3)
28
- addressable (2.7.0)
28
+ addressable (2.8.0)
29
29
  public_suffix (>= 2.0.2, < 5.0)
30
- adsf (1.4.5)
30
+ adsf (1.4.6)
31
31
  rack (>= 1.0.0, < 3.0.0)
32
+ adsf-live (1.4.6)
33
+ adsf (~> 1.3)
34
+ em-websocket (~> 0.5)
35
+ eventmachine (~> 1.2)
36
+ listen (~> 3.0)
37
+ rack-livereload (~> 0.3)
32
38
  byebug (11.1.3)
33
39
  coderay (1.1.3)
34
40
  colored (1.2)
35
- concurrent-ruby (1.1.8)
41
+ concurrent-ruby (1.1.9)
36
42
  cri (2.15.11)
37
- ddmemoize (1.0.0)
38
- ddmetrics (~> 1.0)
39
- ref (~> 2.0)
40
43
  ddmetrics (1.0.1)
41
44
  ddplugin (1.0.3)
42
- diff-lcs (1.4.4)
43
- ffi (1.15.0)
44
- formatador (0.2.5)
45
- guard (2.16.2)
45
+ diff-lcs (1.5.0)
46
+ em-websocket (0.5.3)
47
+ eventmachine (>= 0.12.9)
48
+ http_parser.rb (~> 0)
49
+ eventmachine (1.2.7)
50
+ ffi (1.15.5)
51
+ formatador (0.3.0)
52
+ guard (2.18.0)
46
53
  formatador (>= 0.2.4)
47
54
  listen (>= 2.7, < 4.0)
48
55
  lumberjack (>= 1.0.12, < 2.0)
49
56
  nenv (~> 0.1)
50
57
  notiffany (~> 0.0)
51
- pry (>= 0.9.12)
58
+ pry (>= 0.13.0)
52
59
  shellany (~> 0.0)
53
60
  thor (>= 0.18.1)
54
61
  guard-compat (1.2.1)
55
- guard-shell (0.7.1)
62
+ guard-shell (0.7.2)
56
63
  guard (>= 2.0.0)
57
64
  guard-compat (~> 1.0)
58
65
  hamster (3.0.0)
59
66
  concurrent-ruby (~> 1.0)
60
- i18n (1.8.10)
67
+ http_parser.rb (0.8.0)
68
+ i18n (1.8.11)
61
69
  concurrent-ruby (~> 1.0)
62
70
  icalendar (2.7.1)
63
71
  ice_cube (~> 0.16)
64
- ice_cube (0.16.3)
65
- json (2.5.1)
72
+ ice_cube (0.16.4)
73
+ json (2.6.1)
66
74
  json_schema (0.21.0)
67
75
  kramdown (2.3.1)
68
76
  rexml
69
- listen (3.5.1)
77
+ listen (3.7.1)
70
78
  rb-fsevent (~> 0.10, >= 0.10.3)
71
79
  rb-inotify (~> 0.9, >= 0.9.10)
72
80
  lumberjack (1.2.8)
81
+ memo_wise (1.5.0)
73
82
  method_source (1.0.0)
74
- minitest (5.14.4)
75
- nanoc (4.12.1)
83
+ minitest (5.15.0)
84
+ nanoc (4.12.4)
76
85
  addressable (~> 2.5)
77
86
  colored (~> 1.2)
78
87
  nanoc-checking (~> 1.0)
79
- nanoc-cli (= 4.12.1)
80
- nanoc-core (= 4.12.1)
88
+ nanoc-cli (= 4.12.4)
89
+ nanoc-core (= 4.12.4)
81
90
  nanoc-deploying (~> 1.0)
82
91
  parallel (~> 1.12)
83
92
  tty-command (~> 0.8)
84
93
  tty-which (~> 0.4)
85
- nanoc-checking (1.0.1)
86
- nanoc-cli (~> 4.11, >= 4.11.15)
87
- nanoc-core (~> 4.11, >= 4.11.15)
88
- nanoc-cli (4.12.1)
94
+ nanoc-checking (1.0.2)
95
+ nanoc-cli (~> 4.12, >= 4.12.4)
96
+ nanoc-core (~> 4.12, >= 4.12.4)
97
+ nanoc-cli (4.12.4)
89
98
  cri (~> 2.15)
90
99
  diff-lcs (~> 1.3)
91
- nanoc-core (= 4.12.1)
100
+ nanoc-core (= 4.12.4)
92
101
  zeitwerk (~> 2.1)
93
- nanoc-core (4.12.1)
102
+ nanoc-core (4.12.4)
94
103
  concurrent-ruby (~> 1.1)
95
- ddmemoize (~> 1.0)
96
104
  ddmetrics (~> 1.0)
97
105
  ddplugin (~> 1.0)
98
106
  hamster (~> 3.0)
99
107
  json_schema (~> 0.19)
108
+ memo_wise (~> 1.5)
100
109
  slow_enumerator_tools (~> 1.0)
101
110
  tty-platform (~> 0.2)
102
111
  zeitwerk (~> 2.1)
@@ -104,26 +113,32 @@ GEM
104
113
  nanoc-checking (~> 1.0)
105
114
  nanoc-cli (~> 4.11, >= 4.11.15)
106
115
  nanoc-core (~> 4.11, >= 4.11.15)
116
+ nanoc-live (1.0.0)
117
+ adsf-live (~> 1.4)
118
+ listen (~> 3.0)
119
+ nanoc-cli (~> 4.11, >= 4.11.14)
120
+ nanoc-core (~> 4.11, >= 4.11.14)
107
121
  nenv (0.3.0)
108
- nokogiri (1.11.3-x86_64-darwin)
122
+ nokogiri (1.13.1-x86_64-darwin)
109
123
  racc (~> 1.4)
110
124
  notiffany (0.1.3)
111
125
  nenv (~> 0.1)
112
126
  shellany (~> 0.0)
113
- parallel (1.20.1)
127
+ parallel (1.21.0)
114
128
  pastel (0.8.0)
115
129
  tty-color (~> 0.5)
116
- pry (0.14.0)
130
+ pry (0.14.1)
117
131
  coderay (~> 1.1)
118
132
  method_source (~> 1.0)
119
133
  public_suffix (4.0.6)
120
- racc (1.5.2)
134
+ racc (1.6.0)
121
135
  rack (2.2.3)
122
- rake (13.0.3)
123
- rb-fsevent (0.10.4)
136
+ rack-livereload (0.3.17)
137
+ rack
138
+ rake (13.0.6)
139
+ rb-fsevent (0.11.0)
124
140
  rb-inotify (0.10.1)
125
141
  ffi (~> 1.0)
126
- ref (2.0.0)
127
142
  rexml (3.2.5)
128
143
  rspec (3.10.0)
129
144
  rspec-core (~> 3.10.0)
@@ -131,31 +146,31 @@ GEM
131
146
  rspec-mocks (~> 3.10.0)
132
147
  rspec-core (3.10.1)
133
148
  rspec-support (~> 3.10.0)
134
- rspec-expectations (3.10.1)
149
+ rspec-expectations (3.10.2)
135
150
  diff-lcs (>= 1.2.0, < 2.0)
136
151
  rspec-support (~> 3.10.0)
137
152
  rspec-mocks (3.10.2)
138
153
  diff-lcs (>= 1.2.0, < 2.0)
139
154
  rspec-support (~> 3.10.0)
140
- rspec-support (3.10.2)
141
- rubytree (1.0.0)
142
- json (~> 2.1)
143
- structured_warnings (~> 0.3)
155
+ rspec-support (3.10.3)
156
+ rubytree (1.0.2)
157
+ json (~> 2.6.1)
158
+ structured_warnings (~> 0.4.0)
144
159
  shellany (0.0.1)
145
160
  slow_enumerator_tools (1.1.0)
146
161
  structured_warnings (0.4.0)
147
- thor (1.1.0)
162
+ thor (1.2.1)
148
163
  tty-color (0.6.0)
149
164
  tty-command (0.10.1)
150
165
  pastel (~> 0.8)
151
166
  tty-platform (0.3.0)
152
- tty-which (0.4.2)
167
+ tty-which (0.5.0)
153
168
  tzinfo (2.0.4)
154
169
  concurrent-ruby (~> 1.0)
155
- zeitwerk (2.4.2)
170
+ zeitwerk (2.5.3)
156
171
 
157
172
  PLATFORMS
158
- ruby
173
+ x86_64-darwin-21
159
174
 
160
175
  DEPENDENCIES
161
176
  bundler
@@ -164,4 +179,4 @@ DEPENDENCIES
164
179
  rspec
165
180
 
166
181
  BUNDLED WITH
167
- 2.1.4
182
+ 2.3.3
data/coursegen.gemspec CHANGED
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency 'icalendar'
31
31
  spec.add_dependency 'kramdown'
32
32
  spec.add_dependency 'nanoc'
33
+ spec.add_dependency 'nanoc-live'
33
34
  spec.add_dependency 'nokogiri'
34
35
  spec.add_dependency 'rubytree'
35
36
  spec.add_dependency 'thor'
@@ -1,5 +1,6 @@
1
1
  require 'byebug'
2
2
  require 'active_support/inflector'
3
+ require 'date'
3
4
 
4
5
  #
5
6
  # Coursegen Item decorates Nanoc Item
@@ -93,10 +94,26 @@ class CItem
93
94
  @slides = @nitem[:slides]
94
95
  @lectref = @nitem[:lectref]
95
96
  @reading = @nitem[:reading]
96
- @due = @nitem[:due]
97
+ @due = parse_date(@nitem[:due])
97
98
 
98
99
  end
99
100
 
101
+ def parse_date(datestring)
102
+ if datestring.nil? || datestring == "TBD"
103
+ val = Date.parse("jan-1-1985")
104
+ else
105
+ # Date.parse(datestring)
106
+ val = Date.strptime(datestring, "%m/%d/%y")
107
+ end
108
+ # if val.nil?
109
+ # puts "Nil date: #{datestring} #{@title}"
110
+ # end
111
+ val
112
+ rescue
113
+ puts("bad parse date: #{datestring}")
114
+ nil
115
+ end
116
+
100
117
  def parse_identifier(ident)
101
118
  parts = ident.to_s.split("/")
102
119
  @section ||= parts[2]
@@ -36,6 +36,8 @@ class DataAdaptor
36
36
  citem.homework
37
37
  when :assigned
38
38
  citem.assigned
39
+ when :cat
40
+ citem.cat
39
41
  when :start_date_time
40
42
  citem.schedule_start_date_time
41
43
  when :end_date_time
@@ -44,8 +46,6 @@ class DataAdaptor
44
46
  desc = citem.desc || ''
45
47
  hw = citem.homework || ''
46
48
  desc + '. HW: ' + hw
47
- when :cat
48
- citem.cat
49
49
  when :lectref
50
50
  citem.lectref
51
51
  when :hwref
@@ -19,7 +19,7 @@ class Section
19
19
 
20
20
  def find_by_short_name(sname)
21
21
  matches = @citems.select { |c| sname == c.short_name }
22
- raise RuntimeError,"'#{sname}': invalid reference in section \"#{@section}\"" if matches.length == 0
22
+ raise RuntimeError, "'#{sname}': invalid reference in section \"#{@section}\"" if matches.length == 0
23
23
  raise RuntimeError, "'#{sname}': duplicate referenced in section \"#{@section}\"" if matches.length != 1
24
24
  matches[0]
25
25
  end
@@ -73,6 +73,16 @@ class Section
73
73
  end
74
74
 
75
75
  def sort_pages
76
- @citems.sort! { |a,b| a.order <=> b.order } rescue fail "sort_pages in section.rb"
76
+ @citems.sort! { |a,b| a.order <=> b.order} rescue fail "sort_pages in section.rb"
77
+ # @citems.sort! do |a, b|
78
+ # comp = a.order <=> b.order
79
+ # if !(a.due.nil? || b.due.nil?)
80
+ # if a.due.class != Date || b.due.class != Date
81
+ # puts "sort_pages_type #{a.title} #{b.title} #{a.class} #{b.class}"
82
+ # end
83
+ # comp = a.due <=> b.due
84
+ # end
85
+ # comp
86
+ # end
77
87
  end
78
88
  end
@@ -5,8 +5,8 @@ class BootstrapMarkup
5
5
  @str = ''
6
6
  end
7
7
 
8
- def table_begin(css_class = 'table-condensed')
9
- @str << "<table class=\"table x #{css_class}\">"
8
+ def table_begin(css_class = 'table-sm')
9
+ @str << "<table class=\"table #{css_class}\">"
10
10
  end
11
11
 
12
12
  def table_end
@@ -1,6 +1,6 @@
1
1
  # ContentHelpers is used to annotate content.
2
2
  module ContentHelpers
3
-
3
+
4
4
  def include_topic(item_symbol)
5
5
  incorporated_topic = lookup_nitem('topics', item_symbol.to_s)
6
6
  items[incorporated_topic.identifier.to_s].compiled_content
@@ -67,7 +67,7 @@ module ContentHelpers
67
67
  HTMLSTRING
68
68
  end
69
69
 
70
- def callout(title, body, style="big")
70
+ def callout3(title, body, style="big")
71
71
  style = style.to_s if style.class != String
72
72
  if (style == "big")
73
73
  %(<div class="jumbotron py-1 border border-primary border-rounded-lg">
@@ -84,6 +84,24 @@ module ContentHelpers
84
84
  end
85
85
  end
86
86
 
87
+ def callout(title, body, style="big")
88
+ style = style.to_s if style.class != String
89
+ if (style == "big")
90
+ %(<div class="callout callout-big">
91
+ <h1 class="display-5">#{title}</h1>
92
+ <p class="lead">#{body}</p></div>)
93
+ elsif (style == "small")
94
+ <<~HTMLSTRING
95
+ <div class="callout callout-small">
96
+ <span class="callout-badge">#{title}</span>#{body}
97
+ </div>
98
+ HTMLSTRING
99
+ else
100
+ "error in callout call: .#{style}. #{style.class}"
101
+ end
102
+ end
103
+
104
+
87
105
  def iconbadge1(icon, tooltip)
88
106
  %(<img src="/bootstrap/bootstrap-icons-1.0.0/#{icon}.svg" title="#{tooltip}" class="iconbadge">)
89
107
  end
@@ -194,10 +212,14 @@ module ContentHelpers
194
212
  "*Discussion:*{: style=\"color: blue\"} *#{string}*"
195
213
  end
196
214
 
197
- def discussion_box(string)
215
+ def discussion_box1(string)
198
216
  %(<div class="alert alert-info"><strong>Discussion:</strong> #{string}</div>)
199
217
  end
200
218
 
219
+ def discussion_box(string)
220
+ %(<div class="discussionbox"><strong>Discussion:</strong> #{string}</div>)
221
+ end
222
+
201
223
  def homework_hdr(show_legend: :on)
202
224
  body = '## Homework due for today'
203
225
  legend = "\n**Legend**: #{partbadge}: Participation (pass/fail) | #{pdfbadge}: PDF | #{teambadge}: Team | #{zipbadge}: Attachment"
@@ -29,7 +29,7 @@ class ListOf
29
29
 
30
30
  # Render renders the underlying lecture table.
31
31
  def render
32
- @mark.table_begin
32
+ @mark.table_begin("table-striped table-sm table-responsive table-hover")
33
33
  generate_headers
34
34
  generate_rows
35
35
  @mark.table_end
@@ -53,7 +53,6 @@ class ListOf
53
53
  def generate_rows
54
54
  @data.rows do |row_id|
55
55
  next unless include_row?(row_id)
56
-
57
56
  if subsection_hdr?(row_id)
58
57
  generate_summary_row(row_id)
59
58
  else
@@ -108,11 +107,11 @@ class ListOf
108
107
  end
109
108
 
110
109
  def include_by_row_type?(row_id)
111
- @rows.include?(row_id.type)
110
+ tf = @rows.include?(row_id.type)
112
111
  end
113
112
 
114
113
  def include_by_subsection_path?(row_id)
115
- @subsections.empty? || @subsections.include?(row_id.subsection)
114
+ tf = @subsections.empty? || @subsections.include?(row_id.subsection)
116
115
  end
117
116
 
118
117
  def subsection_hdr?(row_id)
@@ -1,4 +1,5 @@
1
1
  # ListOfHelpers is used to create a lecture table.
2
+
2
3
  module ListOfHelpers
3
4
  # List_of creates and renders a lecture table based on the given info.
4
5
  #
@@ -1,15 +1,12 @@
1
1
  # Class TableHelper provides methods for creating a table.
2
2
  class TableHelper
3
- def initialize(*property)
4
- @prop = property
3
+ def initialize(css_styles)
4
+ @css_styles = css_styles
5
5
  @bm = BootstrapMarkup.new
6
6
  end
7
7
 
8
8
  def headers(*labels)
9
- css_style = ''
10
- css_style += ' table-condensed' if @prop.include? :normal
11
- css_style += ' table-bordered' if @prop.include? :bordered
12
- @bm.table_begin(css_style)
9
+ @bm.table_begin(@css_styles)
13
10
  @bm.headers_begin
14
11
  labels.each do |h|
15
12
  @bm.header_begin
@@ -1,8 +1,20 @@
1
1
  module VisualHelpers
2
-
3
- def end_of_lecture(type=:thatsall)
2
+ def end_of_lecture(type=:random)
4
3
  if (type == :thatsall)
5
- "<slide_break></slide_break>" + include_image("/content/topics/images/thatsallfolks.jpg")
4
+ part1 = "<slide_break></slide_break>\n\n"
5
+ part2 = "## See you next time!!\n\n"
6
+ part3 = "<img src=\"/content/topics/images/thatsallfolks.jpg\" class=\"img-thumbnail d-block mx-auto\" style=\"height:300px;\"/>"
7
+ part4 = ""
8
+ elsif type == :random
9
+ part1 = "<slide_break></slide_break>\n\n"
10
+ part2 = "<h2 class=\"shadow p-3 bg-white rounded\">Thank you. Questions?"
11
+ part3 = random_image :normal, "800", "100"
12
+ part4 = "<small>&nbsp;(random Image from picsum.photos)</small>\</h2>"
6
13
  end
14
+ part1 + part2 + part3 + part4
7
15
  end
8
16
  end
17
+
18
+ def random_image(_style, width, height)
19
+ "<img class=\"img-fluid\ w-100\" src=\"https://picsum.photos/#{width}/#{height}.jpg\" /> "
20
+ end
@@ -5,16 +5,22 @@ Nanoc::Filter.define(:handle_shortcodes) do |content, _params = {}|
5
5
  content
6
6
  .gsub(Regexp.new(prefix.source + /callout :(\w+), "(.+)", "(.+)"/.source)) { callout($2, $3, $1) }
7
7
  .gsub(Regexp.new(prefix.source + /deliverable (.+)$/.source)) { deliverable($1) }
8
- .gsub(Regexp.new(prefix.source + /discussion_box (.+)$/.source), "<%= discussion_box( \"\\1\") %>")
8
+ .gsub(Regexp.new(prefix.source + /discussion_box "(.+)"/.source)) { discussion_box($1) }
9
9
  .gsub(Regexp.new(prefix.source + /h1 (.+)$/.source), "# \\1 ")
10
10
  .gsub(Regexp.new(prefix.source + /h2 (.+)$/.source), "## \\1 ")
11
11
  .gsub(Regexp.new(prefix.source + /h3 (.+)$/.source), "### \\1 ")
12
12
  .gsub(Regexp.new(prefix.source + /h4 (.+)$/.source), "#### \\1 ")
13
- .gsub(Regexp.new(prefix.source + /image :(\w+)/.source), "<img src=\"/content/topics/images/\\1.jpg\" class=\"img-thumbnail\" style=\"height:300px;\"/>")
13
+ .gsub(Regexp.new(prefix.source + /h5 (.+)$/.source)) { "<h5>#{$1}</h5>" }
14
+ .gsub(Regexp.new(prefix.source + /image :(\w+)$/.source)) { "<img src=\"/content/topics/images/#{$1}.jpg\" class=\"img-thumbnail d-block mx-auto\" style=\"height:300px;\"/>" }
15
+ .gsub(Regexp.new(prefix.source + /image :(\w+), :(\w+)$/.source)) { "<img src=\"/content/topics/images/#{$2}.jpg\" class=\"img-thumbnail d-block mx-auto\" style=\"height:#{$1}px;\"/>" }
14
16
  .gsub(Regexp.new(prefix.source + /lecture_end/.source), end_of_lecture)
17
+ .gsub(Regexp.new(prefix.source + /li (.+)$/.source)) { "<li>#{$1}</li>" }
15
18
  .gsub(Regexp.new(prefix.source + /partbadge/.source), partbadge)
16
19
  .gsub(Regexp.new(prefix.source + /pdfbadge/.source), pdfbadge)
17
- .gsub(Regexp.new(prefix.source + /section_link :(\w+) :(\w+)/.source)) { link_to_section($1, $2) }
20
+ .gsub(Regexp.new(prefix.source + /image_random "(\w+)", "(\w+)"/.source)) { "<img src=\"https://picsum.photos/#{$1}/#{$2}.jpg\" /> "}
21
+ .gsub(Regexp.new(prefix.source + /image_rnd :(\w+), "(.+)", "(.+)"/.source)) { random_image($1, $2, $3) }
22
+ .gsub(Regexp.new(prefix.source + /section_link :(\w+), :(\w+)/.source)) { link_to_section($1, $2) }
23
+ .gsub(Regexp.new(prefix.source + /section_include :(\w+), :(\w+)/.source)) { include_from_section($1, $2) }
18
24
  .gsub(Regexp.new(prefix.source + /slide_bigtitle (.+)$/.source), "<slide_break></slide_break>\n\n## \\1")
19
25
  .gsub(Regexp.new(prefix.source + /slide_break/.source), "<slide_break></slide_break>")
20
26
  .gsub(Regexp.new(prefix.source + /slide_subtitle (.+)$/.source), "<slide_break></slide_break>\n\n#### \\1")
@@ -25,6 +31,10 @@ Nanoc::Filter.define(:handle_shortcodes) do |content, _params = {}|
25
31
  .gsub(Regexp.new(prefix.source + /teambadge/.source), teambadge)
26
32
  .gsub(Regexp.new(prefix.source + /topic_include :(\w+)$/.source)) { include_topic($1) }
27
33
  .gsub(Regexp.new(prefix.source + /topic_link :(\w+)/.source)) { link_to_topic($1) }
34
+ .gsub(Regexp.new(prefix.source + /ul_begin :(\w+)/.source)) { "<ul class=\"#{$1}\">" }
35
+ .gsub(Regexp.new(prefix.source + /ul_begin$/.source)) { "<ul>" }
36
+ .gsub(Regexp.new(prefix.source + /ul_end$/.source)) { "</ul>" }
28
37
  .gsub(Regexp.new(prefix.source + /youtube \"(.+)\"$/.source)) { %Q!<iframe width="560" height="315" src="#{$1}"></iframe>! }
29
38
  .gsub(Regexp.new(prefix.source + /zipbadge/.source), zipbadge)
30
- end
39
+
40
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Coursegen
4
- VERSION = '0.9.17'
4
+ VERSION = '0.9.21'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coursegen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.17
4
+ version: 0.9.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pito Salas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-13 00:00:00.000000000 Z
11
+ date: 2022-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -178,6 +178,20 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: nanoc-live
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: nokogiri
183
197
  requirement: !ruby/object:Gem::Requirement
@@ -352,7 +366,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
352
366
  - !ruby/object:Gem::Version
353
367
  version: '0'
354
368
  requirements: []
355
- rubygems_version: 3.1.4
369
+ rubygems_version: 3.3.3
356
370
  signing_key:
357
371
  specification_version: 4
358
372
  summary: Use Nanoc to build courses and deploy them to S3