openstax_kitchen 3.1.0 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/CHANGELOG.md +64 -0
- data/Gemfile.lock +20 -14
- data/README.md +16 -0
- data/codecov.yaml +1 -0
- data/docker/ci +0 -1
- data/lib/kitchen/book_document.rb +1 -1
- data/lib/kitchen/book_element.rb +16 -2
- data/lib/kitchen/chapter_element.rb +10 -13
- data/lib/kitchen/chapter_element_enumerator.rb +1 -1
- data/lib/kitchen/composite_chapter_element.rb +7 -11
- data/lib/kitchen/composite_chapter_element_enumerator.rb +21 -0
- data/lib/kitchen/composite_page_element.rb +15 -10
- data/lib/kitchen/composite_page_element_enumerator.rb +1 -1
- data/lib/kitchen/config.rb +14 -0
- data/lib/kitchen/directions/bake_chapter_glossary/main.rb +18 -0
- data/lib/kitchen/directions/bake_chapter_glossary/v1.rb +30 -0
- data/lib/kitchen/directions/bake_chapter_introductions.rb +1 -1
- data/lib/kitchen/directions/bake_chapter_key_concepts/main.rb +7 -2
- data/lib/kitchen/directions/bake_chapter_key_concepts/v1.rb +12 -7
- data/lib/kitchen/directions/bake_chapter_key_equations.rb +26 -21
- data/lib/kitchen/directions/bake_chapter_references/main.rb +16 -0
- data/lib/kitchen/directions/bake_chapter_references/v1.rb +35 -0
- data/lib/kitchen/directions/bake_chapter_summary.rb +48 -42
- data/lib/kitchen/directions/bake_composite_chapters.rb +1 -1
- data/lib/kitchen/directions/bake_composite_pages.rb +1 -1
- data/lib/kitchen/directions/bake_equations.rb +14 -4
- data/lib/kitchen/directions/bake_example.rb +5 -1
- data/lib/kitchen/directions/bake_figure.rb +1 -1
- data/lib/kitchen/directions/bake_first_elements.rb +22 -0
- data/lib/kitchen/directions/bake_footnotes/v1.rb +2 -1
- data/lib/kitchen/directions/bake_free_response/free_response.xhtml.erb +10 -0
- data/lib/kitchen/directions/bake_free_response/main.rb +11 -0
- data/lib/kitchen/directions/bake_free_response/v1.rb +29 -0
- data/lib/kitchen/directions/bake_further_research.rb +59 -0
- data/lib/kitchen/directions/bake_index/v1.rb +36 -26
- data/lib/kitchen/directions/bake_link_placeholders.rb +1 -1
- data/lib/kitchen/directions/bake_notes/bake_note_subtitle.rb +4 -0
- data/lib/kitchen/directions/bake_notes/bake_numbered_notes.rb +9 -21
- data/lib/kitchen/directions/bake_numbered_exercise/main.rb +6 -2
- data/lib/kitchen/directions/bake_numbered_exercise/v1.rb +25 -12
- data/lib/kitchen/directions/bake_numbered_table/v1.rb +1 -8
- data/lib/kitchen/directions/bake_page_abstracts.rb +1 -1
- data/lib/kitchen/directions/bake_references/main.rb +16 -0
- data/lib/kitchen/directions/bake_references/v1.rb +48 -0
- data/lib/kitchen/directions/bake_suggested_reading.rb +5 -0
- data/lib/kitchen/directions/bake_toc.rb +4 -2
- data/lib/kitchen/directions/{bake_book_answer_key → book_answer_key_container}/eob_solutions_container.xhtml.erb +0 -0
- data/lib/kitchen/directions/{bake_book_answer_key → book_answer_key_container}/main.rb +1 -1
- data/lib/kitchen/directions/{bake_book_answer_key → book_answer_key_container}/v1.rb +2 -2
- data/lib/kitchen/directions/{bake_chapter_review → chapter_review_container}/chapter_review.xhtml.erb +0 -0
- data/lib/kitchen/directions/{bake_chapter_review → chapter_review_container}/main.rb +1 -1
- data/lib/kitchen/directions/{bake_chapter_review → chapter_review_container}/v1.rb +2 -2
- data/lib/kitchen/directions/eoc_section_title_link_snippet.rb +1 -1
- data/lib/kitchen/directions/move_exercises_to_eoc/main.rb +27 -0
- data/lib/kitchen/directions/{bake_chapter_review_exercises → move_exercises_to_eoc}/v1.rb +8 -10
- data/lib/kitchen/directions/{bake_chapter_review_exercises → move_exercises_to_eoc}/v2.rb +8 -9
- data/lib/kitchen/directions/{bake_chapter_answer_key → move_solutions_to_answer_key}/main.rb +1 -1
- data/lib/kitchen/directions/move_solutions_to_answer_key/strategies/american_government.rb +19 -0
- data/lib/kitchen/directions/{bake_chapter_answer_key → move_solutions_to_answer_key}/strategies/calculus.rb +1 -1
- data/lib/kitchen/directions/{bake_chapter_answer_key → move_solutions_to_answer_key}/strategies/uphysics.rb +7 -5
- data/lib/kitchen/directions/{bake_chapter_answer_key → move_solutions_to_answer_key}/v1.rb +3 -1
- data/lib/kitchen/document.rb +20 -42
- data/lib/kitchen/element.rb +9 -3
- data/lib/kitchen/element_base.rb +93 -21
- data/lib/kitchen/element_enumerator_base.rb +33 -2
- data/lib/kitchen/element_enumerator_factory.rb +28 -12
- data/lib/kitchen/element_factory.rb +3 -3
- data/lib/kitchen/example_element.rb +8 -11
- data/lib/kitchen/example_element_enumerator.rb +1 -1
- data/lib/kitchen/exercise_element.rb +7 -10
- data/lib/kitchen/exercise_element_enumerator.rb +1 -1
- data/lib/kitchen/figure_element.rb +8 -11
- data/lib/kitchen/figure_element_enumerator.rb +1 -1
- data/lib/kitchen/id_tracker.rb +68 -0
- data/lib/kitchen/metadata_element.rb +8 -2
- data/lib/kitchen/metadata_element_enumerator.rb +1 -1
- data/lib/kitchen/note_element.rb +8 -11
- data/lib/kitchen/note_element_enumerator.rb +1 -1
- data/lib/kitchen/oven.rb +5 -1
- data/lib/kitchen/page_element.rb +25 -9
- data/lib/kitchen/page_element_enumerator.rb +1 -1
- data/lib/kitchen/patches/i18n.rb +34 -0
- data/lib/kitchen/patches/nokogiri.rb +55 -0
- data/lib/kitchen/patches/nokogiri_profiling.rb +60 -0
- data/lib/kitchen/reference_element.rb +27 -0
- data/lib/kitchen/references_element_enumerator.rb +20 -0
- data/lib/kitchen/search_query.rb +31 -3
- data/lib/kitchen/selector.rb +25 -0
- data/lib/kitchen/selectors/base.rb +39 -0
- data/lib/kitchen/selectors/standard_1.rb +13 -0
- data/lib/kitchen/table_element.rb +8 -11
- data/lib/kitchen/table_element_enumerator.rb +1 -1
- data/lib/kitchen/templates/eob_section_title_template.xhtml.erb +10 -0
- data/lib/kitchen/templates/eoc_section_title_template.xhtml.erb +10 -0
- data/lib/kitchen/term_element.rb +5 -8
- data/lib/kitchen/term_element_enumerator.rb +1 -1
- data/lib/kitchen/unit_element.rb +13 -7
- data/lib/kitchen/unit_element_enumerator.rb +1 -1
- data/lib/kitchen/version.rb +1 -1
- data/lib/locales/en.yml +3 -0
- data/lib/locales/es.yml +32 -0
- data/lib/openstax_kitchen.rb +2 -5
- data/openstax_kitchen.gemspec +1 -0
- metadata +51 -23
- data/lib/kitchen/directions/bake_chapter_glossary.rb +0 -39
- data/lib/kitchen/directions/bake_chapter_key_concepts/key_concepts.xhtml.erb +0 -16
- data/lib/kitchen/directions/bake_chapter_review_exercises/main.rb +0 -15
- data/lib/kitchen/directions/bake_chapter_review_exercises/review_exercises.xhtml.erb +0 -10
- data/lib/kitchen/directions/bake_exercises/main.rb +0 -12
- data/lib/kitchen/directions/bake_exercises/v1.rb +0 -169
- data/lib/kitchen/directions/bake_notes/bake_notes.rb +0 -48
- data/lib/kitchen/directions/bake_problem_first_elements.rb +0 -16
- data/lib/kitchen/transliterations.rb +0 -21
@@ -0,0 +1,10 @@
|
|
1
|
+
<div class="os-eob os-<%=@klass%>-container" data-type="composite-page" data-uuid-key="<%=@uuid_prefix%><%=@klass%>">
|
2
|
+
<h1 data-type="document-title">
|
3
|
+
<span class="os-text"><%= @title %></span>
|
4
|
+
</h1>
|
5
|
+
<div data-type="metadata" style="display: none;">
|
6
|
+
<h1 data-type="document-title" itemprop="name"><%= @title %></h1>
|
7
|
+
<%= @metadata.paste %>
|
8
|
+
</div>
|
9
|
+
<%= @content %>
|
10
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div class="os-eoc os-<%=@klass%>-container" data-type="composite-page" data-uuid-key="<%=@uuid_prefix%><%=@klass%>">
|
2
|
+
<<%= @in_composite_chapter ? 'h3' : 'h2' %> data-type="<%= @in_composite_chapter ? 'title' : 'document-title' %>">
|
3
|
+
<span class="os-text"><%= @title %></span>
|
4
|
+
</<%= @in_composite_chapter ? 'h3' : 'h2' %>>
|
5
|
+
<div data-type="metadata" style="display: none;">
|
6
|
+
<h1 data-type="document-title" itemprop="name"><%= @in_composite_chapter ? I18n.t(:eoc_composite_metadata_title) : @title %></h1>
|
7
|
+
<%= @metadata.paste %>
|
8
|
+
</div>
|
9
|
+
<%= @content %>
|
10
|
+
</div>
|
data/lib/kitchen/term_element.rb
CHANGED
@@ -13,17 +13,14 @@ module Kitchen
|
|
13
13
|
def initialize(node:, document: nil)
|
14
14
|
super(node: node,
|
15
15
|
document: document,
|
16
|
-
enumerator_class: TermElementEnumerator
|
17
|
-
short_type: :term)
|
16
|
+
enumerator_class: TermElementEnumerator)
|
18
17
|
end
|
19
18
|
|
20
|
-
# Returns
|
19
|
+
# Returns the short type
|
20
|
+
# @return [Symbol]
|
21
21
|
#
|
22
|
-
|
23
|
-
|
24
|
-
#
|
25
|
-
def self.is_the_element_class_for?(node)
|
26
|
-
node['data-type'] == 'term'
|
22
|
+
def self.short_type
|
23
|
+
:term
|
27
24
|
end
|
28
25
|
|
29
26
|
end
|
@@ -11,7 +11,7 @@ module Kitchen
|
|
11
11
|
#
|
12
12
|
def self.factory
|
13
13
|
ElementEnumeratorFactory.new(
|
14
|
-
default_css_or_xpath:
|
14
|
+
default_css_or_xpath: Selector.named(:term),
|
15
15
|
sub_element_class: TermElement,
|
16
16
|
enumerator_class: self
|
17
17
|
)
|
data/lib/kitchen/unit_element.rb
CHANGED
@@ -13,8 +13,14 @@ module Kitchen
|
|
13
13
|
def initialize(node:, document: nil)
|
14
14
|
super(node: node,
|
15
15
|
document: document,
|
16
|
-
enumerator_class: UnitElementEnumerator
|
17
|
-
|
16
|
+
enumerator_class: UnitElementEnumerator)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Returns the short type
|
20
|
+
# @return [Symbol]
|
21
|
+
#
|
22
|
+
def self.short_type
|
23
|
+
:unit
|
18
24
|
end
|
19
25
|
|
20
26
|
# Get the title in the immediate children, not the one in the metadata. Could use
|
@@ -27,13 +33,13 @@ module Kitchen
|
|
27
33
|
first!("./*[@data-type = 'document-title']")
|
28
34
|
end
|
29
35
|
|
30
|
-
# Returns
|
36
|
+
# Returns the title's text regardless of whether the title has been baked
|
31
37
|
#
|
32
|
-
# @
|
33
|
-
# @return [Boolean]
|
38
|
+
# @return [String]
|
34
39
|
#
|
35
|
-
def
|
36
|
-
|
40
|
+
def title_text
|
41
|
+
title.children.one? ? title.text : title.first('.os-text').text
|
37
42
|
end
|
43
|
+
|
38
44
|
end
|
39
45
|
end
|
data/lib/kitchen/version.rb
CHANGED
data/lib/locales/en.yml
CHANGED
@@ -15,14 +15,17 @@ en:
|
|
15
15
|
chapter_review: Chapter Review
|
16
16
|
learning_objectives: Learning Objectives
|
17
17
|
stepwise_step_label: Step
|
18
|
+
references: References
|
18
19
|
eoc_chapter_review: Chapter Review
|
19
20
|
eoc_key_terms_title: Key Terms
|
20
21
|
eoc_summary_title: Summary
|
21
22
|
eoc_exercises_title: Exercises
|
23
|
+
eoc_composite_metadata_title: Chapter Review
|
22
24
|
eoc_answer_key_title: Answer Key
|
23
25
|
eoc_key_concepts: Key Concepts
|
24
26
|
eoc_key_equations: Key Equations
|
25
27
|
eoc_suggested_reading: Suggestions for Further Study
|
28
|
+
eoc_further_research_title: Further Research
|
26
29
|
eob_index_title: Index
|
27
30
|
eob_index_symbols_group: Symbols
|
28
31
|
review_exercises: Review Exercises
|
data/lib/locales/es.yml
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
es:
|
2
|
+
figure: Figura
|
3
|
+
table_label: Tabla
|
4
|
+
appendix: Apéndice
|
5
|
+
theorem: Teorema
|
6
|
+
solution: Solución
|
7
|
+
chapter_outline: Esquema Del Capitulo
|
8
|
+
toc_title: Contenido
|
9
|
+
example_label: Ejemplo
|
10
|
+
exercise_label: Ejercicio
|
11
|
+
equation: Ecuación
|
12
|
+
chapter: Capítulo
|
13
|
+
unit: Unidad
|
14
|
+
checkpoint: Punto De Control
|
15
|
+
chapter_review: Revisión Del Capítulo
|
16
|
+
learning_objectives: Objetivos De Aprendizaje
|
17
|
+
stepwise_step_label: Paso
|
18
|
+
references: Referencias
|
19
|
+
eoc_chapter_review: Revisión Del Capítulo
|
20
|
+
eoc_key_terms_title: Términos Clave
|
21
|
+
eoc_summary_title: Resumen
|
22
|
+
eoc_exercises_title: Ejercicios
|
23
|
+
eoc_composite_metadata_title: Revisión Del Capítulo
|
24
|
+
eoc_answer_key_title: Respuestas Clave
|
25
|
+
eoc_key_concepts: Conceptos Clave
|
26
|
+
eoc_key_equations: Ecuaciones Clave
|
27
|
+
eoc_suggested_reading: Sugerencias Para Estudios Adicionales
|
28
|
+
eoc_further_research_title: Investigación Adicional
|
29
|
+
eob_index_title: Índice
|
30
|
+
eob_index_symbols_group: Símbolos
|
31
|
+
review_exercises: Ejercicios De Repaso
|
32
|
+
section_exercises: ! 'Sección %{number} Ejercicios'
|
data/lib/openstax_kitchen.rb
CHANGED
@@ -25,7 +25,6 @@ require 'kitchen/selectors/base'
|
|
25
25
|
require_all('kitchen/selectors')
|
26
26
|
|
27
27
|
require 'kitchen/utils'
|
28
|
-
require 'kitchen/transliterations'
|
29
28
|
require 'kitchen/errors'
|
30
29
|
require 'kitchen/ancestor'
|
31
30
|
require 'kitchen/search_query'
|
@@ -40,6 +39,8 @@ require 'kitchen/oven'
|
|
40
39
|
require 'kitchen/clipboard'
|
41
40
|
require 'kitchen/pantry'
|
42
41
|
require 'kitchen/counter'
|
42
|
+
require 'kitchen/selector'
|
43
|
+
require 'kitchen/id_tracker'
|
43
44
|
|
44
45
|
require 'kitchen/element_enumerator_base'
|
45
46
|
require 'kitchen/element_enumerator_factory'
|
@@ -52,7 +53,3 @@ require 'kitchen/element_factory'
|
|
52
53
|
require_all('kitchen/directions')
|
53
54
|
|
54
55
|
I18n.backend.load_translations(file_glob('/locales/*.yml'))
|
55
|
-
|
56
|
-
I18n.available_locales.each do |available_locale|
|
57
|
-
I18n.backend.store_translations(available_locale, Kitchen::TRANSLITERATIONS)
|
58
|
-
end
|
data/openstax_kitchen.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstax_kitchen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: twitter_cldr
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: byebug
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,6 +234,7 @@ files:
|
|
220
234
|
- lib/kitchen/chapter_element_enumerator.rb
|
221
235
|
- lib/kitchen/clipboard.rb
|
222
236
|
- lib/kitchen/composite_chapter_element.rb
|
237
|
+
- lib/kitchen/composite_chapter_element_enumerator.rb
|
223
238
|
- lib/kitchen/composite_page_element.rb
|
224
239
|
- lib/kitchen/composite_page_element_enumerator.rb
|
225
240
|
- lib/kitchen/config.rb
|
@@ -227,26 +242,14 @@ files:
|
|
227
242
|
- lib/kitchen/debug/print_recipe_error.rb
|
228
243
|
- lib/kitchen/directions/.rubocop.yml
|
229
244
|
- lib/kitchen/directions/bake_appendix.rb
|
230
|
-
- lib/kitchen/directions/
|
231
|
-
- lib/kitchen/directions/
|
232
|
-
- lib/kitchen/directions/bake_book_answer_key/v1.rb
|
233
|
-
- lib/kitchen/directions/bake_chapter_answer_key/main.rb
|
234
|
-
- lib/kitchen/directions/bake_chapter_answer_key/strategies/calculus.rb
|
235
|
-
- lib/kitchen/directions/bake_chapter_answer_key/strategies/uphysics.rb
|
236
|
-
- lib/kitchen/directions/bake_chapter_answer_key/v1.rb
|
237
|
-
- lib/kitchen/directions/bake_chapter_glossary.rb
|
245
|
+
- lib/kitchen/directions/bake_chapter_glossary/main.rb
|
246
|
+
- lib/kitchen/directions/bake_chapter_glossary/v1.rb
|
238
247
|
- lib/kitchen/directions/bake_chapter_introductions.rb
|
239
|
-
- lib/kitchen/directions/bake_chapter_key_concepts/key_concepts.xhtml.erb
|
240
248
|
- lib/kitchen/directions/bake_chapter_key_concepts/main.rb
|
241
249
|
- lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
|
242
250
|
- lib/kitchen/directions/bake_chapter_key_equations.rb
|
243
|
-
- lib/kitchen/directions/
|
244
|
-
- lib/kitchen/directions/
|
245
|
-
- lib/kitchen/directions/bake_chapter_review/v1.rb
|
246
|
-
- lib/kitchen/directions/bake_chapter_review_exercises/main.rb
|
247
|
-
- lib/kitchen/directions/bake_chapter_review_exercises/review_exercises.xhtml.erb
|
248
|
-
- lib/kitchen/directions/bake_chapter_review_exercises/v1.rb
|
249
|
-
- lib/kitchen/directions/bake_chapter_review_exercises/v2.rb
|
251
|
+
- lib/kitchen/directions/bake_chapter_references/main.rb
|
252
|
+
- lib/kitchen/directions/bake_chapter_references/v1.rb
|
250
253
|
- lib/kitchen/directions/bake_chapter_section_exercises/main.rb
|
251
254
|
- lib/kitchen/directions/bake_chapter_section_exercises/v1.rb
|
252
255
|
- lib/kitchen/directions/bake_chapter_summary.rb
|
@@ -257,11 +260,14 @@ files:
|
|
257
260
|
- lib/kitchen/directions/bake_composite_pages.rb
|
258
261
|
- lib/kitchen/directions/bake_equations.rb
|
259
262
|
- lib/kitchen/directions/bake_example.rb
|
260
|
-
- lib/kitchen/directions/bake_exercises/main.rb
|
261
|
-
- lib/kitchen/directions/bake_exercises/v1.rb
|
262
263
|
- lib/kitchen/directions/bake_figure.rb
|
264
|
+
- lib/kitchen/directions/bake_first_elements.rb
|
263
265
|
- lib/kitchen/directions/bake_footnotes/main.rb
|
264
266
|
- lib/kitchen/directions/bake_footnotes/v1.rb
|
267
|
+
- lib/kitchen/directions/bake_free_response/free_response.xhtml.erb
|
268
|
+
- lib/kitchen/directions/bake_free_response/main.rb
|
269
|
+
- lib/kitchen/directions/bake_free_response/v1.rb
|
270
|
+
- lib/kitchen/directions/bake_further_research.rb
|
265
271
|
- lib/kitchen/directions/bake_index/main.rb
|
266
272
|
- lib/kitchen/directions/bake_index/v1.rb
|
267
273
|
- lib/kitchen/directions/bake_index/v1.xhtml.erb
|
@@ -270,7 +276,6 @@ files:
|
|
270
276
|
- lib/kitchen/directions/bake_non_introduction_pages.rb
|
271
277
|
- lib/kitchen/directions/bake_notes/bake_autotitled_notes.rb
|
272
278
|
- lib/kitchen/directions/bake_notes/bake_note_subtitle.rb
|
273
|
-
- lib/kitchen/directions/bake_notes/bake_notes.rb
|
274
279
|
- lib/kitchen/directions/bake_notes/bake_numbered_notes.rb
|
275
280
|
- lib/kitchen/directions/bake_notes/bake_unclassified_notes.rb
|
276
281
|
- lib/kitchen/directions/bake_numbered_exercise/main.rb
|
@@ -280,7 +285,8 @@ files:
|
|
280
285
|
- lib/kitchen/directions/bake_page_abstracts.rb
|
281
286
|
- lib/kitchen/directions/bake_preface/main.rb
|
282
287
|
- lib/kitchen/directions/bake_preface/v1.rb
|
283
|
-
- lib/kitchen/directions/
|
288
|
+
- lib/kitchen/directions/bake_references/main.rb
|
289
|
+
- lib/kitchen/directions/bake_references/v1.rb
|
284
290
|
- lib/kitchen/directions/bake_stepwise.rb
|
285
291
|
- lib/kitchen/directions/bake_suggested_reading.rb
|
286
292
|
- lib/kitchen/directions/bake_theorem/main.rb
|
@@ -289,7 +295,21 @@ files:
|
|
289
295
|
- lib/kitchen/directions/bake_unit_title/main.rb
|
290
296
|
- lib/kitchen/directions/bake_unit_title/v1.rb
|
291
297
|
- lib/kitchen/directions/bake_unnumbered_tables.rb
|
298
|
+
- lib/kitchen/directions/book_answer_key_container/eob_solutions_container.xhtml.erb
|
299
|
+
- lib/kitchen/directions/book_answer_key_container/main.rb
|
300
|
+
- lib/kitchen/directions/book_answer_key_container/v1.rb
|
301
|
+
- lib/kitchen/directions/chapter_review_container/chapter_review.xhtml.erb
|
302
|
+
- lib/kitchen/directions/chapter_review_container/main.rb
|
303
|
+
- lib/kitchen/directions/chapter_review_container/v1.rb
|
292
304
|
- lib/kitchen/directions/eoc_section_title_link_snippet.rb
|
305
|
+
- lib/kitchen/directions/move_exercises_to_eoc/main.rb
|
306
|
+
- lib/kitchen/directions/move_exercises_to_eoc/v1.rb
|
307
|
+
- lib/kitchen/directions/move_exercises_to_eoc/v2.rb
|
308
|
+
- lib/kitchen/directions/move_solutions_to_answer_key/main.rb
|
309
|
+
- lib/kitchen/directions/move_solutions_to_answer_key/strategies/american_government.rb
|
310
|
+
- lib/kitchen/directions/move_solutions_to_answer_key/strategies/calculus.rb
|
311
|
+
- lib/kitchen/directions/move_solutions_to_answer_key/strategies/uphysics.rb
|
312
|
+
- lib/kitchen/directions/move_solutions_to_answer_key/v1.rb
|
293
313
|
- lib/kitchen/directions/move_title_text_into_span.rb
|
294
314
|
- lib/kitchen/document.rb
|
295
315
|
- lib/kitchen/element.rb
|
@@ -305,6 +325,7 @@ files:
|
|
305
325
|
- lib/kitchen/exercise_element_enumerator.rb
|
306
326
|
- lib/kitchen/figure_element.rb
|
307
327
|
- lib/kitchen/figure_element_enumerator.rb
|
328
|
+
- lib/kitchen/id_tracker.rb
|
308
329
|
- lib/kitchen/metadata_element.rb
|
309
330
|
- lib/kitchen/metadata_element_enumerator.rb
|
310
331
|
- lib/kitchen/mixins/block_error_if.rb
|
@@ -314,25 +335,32 @@ files:
|
|
314
335
|
- lib/kitchen/page_element.rb
|
315
336
|
- lib/kitchen/page_element_enumerator.rb
|
316
337
|
- lib/kitchen/pantry.rb
|
338
|
+
- lib/kitchen/patches/i18n.rb
|
317
339
|
- lib/kitchen/patches/nokogiri.rb
|
340
|
+
- lib/kitchen/patches/nokogiri_profiling.rb
|
318
341
|
- lib/kitchen/patches/renderable.rb
|
319
342
|
- lib/kitchen/patches/string.rb
|
320
343
|
- lib/kitchen/recipe.rb
|
344
|
+
- lib/kitchen/reference_element.rb
|
345
|
+
- lib/kitchen/references_element_enumerator.rb
|
321
346
|
- lib/kitchen/search_history.rb
|
322
347
|
- lib/kitchen/search_query.rb
|
348
|
+
- lib/kitchen/selector.rb
|
323
349
|
- lib/kitchen/selectors/base.rb
|
324
350
|
- lib/kitchen/selectors/standard_1.rb
|
325
351
|
- lib/kitchen/table_element.rb
|
326
352
|
- lib/kitchen/table_element_enumerator.rb
|
353
|
+
- lib/kitchen/templates/eob_section_title_template.xhtml.erb
|
354
|
+
- lib/kitchen/templates/eoc_section_title_template.xhtml.erb
|
327
355
|
- lib/kitchen/term_element.rb
|
328
356
|
- lib/kitchen/term_element_enumerator.rb
|
329
|
-
- lib/kitchen/transliterations.rb
|
330
357
|
- lib/kitchen/type_casting_element_enumerator.rb
|
331
358
|
- lib/kitchen/unit_element.rb
|
332
359
|
- lib/kitchen/unit_element_enumerator.rb
|
333
360
|
- lib/kitchen/utils.rb
|
334
361
|
- lib/kitchen/version.rb
|
335
362
|
- lib/locales/en.yml
|
363
|
+
- lib/locales/es.yml
|
336
364
|
- lib/locales/pl.yml
|
337
365
|
- lib/notes.md
|
338
366
|
- lib/openstax_kitchen.rb
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Kitchen
|
4
|
-
module Directions
|
5
|
-
# Bake directons for eoc glossary
|
6
|
-
#
|
7
|
-
module BakeChapterGlossary
|
8
|
-
def self.v1(chapter:, metadata_source:, append_to: nil)
|
9
|
-
metadata_elements = metadata_source.children_to_keep.copy
|
10
|
-
|
11
|
-
definitions = chapter.glossaries.search('dl').cut
|
12
|
-
definitions.sort_by! do |definition|
|
13
|
-
[definition.first('dt').text.downcase, definition.first('dd').text.downcase]
|
14
|
-
end
|
15
|
-
|
16
|
-
chapter.glossaries.trash
|
17
|
-
|
18
|
-
return if definitions.none?
|
19
|
-
|
20
|
-
append_to_element = append_to || chapter
|
21
|
-
|
22
|
-
append_to_element.append(child:
|
23
|
-
<<~HTML
|
24
|
-
<div class="os-eoc os-glossary-container" data-type="composite-page" data-uuid-key="glossary">
|
25
|
-
<h2 data-type="document-title">
|
26
|
-
<span class="os-text">#{I18n.t(:eoc_key_terms_title)}</span>
|
27
|
-
</h2>
|
28
|
-
<div data-type="metadata" style="display: none;">
|
29
|
-
<h1 data-type="document-title" itemprop="name">#{I18n.t(:eoc_key_terms_title)}</h1>
|
30
|
-
#{metadata_elements.paste}
|
31
|
-
</div>
|
32
|
-
#{definitions.paste}
|
33
|
-
</div>
|
34
|
-
HTML
|
35
|
-
)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<div class="os-eoc os-key-concepts-container" data-type="composite-page" data-uuid-key=".key-concepts">
|
2
|
-
<h2 data-type="document-title">
|
3
|
-
<span class="os-text"><%= I18n.t(:eoc_key_concepts) %></span>
|
4
|
-
</h2>
|
5
|
-
<div data-type="metadata" style="display: none;">
|
6
|
-
<h1 data-type="document-title" itemprop="name"><%= I18n.t(:eoc_key_concepts) %></h1>
|
7
|
-
<%= @metadata_elements.paste %>
|
8
|
-
</div>
|
9
|
-
<div class="os-key-concepts">
|
10
|
-
<% @key_concepts.each do |key_concept| %>
|
11
|
-
<div class="os-section-area">
|
12
|
-
<%= key_concept %>
|
13
|
-
</div>
|
14
|
-
<% end %>
|
15
|
-
</div>
|
16
|
-
</div>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Kitchen
|
4
|
-
module Directions
|
5
|
-
module BakeChapterReviewExercises
|
6
|
-
def self.v1(chapter:, metadata_source:, append_to:, klass:)
|
7
|
-
V1.new.bake(chapter: chapter, metadata_source: metadata_source, append_to: append_to, klass: klass)
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.v2(chapter:, metadata_source:, append_to:, klass:)
|
11
|
-
V2.new.bake(chapter: chapter, metadata_source: metadata_source, append_to: append_to, klass: klass)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|