openstax_kitchen 2.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) 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 -1
  9. data/Gemfile +5 -3
  10. data/Gemfile.lock +65 -17
  11. data/README.md +65 -11
  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_references/main.rb +16 -0
  45. data/lib/kitchen/directions/bake_chapter_references/v1.rb +35 -0
  46. data/lib/kitchen/directions/bake_chapter_section_exercises/main.rb +11 -0
  47. data/lib/kitchen/directions/bake_chapter_section_exercises/v1.rb +28 -0
  48. data/lib/kitchen/directions/bake_chapter_summary.rb +45 -36
  49. data/lib/kitchen/directions/bake_chapter_title/main.rb +11 -0
  50. data/lib/kitchen/directions/bake_chapter_title/v1.rb +24 -0
  51. data/lib/kitchen/directions/bake_checkpoint.rb +44 -0
  52. data/lib/kitchen/directions/bake_composite_chapters.rb +14 -0
  53. data/lib/kitchen/directions/bake_composite_pages.rb +2 -2
  54. data/lib/kitchen/directions/bake_equations.rb +37 -0
  55. data/lib/kitchen/directions/bake_example.rb +39 -11
  56. data/lib/kitchen/directions/bake_figure.rb +8 -5
  57. data/lib/kitchen/directions/bake_first_elements.rb +16 -0
  58. data/lib/kitchen/directions/bake_footnotes/main.rb +2 -2
  59. data/lib/kitchen/directions/bake_footnotes/v1.rb +6 -5
  60. data/lib/kitchen/directions/bake_free_response/free_response.xhtml.erb +10 -0
  61. data/lib/kitchen/directions/bake_free_response/main.rb +11 -0
  62. data/lib/kitchen/directions/bake_free_response/v1.rb +29 -0
  63. data/lib/kitchen/directions/bake_further_research.rb +59 -0
  64. data/lib/kitchen/directions/bake_index/main.rb +2 -2
  65. data/lib/kitchen/directions/bake_index/v1.rb +46 -18
  66. data/lib/kitchen/directions/bake_link_placeholders.rb +24 -0
  67. data/lib/kitchen/directions/bake_math_in_paragraph.rb +5 -3
  68. data/lib/kitchen/directions/bake_non_introduction_pages.rb +26 -0
  69. data/lib/kitchen/directions/bake_notes/bake_autotitled_notes.rb +29 -0
  70. data/lib/kitchen/directions/bake_notes/bake_note_subtitle.rb +22 -0
  71. data/lib/kitchen/directions/bake_notes/bake_numbered_notes.rb +51 -0
  72. data/lib/kitchen/directions/bake_notes/bake_unclassified_notes.rb +30 -0
  73. data/lib/kitchen/directions/bake_numbered_exercise/main.rb +15 -0
  74. data/lib/kitchen/directions/bake_numbered_exercise/v1.rb +47 -0
  75. data/lib/kitchen/directions/bake_numbered_table/main.rb +4 -4
  76. data/lib/kitchen/directions/bake_numbered_table/v1.rb +37 -18
  77. data/lib/kitchen/directions/bake_page_abstracts.rb +30 -0
  78. data/lib/kitchen/directions/bake_preface/main.rb +11 -0
  79. data/lib/kitchen/directions/bake_preface/v1.rb +18 -0
  80. data/lib/kitchen/directions/bake_references/main.rb +16 -0
  81. data/lib/kitchen/directions/bake_references/v1.rb +48 -0
  82. data/lib/kitchen/directions/bake_stepwise.rb +8 -12
  83. data/lib/kitchen/directions/bake_suggested_reading.rb +31 -0
  84. data/lib/kitchen/directions/bake_theorem/main.rb +11 -0
  85. data/lib/kitchen/directions/bake_theorem/v1.rb +28 -0
  86. data/lib/kitchen/directions/bake_toc.rb +49 -22
  87. data/lib/kitchen/directions/bake_unit_title/main.rb +11 -0
  88. data/lib/kitchen/directions/bake_unit_title/v1.rb +23 -0
  89. data/lib/kitchen/directions/bake_unnumbered_tables.rb +7 -5
  90. data/lib/kitchen/directions/book_answer_key_container/eob_solutions_container.xhtml.erb +9 -0
  91. data/lib/kitchen/directions/book_answer_key_container/main.rb +11 -0
  92. data/lib/kitchen/directions/book_answer_key_container/v1.rb +13 -0
  93. data/lib/kitchen/directions/chapter_review_container/chapter_review.xhtml.erb +9 -0
  94. data/lib/kitchen/directions/chapter_review_container/main.rb +11 -0
  95. data/lib/kitchen/directions/chapter_review_container/v1.rb +13 -0
  96. data/lib/kitchen/directions/eoc_section_title_link_snippet.rb +20 -0
  97. data/lib/kitchen/directions/move_exercises_to_eoc/main.rb +27 -0
  98. data/lib/kitchen/directions/move_exercises_to_eoc/v1.rb +36 -0
  99. data/lib/kitchen/directions/move_exercises_to_eoc/v2.rb +49 -0
  100. data/lib/kitchen/directions/move_solutions_to_answer_key/main.rb +14 -0
  101. data/lib/kitchen/directions/move_solutions_to_answer_key/strategies/american_government.rb +19 -0
  102. data/lib/kitchen/directions/move_solutions_to_answer_key/strategies/calculus.rb +41 -0
  103. data/lib/kitchen/directions/move_solutions_to_answer_key/strategies/uphysics.rb +63 -0
  104. data/lib/kitchen/directions/move_solutions_to_answer_key/v1.rb +34 -0
  105. data/lib/kitchen/directions/move_title_text_into_span.rb +2 -2
  106. data/lib/kitchen/document.rb +83 -13
  107. data/lib/kitchen/element.rb +20 -3
  108. data/lib/kitchen/element_base.rb +373 -63
  109. data/lib/kitchen/element_enumerator.rb +8 -0
  110. data/lib/kitchen/element_enumerator_base.rb +297 -28
  111. data/lib/kitchen/element_enumerator_factory.rb +64 -53
  112. data/lib/kitchen/element_factory.rb +27 -12
  113. data/lib/kitchen/errors.rb +5 -0
  114. data/lib/kitchen/example_element.rb +21 -6
  115. data/lib/kitchen/example_element_enumerator.rb +9 -1
  116. data/lib/kitchen/exercise_element.rb +42 -0
  117. data/lib/kitchen/exercise_element_enumerator.rb +21 -0
  118. data/lib/kitchen/figure_element.rb +36 -5
  119. data/lib/kitchen/figure_element_enumerator.rb +9 -1
  120. data/lib/kitchen/metadata_element.rb +34 -0
  121. data/lib/kitchen/metadata_element_enumerator.rb +21 -0
  122. data/lib/kitchen/mixins/block_error_if.rb +24 -4
  123. data/lib/kitchen/note_element.rb +48 -20
  124. data/lib/kitchen/note_element_enumerator.rb +9 -1
  125. data/lib/kitchen/oven.rb +66 -15
  126. data/lib/kitchen/page_element.rb +84 -14
  127. data/lib/kitchen/page_element_enumerator.rb +9 -1
  128. data/lib/kitchen/pantry.rb +28 -1
  129. data/lib/kitchen/patches/nokogiri.rb +59 -2
  130. data/lib/kitchen/patches/renderable.rb +9 -3
  131. data/lib/kitchen/patches/string.rb +8 -0
  132. data/lib/kitchen/recipe.rb +69 -32
  133. data/lib/kitchen/reference_element.rb +27 -0
  134. data/lib/kitchen/references_element_enumerator.rb +20 -0
  135. data/lib/kitchen/search_history.rb +43 -4
  136. data/lib/kitchen/search_query.rb +106 -0
  137. data/lib/kitchen/selector.rb +24 -0
  138. data/lib/kitchen/selectors/base.rb +65 -0
  139. data/lib/kitchen/selectors/standard_1.rb +21 -0
  140. data/lib/kitchen/table_element.rb +55 -7
  141. data/lib/kitchen/table_element_enumerator.rb +9 -1
  142. data/lib/kitchen/templates/eob_section_title_template.xhtml.erb +10 -0
  143. data/lib/kitchen/templates/eoc_section_title_template.xhtml.erb +10 -0
  144. data/lib/kitchen/term_element.rb +15 -4
  145. data/lib/kitchen/term_element_enumerator.rb +9 -1
  146. data/lib/kitchen/transliterations.rb +7 -5
  147. data/lib/kitchen/type_casting_element_enumerator.rb +17 -1
  148. data/lib/kitchen/unit_element.rb +45 -0
  149. data/lib/kitchen/unit_element_enumerator.rb +20 -0
  150. data/lib/kitchen/utils.rb +10 -13
  151. data/lib/kitchen/version.rb +5 -1
  152. data/lib/locales/en.yml +18 -7
  153. data/lib/locales/pl.yml +24 -0
  154. data/lib/openstax_kitchen.rb +44 -42
  155. data/openstax_kitchen.gemspec +26 -20
  156. data/tutorials/00/solution1.rb +9 -0
  157. data/tutorials/00/solution2.rb +8 -0
  158. data/tutorials/01/solution1.rb +18 -0
  159. data/tutorials/01/solution2.rb +26 -0
  160. data/tutorials/02/solution1.rb +31 -0
  161. data/tutorials/03/{solution_1.rb → solution1.rb} +6 -4
  162. data/tutorials/03/solution2.rb +18 -0
  163. data/tutorials/04/{solution_1.rb → solution1.rb} +4 -2
  164. data/tutorials/04/{solution_2.rb → solution2.rb} +6 -4
  165. data/tutorials/05/solution1.rb +11 -0
  166. data/tutorials/check_it +16 -15
  167. data/tutorials/setup_my_recipes +7 -6
  168. metadata +149 -24
  169. data/Dockerfile +0 -19
  170. data/docker-compose.yml +0 -12
  171. data/docker/entrypoint +0 -9
  172. data/lib/kitchen/directions/bake_chapter_glossary.rb +0 -34
  173. data/lib/kitchen/directions/bake_exercises.rb +0 -164
  174. data/lib/kitchen/directions/bake_notes.rb +0 -58
  175. data/tutorials/00/solution_1.rb +0 -7
  176. data/tutorials/00/solution_2.rb +0 -6
  177. data/tutorials/01/solution_1.rb +0 -16
  178. data/tutorials/01/solution_2.rb +0 -24
  179. data/tutorials/02/solution_1.rb +0 -29
  180. data/tutorials/03/solution_2.rb +0 -15
  181. data/tutorials/05/solution_1.rb +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47c8699f2836cea06df2e5a97aa79c350662e8193c9c1abfafd50740de61cbf6
4
- data.tar.gz: 2384b847a91f55624ca266274fb273f98cfcaeb81962c988b04efcb0d619f2a1
3
+ metadata.gz: dacc1aae587e492dc42e693e46195c0ed10ba749f62929e322b0744f2f82e94c
4
+ data.tar.gz: 67b4f9691c4431fc172d48381527c1fd75c62dc866ea056ff6666205e73b0e22
5
5
  SHA512:
6
- metadata.gz: 6a617ef7617b5ebb0ae959615125a82945f965fcb7cbc080eff8da974fb843bd81fc72226fc62d9439f9012d95af21c80e6d85d81a1a0594c7b7546d8fd6e6f8
7
- data.tar.gz: cad462c3c8809912d290148a5c5f64fd8518bd8043ba66d315babeed504dc083761014abd038a9fea8eb88caaa9dcc930be4f9c0b4f048e3590a0645b8bf0da9
6
+ metadata.gz: 4a788770e4176617a260d8b2ce265303a59490dd1e95727bd38102732ce6459e3600a9eca807e6c80d364b3fb710c2dbce4ec71b66dbec6570b2d61ed8e00e40
7
+ data.tar.gz: 6df9ea776c2718b1d7fdc8508210774c29f407391e0802ac6e39a94b98aadfbdb6d47447f0f2a164a66413e122ba7b46e7669fd4af5caeeda26ac0cc591919ff
@@ -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,8 +6,92 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- ## [2.0.0] - 2020-12-18
9
+ ## [4.1.0] - 2021-05-18
10
+
11
+ * Fixed performance problem with element class detection (patch)
12
+ * Added `BakeChapterReferences` Directions (minor)
13
+
14
+ ## [4.0.0] - 2021-05-18
15
+
16
+ * Changes `default_css_or_xpath` to optionally be a proc to be evaluated w.r.t. a document's config (minor)
17
+ * Support namespaces defined on elements other than the root (minor)
18
+ * Non-splash figures now treated like normal intro-body content in `BakeChapterIntroductions`
19
+ * `BakeNumberedNotes` and the uphysics strategy for `MoveSolutionsToAnswerKey` updated to accomodate multiple exercises in a note.
20
+ * `BakeFootnotes` now looks for footnotes in composite chapters
21
+ * Move exercise pantry label storage to `BakeNumberedExercises` to ensure consistency between exercise number and link text
22
+ * Update `BakeIndex` term capitalization handling to be less case sensitive (minor)
23
+ * Added a title tag variable to choose between h2 and h3 for children of chapter review (minor)
24
+ * Added a fix for examples not to bake table captions (minor)
25
+ * Replaced a .text with .children to include math text (minor)
26
+ * Changed title tag on numbered notes to always be h3 (major)
27
+ * Storing all note subtitles in the pantry for link placeholders (minor)
28
+ * Added another xmlns string option to remove if clone (minor)
29
+ * Add class to reference superscript & add metadata to `BakeSuggestedReading` (minor)
30
+ * Add `BakeFreeResponse` Directions (minor)
31
+ * Add terms from composite pages to index (minor)
32
+ * Access `.pantry` and `.clipboard` through an element instead of just its document (minor)
33
+ * Add `suppress_solution` option to `BakeNumberedExercise` (minor)
34
+ * Add strategy for American Government answer key (minor)
35
+ * Add `BakeReferences` direction (minor)
36
+ * Fix xmlns string replacement done in PR #209 (minor)
37
+ * Move title above metadata in `BakeSuggestedReading` direction (major)
38
+ * Remove depreciated directions `BakeNotes` and `BakeExercises` (major)
39
+ * Adds `eoc_composite_metadata_title` to en.yml and eoc template (major)
40
+ * Add `template` folder to kitchen to hold templates (minor)
41
+ * Add `eoc_section_title_template` (minor)
42
+ * Expand specs with `append_to` to have with/without `append_to` contexts (minor)
43
+ * Add `is?` method to `ElementBase` (minor)
44
+ * Replaced in_composite_chapter to use `is?` (minor)
45
+ * Add callable `short_type` to Elements (minor)
46
+ * Add template for eob titles - `eob_section_title_template` (minor)
47
+
48
+ ## [3.2.0] - 2021-04-20
49
+
50
+ * Adds method to allow unit and page title text to be retrieved regardless of bake status (minor)
51
+ * Rename several directions (major)
52
+ * `BakeChapterReviewExercises` -> `MoveExercisesToEOC`
53
+ * `BakeChapterReview` -> `ChapterReviewContainer`
54
+ * `BakeBookAnswerKey` -> `BookAnswerKeyContainer`
55
+ * `BakeChapterAnswerKey` -> `MoveSolutionsToAnswerKey`
56
+ * Refactors `BakeFirstElements` and `BakeNumberedExercise` (minor)
57
+ * Adds a decorating option of equation numbers on `BakeEquations` (minor)
10
58
 
59
+ ## [3.1.0] - 2021-04-19
60
+
61
+ * Add the ability to copy an element's ID to `ElementBase` (minor)
62
+ * Create `pl.yml` and add pl to available locals in `StubHelpers` module (minor)
63
+ * Add to `BakeNumberedNotes` directions for baking exercises in a note (with this comes removing bake checkpoints and theorems)
64
+ * Add `BakeEquations` direction (minor)
65
+ * Remove `NoteElement` logging (minor)
66
+ * Adds `BakeChapterReviewExercises` v2 and a u-physics `Strategy` to `BakeChapterAnswerKey` to support baking exercises in u-physics (minor)
67
+ * Have deprecated directions log a warning (minor)
68
+ * Added `wrap_children` method on elements (minor)
69
+ * Refactored `NoteElement` to infer the note title from book-specific locales (minor)
70
+ * Added support for a recipe to infer or be given a book-specific locale file (minor)
71
+ * Added `NumberedTable` support for titles and always captions (minor)
72
+ * Added titles method to `ElementEnumeratorBase` and `ElementBase` (minor)
73
+ * Added a file for baking composite chapters called (`bake_composite_chapters`) and the respective spec.
74
+ (minor change)
75
+ * Added `BakeProblemFirstElements` direction (minor)
76
+
77
+ ## [3.0.0] - 2021-03-17
78
+
79
+ * Added a subfigure? method to `FigureElements`(minor)
80
+ * Added support for titles in `BakeFigure` (minor)
81
+ * Created `BakeUnitTitle` class
82
+ * Created `UnitElement` and `UnitElementEnumerator` classes (minor)
83
+ * Added support for Units in `BakeToc` direction (minor)
84
+ * Added `Unit` to `en.yml` (patch)
85
+ * Remove chapter summary titles only if they exist (minor)
86
+ * Created `BakeSuggestedReading` direction for EOC
87
+ * Added ability to filter searches based on `only` and `except` conditions, which can be names of element methods or blocks of code (minor)
88
+ * Changed from tracking and using `css_or_xpath` strings and arrays to `search_query` objects that
89
+ wrap `css_or_xpath` variables along with `only` and `except` conditions. (major?)
90
+ * Refactored bake_exercises to better support parallel work on multiple versions. (minor)
91
+
92
+ ## [2.0.0] - 2020-12-18
93
+ * Added a file for baking key concepts called (`bake_chapter_key_concepts`) and the respective specs.
94
+ (minor change) only affects the book if called from the recipe
11
95
  * 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.
12
96
 
13
97
  ## [1.0.0] - 2020-12-15
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 (2.0.0)
4
+ openstax_kitchen (4.1.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
26
  docile (1.3.3)
25
- i18n (1.8.5)
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