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.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/.devcontainer/devcontainer.json +37 -17
  3. data/.github/config.yml +14 -0
  4. data/.github/workflows/tests.yml +5 -15
  5. data/.gitignore +2 -2
  6. data/.inch.yml +6 -0
  7. data/.rubocop.yml +65 -0
  8. data/CHANGELOG.md +85 -2
  9. data/Gemfile +5 -3
  10. data/Gemfile.lock +66 -18
  11. data/README.md +69 -15
  12. data/Rakefile +5 -3
  13. data/bin/console +4 -3
  14. data/docker/Dockerfile +36 -0
  15. data/docker/Dockerfile.ci +10 -0
  16. data/docker/bash +5 -1
  17. data/docker/build +10 -0
  18. data/docker/ci +15 -0
  19. data/docker/run +9 -0
  20. data/docker/tag_and_push_latest +17 -0
  21. data/lefthook.yml +6 -0
  22. data/lib/kitchen/ancestor.rb +38 -1
  23. data/lib/kitchen/book_document.rb +20 -2
  24. data/lib/kitchen/book_element.rb +40 -5
  25. data/lib/kitchen/book_element_enumerator.rb +4 -0
  26. data/lib/kitchen/book_recipe.rb +15 -1
  27. data/lib/kitchen/chapter_element.rb +43 -6
  28. data/lib/kitchen/chapter_element_enumerator.rb +9 -1
  29. data/lib/kitchen/clipboard.rb +35 -4
  30. data/lib/kitchen/composite_chapter_element.rb +21 -6
  31. data/lib/kitchen/composite_page_element.rb +35 -7
  32. data/lib/kitchen/composite_page_element_enumerator.rb +9 -1
  33. data/lib/kitchen/config.rb +20 -6
  34. data/lib/kitchen/counter.rb +9 -2
  35. data/lib/kitchen/debug/print_recipe_error.rb +53 -35
  36. data/lib/kitchen/directions/.rubocop.yml +22 -0
  37. data/lib/kitchen/directions/bake_appendix.rb +4 -4
  38. data/lib/kitchen/directions/bake_chapter_glossary/main.rb +18 -0
  39. data/lib/kitchen/directions/bake_chapter_glossary/v1.rb +30 -0
  40. data/lib/kitchen/directions/bake_chapter_introductions.rb +7 -7
  41. data/lib/kitchen/directions/bake_chapter_key_concepts/main.rb +16 -0
  42. data/lib/kitchen/directions/bake_chapter_key_concepts/v1.rb +35 -0
  43. data/lib/kitchen/directions/bake_chapter_key_equations.rb +30 -20
  44. data/lib/kitchen/directions/bake_chapter_section_exercises/main.rb +11 -0
  45. data/lib/kitchen/directions/bake_chapter_section_exercises/v1.rb +28 -0
  46. data/lib/kitchen/directions/bake_chapter_summary.rb +45 -36
  47. data/lib/kitchen/directions/bake_chapter_title/main.rb +11 -0
  48. data/lib/kitchen/directions/bake_chapter_title/v1.rb +24 -0
  49. data/lib/kitchen/directions/bake_checkpoint.rb +44 -0
  50. data/lib/kitchen/directions/bake_composite_chapters.rb +14 -0
  51. data/lib/kitchen/directions/bake_composite_pages.rb +2 -2
  52. data/lib/kitchen/directions/bake_equations.rb +37 -0
  53. data/lib/kitchen/directions/bake_example.rb +39 -11
  54. data/lib/kitchen/directions/bake_figure.rb +8 -5
  55. data/lib/kitchen/directions/bake_first_elements.rb +16 -0
  56. data/lib/kitchen/directions/bake_footnotes/main.rb +2 -2
  57. data/lib/kitchen/directions/bake_footnotes/v1.rb +6 -5
  58. data/lib/kitchen/directions/bake_free_response/free_response.xhtml.erb +10 -0
  59. data/lib/kitchen/directions/bake_free_response/main.rb +11 -0
  60. data/lib/kitchen/directions/bake_free_response/v1.rb +29 -0
  61. data/lib/kitchen/directions/bake_further_research.rb +59 -0
  62. data/lib/kitchen/directions/bake_index/main.rb +2 -2
  63. data/lib/kitchen/directions/bake_index/v1.rb +46 -18
  64. data/lib/kitchen/directions/bake_link_placeholders.rb +24 -0
  65. data/lib/kitchen/directions/bake_math_in_paragraph.rb +5 -3
  66. data/lib/kitchen/directions/bake_non_introduction_pages.rb +26 -0
  67. data/lib/kitchen/directions/bake_notes/bake_autotitled_notes.rb +29 -0
  68. data/lib/kitchen/directions/bake_notes/bake_note_subtitle.rb +22 -0
  69. data/lib/kitchen/directions/bake_notes/bake_numbered_notes.rb +51 -0
  70. data/lib/kitchen/directions/bake_notes/bake_unclassified_notes.rb +30 -0
  71. data/lib/kitchen/directions/bake_numbered_exercise/main.rb +15 -0
  72. data/lib/kitchen/directions/bake_numbered_exercise/v1.rb +47 -0
  73. data/lib/kitchen/directions/bake_numbered_table/main.rb +4 -4
  74. data/lib/kitchen/directions/bake_numbered_table/v1.rb +37 -18
  75. data/lib/kitchen/directions/bake_page_abstracts.rb +30 -0
  76. data/lib/kitchen/directions/bake_preface/main.rb +11 -0
  77. data/lib/kitchen/directions/bake_preface/v1.rb +18 -0
  78. data/lib/kitchen/directions/bake_references/main.rb +16 -0
  79. data/lib/kitchen/directions/bake_references/v1.rb +48 -0
  80. data/lib/kitchen/directions/bake_stepwise.rb +8 -12
  81. data/lib/kitchen/directions/bake_suggested_reading.rb +31 -0
  82. data/lib/kitchen/directions/bake_theorem/main.rb +11 -0
  83. data/lib/kitchen/directions/bake_theorem/v1.rb +28 -0
  84. data/lib/kitchen/directions/bake_toc.rb +49 -22
  85. data/lib/kitchen/directions/bake_unit_title/main.rb +11 -0
  86. data/lib/kitchen/directions/bake_unit_title/v1.rb +23 -0
  87. data/lib/kitchen/directions/bake_unnumbered_tables.rb +7 -5
  88. data/lib/kitchen/directions/book_answer_key_container/eob_solutions_container.xhtml.erb +9 -0
  89. data/lib/kitchen/directions/book_answer_key_container/main.rb +11 -0
  90. data/lib/kitchen/directions/book_answer_key_container/v1.rb +13 -0
  91. data/lib/kitchen/directions/chapter_review_container/chapter_review.xhtml.erb +9 -0
  92. data/lib/kitchen/directions/chapter_review_container/main.rb +11 -0
  93. data/lib/kitchen/directions/chapter_review_container/v1.rb +13 -0
  94. data/lib/kitchen/directions/eoc_section_title_link_snippet.rb +20 -0
  95. data/lib/kitchen/directions/move_exercises_to_eoc/main.rb +27 -0
  96. data/lib/kitchen/directions/move_exercises_to_eoc/v1.rb +36 -0
  97. data/lib/kitchen/directions/move_exercises_to_eoc/v2.rb +49 -0
  98. data/lib/kitchen/directions/move_solutions_to_answer_key/main.rb +14 -0
  99. data/lib/kitchen/directions/move_solutions_to_answer_key/strategies/american_government.rb +19 -0
  100. data/lib/kitchen/directions/move_solutions_to_answer_key/strategies/calculus.rb +41 -0
  101. data/lib/kitchen/directions/move_solutions_to_answer_key/strategies/uphysics.rb +63 -0
  102. data/lib/kitchen/directions/move_solutions_to_answer_key/v1.rb +34 -0
  103. data/lib/kitchen/directions/move_title_text_into_span.rb +2 -2
  104. data/lib/kitchen/document.rb +83 -13
  105. data/lib/kitchen/element.rb +20 -3
  106. data/lib/kitchen/element_base.rb +373 -63
  107. data/lib/kitchen/element_enumerator.rb +8 -0
  108. data/lib/kitchen/element_enumerator_base.rb +297 -28
  109. data/lib/kitchen/element_enumerator_factory.rb +64 -53
  110. data/lib/kitchen/element_factory.rb +27 -12
  111. data/lib/kitchen/errors.rb +5 -0
  112. data/lib/kitchen/example_element.rb +21 -6
  113. data/lib/kitchen/example_element_enumerator.rb +9 -1
  114. data/lib/kitchen/exercise_element.rb +42 -0
  115. data/lib/kitchen/exercise_element_enumerator.rb +21 -0
  116. data/lib/kitchen/figure_element.rb +36 -5
  117. data/lib/kitchen/figure_element_enumerator.rb +9 -1
  118. data/lib/kitchen/metadata_element.rb +34 -0
  119. data/lib/kitchen/metadata_element_enumerator.rb +21 -0
  120. data/lib/kitchen/mixins/block_error_if.rb +24 -4
  121. data/lib/kitchen/note_element.rb +48 -20
  122. data/lib/kitchen/note_element_enumerator.rb +9 -1
  123. data/lib/kitchen/oven.rb +66 -15
  124. data/lib/kitchen/page_element.rb +84 -14
  125. data/lib/kitchen/page_element_enumerator.rb +9 -1
  126. data/lib/kitchen/pantry.rb +28 -1
  127. data/lib/kitchen/patches/nokogiri.rb +19 -2
  128. data/lib/kitchen/patches/renderable.rb +9 -3
  129. data/lib/kitchen/patches/string.rb +8 -0
  130. data/lib/kitchen/recipe.rb +69 -32
  131. data/lib/kitchen/reference_element.rb +27 -0
  132. data/lib/kitchen/references_element_enumerator.rb +20 -0
  133. data/lib/kitchen/search_history.rb +43 -4
  134. data/lib/kitchen/search_query.rb +106 -0
  135. data/lib/kitchen/selector.rb +24 -0
  136. data/lib/kitchen/selectors/base.rb +65 -0
  137. data/lib/kitchen/selectors/standard_1.rb +21 -0
  138. data/lib/kitchen/table_element.rb +55 -7
  139. data/lib/kitchen/table_element_enumerator.rb +9 -1
  140. data/lib/kitchen/templates/eob_section_title_template.xhtml.erb +10 -0
  141. data/lib/kitchen/templates/eoc_section_title_template.xhtml.erb +10 -0
  142. data/lib/kitchen/term_element.rb +15 -4
  143. data/lib/kitchen/term_element_enumerator.rb +9 -1
  144. data/lib/kitchen/transliterations.rb +7 -5
  145. data/lib/kitchen/type_casting_element_enumerator.rb +17 -1
  146. data/lib/kitchen/unit_element.rb +45 -0
  147. data/lib/kitchen/unit_element_enumerator.rb +20 -0
  148. data/lib/kitchen/utils.rb +10 -13
  149. data/lib/kitchen/version.rb +5 -1
  150. data/lib/locales/en.yml +18 -7
  151. data/lib/locales/pl.yml +24 -0
  152. data/lib/openstax_kitchen.rb +59 -0
  153. data/openstax_kitchen.gemspec +26 -20
  154. data/tutorials/00/solution1.rb +9 -0
  155. data/tutorials/00/solution2.rb +8 -0
  156. data/tutorials/01/solution1.rb +18 -0
  157. data/tutorials/01/solution2.rb +26 -0
  158. data/tutorials/02/solution1.rb +31 -0
  159. data/tutorials/03/{solution_1.rb → solution1.rb} +6 -4
  160. data/tutorials/03/solution2.rb +18 -0
  161. data/tutorials/04/{solution_1.rb → solution1.rb} +4 -2
  162. data/tutorials/04/{solution_2.rb → solution2.rb} +6 -4
  163. data/tutorials/05/solution1.rb +11 -0
  164. data/tutorials/check_it +16 -15
  165. data/tutorials/setup_my_recipes +7 -6
  166. metadata +148 -27
  167. data/Dockerfile +0 -19
  168. data/bin/normalize +0 -79
  169. data/books/chemistry2e/bake.rb +0 -133
  170. data/docker-compose.yml +0 -12
  171. data/docker/entrypoint +0 -9
  172. data/lib/kitchen.rb +0 -57
  173. data/lib/kitchen/directions/bake_chapter_glossary.rb +0 -34
  174. data/lib/kitchen/directions/bake_exercises.rb +0 -164
  175. data/lib/kitchen/directions/bake_notes.rb +0 -58
  176. data/tutorials/00/solution_1.rb +0 -7
  177. data/tutorials/00/solution_2.rb +0 -6
  178. data/tutorials/01/solution_1.rb +0 -16
  179. data/tutorials/01/solution_2.rb +0 -24
  180. data/tutorials/02/solution_1.rb +0 -29
  181. data/tutorials/03/solution_2.rb +0 -15
  182. data/tutorials/05/solution_1.rb +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a4f70bbb3dd410d515f7501ed2b95635d4ca8b8369fe1b8ed5eda66e5c64c07
4
- data.tar.gz: ec5151233398b0136e0494efe4b4637876ab3e318f6606ea66fe8a750c46cbf0
3
+ metadata.gz: a6855dd0e84e96799a57645b9023db15a07400c5b6971a0ebb29edf5c87074f0
4
+ data.tar.gz: e7106c5faa811f73e25a829258a4aadfccad20c32dc2a0623ec8a2526e44d274
5
5
  SHA512:
6
- metadata.gz: fce19e98ac530ffd809acb5ff968dbd9b786b11eaa217faec40f7e0af7ad5e2a2f70fae5aed9eb0d2b71bce7456a4d4b9e3842d2d484b17f7da529ed02af9d3a
7
- data.tar.gz: 36d66b6aa6cc8585726007f0edeff8eae49be3222dd33b367adb1b0b6554c0bfbc4f39537ad1e95fbf9bc0cf15a91049347c4940644dcf47348eb932bf42f623
6
+ metadata.gz: 792c85c2b914719e38cca37b798160353425a6f80074926ead34c03e5fd97e47167dbc7d3efcef30d43a459a3ad917fd2e2e354fe490053e4345775cb7eac4df
7
+ data.tar.gz: 95d4ec07de107850a81cec9a714e5dbe83835dd1536005587109292f503d8afa9a1bdc896dc43f3198d59f18769ef7ab4c9ae2ee312d047ab8bee9997cc4c0a6
@@ -1,19 +1,39 @@
1
1
  {
2
- "name": "Kitchen Dev",
3
- "dockerComposeFile": ["../docker-compose.yml"],
4
- "service": "app",
5
- "workspaceFolder": "/code",
6
- "shutdownAction": "stopCompose",
7
- "extensions": [
8
- "castwide.solargraph",
9
- ],
10
- "settings": {
11
- "[ruby]": {
12
- "editor.insertSpaces": true,
13
- "editor.tabSize": 2
14
- },
15
- "solargraph.commandPath": "/usr/local/bundle/bin/solargraph",
16
- "solargraph.bundlerPath": "/usr/local/bin/bundle",
17
- },
18
- "postCreateCommand": "bundle install"
2
+ "name": "Kitchen Dev",
3
+ "build": {
4
+ "dockerfile": "../docker/Dockerfile",
5
+ "context": "..",
6
+ "args": {
7
+ "bundler_version": "2.2.4"
8
+ }
9
+ },
10
+ "workspaceMount": "source=${localWorkspaceFolder},target=/code,type=bind,consistency=default",
11
+ "workspaceFolder": "/code",
12
+ "extensions": [
13
+ "castwide.solargraph",
14
+ "rebornix.Ruby",
15
+ "MS-vsliveshare.vsliveshare-pack"
16
+ ],
17
+ "settings": {
18
+ "files.trimTrailingWhitespace": true,
19
+ "files.insertFinalNewline": true,
20
+ "terminal.integrated.shell.linux": "/bin/bash",
21
+ "[ruby]": {
22
+ "editor.insertSpaces": true,
23
+ "editor.tabSize": 2,
24
+ },
25
+ "ruby.lint": {
26
+ "rubocop": {
27
+ "useBundler": true // enable rubocop via bundler
28
+ },
29
+ },
30
+ "ruby.format": "rubocop", // use rubocop for formatting
31
+ "ruby.useLanguageServer": true,
32
+ "solargraph.commandPath": "/usr/local/bundle/bin/solargraph",
33
+ "solargraph.bundlerPath": "/usr/local/bin/bundle",
34
+ "ruby.rubocop.executePath": "/usr/local/bundle/bin/",
35
+ "ruby.rubocop.onSave": true,
36
+ "ruby.rubocop.configFilePath": "/code/.rubocop.yml",
37
+ "terminal.integrated.scrollback": 100000
38
+ }
19
39
  }
@@ -0,0 +1,14 @@
1
+ # See https://github.com/openstax/staxly#plugins for more options for this file
2
+ changelog:
3
+ # See https://github.com/mikz/probot-changelog for details
4
+
5
+ # The filename of the CHANGELOG that needs to be updated in every PullRequest
6
+ filename: CHANGELOG.md
7
+
8
+ # (optional) when files matching these patterns are changed then disallow merging
9
+ # until the CHANGELOG is updated.
10
+ # If this pattern is not included then **all** Pull Requests require an edit to
11
+ # the CHANGELOG file
12
+
13
+ # include:
14
+ # - /^src\//
@@ -5,32 +5,22 @@ on:
5
5
  push:
6
6
  branches:
7
7
  - main
8
- schedule:
9
- - cron: '0 0 * * 0' # weekly
10
8
 
11
9
  jobs:
12
- tests:
10
+ rspec:
13
11
  timeout-minutes: 10
14
12
  runs-on: ubuntu-18.04
15
13
 
16
14
  steps:
17
15
  - uses: actions/checkout@v2
18
- - uses: actions/setup-ruby@v1
19
- with:
20
- ruby-version: 2.6
21
16
  - uses: actions/cache@v2
22
17
  with:
23
18
  path: vendor/bundle
24
19
  key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
25
20
  restore-keys: |
26
21
  ${{ runner.os }}-gems-
27
- - name: Test
28
- env:
29
- ENABLE_CODECOV: 1
22
+ - name: Build docker image and run specs within it
23
+ # See https://docs.codecov.io/docs/testing-with-docker
30
24
  run: |
31
- gem install bundler --force --no-document --version 2.1.4
32
- bundle config deployment true
33
- bundle config path vendor/bundle
34
- bundle config jobs 2
35
- bundle install
36
- bundle exec rake
25
+ ./docker/build --ci
26
+ CI_ENV=`bash <(curl -s https://codecov.io/env)` ./docker/ci
data/.gitignore CHANGED
@@ -7,14 +7,14 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /vendor/
10
11
 
11
12
  # rspec failure tracking
12
13
  .rspec_status
13
- .irb_history
14
+ .irb-history
14
15
  .byebug_history
15
16
  bin/scratch
16
17
  tutorial/outputs/*.html
17
18
 
18
19
  tutorials/**/actual_baked.*html
19
20
  tutorials/**/my_recipe.rb
20
-
data/.inch.yml ADDED
@@ -0,0 +1,6 @@
1
+ files:
2
+ # define files excluded from the analysis (defaults to [])
3
+ excluded:
4
+ - lib/kitchen/directions/**/*.rb # may want to add this in later in a limited way
5
+ - lib/kitchen/debug/**/*.rb
6
+ - lib/openstax_kitchen.rb
data/.rubocop.yml ADDED
@@ -0,0 +1,65 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.4
3
+
4
+ Layout/EmptyLinesAroundClassBody:
5
+ Enabled: false
6
+
7
+ Layout/EmptyLinesAroundBlockBody:
8
+ Enabled: false
9
+
10
+ Layout/LineLength:
11
+ Max: 100
12
+ IgnoredPatterns: ['(\A|\s)#']
13
+
14
+ Metrics/AbcSize:
15
+ Max: 50
16
+
17
+ Naming/PredicateName:
18
+ Enabled: false
19
+
20
+ Metrics/ClassLength:
21
+ Max: 300
22
+ CountAsOne: ['heredoc']
23
+
24
+ Metrics/MethodLength:
25
+ Max: 50
26
+ CountAsOne: ['heredoc']
27
+
28
+ Metrics/BlockLength:
29
+ CountAsOne: ['heredoc']
30
+ Max: 30
31
+ Exclude:
32
+ - 'openstax_kitchen.gemspec'
33
+
34
+ Metrics/ModuleLength:
35
+ CountAsOne: ['heredoc']
36
+
37
+ Style/Alias:
38
+ EnforcedStyle: prefer_alias_method
39
+
40
+ Style/StringLiterals:
41
+ ConsistentQuotesInMultiline: true
42
+
43
+ Layout/SpaceAroundEqualsInParameterDefault:
44
+ EnforcedStyle: no_space
45
+
46
+ Style/AccessorGrouping:
47
+ EnforcedStyle: separated
48
+
49
+ Style/SingleLineMethods:
50
+ Enabled: false # don't abuse it, but sometimes it is right
51
+
52
+ Style/RegexpLiteral:
53
+ AllowInnerSlashes: true
54
+
55
+ Style/SymbolProc:
56
+ IgnoredMethods:
57
+ - respond_to
58
+ - define_method
59
+ - XML # For Nokogiri::XML
60
+
61
+ Layout/ClosingParenthesisIndentation:
62
+ Enabled: false # when true hanging parens look weird
63
+
64
+ Layout/MultilineMethodCallBraceLayout:
65
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -6,6 +6,89 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- ## [1.0.0] - 2020-10-03
9
+ ## [4.0.0] - 2021-05-18
10
10
 
11
- First official version.
11
+ * Changes `default_css_or_xpath` to optionally be a proc to be evaluated w.r.t. a document's config (minor)
12
+ * Support namespaces defined on elements other than the root (minor)
13
+ * Non-splash figures now treated like normal intro-body content in `BakeChapterIntroductions`
14
+ * `BakeNumberedNotes` and the uphysics strategy for `MoveSolutionsToAnswerKey` updated to accomodate multiple exercises in a note.
15
+ * `BakeFootnotes` now looks for footnotes in composite chapters
16
+ * Move exercise pantry label storage to `BakeNumberedExercises` to ensure consistency between exercise number and link text
17
+ * Update `BakeIndex` term capitalization handling to be less case sensitive (minor)
18
+ * Added a title tag variable to choose between h2 and h3 for children of chapter review (minor)
19
+ * Added a fix for examples not to bake table captions (minor)
20
+ * Replaced a .text with .children to include math text (minor)
21
+ * Changed title tag on numbered notes to always be h3 (major)
22
+ * Storing all note subtitles in the pantry for link placeholders (minor)
23
+ * Added another xmlns string option to remove if clone (minor)
24
+ * Add class to reference superscript & add metadata to `BakeSuggestedReading` (minor)
25
+ * Add `BakeFreeResponse` Directions (minor)
26
+ * Add terms from composite pages to index (minor)
27
+ * Access `.pantry` and `.clipboard` through an element instead of just its document (minor)
28
+ * Add `suppress_solution` option to `BakeNumberedExercise` (minor)
29
+ * Add strategy for American Government answer key (minor)
30
+ * Add `BakeReferences` direction (minor)
31
+ * Fix xmlns string replacement done in PR #209 (minor)
32
+ * Move title above metadata in `BakeSuggestedReading` direction (major)
33
+ * Remove depreciated directions `BakeNotes` and `BakeExercises` (major)
34
+ * Adds `eoc_composite_metadata_title` to en.yml and eoc template (major)
35
+ * Add `template` folder to kitchen to hold templates (minor)
36
+ * Add `eoc_section_title_template` (minor)
37
+ * Expand specs with `append_to` to have with/without `append_to` contexts (minor)
38
+ * Add `is?` method to `ElementBase` (minor)
39
+ * Replaced in_composite_chapter to use `is?` (minor)
40
+ * Add callable `short_type` to Elements (minor)
41
+ * Add template for eob titles - `eob_section_title_template` (minor)
42
+
43
+ ## [3.2.0] - 2021-04-20
44
+
45
+ * Adds method to allow unit and page title text to be retrieved regardless of bake status (minor)
46
+ * Rename several directions (major)
47
+ * `BakeChapterReviewExercises` -> `MoveExercisesToEOC`
48
+ * `BakeChapterReview` -> `ChapterReviewContainer`
49
+ * `BakeBookAnswerKey` -> `BookAnswerKeyContainer`
50
+ * `BakeChapterAnswerKey` -> `MoveSolutionsToAnswerKey`
51
+ * Refactors `BakeFirstElements` and `BakeNumberedExercise` (minor)
52
+ * Adds a decorating option of equation numbers on `BakeEquations` (minor)
53
+
54
+ ## [3.1.0] - 2021-04-19
55
+
56
+ * Add the ability to copy an element's ID to `ElementBase` (minor)
57
+ * Create `pl.yml` and add pl to available locals in `StubHelpers` module (minor)
58
+ * Add to `BakeNumberedNotes` directions for baking exercises in a note (with this comes removing bake checkpoints and theorems)
59
+ * Add `BakeEquations` direction (minor)
60
+ * Remove `NoteElement` logging (minor)
61
+ * Adds `BakeChapterReviewExercises` v2 and a u-physics `Strategy` to `BakeChapterAnswerKey` to support baking exercises in u-physics (minor)
62
+ * Have deprecated directions log a warning (minor)
63
+ * Added `wrap_children` method on elements (minor)
64
+ * Refactored `NoteElement` to infer the note title from book-specific locales (minor)
65
+ * Added support for a recipe to infer or be given a book-specific locale file (minor)
66
+ * Added `NumberedTable` support for titles and always captions (minor)
67
+ * Added titles method to `ElementEnumeratorBase` and `ElementBase` (minor)
68
+ * Added a file for baking composite chapters called (`bake_composite_chapters`) and the respective spec.
69
+ (minor change)
70
+ * Added `BakeProblemFirstElements` direction (minor)
71
+
72
+ ## [3.0.0] - 2021-03-17
73
+
74
+ * Added a subfigure? method to `FigureElements`(minor)
75
+ * Added support for titles in `BakeFigure` (minor)
76
+ * Created `BakeUnitTitle` class
77
+ * Created `UnitElement` and `UnitElementEnumerator` classes (minor)
78
+ * Added support for Units in `BakeToc` direction (minor)
79
+ * Added `Unit` to `en.yml` (patch)
80
+ * Remove chapter summary titles only if they exist (minor)
81
+ * Created `BakeSuggestedReading` direction for EOC
82
+ * Added ability to filter searches based on `only` and `except` conditions, which can be names of element methods or blocks of code (minor)
83
+ * Changed from tracking and using `css_or_xpath` strings and arrays to `search_query` objects that
84
+ wrap `css_or_xpath` variables along with `only` and `except` conditions. (major?)
85
+ * Refactored bake_exercises to better support parallel work on multiple versions. (minor)
86
+
87
+ ## [2.0.0] - 2020-12-18
88
+ * Added a file for baking key concepts called (`bake_chapter_key_concepts`) and the respective specs.
89
+ (minor change) only affects the book if called from the recipe
90
+ * Changed the main gem source file to have the same name as the gem (`openstax_kitchen`) so that you don't have to `require` a different name than you use in your `gem` call.
91
+
92
+ ## [1.0.0] - 2020-12-15
93
+
94
+ * First official version.
data/Gemfile CHANGED
@@ -1,9 +1,11 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in kitchen.gemspec
4
6
  gemspec
5
7
 
6
- gem "rake", "~> 12.0"
7
- gem "rspec", "~> 3.0"
8
+ gem 'rake', '~> 12.0'
9
+ gem 'rspec', '~> 3.0'
8
10
 
9
11
  gem 'codecov', require: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openstax_kitchen (1.0.0)
4
+ openstax_kitchen (4.0.0)
5
5
  activesupport
6
6
  i18n
7
7
  nokogiri
@@ -10,29 +10,49 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (6.0.3.3)
13
+ activesupport (6.1.3.2)
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
- i18n (>= 0.7, < 2)
16
- minitest (~> 5.1)
17
- tzinfo (~> 1.1)
18
- zeitwerk (~> 2.2, >= 2.2.2)
15
+ i18n (>= 1.6, < 2)
16
+ minitest (>= 5.1)
17
+ tzinfo (~> 2.0)
18
+ zeitwerk (~> 2.3)
19
+ ast (2.4.1)
19
20
  byebug (11.1.2)
20
21
  codecov (0.2.13)
21
22
  simplecov (~> 0.18.0)
22
- concurrent-ruby (1.1.7)
23
+ coderay (1.1.3)
24
+ concurrent-ruby (1.1.8)
23
25
  diff-lcs (1.3)
24
- docile (1.3.2)
25
- i18n (1.8.5)
26
+ docile (1.3.3)
27
+ i18n (1.8.10)
26
28
  concurrent-ruby (~> 1.0)
27
- mini_portile2 (2.4.0)
28
- minitest (5.14.2)
29
- nokogiri (1.10.9)
30
- mini_portile2 (~> 2.4.0)
29
+ inch (0.8.0)
30
+ pry
31
+ sparkr (>= 0.2.0)
32
+ term-ansicolor
33
+ yard (~> 0.9.12)
34
+ method_source (1.0.0)
35
+ mini_portile2 (2.5.0)
36
+ minitest (5.14.4)
37
+ nokogiri (1.11.1)
38
+ mini_portile2 (~> 2.5.0)
39
+ racc (~> 1.4)
40
+ nokogiri (1.11.1-x86_64-linux)
41
+ racc (~> 1.4)
31
42
  nokogiri-diff (0.2.0)
32
43
  nokogiri (~> 1.5)
33
44
  tdiff (~> 0.3, >= 0.3.2)
45
+ parallel (1.20.1)
46
+ parser (2.7.2.0)
47
+ ast (~> 2.4.1)
48
+ pry (0.13.1)
49
+ coderay (~> 1.1)
50
+ method_source (~> 1.0)
51
+ racc (1.5.2)
34
52
  rainbow (3.0.0)
35
53
  rake (12.3.3)
54
+ regexp_parser (2.0.1)
55
+ rexml (3.2.5)
36
56
  rspec (3.9.0)
37
57
  rspec-core (~> 3.9.0)
38
58
  rspec-expectations (~> 3.9.0)
@@ -46,29 +66,57 @@ GEM
46
66
  diff-lcs (>= 1.2.0, < 2.0)
47
67
  rspec-support (~> 3.9.0)
48
68
  rspec-support (3.9.2)
69
+ rubocop (1.6.1)
70
+ parallel (~> 1.10)
71
+ parser (>= 2.7.1.5)
72
+ rainbow (>= 2.2.2, < 4.0)
73
+ regexp_parser (>= 1.8, < 3.0)
74
+ rexml
75
+ rubocop-ast (>= 1.2.0, < 2.0)
76
+ ruby-progressbar (~> 1.7)
77
+ unicode-display_width (>= 1.4.0, < 2.0)
78
+ rubocop-ast (1.3.0)
79
+ parser (>= 2.7.1.5)
80
+ rubocop-rake (0.5.1)
81
+ rubocop
82
+ rubocop-rspec (2.1.0)
83
+ rubocop (~> 1.0)
84
+ rubocop-ast (>= 1.1.0)
85
+ ruby-progressbar (1.10.1)
49
86
  simplecov (0.18.5)
50
87
  docile (~> 1.1)
51
88
  simplecov-html (~> 0.11)
52
89
  simplecov-html (0.12.3)
90
+ sparkr (0.4.1)
91
+ sync (0.5.0)
53
92
  tdiff (0.3.4)
54
- thread_safe (0.3.6)
55
- tzinfo (1.2.7)
56
- thread_safe (~> 0.1)
93
+ term-ansicolor (1.7.1)
94
+ tins (~> 1.0)
95
+ tins (1.26.0)
96
+ sync
97
+ tzinfo (2.0.4)
98
+ concurrent-ruby (~> 1.0)
99
+ unicode-display_width (1.7.0)
57
100
  yard (0.9.24)
58
- zeitwerk (2.4.0)
101
+ zeitwerk (2.4.2)
59
102
 
60
103
  PLATFORMS
61
104
  ruby
105
+ x86_64-linux
62
106
 
63
107
  DEPENDENCIES
64
108
  byebug
65
109
  codecov
110
+ inch
66
111
  nokogiri-diff
67
112
  openstax_kitchen!
68
113
  rainbow
69
114
  rake (~> 12.0)
70
115
  rspec (~> 3.0)
116
+ rubocop
117
+ rubocop-rake
118
+ rubocop-rspec
71
119
  yard
72
120
 
73
121
  BUNDLED WITH
74
- 2.1.4
122
+ 2.2.4