coursegen 0.9.12 → 0.9.17

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: 84a6ebef854e8593ec4220efb9489e46f382b514ed119d35da6bee36716af1ee
4
- data.tar.gz: c3fdae9061950f0ca24b0e961c1a7998e6fc25381aa653f54d195a9eb6a23877
3
+ metadata.gz: e1c4769dbe98129a6d08cb35c8c87c100071c87479c0e0a517e286d361eb892a
4
+ data.tar.gz: e695fdcf6ea62e9a17241926c91b5e10a4635845da56f2d118448d63adf34a36
5
5
  SHA512:
6
- metadata.gz: dd08ac8ede337638feea1f03ed8ce99a80fb0df0254541d71b04e00b568241c8fbafe4f986eaf8b1152e64bd455444d2152ba4bc8b5c29319abd1b808cc55c78
7
- data.tar.gz: a4f27bbbd34669e32a65655a6427e2a5e2ad3191939c6efb21280c76af8ae9a959686a5e5b2d3a638bc7b223a0f8949d3ced80d776d0142583f57195ffdbde97
6
+ metadata.gz: 9f1f6f58aa999ddacd3bbf5735104b41f0551589ddf4179aa2bad85f6ec567a01f8b6ce654f2ad87a166be93f397d16075543aee229528388c41f81c1a832f1a
7
+ data.tar.gz: 0175deec4cfbe7caa22c95fc1d352567b1624122354b08346cea1d929ee34107f404ee59e68224fae37bd2fb83f5205aababe4b32f1fd9e026fa82c04990ca99
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coursegen (0.9.12)
4
+ coursegen (0.9.17)
5
5
  activesupport
6
6
  adsf
7
7
  byebug
@@ -19,7 +19,7 @@ PATH
19
19
  GEM
20
20
  remote: https://rubygems.org/
21
21
  specs:
22
- activesupport (6.1.3)
22
+ activesupport (6.1.3.1)
23
23
  concurrent-ruby (~> 1.0, >= 1.0.2)
24
24
  i18n (>= 1.6, < 2)
25
25
  minitest (>= 5.1)
@@ -40,7 +40,7 @@ GEM
40
40
  ddmetrics (1.0.1)
41
41
  ddplugin (1.0.3)
42
42
  diff-lcs (1.4.4)
43
- ffi (1.14.2)
43
+ ffi (1.15.0)
44
44
  formatador (0.2.5)
45
45
  guard (2.16.2)
46
46
  formatador (>= 0.2.4)
@@ -57,27 +57,27 @@ GEM
57
57
  guard-compat (~> 1.0)
58
58
  hamster (3.0.0)
59
59
  concurrent-ruby (~> 1.0)
60
- i18n (1.8.9)
60
+ i18n (1.8.10)
61
61
  concurrent-ruby (~> 1.0)
62
- icalendar (2.7.0)
62
+ icalendar (2.7.1)
63
63
  ice_cube (~> 0.16)
64
64
  ice_cube (0.16.3)
65
- json (2.3.0)
66
- json_schema (0.20.9)
67
- kramdown (2.3.0)
65
+ json (2.5.1)
66
+ json_schema (0.21.0)
67
+ kramdown (2.3.1)
68
68
  rexml
69
- listen (3.4.1)
69
+ listen (3.5.1)
70
70
  rb-fsevent (~> 0.10, >= 0.10.3)
71
71
  rb-inotify (~> 0.9, >= 0.9.10)
72
72
  lumberjack (1.2.8)
73
73
  method_source (1.0.0)
74
74
  minitest (5.14.4)
75
- nanoc (4.11.23)
75
+ nanoc (4.12.1)
76
76
  addressable (~> 2.5)
77
77
  colored (~> 1.2)
78
78
  nanoc-checking (~> 1.0)
79
- nanoc-cli (= 4.11.23)
80
- nanoc-core (= 4.11.23)
79
+ nanoc-cli (= 4.12.1)
80
+ nanoc-core (= 4.12.1)
81
81
  nanoc-deploying (~> 1.0)
82
82
  parallel (~> 1.12)
83
83
  tty-command (~> 0.8)
@@ -85,12 +85,12 @@ GEM
85
85
  nanoc-checking (1.0.1)
86
86
  nanoc-cli (~> 4.11, >= 4.11.15)
87
87
  nanoc-core (~> 4.11, >= 4.11.15)
88
- nanoc-cli (4.11.23)
88
+ nanoc-cli (4.12.1)
89
89
  cri (~> 2.15)
90
90
  diff-lcs (~> 1.3)
91
- nanoc-core (= 4.11.23)
91
+ nanoc-core (= 4.12.1)
92
92
  zeitwerk (~> 2.1)
93
- nanoc-core (4.11.23)
93
+ nanoc-core (4.12.1)
94
94
  concurrent-ruby (~> 1.1)
95
95
  ddmemoize (~> 1.0)
96
96
  ddmetrics (~> 1.0)
@@ -98,7 +98,6 @@ GEM
98
98
  hamster (~> 3.0)
99
99
  json_schema (~> 0.19)
100
100
  slow_enumerator_tools (~> 1.0)
101
- tomlrb (~> 1.2)
102
101
  tty-platform (~> 0.2)
103
102
  zeitwerk (~> 2.1)
104
103
  nanoc-deploying (1.0.1)
@@ -106,7 +105,7 @@ GEM
106
105
  nanoc-cli (~> 4.11, >= 4.11.15)
107
106
  nanoc-core (~> 4.11, >= 4.11.15)
108
107
  nenv (0.3.0)
109
- nokogiri (1.11.1-x86_64-darwin)
108
+ nokogiri (1.11.3-x86_64-darwin)
110
109
  racc (~> 1.4)
111
110
  notiffany (0.1.3)
112
111
  nenv (~> 0.1)
@@ -114,7 +113,7 @@ GEM
114
113
  parallel (1.20.1)
115
114
  pastel (0.8.0)
116
115
  tty-color (~> 0.5)
117
- pry (0.13.1)
116
+ pry (0.14.0)
118
117
  coderay (~> 1.1)
119
118
  method_source (~> 1.0)
120
119
  public_suffix (4.0.6)
@@ -125,7 +124,7 @@ GEM
125
124
  rb-inotify (0.10.1)
126
125
  ffi (~> 1.0)
127
126
  ref (2.0.0)
128
- rexml (3.2.3)
127
+ rexml (3.2.5)
129
128
  rspec (3.10.0)
130
129
  rspec-core (~> 3.10.0)
131
130
  rspec-expectations (~> 3.10.0)
@@ -135,10 +134,10 @@ GEM
135
134
  rspec-expectations (3.10.1)
136
135
  diff-lcs (>= 1.2.0, < 2.0)
137
136
  rspec-support (~> 3.10.0)
138
- rspec-mocks (3.10.1)
137
+ rspec-mocks (3.10.2)
139
138
  diff-lcs (>= 1.2.0, < 2.0)
140
139
  rspec-support (~> 3.10.0)
141
- rspec-support (3.10.1)
140
+ rspec-support (3.10.2)
142
141
  rubytree (1.0.0)
143
142
  json (~> 2.1)
144
143
  structured_warnings (~> 0.3)
@@ -146,9 +145,8 @@ GEM
146
145
  slow_enumerator_tools (1.1.0)
147
146
  structured_warnings (0.4.0)
148
147
  thor (1.1.0)
149
- tomlrb (1.3.0)
150
148
  tty-color (0.6.0)
151
- tty-command (0.10.0)
149
+ tty-command (0.10.1)
152
150
  pastel (~> 0.8)
153
151
  tty-platform (0.3.0)
154
152
  tty-which (0.4.2)
@@ -67,19 +67,20 @@ module ContentHelpers
67
67
  HTMLSTRING
68
68
  end
69
69
 
70
- def callout(title, body, style=:big)
71
- if (style == :big)
70
+ def callout(title, body, style="big")
71
+ style = style.to_s if style.class != String
72
+ if (style == "big")
72
73
  %(<div class="jumbotron py-1 border border-primary border-rounded-lg">
73
74
  <h1 class="display-5">#{title}</h1>
74
75
  <p class="lead">#{body}</p></div>)
75
- elsif (style == :small)
76
+ elsif (style == "small")
76
77
  <<~HTMLSTRING
77
78
  <div class="callout border border-primary rounded p-2 m-3">
78
79
  <span class="badge badge-pill badge-primary">#{title}</span>#{body}
79
80
  </div>
80
81
  HTMLSTRING
81
82
  else
82
- "error in callout call #{style}"
83
+ "error in callout call: .#{style}. #{style.class}"
83
84
  end
84
85
  end
85
86
 
@@ -2,7 +2,7 @@ module VisualHelpers
2
2
 
3
3
  def end_of_lecture(type=:thatsall)
4
4
  if (type == :thatsall)
5
- %(<slide_break></slide_break><hr/><%= include_image "/content/topics/images/thatsallfolks.jpg" %>)
5
+ "<slide_break></slide_break>" + include_image("/content/topics/images/thatsallfolks.jpg")
6
6
  end
7
7
  end
8
8
  end
@@ -2,29 +2,29 @@ include VisualHelpers
2
2
 
3
3
  Nanoc::Filter.define(:handle_shortcodes) do |content, _params = {}|
4
4
  prefix = /:/
5
- content
6
- .gsub(/^\$\$TOPIC_INCLUDE :(\w+)$/) { "<%= include_topic( :#{Regexp.last_match(1)}) %>" }
7
- .gsub(/\$\$TOPIC_LINK :(\w+)$/) { "<%= link_to_topic( :#{Regexp.last_match(1)}) %>" }
8
- .gsub(/\$\$SLIDE_TITLE (.+)$/) { "<slide_break></slide_break>\n\n### #{Regexp.last_match(1)}" }
9
- .gsub(/\$\$SLIDE_BREAK$/) { "<slide_break></slide_break>" }
10
- .gsub(/\$\$LECTURE_END$/) { end_of_lecture }
11
- .gsub(/\$\$LECTURE_BEGIN (.+)$/) { "## #{Regexp.last_match(1)} "}
12
- .gsub(Regexp.new(prefix.source + /h1 (.+)$/.source), "# \\1 ")
13
- .gsub(Regexp.new(prefix.source + /h2 (.+)$/.source), "## \\1 ")
14
- .gsub(Regexp.new(prefix.source + /h3 (.+)$/.source), "### \\1 ")
15
- .gsub(Regexp.new(prefix.source + /topic_include :(\w+)$/.source), "<%= include_topic( :\\1) %>")
16
- .gsub(Regexp.new(prefix.source + /topic_link :(\w+)$/.source), "<%= link_to_topic( :\\1) %>")
17
- .gsub(Regexp.new(prefix.source + /slide_title (.+)$/.source), "<slide_break></slide_break>\n\n### \\1")
18
- .gsub(Regexp.new(prefix.source + /lecture_end/.source), end_of_lecture)
19
- .gsub(Regexp.new(prefix.source + /deliverable (.+)$/.source), "<%= deliverable( \"\\1\") %>")
20
- .gsub(Regexp.new(prefix.source + /pdfbadge/.source), pdfbadge)
21
- .gsub(Regexp.new(prefix.source + /partbadge/.source), partbadge)
22
- .gsub(Regexp.new(prefix.source + /teambadge/.source), teambadge)
23
- .gsub(Regexp.new(prefix.source + /zipbadge/.source), zipbadge)
24
- .gsub(Regexp.new(prefix.source + /slide_break/.source), "<slide_break></slide_break>")
25
- .gsub(Regexp.new(prefix.source + /source_begin :(.+)$/.source), "<%= source_begin ( \":language-\\1\") %>")
26
- .gsub(Regexp.new(prefix.source + /source_end$/.source), "<%= source_end %>")
27
- .gsub(Regexp.new(prefix.source + /team_deliverable (.+)$/.source), "<%= team_deliverable( \"\\1\") %>")
28
- .gsub(Regexp.new(prefix.source + /discussion_box (.+)$/.source), "<%= discussion_box( \"\\1\") %>")
29
-
30
- end
5
+ content
6
+ .gsub(Regexp.new(prefix.source + /callout :(\w+), "(.+)", "(.+)"/.source)) { callout($2, $3, $1) }
7
+ .gsub(Regexp.new(prefix.source + /deliverable (.+)$/.source)) { deliverable($1) }
8
+ .gsub(Regexp.new(prefix.source + /discussion_box (.+)$/.source), "<%= discussion_box( \"\\1\") %>")
9
+ .gsub(Regexp.new(prefix.source + /h1 (.+)$/.source), "# \\1 ")
10
+ .gsub(Regexp.new(prefix.source + /h2 (.+)$/.source), "## \\1 ")
11
+ .gsub(Regexp.new(prefix.source + /h3 (.+)$/.source), "### \\1 ")
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;\"/>")
14
+ .gsub(Regexp.new(prefix.source + /lecture_end/.source), end_of_lecture)
15
+ .gsub(Regexp.new(prefix.source + /partbadge/.source), partbadge)
16
+ .gsub(Regexp.new(prefix.source + /pdfbadge/.source), pdfbadge)
17
+ .gsub(Regexp.new(prefix.source + /section_link :(\w+) :(\w+)/.source)) { link_to_section($1, $2) }
18
+ .gsub(Regexp.new(prefix.source + /slide_bigtitle (.+)$/.source), "<slide_break></slide_break>\n\n## \\1")
19
+ .gsub(Regexp.new(prefix.source + /slide_break/.source), "<slide_break></slide_break>")
20
+ .gsub(Regexp.new(prefix.source + /slide_subtitle (.+)$/.source), "<slide_break></slide_break>\n\n#### \\1")
21
+ .gsub(Regexp.new(prefix.source + /slide_title (.+)$/.source), "<slide_break></slide_break>\n\n### \\1")
22
+ .gsub(Regexp.new(prefix.source + /source_begin :(.+)$/.source)) { source_begin( ":language-"+$1) }
23
+ .gsub(Regexp.new(prefix.source + /source_end/.source), source_end)
24
+ .gsub(Regexp.new(prefix.source + /team_deliverable (.+)$/.source)) { team_deliverable($1) }
25
+ .gsub(Regexp.new(prefix.source + /teambadge/.source), teambadge)
26
+ .gsub(Regexp.new(prefix.source + /topic_include :(\w+)$/.source)) { include_topic($1) }
27
+ .gsub(Regexp.new(prefix.source + /topic_link :(\w+)/.source)) { link_to_topic($1) }
28
+ .gsub(Regexp.new(prefix.source + /youtube \"(.+)\"$/.source)) { %Q!<iframe width="560" height="315" src="#{$1}"></iframe>! }
29
+ .gsub(Regexp.new(prefix.source + /zipbadge/.source), zipbadge)
30
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Coursegen
4
- VERSION = '0.9.12'
4
+ VERSION = '0.9.17'
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.12
4
+ version: 0.9.17
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-03-09 00:00:00.000000000 Z
11
+ date: 2021-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler