openstax_kitchen 1.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.devcontainer/devcontainer.json +37 -17
- data/.github/config.yml +14 -0
- data/.github/workflows/tests.yml +5 -15
- data/.gitignore +2 -2
- data/.inch.yml +6 -0
- data/.rubocop.yml +65 -0
- data/CHANGELOG.md +85 -2
- data/Gemfile +5 -3
- data/Gemfile.lock +66 -18
- data/README.md +69 -15
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/docker/Dockerfile +36 -0
- data/docker/Dockerfile.ci +10 -0
- data/docker/bash +5 -1
- data/docker/build +10 -0
- data/docker/ci +15 -0
- data/docker/run +9 -0
- data/docker/tag_and_push_latest +17 -0
- data/lefthook.yml +6 -0
- data/lib/kitchen/ancestor.rb +38 -1
- data/lib/kitchen/book_document.rb +20 -2
- data/lib/kitchen/book_element.rb +40 -5
- data/lib/kitchen/book_element_enumerator.rb +4 -0
- data/lib/kitchen/book_recipe.rb +15 -1
- data/lib/kitchen/chapter_element.rb +43 -6
- data/lib/kitchen/chapter_element_enumerator.rb +9 -1
- data/lib/kitchen/clipboard.rb +35 -4
- data/lib/kitchen/composite_chapter_element.rb +21 -6
- data/lib/kitchen/composite_page_element.rb +35 -7
- data/lib/kitchen/composite_page_element_enumerator.rb +9 -1
- data/lib/kitchen/config.rb +20 -6
- data/lib/kitchen/counter.rb +9 -2
- data/lib/kitchen/debug/print_recipe_error.rb +53 -35
- data/lib/kitchen/directions/.rubocop.yml +22 -0
- data/lib/kitchen/directions/bake_appendix.rb +4 -4
- 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 +7 -7
- data/lib/kitchen/directions/bake_chapter_key_concepts/main.rb +16 -0
- data/lib/kitchen/directions/bake_chapter_key_concepts/v1.rb +35 -0
- data/lib/kitchen/directions/bake_chapter_key_equations.rb +30 -20
- 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 +45 -36
- data/lib/kitchen/directions/bake_chapter_title/main.rb +11 -0
- data/lib/kitchen/directions/bake_chapter_title/v1.rb +24 -0
- data/lib/kitchen/directions/bake_checkpoint.rb +44 -0
- data/lib/kitchen/directions/bake_composite_chapters.rb +14 -0
- data/lib/kitchen/directions/bake_composite_pages.rb +2 -2
- data/lib/kitchen/directions/bake_equations.rb +37 -0
- data/lib/kitchen/directions/bake_example.rb +39 -11
- data/lib/kitchen/directions/bake_figure.rb +8 -5
- data/lib/kitchen/directions/bake_first_elements.rb +16 -0
- data/lib/kitchen/directions/bake_footnotes/main.rb +2 -2
- data/lib/kitchen/directions/bake_footnotes/v1.rb +6 -5
- 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/main.rb +2 -2
- data/lib/kitchen/directions/bake_index/v1.rb +46 -18
- data/lib/kitchen/directions/bake_link_placeholders.rb +24 -0
- data/lib/kitchen/directions/bake_math_in_paragraph.rb +5 -3
- 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 +22 -0
- data/lib/kitchen/directions/bake_notes/bake_numbered_notes.rb +51 -0
- data/lib/kitchen/directions/bake_notes/bake_unclassified_notes.rb +30 -0
- data/lib/kitchen/directions/bake_numbered_exercise/main.rb +15 -0
- data/lib/kitchen/directions/bake_numbered_exercise/v1.rb +47 -0
- data/lib/kitchen/directions/bake_numbered_table/main.rb +4 -4
- data/lib/kitchen/directions/bake_numbered_table/v1.rb +37 -18
- data/lib/kitchen/directions/bake_page_abstracts.rb +30 -0
- data/lib/kitchen/directions/bake_preface/main.rb +11 -0
- data/lib/kitchen/directions/bake_preface/v1.rb +18 -0
- 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_stepwise.rb +8 -12
- data/lib/kitchen/directions/bake_suggested_reading.rb +31 -0
- 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 +49 -22
- data/lib/kitchen/directions/bake_unit_title/main.rb +11 -0
- data/lib/kitchen/directions/bake_unit_title/v1.rb +23 -0
- data/lib/kitchen/directions/bake_unnumbered_tables.rb +7 -5
- data/lib/kitchen/directions/book_answer_key_container/eob_solutions_container.xhtml.erb +9 -0
- data/lib/kitchen/directions/book_answer_key_container/main.rb +11 -0
- data/lib/kitchen/directions/book_answer_key_container/v1.rb +13 -0
- data/lib/kitchen/directions/chapter_review_container/chapter_review.xhtml.erb +9 -0
- data/lib/kitchen/directions/chapter_review_container/main.rb +11 -0
- data/lib/kitchen/directions/chapter_review_container/v1.rb +13 -0
- data/lib/kitchen/directions/eoc_section_title_link_snippet.rb +20 -0
- data/lib/kitchen/directions/move_exercises_to_eoc/main.rb +27 -0
- data/lib/kitchen/directions/move_exercises_to_eoc/v1.rb +36 -0
- data/lib/kitchen/directions/move_exercises_to_eoc/v2.rb +49 -0
- data/lib/kitchen/directions/move_solutions_to_answer_key/main.rb +14 -0
- data/lib/kitchen/directions/move_solutions_to_answer_key/strategies/american_government.rb +19 -0
- data/lib/kitchen/directions/move_solutions_to_answer_key/strategies/calculus.rb +41 -0
- data/lib/kitchen/directions/move_solutions_to_answer_key/strategies/uphysics.rb +63 -0
- data/lib/kitchen/directions/move_solutions_to_answer_key/v1.rb +34 -0
- data/lib/kitchen/directions/move_title_text_into_span.rb +2 -2
- data/lib/kitchen/document.rb +83 -13
- data/lib/kitchen/element.rb +20 -3
- data/lib/kitchen/element_base.rb +373 -63
- data/lib/kitchen/element_enumerator.rb +8 -0
- data/lib/kitchen/element_enumerator_base.rb +297 -28
- data/lib/kitchen/element_enumerator_factory.rb +64 -53
- data/lib/kitchen/element_factory.rb +27 -12
- data/lib/kitchen/errors.rb +5 -0
- data/lib/kitchen/example_element.rb +21 -6
- data/lib/kitchen/example_element_enumerator.rb +9 -1
- data/lib/kitchen/exercise_element.rb +42 -0
- data/lib/kitchen/exercise_element_enumerator.rb +21 -0
- data/lib/kitchen/figure_element.rb +36 -5
- data/lib/kitchen/figure_element_enumerator.rb +9 -1
- data/lib/kitchen/metadata_element.rb +34 -0
- data/lib/kitchen/metadata_element_enumerator.rb +21 -0
- data/lib/kitchen/mixins/block_error_if.rb +24 -4
- data/lib/kitchen/note_element.rb +48 -20
- data/lib/kitchen/note_element_enumerator.rb +9 -1
- data/lib/kitchen/oven.rb +66 -15
- data/lib/kitchen/page_element.rb +84 -14
- data/lib/kitchen/page_element_enumerator.rb +9 -1
- data/lib/kitchen/pantry.rb +28 -1
- data/lib/kitchen/patches/nokogiri.rb +19 -2
- data/lib/kitchen/patches/renderable.rb +9 -3
- data/lib/kitchen/patches/string.rb +8 -0
- data/lib/kitchen/recipe.rb +69 -32
- data/lib/kitchen/reference_element.rb +27 -0
- data/lib/kitchen/references_element_enumerator.rb +20 -0
- data/lib/kitchen/search_history.rb +43 -4
- data/lib/kitchen/search_query.rb +106 -0
- data/lib/kitchen/selector.rb +24 -0
- data/lib/kitchen/selectors/base.rb +65 -0
- data/lib/kitchen/selectors/standard_1.rb +21 -0
- data/lib/kitchen/table_element.rb +55 -7
- data/lib/kitchen/table_element_enumerator.rb +9 -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 +15 -4
- data/lib/kitchen/term_element_enumerator.rb +9 -1
- data/lib/kitchen/transliterations.rb +7 -5
- data/lib/kitchen/type_casting_element_enumerator.rb +17 -1
- data/lib/kitchen/unit_element.rb +45 -0
- data/lib/kitchen/unit_element_enumerator.rb +20 -0
- data/lib/kitchen/utils.rb +10 -13
- data/lib/kitchen/version.rb +5 -1
- data/lib/locales/en.yml +18 -7
- data/lib/locales/pl.yml +24 -0
- data/lib/openstax_kitchen.rb +59 -0
- data/openstax_kitchen.gemspec +26 -20
- data/tutorials/00/solution1.rb +9 -0
- data/tutorials/00/solution2.rb +8 -0
- data/tutorials/01/solution1.rb +18 -0
- data/tutorials/01/solution2.rb +26 -0
- data/tutorials/02/solution1.rb +31 -0
- data/tutorials/03/{solution_1.rb → solution1.rb} +6 -4
- data/tutorials/03/solution2.rb +18 -0
- data/tutorials/04/{solution_1.rb → solution1.rb} +4 -2
- data/tutorials/04/{solution_2.rb → solution2.rb} +6 -4
- data/tutorials/05/solution1.rb +11 -0
- data/tutorials/check_it +16 -15
- data/tutorials/setup_my_recipes +7 -6
- metadata +148 -27
- data/Dockerfile +0 -19
- data/bin/normalize +0 -79
- data/books/chemistry2e/bake.rb +0 -133
- data/docker-compose.yml +0 -12
- data/docker/entrypoint +0 -9
- data/lib/kitchen.rb +0 -57
- data/lib/kitchen/directions/bake_chapter_glossary.rb +0 -34
- data/lib/kitchen/directions/bake_exercises.rb +0 -164
- data/lib/kitchen/directions/bake_notes.rb +0 -58
- data/tutorials/00/solution_1.rb +0 -7
- data/tutorials/00/solution_2.rb +0 -6
- data/tutorials/01/solution_1.rb +0 -16
- data/tutorials/01/solution_2.rb +0 -24
- data/tutorials/02/solution_1.rb +0 -29
- data/tutorials/03/solution_2.rb +0 -15
- data/tutorials/05/solution_1.rb +0 -9
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
@solution1 = Kitchen::Recipe.new do |doc|
|
4
|
+
|
5
|
+
doc.search("[data-type='chapter']").each do |chapter|
|
6
|
+
movers = chapter.search('.will-move').cut
|
7
|
+
movers.each { |mover| mover.name = 'section' }
|
8
|
+
|
9
|
+
chapter.append(child: <<~HTML
|
10
|
+
<div class="eoc">
|
11
|
+
<div class="os-title">End of Chapter Collations</div>
|
12
|
+
#{movers.paste}
|
13
|
+
</div>
|
14
|
+
HTML
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
@solution2 = Kitchen::BookRecipe.new do |doc|
|
4
|
+
|
5
|
+
# ^
|
6
|
+
# |
|
7
|
+
#
|
8
|
+
# BookRecipe gives us `doc.book` and `book.chapters` to make the code cleaner
|
9
|
+
#
|
10
|
+
# | |
|
11
|
+
# v v
|
12
|
+
|
13
|
+
doc.book.chapters.each do |chapter|
|
14
|
+
movers = chapter.search('.will-move').cut
|
15
|
+
movers.each { |mover| mover.name = 'section' }
|
16
|
+
|
17
|
+
chapter.append(child: <<~HTML
|
18
|
+
<div class="eoc">
|
19
|
+
<div class="os-title">End of Chapter Collations</div>
|
20
|
+
#{movers.paste}
|
21
|
+
</div>
|
22
|
+
HTML
|
23
|
+
)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
@solution1 = Kitchen::Recipe.new do |doc|
|
4
|
+
|
5
|
+
doc.search("[data-type='chapter']").each do |chapter|
|
6
|
+
review_questions = chapter.search('.review-questions').cut
|
7
|
+
critical_thinking = chapter.search('.critical-thinking').cut
|
8
|
+
|
9
|
+
[review_questions, critical_thinking].each do |clipboard|
|
10
|
+
clipboard.each do |element|
|
11
|
+
element.first('h3').trash
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
chapter.append(child: <<~HTML
|
16
|
+
<div class="eoc">
|
17
|
+
<h2 data-type="document-title">End of Chapter Stuff</h2>
|
18
|
+
<div class="critical-thinking-container">
|
19
|
+
<div class="os-title">Critical Thinking Questions</div>
|
20
|
+
#{critical_thinking.paste}
|
21
|
+
</div>
|
22
|
+
<div class="review-questions-container">
|
23
|
+
<div class="os-title">Review Questions</div>
|
24
|
+
#{review_questions.paste}
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
HTML
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
@@ -1,15 +1,17 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
@solution1 = Kitchen::BookRecipe.new do |doc|
|
2
4
|
book = doc.book
|
3
5
|
|
4
6
|
book.chapters.each do |chapter|
|
5
7
|
chapter.prepend(child: <<~HTML
|
6
|
-
|
7
|
-
|
8
|
+
<h1 data-type="document-title">Chapter #{chapter.count_in(:book)}</h1>
|
9
|
+
HTML
|
8
10
|
)
|
9
11
|
|
10
12
|
chapter.pages.each do |page|
|
11
13
|
page_title = page.title
|
12
|
-
page_title.name =
|
14
|
+
page_title.name = 'h2'
|
13
15
|
page_title.prepend(child: "#{chapter.count_in(:book)}.#{page.count_in(:chapter)} ")
|
14
16
|
end
|
15
17
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
@solution2 = Kitchen::BookRecipe.new do |doc|
|
4
|
+
book = doc.book
|
5
|
+
|
6
|
+
book.chapters.each do |chapter|
|
7
|
+
chapter.prepend(child: <<~HTML
|
8
|
+
<h1 data-type="document-title">Chapter #{chapter.count_in(:book)}</h1>
|
9
|
+
HTML
|
10
|
+
)
|
11
|
+
|
12
|
+
chapter.pages.each do |page|
|
13
|
+
page.title
|
14
|
+
.set(:name, 'h2')
|
15
|
+
.prepend(child: "#{chapter.count_in(:book)}.#{page.count_in(:chapter)} ")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
@solution1 = Kitchen::BookRecipe.new do |doc|
|
2
4
|
book = doc.book
|
3
5
|
|
4
6
|
book.tables.each do |table|
|
@@ -13,7 +15,7 @@
|
|
13
15
|
doc.pantry(name: :link_text).store figure_name, label: figure.id
|
14
16
|
end
|
15
17
|
|
16
|
-
book.search(
|
18
|
+
book.search('a.needs-label').each do |anchor|
|
17
19
|
id = anchor[:href][1..-1]
|
18
20
|
anchor.replace_children(with: doc.pantry(name: :link_text).get(id))
|
19
21
|
end
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
@solution2 = Kitchen::BookRecipe.new do |doc|
|
2
4
|
book = doc.book
|
3
5
|
|
4
6
|
# Solution 1 treats figures and tables almost identically and ends up duplicating
|
@@ -6,8 +8,8 @@
|
|
6
8
|
# enumerator and the label):
|
7
9
|
|
8
10
|
enumerators_to_labels_map = {
|
9
|
-
book.tables =>
|
10
|
-
book.figures =>
|
11
|
+
book.tables => 'Table',
|
12
|
+
book.figures => 'Figure'
|
11
13
|
}
|
12
14
|
|
13
15
|
enumerators_to_labels_map.each do |enumerator, label|
|
@@ -18,7 +20,7 @@
|
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
21
|
-
book.search(
|
23
|
+
book.search('a.needs-label').each do |anchor|
|
22
24
|
id = anchor[:href][1..-1]
|
23
25
|
anchor.replace_children(with: doc.pantry(name: :link_text).get(id))
|
24
26
|
end
|
data/tutorials/check_it
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'openstax_kitchen'
|
6
|
+
require 'rspec'
|
7
|
+
require 'byebug'
|
8
|
+
require 'rainbow'
|
8
9
|
|
9
10
|
def parse_doc(filename)
|
10
|
-
Nokogiri::XML(File.open(filename)){|config| config.noblanks}
|
11
|
+
Nokogiri::XML(File.open(filename)) { |config| config.noblanks }
|
11
12
|
end
|
12
13
|
|
13
14
|
def parse_doc_and_prep_for_diff(filename)
|
14
15
|
doc = parse_doc(filename)
|
15
16
|
string = doc.to_xhtml
|
16
17
|
# Get rid of whitespace at the start of lines (remove impact of indentation)
|
17
|
-
string.gsub(/^\s*/,
|
18
|
+
string.gsub(/^\s*/, '')
|
18
19
|
end
|
19
20
|
|
20
21
|
if ARGV.empty?
|
@@ -25,12 +26,12 @@ end
|
|
25
26
|
|
26
27
|
tutorial_number = ARGV[0]
|
27
28
|
|
28
|
-
Dir[File.expand_path(__dir__ + "/#{tutorial_number}/*.rb")].each{|f| require f}
|
29
|
+
Dir[File.expand_path(__dir__ + "/#{tutorial_number}/*.rb")].sort.each { |f| require f }
|
29
30
|
|
30
|
-
recipe_name = (ARGV[1] ||
|
31
|
+
recipe_name = (ARGV[1] || 'my_recipe')
|
31
32
|
recipe_variable_name = "@#{recipe_name}".to_sym
|
32
33
|
|
33
|
-
|
34
|
+
unless instance_variables.include?(recipe_variable_name)
|
34
35
|
puts Rainbow("There is no recipe named '#{recipe_variable_name}' defined in the " \
|
35
36
|
"tutorials/#{tutorial_number} directory").red
|
36
37
|
exit(1)
|
@@ -51,14 +52,14 @@ differ = RSpec::Support::Differ.new(color: true)
|
|
51
52
|
diff = differ.diff(expected, actual)
|
52
53
|
|
53
54
|
# Get rid of some coloring junk at the start
|
54
|
-
diff.sub!(/\e\[0m\n\e\[0m/,
|
55
|
+
diff.sub!(/\e\[0m\n\e\[0m/, '')
|
55
56
|
|
56
57
|
if diff.blank?
|
57
|
-
puts Rainbow(
|
58
|
+
puts Rainbow('The actual output matches the expected output! Way to go!').green
|
58
59
|
else
|
59
|
-
puts Rainbow(
|
60
|
-
puts Rainbow(
|
61
|
-
puts Rainbow(
|
60
|
+
puts Rainbow('The actual output does not match the expected output.').yellow
|
61
|
+
puts "#{Rainbow('-').red} = actual output"
|
62
|
+
puts "#{Rainbow('+').green} = expected output"
|
62
63
|
puts "\n"
|
63
64
|
puts diff
|
64
65
|
end
|
data/tutorials/setup_my_recipes
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'byebug'
|
6
|
+
require 'rainbow'
|
6
7
|
|
7
8
|
Dir.chdir(__dir__)
|
8
|
-
tutorial_numbers = Dir.glob(
|
9
|
+
tutorial_numbers = Dir.glob('*').select { |f| File.directory?(f) && f.match?(/\d\d/) }
|
9
10
|
|
10
11
|
tutorial_numbers.each do |tutorial_number|
|
11
12
|
file_name = File.expand_path("#{tutorial_number}/my_recipe.rb", __dir__)
|
12
13
|
if File.exist?(file_name)
|
13
|
-
puts "Skipped making recipe skeleton; my_recipe.rb exists in tutorials folder
|
14
|
+
puts "Skipped making recipe skeleton; my_recipe.rb exists in tutorials folder #{tutorial_number}"
|
14
15
|
next
|
15
16
|
else
|
16
|
-
File.open(file_name,
|
17
|
+
File.open(file_name, 'w') do |f|
|
17
18
|
f.write <<~CONTENTS
|
18
19
|
# This file is IGNORED by Git
|
19
20
|
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstax_kitchen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.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:
|
11
|
+
date: 2021-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: i18n
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: nokogiri
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rainbow
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: inch
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -122,6 +122,62 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-rake
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop-rspec
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: yard
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
125
181
|
description: OpenStax content baking library
|
126
182
|
email:
|
127
183
|
- jpslav@gmail.com
|
@@ -130,27 +186,31 @@ extensions: []
|
|
130
186
|
extra_rdoc_files: []
|
131
187
|
files:
|
132
188
|
- ".devcontainer/devcontainer.json"
|
189
|
+
- ".github/config.yml"
|
133
190
|
- ".github/workflows/tests.yml"
|
134
191
|
- ".gitignore"
|
192
|
+
- ".inch.yml"
|
135
193
|
- ".rspec"
|
194
|
+
- ".rubocop.yml"
|
136
195
|
- ".solargraph.yml"
|
137
196
|
- CHANGELOG.md
|
138
197
|
- CODE_OF_CONDUCT.md
|
139
|
-
- Dockerfile
|
140
198
|
- Gemfile
|
141
199
|
- Gemfile.lock
|
142
200
|
- LICENSE.txt
|
143
201
|
- README.md
|
144
202
|
- Rakefile
|
145
203
|
- bin/console
|
146
|
-
- bin/normalize
|
147
204
|
- bin/setup
|
148
|
-
- books/chemistry2e/bake.rb
|
149
205
|
- codecov.yaml
|
150
|
-
- docker
|
206
|
+
- docker/Dockerfile
|
207
|
+
- docker/Dockerfile.ci
|
151
208
|
- docker/bash
|
152
|
-
- docker/
|
153
|
-
-
|
209
|
+
- docker/build
|
210
|
+
- docker/ci
|
211
|
+
- docker/run
|
212
|
+
- docker/tag_and_push_latest
|
213
|
+
- lefthook.yml
|
154
214
|
- lib/kitchen/ancestor.rb
|
155
215
|
- lib/kitchen/book_document.rb
|
156
216
|
- lib/kitchen/book_element.rb
|
@@ -165,27 +225,74 @@ files:
|
|
165
225
|
- lib/kitchen/config.rb
|
166
226
|
- lib/kitchen/counter.rb
|
167
227
|
- lib/kitchen/debug/print_recipe_error.rb
|
228
|
+
- lib/kitchen/directions/.rubocop.yml
|
168
229
|
- lib/kitchen/directions/bake_appendix.rb
|
169
|
-
- lib/kitchen/directions/bake_chapter_glossary.rb
|
230
|
+
- lib/kitchen/directions/bake_chapter_glossary/main.rb
|
231
|
+
- lib/kitchen/directions/bake_chapter_glossary/v1.rb
|
170
232
|
- lib/kitchen/directions/bake_chapter_introductions.rb
|
233
|
+
- lib/kitchen/directions/bake_chapter_key_concepts/main.rb
|
234
|
+
- lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
|
171
235
|
- lib/kitchen/directions/bake_chapter_key_equations.rb
|
236
|
+
- lib/kitchen/directions/bake_chapter_section_exercises/main.rb
|
237
|
+
- lib/kitchen/directions/bake_chapter_section_exercises/v1.rb
|
172
238
|
- lib/kitchen/directions/bake_chapter_summary.rb
|
239
|
+
- lib/kitchen/directions/bake_chapter_title/main.rb
|
240
|
+
- lib/kitchen/directions/bake_chapter_title/v1.rb
|
241
|
+
- lib/kitchen/directions/bake_checkpoint.rb
|
242
|
+
- lib/kitchen/directions/bake_composite_chapters.rb
|
173
243
|
- lib/kitchen/directions/bake_composite_pages.rb
|
244
|
+
- lib/kitchen/directions/bake_equations.rb
|
174
245
|
- lib/kitchen/directions/bake_example.rb
|
175
|
-
- lib/kitchen/directions/bake_exercises.rb
|
176
246
|
- lib/kitchen/directions/bake_figure.rb
|
247
|
+
- lib/kitchen/directions/bake_first_elements.rb
|
177
248
|
- lib/kitchen/directions/bake_footnotes/main.rb
|
178
249
|
- lib/kitchen/directions/bake_footnotes/v1.rb
|
250
|
+
- lib/kitchen/directions/bake_free_response/free_response.xhtml.erb
|
251
|
+
- lib/kitchen/directions/bake_free_response/main.rb
|
252
|
+
- lib/kitchen/directions/bake_free_response/v1.rb
|
253
|
+
- lib/kitchen/directions/bake_further_research.rb
|
179
254
|
- lib/kitchen/directions/bake_index/main.rb
|
180
255
|
- lib/kitchen/directions/bake_index/v1.rb
|
181
256
|
- lib/kitchen/directions/bake_index/v1.xhtml.erb
|
257
|
+
- lib/kitchen/directions/bake_link_placeholders.rb
|
182
258
|
- lib/kitchen/directions/bake_math_in_paragraph.rb
|
183
|
-
- lib/kitchen/directions/
|
259
|
+
- lib/kitchen/directions/bake_non_introduction_pages.rb
|
260
|
+
- lib/kitchen/directions/bake_notes/bake_autotitled_notes.rb
|
261
|
+
- lib/kitchen/directions/bake_notes/bake_note_subtitle.rb
|
262
|
+
- lib/kitchen/directions/bake_notes/bake_numbered_notes.rb
|
263
|
+
- lib/kitchen/directions/bake_notes/bake_unclassified_notes.rb
|
264
|
+
- lib/kitchen/directions/bake_numbered_exercise/main.rb
|
265
|
+
- lib/kitchen/directions/bake_numbered_exercise/v1.rb
|
184
266
|
- lib/kitchen/directions/bake_numbered_table/main.rb
|
185
267
|
- lib/kitchen/directions/bake_numbered_table/v1.rb
|
268
|
+
- lib/kitchen/directions/bake_page_abstracts.rb
|
269
|
+
- lib/kitchen/directions/bake_preface/main.rb
|
270
|
+
- lib/kitchen/directions/bake_preface/v1.rb
|
271
|
+
- lib/kitchen/directions/bake_references/main.rb
|
272
|
+
- lib/kitchen/directions/bake_references/v1.rb
|
186
273
|
- lib/kitchen/directions/bake_stepwise.rb
|
274
|
+
- lib/kitchen/directions/bake_suggested_reading.rb
|
275
|
+
- lib/kitchen/directions/bake_theorem/main.rb
|
276
|
+
- lib/kitchen/directions/bake_theorem/v1.rb
|
187
277
|
- lib/kitchen/directions/bake_toc.rb
|
278
|
+
- lib/kitchen/directions/bake_unit_title/main.rb
|
279
|
+
- lib/kitchen/directions/bake_unit_title/v1.rb
|
188
280
|
- lib/kitchen/directions/bake_unnumbered_tables.rb
|
281
|
+
- lib/kitchen/directions/book_answer_key_container/eob_solutions_container.xhtml.erb
|
282
|
+
- lib/kitchen/directions/book_answer_key_container/main.rb
|
283
|
+
- lib/kitchen/directions/book_answer_key_container/v1.rb
|
284
|
+
- lib/kitchen/directions/chapter_review_container/chapter_review.xhtml.erb
|
285
|
+
- lib/kitchen/directions/chapter_review_container/main.rb
|
286
|
+
- lib/kitchen/directions/chapter_review_container/v1.rb
|
287
|
+
- lib/kitchen/directions/eoc_section_title_link_snippet.rb
|
288
|
+
- lib/kitchen/directions/move_exercises_to_eoc/main.rb
|
289
|
+
- lib/kitchen/directions/move_exercises_to_eoc/v1.rb
|
290
|
+
- lib/kitchen/directions/move_exercises_to_eoc/v2.rb
|
291
|
+
- lib/kitchen/directions/move_solutions_to_answer_key/main.rb
|
292
|
+
- lib/kitchen/directions/move_solutions_to_answer_key/strategies/american_government.rb
|
293
|
+
- lib/kitchen/directions/move_solutions_to_answer_key/strategies/calculus.rb
|
294
|
+
- lib/kitchen/directions/move_solutions_to_answer_key/strategies/uphysics.rb
|
295
|
+
- lib/kitchen/directions/move_solutions_to_answer_key/v1.rb
|
189
296
|
- lib/kitchen/directions/move_title_text_into_span.rb
|
190
297
|
- lib/kitchen/document.rb
|
191
298
|
- lib/kitchen/element.rb
|
@@ -197,8 +304,12 @@ files:
|
|
197
304
|
- lib/kitchen/errors.rb
|
198
305
|
- lib/kitchen/example_element.rb
|
199
306
|
- lib/kitchen/example_element_enumerator.rb
|
307
|
+
- lib/kitchen/exercise_element.rb
|
308
|
+
- lib/kitchen/exercise_element_enumerator.rb
|
200
309
|
- lib/kitchen/figure_element.rb
|
201
310
|
- lib/kitchen/figure_element_enumerator.rb
|
311
|
+
- lib/kitchen/metadata_element.rb
|
312
|
+
- lib/kitchen/metadata_element_enumerator.rb
|
202
313
|
- lib/kitchen/mixins/block_error_if.rb
|
203
314
|
- lib/kitchen/note_element.rb
|
204
315
|
- lib/kitchen/note_element_enumerator.rb
|
@@ -210,42 +321,52 @@ files:
|
|
210
321
|
- lib/kitchen/patches/renderable.rb
|
211
322
|
- lib/kitchen/patches/string.rb
|
212
323
|
- lib/kitchen/recipe.rb
|
324
|
+
- lib/kitchen/reference_element.rb
|
325
|
+
- lib/kitchen/references_element_enumerator.rb
|
213
326
|
- lib/kitchen/search_history.rb
|
327
|
+
- lib/kitchen/search_query.rb
|
328
|
+
- lib/kitchen/selector.rb
|
214
329
|
- lib/kitchen/selectors/base.rb
|
215
330
|
- lib/kitchen/selectors/standard_1.rb
|
216
331
|
- lib/kitchen/table_element.rb
|
217
332
|
- lib/kitchen/table_element_enumerator.rb
|
333
|
+
- lib/kitchen/templates/eob_section_title_template.xhtml.erb
|
334
|
+
- lib/kitchen/templates/eoc_section_title_template.xhtml.erb
|
218
335
|
- lib/kitchen/term_element.rb
|
219
336
|
- lib/kitchen/term_element_enumerator.rb
|
220
337
|
- lib/kitchen/transliterations.rb
|
221
338
|
- lib/kitchen/type_casting_element_enumerator.rb
|
339
|
+
- lib/kitchen/unit_element.rb
|
340
|
+
- lib/kitchen/unit_element_enumerator.rb
|
222
341
|
- lib/kitchen/utils.rb
|
223
342
|
- lib/kitchen/version.rb
|
224
343
|
- lib/locales/en.yml
|
344
|
+
- lib/locales/pl.yml
|
225
345
|
- lib/notes.md
|
346
|
+
- lib/openstax_kitchen.rb
|
226
347
|
- openstax_kitchen.gemspec
|
227
348
|
- tutorials/00/expected_baked.html
|
228
349
|
- tutorials/00/raw.html
|
229
|
-
- tutorials/00/
|
230
|
-
- tutorials/00/
|
350
|
+
- tutorials/00/solution1.rb
|
351
|
+
- tutorials/00/solution2.rb
|
231
352
|
- tutorials/01/expected_baked.html
|
232
353
|
- tutorials/01/raw.html
|
233
|
-
- tutorials/01/
|
234
|
-
- tutorials/01/
|
354
|
+
- tutorials/01/solution1.rb
|
355
|
+
- tutorials/01/solution2.rb
|
235
356
|
- tutorials/02/expected_baked.html
|
236
357
|
- tutorials/02/raw.html
|
237
|
-
- tutorials/02/
|
358
|
+
- tutorials/02/solution1.rb
|
238
359
|
- tutorials/03/expected_baked.html
|
239
360
|
- tutorials/03/raw.html
|
240
|
-
- tutorials/03/
|
241
|
-
- tutorials/03/
|
361
|
+
- tutorials/03/solution1.rb
|
362
|
+
- tutorials/03/solution2.rb
|
242
363
|
- tutorials/04/expected_baked.html
|
243
364
|
- tutorials/04/raw.html
|
244
|
-
- tutorials/04/
|
245
|
-
- tutorials/04/
|
365
|
+
- tutorials/04/solution1.rb
|
366
|
+
- tutorials/04/solution2.rb
|
246
367
|
- tutorials/05/expected_baked.html
|
247
368
|
- tutorials/05/raw.html
|
248
|
-
- tutorials/05/
|
369
|
+
- tutorials/05/solution1.rb
|
249
370
|
- tutorials/check_it
|
250
371
|
- tutorials/setup_my_recipes
|
251
372
|
homepage: https://github.com/openstax/kitchen
|
@@ -264,7 +385,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
264
385
|
requirements:
|
265
386
|
- - ">="
|
266
387
|
- !ruby/object:Gem::Version
|
267
|
-
version: 2.
|
388
|
+
version: 2.4.0
|
268
389
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
269
390
|
requirements:
|
270
391
|
- - ">="
|