coursegen 0.9.1 → 0.9.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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c8c20c18654bed952a0b1f5e488977f54e613bb0a0c6934e472d028a4abed89
4
- data.tar.gz: 8db99fc9a6fa6aea08b9b6dd4d1f6de1a1e3a9b7e1757f1305482ac781bccd89
3
+ metadata.gz: cdca83c6fc2baa1071353729e9ac19f85fe246d323c8edbeeac392e5b6e75220
4
+ data.tar.gz: 71ae4a3e7491aa469232ef8737e3f88971d6fada2dc401484c50cc43e94d90c6
5
5
  SHA512:
6
- metadata.gz: 4ab21fdc5c79763690101f1ddd93ff37ec94d26033e6d6f0f35f20ce65bee9d4e7294b2ee5bb667d6319455662fa9b258c231bba79e1b181d072f577049f962f
7
- data.tar.gz: 981f8abcb7940b83582b8dbb998449871acf2d8a8704d7b575cd8b1b6a072287916850a0187bf0e3dc45f6a50deec36b8843f1b1f8ea7039813b0dabc265e46e
6
+ metadata.gz: 8ad815270ea969845109ddab42a91c800c02192c72d14ca10fad1476349645ff7170ec73d5df480890d1e02454faccd926029f253808345b6234e726d37b8ef6
7
+ data.tar.gz: b91650dc566ccbe34adef4bbbdb7144d77d782537652538e596c6436eb2b4024e5b5489d04f8d1549899921747efc51ad817c906c610e35cbf49171a251cc72a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coursegen (0.9.1)
4
+ coursegen (0.9.7)
5
5
  activesupport
6
6
  adsf
7
7
  byebug
@@ -19,29 +19,28 @@ PATH
19
19
  GEM
20
20
  remote: https://rubygems.org/
21
21
  specs:
22
- activesupport (6.0.3.1)
22
+ activesupport (6.1.3)
23
23
  concurrent-ruby (~> 1.0, >= 1.0.2)
24
- i18n (>= 0.7, < 2)
25
- minitest (~> 5.1)
26
- tzinfo (~> 1.1)
27
- zeitwerk (~> 2.2, >= 2.2.2)
24
+ i18n (>= 1.6, < 2)
25
+ minitest (>= 5.1)
26
+ tzinfo (~> 2.0)
27
+ zeitwerk (~> 2.3)
28
28
  addressable (2.7.0)
29
29
  public_suffix (>= 2.0.2, < 5.0)
30
- adsf (1.4.3)
30
+ adsf (1.4.5)
31
31
  rack (>= 1.0.0, < 3.0.0)
32
32
  byebug (11.1.3)
33
33
  coderay (1.1.3)
34
34
  colored (1.2)
35
- concurrent-ruby (1.1.6)
36
- cri (2.15.10)
35
+ concurrent-ruby (1.1.8)
36
+ cri (2.15.11)
37
37
  ddmemoize (1.0.0)
38
38
  ddmetrics (~> 1.0)
39
39
  ref (~> 2.0)
40
40
  ddmetrics (1.0.1)
41
- ddplugin (1.0.2)
41
+ ddplugin (1.0.3)
42
42
  diff-lcs (1.4.4)
43
- equatable (0.6.1)
44
- ffi (1.13.1)
43
+ ffi (1.14.2)
45
44
  formatador (0.2.5)
46
45
  guard (2.16.2)
47
46
  formatador (>= 0.2.4)
@@ -58,41 +57,41 @@ GEM
58
57
  guard-compat (~> 1.0)
59
58
  hamster (3.0.0)
60
59
  concurrent-ruby (~> 1.0)
61
- i18n (1.8.3)
60
+ i18n (1.8.9)
62
61
  concurrent-ruby (~> 1.0)
63
- icalendar (2.6.1)
62
+ icalendar (2.7.0)
64
63
  ice_cube (~> 0.16)
65
64
  ice_cube (0.16.3)
66
65
  json (2.3.0)
67
- json_schema (0.20.8)
68
- kramdown (2.2.1)
66
+ json_schema (0.20.9)
67
+ kramdown (2.3.0)
69
68
  rexml
70
- listen (3.2.1)
69
+ listen (3.4.1)
71
70
  rb-fsevent (~> 0.10, >= 0.10.3)
72
71
  rb-inotify (~> 0.9, >= 0.9.10)
73
- lumberjack (1.2.5)
72
+ lumberjack (1.2.8)
74
73
  method_source (1.0.0)
75
- mini_portile2 (2.4.0)
76
- minitest (5.14.1)
77
- nanoc (4.11.16)
74
+ minitest (5.14.4)
75
+ nanoc (4.11.23)
78
76
  addressable (~> 2.5)
79
77
  colored (~> 1.2)
80
78
  nanoc-checking (~> 1.0)
81
- nanoc-cli (= 4.11.16)
82
- nanoc-core (= 4.11.16)
79
+ nanoc-cli (= 4.11.23)
80
+ nanoc-core (= 4.11.23)
83
81
  nanoc-deploying (~> 1.0)
84
82
  parallel (~> 1.12)
85
83
  tty-command (~> 0.8)
86
84
  tty-which (~> 0.4)
87
- nanoc-checking (1.0.0)
85
+ nanoc-checking (1.0.1)
88
86
  nanoc-cli (~> 4.11, >= 4.11.15)
89
87
  nanoc-core (~> 4.11, >= 4.11.15)
90
- nanoc-cli (4.11.16)
88
+ nanoc-cli (4.11.23)
91
89
  cri (~> 2.15)
92
90
  diff-lcs (~> 1.3)
93
- nanoc-core (= 4.11.16)
91
+ nanoc-core (= 4.11.23)
94
92
  zeitwerk (~> 2.1)
95
- nanoc-core (4.11.16)
93
+ nanoc-core (4.11.23)
94
+ concurrent-ruby (~> 1.1)
96
95
  ddmemoize (~> 1.0)
97
96
  ddmetrics (~> 1.0)
98
97
  ddplugin (~> 1.0)
@@ -102,61 +101,60 @@ GEM
102
101
  tomlrb (~> 1.2)
103
102
  tty-platform (~> 0.2)
104
103
  zeitwerk (~> 2.1)
105
- nanoc-deploying (1.0.0)
104
+ nanoc-deploying (1.0.1)
106
105
  nanoc-checking (~> 1.0)
107
106
  nanoc-cli (~> 4.11, >= 4.11.15)
108
107
  nanoc-core (~> 4.11, >= 4.11.15)
109
108
  nenv (0.3.0)
110
- nokogiri (1.10.9)
111
- mini_portile2 (~> 2.4.0)
109
+ nokogiri (1.11.1-x86_64-darwin)
110
+ racc (~> 1.4)
112
111
  notiffany (0.1.3)
113
112
  nenv (~> 0.1)
114
113
  shellany (~> 0.0)
115
- parallel (1.19.1)
116
- pastel (0.7.4)
117
- equatable (~> 0.6)
114
+ parallel (1.20.1)
115
+ pastel (0.8.0)
118
116
  tty-color (~> 0.5)
119
117
  pry (0.13.1)
120
118
  coderay (~> 1.1)
121
119
  method_source (~> 1.0)
122
- public_suffix (4.0.5)
123
- rack (2.2.2)
124
- rake (13.0.1)
120
+ public_suffix (4.0.6)
121
+ racc (1.5.2)
122
+ rack (2.2.3)
123
+ rake (13.0.3)
125
124
  rb-fsevent (0.10.4)
126
125
  rb-inotify (0.10.1)
127
126
  ffi (~> 1.0)
128
127
  ref (2.0.0)
129
- rexml (3.2.4)
130
- rspec (3.9.0)
131
- rspec-core (~> 3.9.0)
132
- rspec-expectations (~> 3.9.0)
133
- rspec-mocks (~> 3.9.0)
134
- rspec-core (3.9.2)
135
- rspec-support (~> 3.9.3)
136
- rspec-expectations (3.9.2)
128
+ rexml (3.2.3)
129
+ rspec (3.10.0)
130
+ rspec-core (~> 3.10.0)
131
+ rspec-expectations (~> 3.10.0)
132
+ rspec-mocks (~> 3.10.0)
133
+ rspec-core (3.10.1)
134
+ rspec-support (~> 3.10.0)
135
+ rspec-expectations (3.10.1)
137
136
  diff-lcs (>= 1.2.0, < 2.0)
138
- rspec-support (~> 3.9.0)
139
- rspec-mocks (3.9.1)
137
+ rspec-support (~> 3.10.0)
138
+ rspec-mocks (3.10.1)
140
139
  diff-lcs (>= 1.2.0, < 2.0)
141
- rspec-support (~> 3.9.0)
142
- rspec-support (3.9.3)
140
+ rspec-support (~> 3.10.0)
141
+ rspec-support (3.10.1)
143
142
  rubytree (1.0.0)
144
143
  json (~> 2.1)
145
144
  structured_warnings (~> 0.3)
146
145
  shellany (0.0.1)
147
146
  slow_enumerator_tools (1.1.0)
148
147
  structured_warnings (0.4.0)
149
- thor (1.0.1)
150
- thread_safe (0.3.6)
148
+ thor (1.1.0)
151
149
  tomlrb (1.3.0)
152
- tty-color (0.5.1)
153
- tty-command (0.9.0)
154
- pastel (~> 0.7.0)
150
+ tty-color (0.6.0)
151
+ tty-command (0.10.0)
152
+ pastel (~> 0.8)
155
153
  tty-platform (0.3.0)
156
154
  tty-which (0.4.2)
157
- tzinfo (1.2.7)
158
- thread_safe (~> 0.1)
159
- zeitwerk (2.3.0)
155
+ tzinfo (2.0.4)
156
+ concurrent-ruby (~> 1.0)
157
+ zeitwerk (2.4.2)
160
158
 
161
159
  PLATFORMS
162
160
  ruby
data/lib/coursegen.rb CHANGED
@@ -4,6 +4,7 @@ require 'nokogiri'
4
4
 
5
5
  require 'coursegen/version'
6
6
  require 'coursegen/course/helpers/sidebar_helpers'
7
+ require 'coursegen/course/helpers/visual_helpers'
7
8
  require 'coursegen/course/helpers/lecture_helpers'
8
9
  require 'coursegen/course/helpers/content_helpers'
9
10
  require 'coursegen/course/helpers/logging_helpers'
@@ -1,5 +1,6 @@
1
1
  # ContentHelpers is used to annotate content.
2
2
  module ContentHelpers
3
+
3
4
  def include_topic(item_symbol)
4
5
  incorporated_topic = lookup_nitem('topics', item_symbol.to_s)
5
6
  items[incorporated_topic.identifier.to_s].compiled_content
@@ -50,7 +51,7 @@ module ContentHelpers
50
51
  italic_red(string)
51
52
  end
52
53
 
53
- def callout_1(title, body)
54
+ def callout1(title, body)
54
55
  <<~HTMLSTRING
55
56
  <div class="well well-sm callout">
56
57
  <span class="themebg label label-primary">#{title}</span>#{body}
@@ -58,7 +59,7 @@ module ContentHelpers
58
59
  HTMLSTRING
59
60
  end
60
61
 
61
- def callout_2(title, body)
62
+ def callout2(title, body)
62
63
  <<~HTMLSTRING
63
64
  <div class="callout border border-primary rounded p-2 m-3">
64
65
  <span class="badge badge-pill badge-primary">#{title}</span>#{body}
@@ -66,20 +67,34 @@ module ContentHelpers
66
67
  HTMLSTRING
67
68
  end
68
69
 
69
- def callout(title, body)
70
- %(<div class="jumbotron py-1 border border-primary border-rounded-lg">
71
- <h1 class="display-5">#{title}</h1>
72
- <p class="lead">#{body}</p></div>)
70
+ def callout(title, body, style=:big)
71
+ if (style == :big)
72
+ %(<div class="jumbotron py-1 border border-primary border-rounded-lg">
73
+ <h1 class="display-5">#{title}</h1>
74
+ <p class="lead">#{body}</p></div>)
75
+ elsif (style == :small)
76
+ <<~HTMLSTRING
77
+ <div class="callout border border-primary rounded p-2 m-3">
78
+ <span class="badge badge-pill badge-primary">#{title}</span>#{body}
79
+ </div>
80
+ HTMLSTRING
81
+ else
82
+ "error in callout call #{style}"
83
+ end
73
84
  end
74
85
 
75
86
  def iconbadge1(icon, tooltip)
76
87
  %(<img src="/bootstrap/bootstrap-icons-1.0.0/#{icon}.svg" title="#{tooltip}" class="iconbadge">)
77
88
  end
78
89
 
79
- def iconbadge(icon, tooltip)
80
- %(<svg class="bi iconbadge" fill="blue"><use xlink:href="/bootstrap/bootstrap-icons-1.0.0/bootstrap-icons.svg##{icon}"/></svg>)
90
+ def iconbadge3(icon, tooltip, shorttext="")
91
+ %(<svg class="iconbadge bi" title="#{tooltip}" data-placement="top" data-title="#{tooltip}" data-toggle="tooltip" fill="blue"><use xlink:href="/bootstrap/bootstrap-icons-1.0.0/bootstrap-icons.svg##{icon}"/></svg>#{shorttext})
81
92
  end
82
-
93
+
94
+ def iconbadge(icon, tooltip, shorttext="")
95
+ %(<svg class="iconbadge bi" title="#{tooltip}" data-placement="top" data-title="#{tooltip}" data-toggle="tooltip" fill="blue"><use xlink:href="/bootstrap/bootstrap-icons-1.0.0/bootstrap-icons.svg##{icon}"/></svg><span class="icontext" >#{shorttext}</span>)
96
+ end
97
+
83
98
  def textbadge(text, tooltip)
84
99
  %(<span class="label label-info" data-toggle="tooltip" data-placement="top" title="#{tooltip}">#{text}</span>)
85
100
  end
@@ -89,31 +104,31 @@ module ContentHelpers
89
104
  end
90
105
 
91
106
  def pdfbadge
92
- iconbadge('file-earmark-richtext-fill', 'Submit as 1 page pdf, include name and homework #')
107
+ iconbadge('file-earmark-richtext-fill', 'Submit a pdf file', "pdf")
93
108
  end
94
109
 
95
110
  def codebadge
96
- iconbadge('file-code-fill', 'Work on code in your portfolio')
111
+ iconbadge('file-code-fill', 'Work on code in your portfolio', "portfolio")
97
112
  end
98
113
 
99
114
  def cloudbadge
100
- iconbadge('cloud-fill', 'Work on code in your portfolio')
115
+ iconbadge('cloud-fill', 'Work on code in your portfolio', 'portfolio')
101
116
  end
102
117
 
103
118
  def zipbadge
104
- iconbadge('file-earmark-zip-fill', 'Submit work as an attachment')
119
+ iconbadge('file-earmark-zip-fill', 'Submit work in a zipfile', 'zip')
105
120
  end
106
121
 
107
122
  def partbadge
108
- iconbadge('heart-half', 'Graded for participation only - pass/fail')
123
+ iconbadge('heart-half', 'Graded for participation only - pass/fail', 'participation')
109
124
  end
110
125
 
111
126
  def timebadge
112
- iconbadge('alarm-fill', 'Must be submitted first thing on day of class')
127
+ iconbadge('alarm-fill', 'Must be submitted first thing on day of class', 'early submit')
113
128
  end
114
129
 
115
130
  def teambadge
116
- iconbadge('people-fill', 'Team Deliverable')
131
+ iconbadge('people-fill', 'Team Deliverable', 'team deliverable')
117
132
  end
118
133
 
119
134
  def include_image_old(filename_string, extra_class: nil)
@@ -200,8 +215,8 @@ module ContentHelpers
200
215
  # body << %(" class="img-polaroid" alt=""></div>)
201
216
  # counter += 1
202
217
  # end
203
- # body << %(</div> <a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
204
- # <a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
218
+ # body << %(</div> <a class="left carousel-control" href="#myCarousel" data-slide="prev"></a>
219
+ # <a class="right carousel-control" href="#myCarousel" data-slide="next"></a>
205
220
  # </div>)
206
221
  # body
207
222
  # end
@@ -234,7 +249,7 @@ module ContentHelpers
234
249
  # body
235
250
  # end
236
251
 
237
- def carousel_V4(filenames)
252
+ def carousel_v4(filenames)
238
253
  body = <<~HEREDOC
239
254
  <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
240
255
  <div class="carousel-inner">
@@ -244,7 +259,7 @@ module ContentHelpers
244
259
  active = count == 0 ? 'active' : ''
245
260
  body << <<~HEREDOC
246
261
  <div class="carousel-item #{active}">
247
- <img class="d-block w-100" src="/content/topics/images/#{fname}">
262
+ <img class="d-block w-80" src="/content/topics/images/#{fname}">
248
263
  </div>
249
264
  HEREDOC
250
265
  count += 1
@@ -0,0 +1,8 @@
1
+ module VisualHelpers
2
+
3
+ def end_of_lecture(type=:thatsall)
4
+ if (type == :thatsall)
5
+ %(<hr/><%= include_image "/content/topics/images/thatsallfolks.jpg" %>)
6
+ end
7
+ end
8
+ end
@@ -6,6 +6,7 @@ include SidebarHelpers
6
6
  include ListOfHelpers
7
7
  include ICalFeedHelpers
8
8
  include FormattingHelpers
9
+ include VisualHelpers
9
10
  include Nanoc::Helpers::Rendering
10
11
  include Nanoc::Helpers::LinkTo
11
12
  include Nanoc::Helpers::Tagging
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Coursegen
4
- VERSION = '0.9.1'
4
+ VERSION = '0.9.7'
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.1
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pito Salas
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-06 00:00:00.000000000 Z
11
+ date: 2021-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -270,6 +270,7 @@ files:
270
270
  - lib/coursegen/course/helpers/navigation_helpers.rb
271
271
  - lib/coursegen/course/helpers/sidebar_helpers.rb
272
272
  - lib/coursegen/course/helpers/table_helpers.rb
273
+ - lib/coursegen/course/helpers/visual_helpers.rb
273
274
  - lib/coursegen/course/lib/helpers_.rb
274
275
  - lib/coursegen/course/lib/ical_adaptor.rb
275
276
  - lib/coursegen/course/lib/search_data_generator.rb
@@ -335,7 +336,7 @@ homepage: ''
335
336
  licenses:
336
337
  - MIT
337
338
  metadata: {}
338
- post_install_message:
339
+ post_install_message:
339
340
  rdoc_options: []
340
341
  require_paths:
341
342
  - lib
@@ -350,8 +351,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
350
351
  - !ruby/object:Gem::Version
351
352
  version: '0'
352
353
  requirements: []
353
- rubygems_version: 3.0.3
354
- signing_key:
354
+ rubygems_version: 3.1.4
355
+ signing_key:
355
356
  specification_version: 4
356
357
  summary: Use Nanoc to build courses and deploy them to S3
357
358
  test_files: