coursegen 0.7.2 → 0.7.3

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: 93427c36eea397d629a4ce4da85facafb60360d50ce0d3b04986c7147d17e71f
4
- data.tar.gz: 716677e71ecaa2f717a96b65c43d096a0775c55b0a7faa8cce68d6fb06ab6c07
3
+ metadata.gz: 6995fb7b963000b4b264459869950ad58693b464ff65c2da4df6c5894cddf268
4
+ data.tar.gz: f96f292cd26213947a3d7fafaf1006d4edd7ba463b2daceecb5190575d36c3f9
5
5
  SHA512:
6
- metadata.gz: bd0ba1345337def6748f0bde784436bfc167304808d9122c523640fd71a0b925931e37f00a782d2afc1a3156c9712a7743503292eef861b0acbbaffcc98fc829
7
- data.tar.gz: 1e606aeb7d0948091447956e90f0c247ddad4031ebdf46758d8d6e43201c203ee37165bd499c9a9a9d4abca2059080da1bda6443352d01417e5130bd524a2695
6
+ metadata.gz: b9adb661cbf38d09aec6b5689fcac89d19c5abb4d2a784c3a19264295d578a1af2b113bca12047d96b6fa5ef32e9e3482b40bf96cebcaa1dd918cbd31f27aa8e
7
+ data.tar.gz: 1af86c2e0f7870fdee35f99a57a81c5ed225cf4edaecc4da0a8ac6e39a0a4a6f98720b3dd161fd74fa4078c494018dd002ca8bcc367e048bd7609ee2364e77cf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coursegen (0.6.2)
4
+ coursegen (0.7.3)
5
5
  activesupport
6
6
  adsf
7
7
  byebug
@@ -19,29 +19,29 @@ PATH
19
19
  GEM
20
20
  remote: https://rubygems.org/
21
21
  specs:
22
- activesupport (5.2.0)
22
+ activesupport (5.2.2)
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
27
  addressable (2.5.2)
28
28
  public_suffix (>= 2.0.2, < 4.0)
29
- adsf (1.4.0)
29
+ adsf (1.4.1)
30
30
  rack (>= 1.0.0, < 3.0.0)
31
31
  byebug (10.0.2)
32
32
  coderay (1.1.2)
33
33
  colored (1.2)
34
- concurrent-ruby (1.0.5)
35
- cri (2.10.1)
34
+ concurrent-ruby (1.1.4)
35
+ cri (2.15.2)
36
36
  colored (~> 1.2)
37
- ddmemoize (1.0.0a3)
38
- ddtelemetry (= 1.0.0a2)
37
+ ddmemoize (1.0.0)
38
+ ddmetrics (~> 1.0)
39
39
  ref (~> 2.0)
40
- ddplugin (1.0.1)
41
- ddtelemetry (1.0.0a2)
40
+ ddmetrics (1.0.1)
41
+ ddplugin (1.0.2)
42
42
  ffi (1.9.25)
43
43
  formatador (0.2.5)
44
- guard (2.14.2)
44
+ guard (2.15.0)
45
45
  formatador (>= 0.2.4)
46
46
  listen (>= 2.7, < 4.0)
47
47
  lumberjack (>= 1.0.12, < 2.0)
@@ -56,43 +56,50 @@ GEM
56
56
  guard-compat (~> 1.0)
57
57
  hamster (3.0.0)
58
58
  concurrent-ruby (~> 1.0)
59
- i18n (1.0.1)
59
+ i18n (1.5.3)
60
60
  concurrent-ruby (~> 1.0)
61
- icalendar (2.4.1)
61
+ icalendar (2.5.2)
62
+ ice_cube (~> 0.16)
63
+ ice_cube (0.16.3)
62
64
  json (2.1.0)
63
- kramdown (1.16.2)
65
+ json_schema (0.19.1)
66
+ kramdown (1.17.0)
64
67
  listen (3.1.5)
65
68
  rb-fsevent (~> 0.9, >= 0.9.4)
66
69
  rb-inotify (~> 0.9, >= 0.9.7)
67
70
  ruby_dep (~> 1.2)
68
- lumberjack (1.0.12)
69
- method_source (0.9.0)
70
- mini_portile2 (2.3.0)
71
+ lumberjack (1.0.13)
72
+ method_source (0.9.2)
73
+ mini_portile2 (2.4.0)
71
74
  minitest (5.11.3)
72
- nanoc (4.8.19)
75
+ nanoc (4.11.0)
73
76
  addressable (~> 2.5)
74
- cri (~> 2.8)
75
- ddmemoize (= 1.0.0a3)
77
+ cri (~> 2.15)
78
+ ddmemoize (~> 1.0)
79
+ ddmetrics (~> 1.0)
76
80
  ddplugin (~> 1.0)
77
- ddtelemetry (= 1.0.0a2)
78
81
  hamster (~> 3.0)
82
+ json_schema (~> 0.19)
83
+ parallel (~> 1.12)
79
84
  ref (~> 2.0)
80
85
  slow_enumerator_tools (~> 1.0)
86
+ tomlrb (~> 1.2)
81
87
  nenv (0.3.0)
82
- nokogiri (1.8.4)
83
- mini_portile2 (~> 2.3.0)
88
+ nokogiri (1.9.1)
89
+ mini_portile2 (~> 2.4.0)
84
90
  notiffany (0.1.1)
85
91
  nenv (~> 0.1)
86
92
  shellany (~> 0.0)
87
- pry (0.11.3)
93
+ parallel (1.12.1)
94
+ pry (0.12.2)
88
95
  coderay (~> 1.1.0)
89
96
  method_source (~> 0.9.0)
90
- public_suffix (3.0.2)
91
- rack (2.0.5)
97
+ public_suffix (3.0.3)
98
+ rack (2.0.6)
92
99
  rake (11.3.0)
93
100
  rb-fsevent (0.10.3)
94
- rb-inotify (0.9.10)
95
- ffi (>= 0.5.0, < 2)
101
+ rb-inotify (0.10.0)
102
+ ffi (~> 1.0)
96
103
  ref (2.0.0)
97
104
  ruby_dep (1.5.0)
98
105
  rubytree (1.0.0)
@@ -101,8 +108,9 @@ GEM
101
108
  shellany (0.0.1)
102
109
  slow_enumerator_tools (1.1.0)
103
110
  structured_warnings (0.3.0)
104
- thor (0.20.0)
111
+ thor (0.20.3)
105
112
  thread_safe (0.3.6)
113
+ tomlrb (1.2.8)
106
114
  tzinfo (1.2.5)
107
115
  thread_safe (~> 0.1)
108
116
 
@@ -115,4 +123,4 @@ DEPENDENCIES
115
123
  rake
116
124
 
117
125
  BUNDLED WITH
118
- 1.16.1
126
+ 1.17.2
@@ -1,54 +1,54 @@
1
1
  # Helpers to be used to annotate content
2
2
  module ContentHelpers
3
- def include_topic item_symbol
3
+ def include_topic(item_symbol)
4
4
  incorporated_topic = lookup_nitem("topics", item_symbol.to_s)
5
5
  items[incorporated_topic.identifier.to_s].compiled_content
6
6
  end
7
7
 
8
- def include_page item_symbol
8
+ def include_page(item_symbol)
9
9
  incorporated_topic = lookup_nitem("pages", item_symbol.to_s)
10
10
  items[incorporated_topic.identifier.to_s].compiled_content
11
11
  end
12
12
 
13
- def include_background item_symbol
13
+ def include_background(item_symbol)
14
14
  incorporated_topic = lookup_nitem("background", item_symbol.to_s)
15
15
  items[incorporated_topic.identifier.to_s].compiled_content
16
16
  end
17
17
 
18
- def include_intro item_symbol
18
+ def include_intro(item_symbol)
19
19
  incorporated_topic = lookup_nitem("intro", item_symbol.to_s)
20
20
  items[incorporated_topic.identifier.to_s].compiled_content
21
21
  end
22
22
 
23
- def include_from_section sect_symbol, item_symbol
23
+ def include_from_section(sect_symbol, item_symbol)
24
24
  incorporated_item = lookup_nitem(sect_symbol.to_s, item_symbol.to_s)
25
25
  Toc.instance.record_inclusion @item, incorporated_item
26
26
  items[incorporated_item.identifier.to_s].compiled_content
27
27
  end
28
28
 
29
- def lookup_nitem the_sect, short_name
29
+ def lookup_nitem(the_sect, short_name)
30
30
  Toc.instance.lookup_citem(the_sect, short_name).nitem
31
31
  end
32
32
 
33
- def link_to_doc label, file_name
33
+ def link_to_doc(label, file_name)
34
34
  "<a href=\"/docs/#{file_name}\">#{label}</a>"
35
35
  end
36
36
 
37
- def toc_link_to item
37
+ def toc_link_to(item)
38
38
  link_to_unless_current item[:title], item
39
39
  end
40
40
 
41
- def bold_red string
41
+ def bold_red(string)
42
42
  "<span style=\"color: red; font-style: italic;\">#{string}</span>"
43
43
  end
44
44
 
45
- def italic_red string
45
+ def italic_red(string)
46
46
  " *#{string}*{: style=\"color: red\"} "
47
47
  end
48
48
 
49
- def ir string; italic_red(string); end
49
+ def ir(string); italic_red(string); end
50
50
 
51
- def callout title, body
51
+ def callout(title, body)
52
52
  <<-HTMLSTRING
53
53
  <div class="well well-sm">
54
54
  <span class="themebg label label-primary">#{title}</span>#{body}
@@ -56,11 +56,11 @@ module ContentHelpers
56
56
  HTMLSTRING
57
57
  end
58
58
 
59
- def textbadge text, tooltip
59
+ def textbadge(text, tooltip)
60
60
  %(<span class="label label-info" data-toggle="tooltip" data-placement="top" title="#{tooltip}">#{text}</span>)
61
61
  end
62
62
 
63
- def iconbadge icon, tooltip
63
+ def iconbadge(icon, tooltip)
64
64
  %(<span class="glyphicon glyphicon-#{icon} themefg" data-toggle="tooltip" data-placement="top" title="#{tooltip}"></span>)
65
65
  end
66
66
 
@@ -68,6 +68,10 @@ HTMLSTRING
68
68
  iconbadge("file", "Submit as 1 page pdf, include name and homework #")
69
69
  end
70
70
 
71
+ def teambadge
72
+ iconbadge("stroller", "Team submission")
73
+ end
74
+
71
75
  def codebadge
72
76
  iconbadge("cloud", "Work on code in your portfolio")
73
77
  end
@@ -92,8 +96,7 @@ HTMLSTRING
92
96
  iconbadge("tent", "Team Deliverable")
93
97
  end
94
98
 
95
-
96
- def include_image_old filename_string, extra_class: nil
99
+ def include_image_old(filename_string, extra_class: nil)
97
100
  css_class = "img-responsive"
98
101
  css_class += " img-" + extra_class unless extra_class.nil?
99
102
  <<-HTMLSTRING
@@ -101,7 +104,7 @@ HTMLSTRING
101
104
  HTMLSTRING
102
105
  end
103
106
 
104
- def include_image filename_string, extra: ""
107
+ def include_image(filename_string, extra: "")
105
108
  <<-HTMLSTRING
106
109
  <div class="row">
107
110
  <div class="col-md-offset-2 col-md-8">
@@ -111,7 +114,7 @@ HTMLSTRING
111
114
  HTMLSTRING
112
115
  end
113
116
 
114
- def important string = ":"
117
+ def important(string = ":")
115
118
  <<-HTMLSTRING
116
119
  <div class="cg-important">
117
120
  #{string}
@@ -119,17 +122,17 @@ HTMLSTRING
119
122
  HTMLSTRING
120
123
  end
121
124
 
122
- def nb string = ":"
125
+ def nb(string = ":")
123
126
  <<-HTMLSTRING
124
127
  <div class="label label-info">#{string}</div>
125
128
  HTMLSTRING
126
129
  end
127
130
 
128
- def tbd string = ""
131
+ def tbd(string = "")
129
132
  "*[TO BE DETERMINED#{string}]*{: style=\"color: red\"}"
130
133
  end
131
134
 
132
- def deliverable string, append=""
135
+ def deliverable(string, append = "")
133
136
  "*Deliverable:*{: style=\"color: red\"} #{string + append} "
134
137
  end
135
138
 
@@ -141,15 +144,15 @@ HTMLSTRING
141
144
  deliverable(string, " *(pdf with name and hw number, graded for participation only)*")
142
145
  end
143
146
 
144
- def team_deliverable string
147
+ def team_deliverable(string)
145
148
  "*Team Deliverable:*{: style=\"color: red\"} *#{string}*"
146
149
  end
147
150
 
148
- def discussion string
151
+ def discussion(string)
149
152
  "*Discussion:*{: style=\"color: blue\"} *#{string}*"
150
153
  end
151
154
 
152
- def discussion_box string
155
+ def discussion_box(string)
153
156
  %(<div class="alert alert-info"><strong>Discussion:</strong> #{string}</div>)
154
157
  end
155
158
 
@@ -178,7 +181,7 @@ HTMLSTRING
178
181
  end
179
182
 
180
183
  def carousel_new(filenames)
181
- carousel_work(filenames.map {|filename| "/content/topics/images/" + filename })
184
+ carousel_work(filenames.map { |filename| "/content/topics/images/" + filename })
182
185
  end
183
186
 
184
187
  def carousel_work(filenames)
@@ -221,32 +224,31 @@ HTMLSTRING
221
224
  "~~~~~~\n {: .language-python}"
222
225
  end
223
226
 
224
- def ruby_string str
227
+ def ruby_string(str)
225
228
  ruby_begin + "\n" + str + "\n" + ruby_end
226
229
  end
227
230
 
228
- def python_string str
231
+ def python_string(str)
229
232
  python_begin + "\n" + str + "\n" + python_end
230
233
  end
231
234
 
232
- def include_ruby name
235
+ def include_ruby(name)
233
236
  filename = Dir.pwd + "/content/content/topics/scripts/" + name.to_s + ".rb"
234
237
  filecontents = File.new(filename).read
235
238
  ruby_string filecontents
236
239
  end
237
240
 
238
- def include_python name
241
+ def include_python(name)
239
242
  filename = Dir.pwd + "/content/content/topics/robotcode/" + name.to_s + ".py"
240
243
  filecontents = File.new(filename).read
241
244
  ruby_string filecontents
242
245
  end
243
246
 
244
-
245
247
  def code_begin
246
248
  "\n~~~~~~"
247
249
  end
248
250
 
249
- def code_end lang=""
251
+ def code_end(lang = "")
250
252
  str = "~~~~~~\n"
251
253
  if ["ruby", "css", "java", "html"].include? lang
252
254
  str += "{: .language-#{lang}}"
@@ -254,11 +256,11 @@ HTMLSTRING
254
256
  str
255
257
  end
256
258
 
257
- def code_string str
259
+ def code_string(str)
258
260
  code_begin + "\n" + str + code_end
259
261
  end
260
262
 
261
- def include_code name
263
+ def include_code(name)
262
264
  filename = Dir.pwd + "/content/content/topics/scripts/" + name
263
265
  filecontents = File.new(filename).read
264
266
  code_string filecontents
@@ -1,3 +1,3 @@
1
1
  module Coursegen
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
3
3
  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.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pito Salas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-30 00:00:00.000000000 Z
11
+ date: 2019-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -237,7 +237,6 @@ files:
237
237
  - Rakefile
238
238
  - bin/cg
239
239
  - coursegen.gemspec
240
- - deleteme.rb
241
240
  - lib/coursegen.rb
242
241
  - lib/coursegen/cli.rb
243
242
  - lib/coursegen/course/data/citem.rb
@@ -332,8 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
332
331
  - !ruby/object:Gem::Version
333
332
  version: '0'
334
333
  requirements: []
335
- rubyforge_project:
336
- rubygems_version: 2.7.3
334
+ rubygems_version: 3.0.1
337
335
  signing_key:
338
336
  specification_version: 4
339
337
  summary: Use Nanoc to build courses and deploy them to S3
data/deleteme.rb DELETED
@@ -1,2 +0,0 @@
1
- classs ViewGen
2
- de