openstax_kitchen 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -3
- data/Gemfile.lock +1 -1
- data/README.md +7 -0
- data/lib/kitchen/directions/bake_book_answer_key/eob_solutions_container.xhtml.erb +9 -0
- data/lib/kitchen/directions/bake_book_answer_key/main.rb +11 -0
- data/lib/kitchen/directions/bake_book_answer_key/v1.rb +13 -0
- data/lib/kitchen/directions/bake_chapter_answer_key/main.rb +14 -0
- data/lib/kitchen/directions/bake_chapter_answer_key/strategies/calculus.rb +41 -0
- data/lib/kitchen/directions/bake_chapter_answer_key/strategies/uphysics.rb +61 -0
- data/lib/kitchen/directions/bake_chapter_answer_key/v1.rb +32 -0
- data/lib/kitchen/directions/bake_chapter_glossary.rb +4 -2
- data/lib/kitchen/directions/bake_chapter_key_concepts/key_concepts.xhtml.erb +16 -0
- data/lib/kitchen/directions/bake_chapter_key_concepts/main.rb +11 -0
- data/lib/kitchen/directions/bake_chapter_key_concepts/v1.rb +30 -0
- data/lib/kitchen/directions/bake_chapter_key_equations.rb +4 -2
- data/lib/kitchen/directions/bake_chapter_review/chapter_review.xhtml.erb +9 -0
- data/lib/kitchen/directions/bake_chapter_review/main.rb +11 -0
- data/lib/kitchen/directions/bake_chapter_review/v1.rb +13 -0
- data/lib/kitchen/directions/bake_chapter_review_exercises/main.rb +15 -0
- data/lib/kitchen/directions/bake_chapter_review_exercises/review_exercises.xhtml.erb +10 -0
- data/lib/kitchen/directions/bake_chapter_review_exercises/v1.rb +38 -0
- data/lib/kitchen/directions/bake_chapter_review_exercises/v2.rb +50 -0
- data/lib/kitchen/directions/bake_chapter_section_exercises/main.rb +11 -0
- data/lib/kitchen/directions/bake_chapter_section_exercises/v1.rb +28 -0
- data/lib/kitchen/directions/bake_chapter_summary.rb +1 -1
- data/lib/kitchen/directions/bake_checkpoint.rb +44 -0
- data/lib/kitchen/directions/bake_composite_chapters.rb +14 -0
- data/lib/kitchen/directions/bake_equations.rb +27 -0
- data/lib/kitchen/directions/bake_example.rb +29 -7
- data/lib/kitchen/directions/bake_exercises/main.rb +1 -0
- data/lib/kitchen/directions/bake_exercises/v1.rb +34 -31
- data/lib/kitchen/directions/bake_non_introduction_pages.rb +26 -0
- data/lib/kitchen/directions/bake_notes/bake_autotitled_notes.rb +29 -0
- data/lib/kitchen/directions/bake_notes/bake_note_subtitle.rb +18 -0
- data/lib/kitchen/directions/{bake_notes.rb → bake_notes/bake_notes.rb} +6 -16
- data/lib/kitchen/directions/bake_notes/bake_numbered_notes.rb +63 -0
- data/lib/kitchen/directions/bake_notes/bake_unclassified_notes.rb +30 -0
- data/lib/kitchen/directions/bake_numbered_exercise/main.rb +11 -0
- data/lib/kitchen/directions/bake_numbered_exercise/v1.rb +34 -0
- data/lib/kitchen/directions/bake_numbered_table/main.rb +2 -2
- data/lib/kitchen/directions/bake_numbered_table/v1.rb +17 -3
- data/lib/kitchen/directions/bake_page_abstracts.rb +16 -0
- data/lib/kitchen/directions/bake_problem_first_elements.rb +16 -0
- data/lib/kitchen/directions/bake_stepwise.rb +1 -5
- data/lib/kitchen/directions/bake_theorem/main.rb +11 -0
- data/lib/kitchen/directions/bake_theorem/v1.rb +28 -0
- data/lib/kitchen/directions/bake_toc.rb +6 -0
- data/lib/kitchen/directions/eoc_section_title_link_snippet.rb +20 -0
- data/lib/kitchen/element_base.rb +40 -1
- data/lib/kitchen/element_enumerator_base.rb +87 -8
- data/lib/kitchen/exercise_element.rb +45 -0
- data/lib/kitchen/exercise_element_enumerator.rb +21 -0
- data/lib/kitchen/note_element.rb +17 -16
- data/lib/kitchen/page_element.rb +8 -0
- data/lib/kitchen/recipe.rb +35 -2
- data/lib/kitchen/version.rb +1 -1
- data/lib/locales/en.yml +9 -7
- data/lib/locales/pl.yml +24 -0
- data/lib/openstax_kitchen.rb +1 -1
- metadata +39 -3
@@ -70,6 +70,37 @@ module Kitchen
|
|
70
70
|
chain_to(PageElementEnumerator, css_or_xpath: css_or_xpath, only: only, except: except)
|
71
71
|
end
|
72
72
|
|
73
|
+
# Returns an enumerator that iterates through composite pages within the scope of this enumerator
|
74
|
+
#
|
75
|
+
# @param css_or_xpath [String] additional selectors to further narrow the element iterated over;
|
76
|
+
# a "$" in this argument will be replaced with the default selector for the element being
|
77
|
+
# iterated over.
|
78
|
+
# @param only [Symbol, Callable] the name of a method to call on an element or a
|
79
|
+
# lambda or proc that accepts an element; elements will only be included in the
|
80
|
+
# search results if the method or callable returns true
|
81
|
+
# @param except [Symbol, Callable] the name of a method to call on an element or a
|
82
|
+
# lambda or proc that accepts an element; elements will not be included in the
|
83
|
+
# search results if the method or callable returns false
|
84
|
+
#
|
85
|
+
def composite_pages(css_or_xpath=nil, only: nil, except: nil)
|
86
|
+
block_error_if(block_given?)
|
87
|
+
chain_to(CompositePageElementEnumerator, css_or_xpath: css_or_xpath, only: only, except: except)
|
88
|
+
end
|
89
|
+
|
90
|
+
# Returns an enumerator that iterates through pages that arent the introduction page within the scope of this enumerator
|
91
|
+
#
|
92
|
+
# @param css_or_xpath [String] additional selectors to further narrow the element iterated over;
|
93
|
+
# a "$" in this argument will be replaced with the default selector for the element being
|
94
|
+
# iterated over.
|
95
|
+
#
|
96
|
+
def non_introduction_pages(only: nil, except: nil)
|
97
|
+
block_error_if(block_given?)
|
98
|
+
chain_to(PageElementEnumerator,
|
99
|
+
css_or_xpath: '$:not(.introduction)',
|
100
|
+
only: only,
|
101
|
+
except: except)
|
102
|
+
end
|
103
|
+
|
73
104
|
# Returns an enumerator that iterates through chapters within the scope of this enumerator
|
74
105
|
#
|
75
106
|
# @param css_or_xpath [String] additional selectors to further narrow the element iterated over;
|
@@ -166,6 +197,44 @@ module Kitchen
|
|
166
197
|
chain_to(ExampleElementEnumerator, css_or_xpath: css_or_xpath, only: only, except: except)
|
167
198
|
end
|
168
199
|
|
200
|
+
# Returns an enumerator that iterates through titles within the scope of this enumerator
|
201
|
+
#
|
202
|
+
# @param css_or_xpath [String] additional selectors to further narrow the element iterated over;
|
203
|
+
# a "$" in this argument will be replaced with the default selector for the element being
|
204
|
+
# iterated over.
|
205
|
+
# @param only [Symbol, Callable] the name of a method to call on an element or a
|
206
|
+
# lambda or proc that accepts an element; elements will only be included in the
|
207
|
+
# search results if the method or callable returns true
|
208
|
+
# @param except [Symbol, Callable] the name of a method to call on an element or a
|
209
|
+
# lambda or proc that accepts an element; elements will not be included in the
|
210
|
+
# search results if the method or callable returns false
|
211
|
+
#
|
212
|
+
def titles(css_or_xpath=nil, only: nil, except: nil)
|
213
|
+
block_error_if(block_given?)
|
214
|
+
chain_to(ElementEnumerator,
|
215
|
+
default_css_or_xpath: '[data-type="title"]',
|
216
|
+
css_or_xpath: css_or_xpath,
|
217
|
+
only: only,
|
218
|
+
except: except)
|
219
|
+
end
|
220
|
+
|
221
|
+
# Returns an enumerator that iterates through exercises within the scope of this enumerator
|
222
|
+
#
|
223
|
+
# @param css_or_xpath [String] additional selectors to further narrow the element iterated over;
|
224
|
+
# a "$" in this argument will be replaced with the default selector for the element being
|
225
|
+
# iterated over.
|
226
|
+
# @param only [Symbol, Callable] the name of a method to call on an element or a
|
227
|
+
# lambda or proc that accepts an element; elements will only be included in the
|
228
|
+
# search results if the method or callable returns true
|
229
|
+
# @param except [Symbol, Callable] the name of a method to call on an element or a
|
230
|
+
# lambda or proc that accepts an element; elements will not be included in the
|
231
|
+
# search results if the method or callable returns false
|
232
|
+
#
|
233
|
+
def exercises(css_or_xpath=nil, only: nil, except: nil)
|
234
|
+
block_error_if(block_given?)
|
235
|
+
chain_to(ExerciseElementEnumerator, css_or_xpath: css_or_xpath, only: only, except: except)
|
236
|
+
end
|
237
|
+
|
169
238
|
# Returns an enumerator that iterates through metadata within the scope of this enumerator
|
170
239
|
#
|
171
240
|
# @param css_or_xpath [String] additional selectors to further narrow the element iterated over;
|
@@ -195,7 +264,12 @@ module Kitchen
|
|
195
264
|
# Returns an enumerator that iterates through elements within the scope of this enumerator
|
196
265
|
#
|
197
266
|
# @param enumerator_class [ElementEnumeratorBase] the enumerator to use for the iteration
|
267
|
+
# @param default_css_or_xpath [String] the default CSS or xpath to use when iterating. Normally,
|
268
|
+
# this value is provided by the `enumerator_class`, but that isn't always the case, e.g.
|
269
|
+
# when that class is a generic `ElementEnumerator`.
|
198
270
|
# @param css_or_xpath [String] additional selectors to further narrow the element iterated over
|
271
|
+
# a "$" in this argument will be replaced with the default selector for the element being
|
272
|
+
# iterated over.
|
199
273
|
# @param only [Symbol, Callable] the name of a method to call on an element or a
|
200
274
|
# lambda or proc that accepts an element; elements will only be included in the
|
201
275
|
# search results if the method or callable returns true
|
@@ -203,16 +277,21 @@ module Kitchen
|
|
203
277
|
# lambda or proc that accepts an element; elements will not be included in the
|
204
278
|
# search results if the method or callable returns false
|
205
279
|
#
|
206
|
-
def chain_to(enumerator_class,
|
280
|
+
def chain_to(enumerator_class, default_css_or_xpath: nil, css_or_xpath: nil,
|
281
|
+
only: nil, except: nil)
|
207
282
|
block_error_if(block_given?)
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
except: except
|
214
|
-
)
|
283
|
+
|
284
|
+
search_query = SearchQuery.new(
|
285
|
+
css_or_xpath: css_or_xpath,
|
286
|
+
only: only,
|
287
|
+
except: except
|
215
288
|
)
|
289
|
+
|
290
|
+
if default_css_or_xpath
|
291
|
+
search_query.apply_default_css_or_xpath_and_normalize(default_css_or_xpath)
|
292
|
+
end
|
293
|
+
|
294
|
+
enumerator_class.factory.build_within(self, search_query: search_query)
|
216
295
|
end
|
217
296
|
|
218
297
|
# Returns the first element in this enumerator
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Kitchen
|
4
|
+
# An element for an example
|
5
|
+
#
|
6
|
+
class ExerciseElement < ElementBase
|
7
|
+
|
8
|
+
# Creates a new +ExerciseElement+
|
9
|
+
#
|
10
|
+
# @param node [Nokogiri::XML::Node] the node this element wraps
|
11
|
+
# @param document [Document] this element's document
|
12
|
+
#
|
13
|
+
def initialize(node:, document: nil)
|
14
|
+
super(node: node,
|
15
|
+
document: document,
|
16
|
+
enumerator_class: ExerciseElementEnumerator,
|
17
|
+
short_type: :exercise)
|
18
|
+
end
|
19
|
+
|
20
|
+
# Returns true if this class represents the element for the given node
|
21
|
+
#
|
22
|
+
# @param node [Nokogiri::XML::Node] the underlying node
|
23
|
+
# @return [Boolean]
|
24
|
+
#
|
25
|
+
def self.is_the_element_class_for?(node)
|
26
|
+
node['data-type'] == 'exercise'
|
27
|
+
end
|
28
|
+
|
29
|
+
# Returns the enumerator for problem.
|
30
|
+
#
|
31
|
+
# @return ElementEnumerator
|
32
|
+
#
|
33
|
+
def problem
|
34
|
+
first("[data-type='problem']")
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns the enumerator for solution.
|
38
|
+
#
|
39
|
+
# @return ElementEnumerator
|
40
|
+
#
|
41
|
+
def solution
|
42
|
+
first("[data-type='solution']")
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Kitchen
|
4
|
+
# An enumerator for example elements
|
5
|
+
#
|
6
|
+
class ExerciseElementEnumerator < ElementEnumeratorBase
|
7
|
+
|
8
|
+
# Returns a factory for this enumerator
|
9
|
+
#
|
10
|
+
# @return [ElementEnumeratorFactory]
|
11
|
+
#
|
12
|
+
def self.factory
|
13
|
+
ElementEnumeratorFactory.new(
|
14
|
+
default_css_or_xpath: "div[data-type='exercise']", # TODO: element.document.selectors.exercise
|
15
|
+
sub_element_class: ExerciseElement,
|
16
|
+
enumerator_class: self
|
17
|
+
)
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
data/lib/kitchen/note_element.rb
CHANGED
@@ -5,13 +5,6 @@ module Kitchen
|
|
5
5
|
#
|
6
6
|
class NoteElement < ElementBase
|
7
7
|
|
8
|
-
TITLE_TRANSLATION_KEYS = %w[
|
9
|
-
link-to-learning
|
10
|
-
everyday-life
|
11
|
-
sciences-interconnect
|
12
|
-
chemist-portrait
|
13
|
-
].freeze
|
14
|
-
|
15
8
|
# Creates a new +NoteElement+
|
16
9
|
#
|
17
10
|
# @param node [Nokogiri::XML::Node] the node this element wraps
|
@@ -38,7 +31,7 @@ module Kitchen
|
|
38
31
|
# @return [Boolean]
|
39
32
|
#
|
40
33
|
def indicates_autogenerated_title?
|
41
|
-
|
34
|
+
detected_note_title_key != 0 && detected_note_title_key.present?
|
42
35
|
end
|
43
36
|
|
44
37
|
# Get the autogenerated title for this note
|
@@ -46,9 +39,11 @@ module Kitchen
|
|
46
39
|
# @return [String]
|
47
40
|
#
|
48
41
|
def autogenerated_title
|
49
|
-
|
50
|
-
|
51
|
-
|
42
|
+
if indicates_autogenerated_title?
|
43
|
+
I18n.t(:"notes.#{detected_note_title_key}")
|
44
|
+
else
|
45
|
+
"unknown title for note with classes #{classes}"
|
46
|
+
end
|
52
47
|
end
|
53
48
|
|
54
49
|
# Returns true if this class represents the element for the given node
|
@@ -62,12 +57,18 @@ module Kitchen
|
|
62
57
|
|
63
58
|
protected
|
64
59
|
|
65
|
-
def
|
66
|
-
|
67
|
-
|
60
|
+
def detected_note_title_key
|
61
|
+
@detected_note_title_key ||= begin
|
62
|
+
return 0 if classes.empty? || !I18n.t('.').key?(:notes)
|
68
63
|
|
69
|
-
|
70
|
-
|
64
|
+
possible_keys = I18n.t(:notes).keys.map(&:to_s)
|
65
|
+
keys = possible_keys & classes
|
71
66
|
|
67
|
+
raise("too many translation keys: #{keys.join(', ')}") if keys.many?
|
68
|
+
return 0 if keys.empty?
|
69
|
+
|
70
|
+
keys.first
|
71
|
+
end
|
72
|
+
end
|
72
73
|
end
|
73
74
|
end
|
data/lib/kitchen/page_element.rb
CHANGED
@@ -87,6 +87,14 @@ module Kitchen
|
|
87
87
|
first!('section.exercises')
|
88
88
|
end
|
89
89
|
|
90
|
+
# Returns the key concepts
|
91
|
+
#
|
92
|
+
# @return [Element]
|
93
|
+
#
|
94
|
+
def key_concepts
|
95
|
+
search('section.key-concepts')
|
96
|
+
end
|
97
|
+
|
90
98
|
# Returns true if this class represents the element for the given node
|
91
99
|
#
|
92
100
|
# @param node [Nokogiri::XML::Node] the underlying node
|
data/lib/kitchen/recipe.rb
CHANGED
@@ -14,6 +14,10 @@ module Kitchen
|
|
14
14
|
# @return [String]
|
15
15
|
attr_reader :source_location
|
16
16
|
|
17
|
+
# An I18n backend specific to this recipe, may be nil
|
18
|
+
# @return [I18n::Backend::Simple, nil]
|
19
|
+
attr_reader :my_i18n_backend
|
20
|
+
|
17
21
|
# Sets the document so the recipe can yield it for modification
|
18
22
|
#
|
19
23
|
# @param document [Document] the document to modify
|
@@ -31,20 +35,29 @@ module Kitchen
|
|
31
35
|
|
32
36
|
# Make a new Recipe
|
33
37
|
#
|
38
|
+
# @param locales_dir [String, nil] the absolute path to a folder containing recipe-specific
|
39
|
+
# I18n translations. If not provided, Kitchen will look for a `locales` directory in the
|
40
|
+
# same directory as the recipe source. Recipe-specific translations override those in
|
41
|
+
# Kitchen. If no recipe-specific locales directory exists, Kitchen will just use its default
|
42
|
+
# translations.
|
34
43
|
# @yield A block for defining the steps of the recipe
|
35
44
|
# @yieldparam doc [Document] an object representing an XML document
|
36
45
|
#
|
37
|
-
def initialize(&block)
|
46
|
+
def initialize(locales_dir: nil, &block)
|
38
47
|
raise(RecipeError, 'Recipes must be initialized with a block') unless block_given?
|
39
48
|
|
40
49
|
@source_location = block.source_location[0]
|
41
50
|
@block = block
|
51
|
+
|
52
|
+
load_my_i18n_backend(locales_dir)
|
42
53
|
end
|
43
54
|
|
44
55
|
# Executes the block given to +Recipe.new+ on the document. Aka, does the baking.
|
45
56
|
#
|
46
57
|
def bake
|
47
|
-
|
58
|
+
with_my_locales do
|
59
|
+
@block.to_proc.call(document)
|
60
|
+
end
|
48
61
|
rescue RecipeError, ElementNotFoundError, Nokogiri::CSS::SyntaxError => e
|
49
62
|
print_recipe_error_and_exit(e)
|
50
63
|
rescue ArgumentError, NoMethodError => e
|
@@ -67,6 +80,26 @@ module Kitchen
|
|
67
80
|
error.backtrace.any? { |entry| entry.start_with?(@source_location) }
|
68
81
|
end
|
69
82
|
|
83
|
+
def load_my_i18n_backend(locales_dir)
|
84
|
+
locales_dir ||= begin
|
85
|
+
guessed_locales_dir = "#{File.dirname(@source_location)}/locales"
|
86
|
+
File.directory?(guessed_locales_dir) ? guessed_locales_dir : nil
|
87
|
+
end
|
88
|
+
|
89
|
+
return unless locales_dir
|
90
|
+
|
91
|
+
@my_i18n_backend = I18n::Backend::Simple.new
|
92
|
+
@my_i18n_backend.load_translations(Dir[File.expand_path("#{locales_dir}/*.yml")])
|
93
|
+
end
|
94
|
+
|
95
|
+
def with_my_locales
|
96
|
+
original_i18n_backend = I18n.backend
|
97
|
+
I18n.backend = I18n::Backend::Chain.new(my_i18n_backend, original_i18n_backend)
|
98
|
+
yield
|
99
|
+
ensure
|
100
|
+
I18n.backend = original_i18n_backend
|
101
|
+
end
|
102
|
+
|
70
103
|
# Print the given recipe error and do a process exit
|
71
104
|
#
|
72
105
|
# @param error [RecipeError] the error
|
data/lib/kitchen/version.rb
CHANGED
data/lib/locales/en.yml
CHANGED
@@ -2,26 +2,28 @@ en:
|
|
2
2
|
figure: Figure
|
3
3
|
table_label: Table
|
4
4
|
appendix: Appendix
|
5
|
+
theorem: Theorem
|
6
|
+
solution: Solution
|
5
7
|
chapter_outline: Chapter Outline
|
6
8
|
toc_title: Contents
|
7
9
|
example_label: Example
|
8
10
|
exercise_label: Exercise
|
11
|
+
equation: Equation
|
9
12
|
chapter: Chapter
|
10
13
|
unit: Unit
|
14
|
+
checkpoint: Checkpoint
|
15
|
+
chapter_review: Chapter Review
|
11
16
|
learning_objectives: Learning Objectives
|
12
17
|
stepwise_step_label: Step
|
18
|
+
eoc_chapter_review: Chapter Review
|
13
19
|
eoc_key_terms_title: Key Terms
|
14
20
|
eoc_summary_title: Summary
|
15
21
|
eoc_exercises_title: Exercises
|
16
22
|
eoc_answer_key_title: Answer Key
|
23
|
+
eoc_key_concepts: Key Concepts
|
17
24
|
eoc_key_equations: Key Equations
|
18
25
|
eoc_suggested_reading: Suggestions for Further Study
|
19
26
|
eob_index_title: Index
|
20
27
|
eob_index_symbols_group: Symbols
|
21
|
-
|
22
|
-
|
23
|
-
sciences-interconnect: How Sciences Interconnect
|
24
|
-
chemistry:
|
25
|
-
link-to-learning: Link to Learning
|
26
|
-
everyday-life: Chemistry in Everyday Life
|
27
|
-
chemist-portrait: Portrait of a Chemist
|
28
|
+
review_exercises: Review Exercises
|
29
|
+
section_exercises: ! 'Section %{number} Exercises'
|
data/lib/locales/pl.yml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
pl:
|
2
|
+
figure: Rysunek
|
3
|
+
table_label: Tabela
|
4
|
+
appendix: Dodatek
|
5
|
+
theorem: Twierdzenie
|
6
|
+
solution: Rozwiązanie
|
7
|
+
chapter_outline: Treść rozdziału
|
8
|
+
toc_title: Spis treści
|
9
|
+
example_label: Przykład
|
10
|
+
exercise_label: Ćwiczenie
|
11
|
+
equation: Równanie
|
12
|
+
chapter: Rozdział
|
13
|
+
unit: Część
|
14
|
+
chapter_review: Podsumowanie rozdziału
|
15
|
+
learning_objectives: Cel dydaktyczny
|
16
|
+
stepwise_step_label: Krok
|
17
|
+
eoc_chapter_review: Podsumowanie rozdziału
|
18
|
+
eoc_key_terms_title: Kluczowe pojęcia
|
19
|
+
eoc_summary_title: Podsumowanie
|
20
|
+
eoc_answer_key_title: Rozwiązania zadań
|
21
|
+
eoc_key_equations: Najważniejsze wzory
|
22
|
+
eob_index_title: Skorowidz rzeczowy
|
23
|
+
eob_index_symbols_group: Symbole
|
24
|
+
|
data/lib/openstax_kitchen.rb
CHANGED
@@ -51,7 +51,7 @@ require 'kitchen/element_factory'
|
|
51
51
|
|
52
52
|
require_all('kitchen/directions')
|
53
53
|
|
54
|
-
I18n.
|
54
|
+
I18n.backend.load_translations(file_glob('/locales/*.yml'))
|
55
55
|
|
56
56
|
I18n.available_locales.each do |available_locale|
|
57
57
|
I18n.backend.store_translations(available_locale, Kitchen::TRANSLITERATIONS)
|
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: 3.
|
4
|
+
version: 3.1.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-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -227,13 +227,35 @@ files:
|
|
227
227
|
- lib/kitchen/debug/print_recipe_error.rb
|
228
228
|
- lib/kitchen/directions/.rubocop.yml
|
229
229
|
- lib/kitchen/directions/bake_appendix.rb
|
230
|
+
- lib/kitchen/directions/bake_book_answer_key/eob_solutions_container.xhtml.erb
|
231
|
+
- lib/kitchen/directions/bake_book_answer_key/main.rb
|
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
|
230
237
|
- lib/kitchen/directions/bake_chapter_glossary.rb
|
231
238
|
- lib/kitchen/directions/bake_chapter_introductions.rb
|
239
|
+
- lib/kitchen/directions/bake_chapter_key_concepts/key_concepts.xhtml.erb
|
240
|
+
- lib/kitchen/directions/bake_chapter_key_concepts/main.rb
|
241
|
+
- lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
|
232
242
|
- lib/kitchen/directions/bake_chapter_key_equations.rb
|
243
|
+
- lib/kitchen/directions/bake_chapter_review/chapter_review.xhtml.erb
|
244
|
+
- lib/kitchen/directions/bake_chapter_review/main.rb
|
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
|
250
|
+
- lib/kitchen/directions/bake_chapter_section_exercises/main.rb
|
251
|
+
- lib/kitchen/directions/bake_chapter_section_exercises/v1.rb
|
233
252
|
- lib/kitchen/directions/bake_chapter_summary.rb
|
234
253
|
- lib/kitchen/directions/bake_chapter_title/main.rb
|
235
254
|
- lib/kitchen/directions/bake_chapter_title/v1.rb
|
255
|
+
- lib/kitchen/directions/bake_checkpoint.rb
|
256
|
+
- lib/kitchen/directions/bake_composite_chapters.rb
|
236
257
|
- lib/kitchen/directions/bake_composite_pages.rb
|
258
|
+
- lib/kitchen/directions/bake_equations.rb
|
237
259
|
- lib/kitchen/directions/bake_example.rb
|
238
260
|
- lib/kitchen/directions/bake_exercises/main.rb
|
239
261
|
- lib/kitchen/directions/bake_exercises/v1.rb
|
@@ -245,18 +267,29 @@ files:
|
|
245
267
|
- lib/kitchen/directions/bake_index/v1.xhtml.erb
|
246
268
|
- lib/kitchen/directions/bake_link_placeholders.rb
|
247
269
|
- lib/kitchen/directions/bake_math_in_paragraph.rb
|
248
|
-
- lib/kitchen/directions/
|
270
|
+
- lib/kitchen/directions/bake_non_introduction_pages.rb
|
271
|
+
- lib/kitchen/directions/bake_notes/bake_autotitled_notes.rb
|
272
|
+
- lib/kitchen/directions/bake_notes/bake_note_subtitle.rb
|
273
|
+
- lib/kitchen/directions/bake_notes/bake_notes.rb
|
274
|
+
- lib/kitchen/directions/bake_notes/bake_numbered_notes.rb
|
275
|
+
- lib/kitchen/directions/bake_notes/bake_unclassified_notes.rb
|
276
|
+
- lib/kitchen/directions/bake_numbered_exercise/main.rb
|
277
|
+
- lib/kitchen/directions/bake_numbered_exercise/v1.rb
|
249
278
|
- lib/kitchen/directions/bake_numbered_table/main.rb
|
250
279
|
- lib/kitchen/directions/bake_numbered_table/v1.rb
|
251
280
|
- lib/kitchen/directions/bake_page_abstracts.rb
|
252
281
|
- lib/kitchen/directions/bake_preface/main.rb
|
253
282
|
- lib/kitchen/directions/bake_preface/v1.rb
|
283
|
+
- lib/kitchen/directions/bake_problem_first_elements.rb
|
254
284
|
- lib/kitchen/directions/bake_stepwise.rb
|
255
285
|
- lib/kitchen/directions/bake_suggested_reading.rb
|
286
|
+
- lib/kitchen/directions/bake_theorem/main.rb
|
287
|
+
- lib/kitchen/directions/bake_theorem/v1.rb
|
256
288
|
- lib/kitchen/directions/bake_toc.rb
|
257
289
|
- lib/kitchen/directions/bake_unit_title/main.rb
|
258
290
|
- lib/kitchen/directions/bake_unit_title/v1.rb
|
259
291
|
- lib/kitchen/directions/bake_unnumbered_tables.rb
|
292
|
+
- lib/kitchen/directions/eoc_section_title_link_snippet.rb
|
260
293
|
- lib/kitchen/directions/move_title_text_into_span.rb
|
261
294
|
- lib/kitchen/document.rb
|
262
295
|
- lib/kitchen/element.rb
|
@@ -268,6 +301,8 @@ files:
|
|
268
301
|
- lib/kitchen/errors.rb
|
269
302
|
- lib/kitchen/example_element.rb
|
270
303
|
- lib/kitchen/example_element_enumerator.rb
|
304
|
+
- lib/kitchen/exercise_element.rb
|
305
|
+
- lib/kitchen/exercise_element_enumerator.rb
|
271
306
|
- lib/kitchen/figure_element.rb
|
272
307
|
- lib/kitchen/figure_element_enumerator.rb
|
273
308
|
- lib/kitchen/metadata_element.rb
|
@@ -298,6 +333,7 @@ files:
|
|
298
333
|
- lib/kitchen/utils.rb
|
299
334
|
- lib/kitchen/version.rb
|
300
335
|
- lib/locales/en.yml
|
336
|
+
- lib/locales/pl.yml
|
301
337
|
- lib/notes.md
|
302
338
|
- lib/openstax_kitchen.rb
|
303
339
|
- openstax_kitchen.gemspec
|