middlemac 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +24 -0
  3. data/.yardopts +7 -0
  4. data/CHANGELOG.md +43 -0
  5. data/Gemfile +18 -0
  6. data/LICENSE.md +22 -0
  7. data/README.md +225 -0
  8. data/Rakefile +213 -0
  9. data/bin/middlemac +103 -0
  10. data/documentation_project/.gitignore +37 -0
  11. data/documentation_project/Contents/Info.plist.erb +42 -0
  12. data/documentation_project/Contents/Resources/Base.lproj/010_what_is_middlemac/index.html.md.erb +126 -0
  13. data/documentation_project/Contents/Resources/Base.lproj/020_setup_tutorial/index.html.md.erb +168 -0
  14. data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/10_markdown_skill.html.md.erb +63 -0
  15. data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/20_frontmatter_skill.html.md.erb +54 -0
  16. data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/30_middleman_skill.html.md.erb +93 -0
  17. data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/40_ruby_skill.html.md.erb +67 -0
  18. data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/50_ruby_ecosystem.html.md.erb +136 -0
  19. data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/60_filetypes_skill.html.md.erb +165 -0
  20. data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/index.html.md.erb +35 -0
  21. data/documentation_project/Contents/Resources/Base.lproj/040_setup/index.html.md.erb +88 -0
  22. data/documentation_project/Contents/Resources/Base.lproj/050_structure/010_directories_and_images.html.md.erb +176 -0
  23. data/documentation_project/Contents/Resources/Base.lproj/050_structure/020_layouts_and_templates.html.md.erb +71 -0
  24. data/documentation_project/Contents/Resources/Base.lproj/050_structure/025_css.html.md.erb +71 -0
  25. data/documentation_project/Contents/Resources/Base.lproj/050_structure/030_groups.html.md.erb +83 -0
  26. data/documentation_project/Contents/Resources/Base.lproj/050_structure/040_breadcrumbs.html.md.erb +43 -0
  27. data/documentation_project/Contents/Resources/Base.lproj/050_structure/050_navigator.html.md.erb +26 -0
  28. data/documentation_project/Contents/Resources/Base.lproj/050_structure/060_targets.html.md.erb +63 -0
  29. data/documentation_project/Contents/Resources/Base.lproj/050_structure/070_features.html.md.erb +122 -0
  30. data/documentation_project/Contents/Resources/Base.lproj/050_structure/index.html.md.erb +21 -0
  31. data/documentation_project/Contents/Resources/Base.lproj/050_structure/not_free.html.md.erb +43 -0
  32. data/documentation_project/Contents/Resources/Base.lproj/050_structure/not_pro.html.md.erb +43 -0
  33. data/documentation_project/Contents/Resources/Base.lproj/060_content/010_frontmatter.html.md.erb +88 -0
  34. data/documentation_project/Contents/Resources/Base.lproj/060_content/030_helpers.html.md.erb +247 -0
  35. data/documentation_project/Contents/Resources/Base.lproj/060_content/040_partials.html.md.erb +121 -0
  36. data/documentation_project/Contents/Resources/Base.lproj/060_content/050_resources.html.md.erb +60 -0
  37. data/documentation_project/Contents/Resources/Base.lproj/060_content/070_including_excluding.html.md.erb +68 -0
  38. data/documentation_project/Contents/Resources/Base.lproj/060_content/080_markdown_links_images.html.md.erb +93 -0
  39. data/documentation_project/Contents/Resources/Base.lproj/060_content/090_css_image_sizes.html.md.erb +90 -0
  40. data/documentation_project/Contents/Resources/Base.lproj/060_content/100_using_local_data.html.md.erb +37 -0
  41. data/documentation_project/Contents/Resources/Base.lproj/060_content/index.html.md.erb +21 -0
  42. data/documentation_project/Contents/Resources/Base.lproj/070_preview_build/index.html.md.erb +78 -0
  43. data/documentation_project/Contents/Resources/Base.lproj/090_build_application/10_apple_help_setup.html.md.erb +110 -0
  44. data/documentation_project/Contents/Resources/Base.lproj/090_build_application/20_xcode_integration.html.md.erb +64 -0
  45. data/documentation_project/Contents/Resources/Base.lproj/090_build_application/index.html.md.erb +25 -0
  46. data/documentation_project/Contents/Resources/Base.lproj/100_reference/10_cli_ref.html.md.erb +72 -0
  47. data/documentation_project/Contents/Resources/Base.lproj/100_reference/20_config_ref.html.md.erb +56 -0
  48. data/documentation_project/Contents/Resources/Base.lproj/100_reference/30_helpers_ext_ref.html.md.erb +51 -0
  49. data/documentation_project/Contents/Resources/Base.lproj/100_reference/40_helpers_ref.html.md.erb +45 -0
  50. data/documentation_project/Contents/Resources/Base.lproj/100_reference/50_resource_ext_ref.html.md.erb +25 -0
  51. data/documentation_project/Contents/Resources/Base.lproj/100_reference/index.html.md.erb +26 -0
  52. data/documentation_project/Contents/Resources/Base.lproj/110_acknowledgements/index.html.md.erb +61 -0
  53. data/documentation_project/Contents/Resources/Base.lproj/120_backwards_compatibility/index.html.md.erb +88 -0
  54. data/documentation_project/Contents/Resources/Base.lproj/130_all_help_content/index.html.md.erb +15 -0
  55. data/documentation_project/Contents/Resources/Base.lproj/InfoPlist.strings.erb +10 -0
  56. data/documentation_project/Contents/Resources/Base.lproj/assets/_data/globals.yml +11 -0
  57. data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/layout-html4.haml +22 -0
  58. data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/layout-xhtml.haml +28 -0
  59. data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/template-logo-large.haml +30 -0
  60. data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/template-logo-medium.haml +30 -0
  61. data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/template-logo-small.haml +30 -0
  62. data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/FontAwesome.otf +0 -0
  63. data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
  64. data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.svg +655 -0
  65. data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
  66. data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
  67. data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
  68. data/documentation_project/Contents/Resources/Base.lproj/assets/images/all-sample.png +0 -0
  69. data/documentation_project/Contents/Resources/Base.lproj/assets/images/all-sample@2x.png +0 -0
  70. data/documentation_project/Contents/Resources/Base.lproj/assets/images/free-middlemac-logo-small.png +0 -0
  71. data/documentation_project/Contents/Resources/Base.lproj/assets/images/free-middlemac-logo-small@2x.png +0 -0
  72. data/documentation_project/Contents/Resources/Base.lproj/assets/images/free-middlemac-logo.png +0 -0
  73. data/documentation_project/Contents/Resources/Base.lproj/assets/images/free-middlemac-logo@2x.png +0 -0
  74. data/documentation_project/Contents/Resources/Base.lproj/assets/images/middlemac-logo-small.png +0 -0
  75. data/documentation_project/Contents/Resources/Base.lproj/assets/images/middlemac-logo-small@2x.png +0 -0
  76. data/documentation_project/Contents/Resources/Base.lproj/assets/images/middlemac-logo.png +0 -0
  77. data/documentation_project/Contents/Resources/Base.lproj/assets/images/middlemac-logo@2x.png +0 -0
  78. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras-small.png +0 -0
  79. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras-small@2x.png +0 -0
  80. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras.png +0 -0
  81. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras@2x.png +0 -0
  82. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras-small.png +0 -0
  83. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras-small@2x.png +0 -0
  84. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras.png +0 -0
  85. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras@2x.png +0 -0
  86. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-pagegroups/middleman-pagegroups-small.png +0 -0
  87. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-pagegroups/middleman-pagegroups.png +0 -0
  88. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/free-logo-small.png +0 -0
  89. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/free-logo-small@2x.png +0 -0
  90. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/free-logo.png +0 -0
  91. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/free-logo@2x.png +0 -0
  92. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/pro-logo-small.png +0 -0
  93. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/pro-logo-small@2x.png +0 -0
  94. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/pro-logo.png +0 -0
  95. data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/pro-logo@2x.png +0 -0
  96. data/documentation_project/Contents/Resources/Base.lproj/assets/images/pro-middlemac-logo-small.png +0 -0
  97. data/documentation_project/Contents/Resources/Base.lproj/assets/images/pro-middlemac-logo-small@2x.png +0 -0
  98. data/documentation_project/Contents/Resources/Base.lproj/assets/images/pro-middlemac-logo.png +0 -0
  99. data/documentation_project/Contents/Resources/Base.lproj/assets/images/pro-middlemac-logo@2x.png +0 -0
  100. data/documentation_project/Contents/Resources/Base.lproj/assets/javascripts/all.js +1 -0
  101. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs.haml +11 -0
  102. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs_alt.haml +15 -0
  103. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_brethren.haml +18 -0
  104. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_brethren_index.haml +14 -0
  105. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_legitimate_children.haml +16 -0
  106. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_prev_next.haml +21 -0
  107. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_toc_index.haml +21 -0
  108. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_extras_config.erb +200 -0
  109. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_extras_helpers.erb +146 -0
  110. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_extras_helpers_extended.erb +135 -0
  111. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_middlemac_config.erb +207 -0
  112. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_middlemac_helpers.erb +297 -0
  113. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_middlemac_helpers_extended.erb +96 -0
  114. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_config.erb +744 -0
  115. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_helpers.erb +710 -0
  116. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_helpers_css.erb +523 -0
  117. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_helpers_extended.erb +56 -0
  118. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_resources.erb +540 -0
  119. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_targets_config.erb +402 -0
  120. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_targets_helpers.erb +235 -0
  121. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_targets_helpers_extended.erb +138 -0
  122. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_targets_instance.erb +81 -0
  123. data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_targets_resources.erb +109 -0
  124. data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/_apple_helpbook.scss +946 -0
  125. data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/_github.scss +61 -0
  126. data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/_normalize.scss +374 -0
  127. data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/breadcrumb-separator-light.png +0 -0
  128. data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/image_sizes.css.erb +8 -0
  129. data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/style.css.scss +4 -0
  130. data/documentation_project/Contents/Resources/Base.lproj/index.html.md.erb +31 -0
  131. data/documentation_project/Contents/Resources/shared/free-icon_256x256.png +0 -0
  132. data/documentation_project/Contents/Resources/shared/free-icon_256x256@2x.png +0 -0
  133. data/documentation_project/Contents/Resources/shared/free-icon_32x32.png +0 -0
  134. data/documentation_project/Contents/Resources/shared/free-icon_32x32@2x.png +0 -0
  135. data/documentation_project/Contents/Resources/shared/icon_256x256.png +0 -0
  136. data/documentation_project/Contents/Resources/shared/icon_256x256@2x.png +0 -0
  137. data/documentation_project/Contents/Resources/shared/icon_32x32.png +0 -0
  138. data/documentation_project/Contents/Resources/shared/icon_32x32@2x.png +0 -0
  139. data/documentation_project/Contents/Resources/shared/pro-icon_256x256.png +0 -0
  140. data/documentation_project/Contents/Resources/shared/pro-icon_256x256@2x.png +0 -0
  141. data/documentation_project/Contents/Resources/shared/pro-icon_32x32.png +0 -0
  142. data/documentation_project/Contents/Resources/shared/pro-icon_32x32@2x.png +0 -0
  143. data/documentation_project/Gemfile +51 -0
  144. data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/project.pbxproj +529 -0
  145. data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  146. data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/xcshareddata/xcschemes/Help (free).xcscheme +80 -0
  147. data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/xcshareddata/xcschemes/HelpViewerApp (free).xcscheme +91 -0
  148. data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/xcshareddata/xcschemes/HelpViewerApp (pro).xcscheme +91 -0
  149. data/documentation_project/HelpViewerApp/HelpViewerApp/AppDelegate.h +16 -0
  150. data/documentation_project/HelpViewerApp/HelpViewerApp/AppDelegate.m +45 -0
  151. data/documentation_project/HelpViewerApp/HelpViewerApp/Assets.xcassets/AppIcon.appiconset/Contents.json +58 -0
  152. data/documentation_project/HelpViewerApp/HelpViewerApp/Base.lproj/MainMenu.xib +115 -0
  153. data/documentation_project/HelpViewerApp/HelpViewerApp/Info-free.plist +38 -0
  154. data/documentation_project/HelpViewerApp/HelpViewerApp/Info-pro.plist +38 -0
  155. data/documentation_project/HelpViewerApp/HelpViewerApp/main.m +13 -0
  156. data/documentation_project/HelpViewerApp/README.md +43 -0
  157. data/documentation_project/Middlemac (free).help/.gitignore +3 -0
  158. data/documentation_project/Middlemac (pro).help/.gitignore +3 -0
  159. data/documentation_project/config.rb +309 -0
  160. data/documentation_project/middlemac.webloc +0 -0
  161. data/features/main_features.feature +44 -0
  162. data/features/support/env.rb +20 -0
  163. data/fixtures/middlemac_app/.gitignore +25 -0
  164. data/fixtures/middlemac_app/Contents/Info.plist.erb +42 -0
  165. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/10_hello_world_file.html.md.erb +22 -0
  166. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/20_goodbye_world_file.html.md.erb +22 -0
  167. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/30_sample_group_number_one/index.html.md.erb +24 -0
  168. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/30_sample_group_number_one/page_one.html.md.erb +20 -0
  169. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/30_sample_group_number_one/page_two.html.md.erb +19 -0
  170. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/01_nested_group_example/01_page_one.html.md.erb +18 -0
  171. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/01_nested_group_example/02_pagina_dos.html.md.erb +19 -0
  172. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/01_nested_group_example/03_page_san.html.md.erb +18 -0
  173. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/01_nested_group_example/index.html.md.erb +18 -0
  174. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/02_page_two.html.md.erb +19 -0
  175. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/03_page_three.html.md.erb +19 -0
  176. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/index.html.md.erb +24 -0
  177. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/45_testing_world_file.html.md.erb +55 -0
  178. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/50_entire_world_file.html.md.erb +15 -0
  179. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/InfoPlist.strings.erb +10 -0
  180. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/_new_style_partial.erb +1 -0
  181. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_data/globals.yml +11 -0
  182. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/layout-html4.haml +22 -0
  183. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/layout-xhtml.haml +28 -0
  184. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/template-logo-large.haml +30 -0
  185. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/template-logo-medium.haml +30 -0
  186. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/template-logo-small.haml +30 -0
  187. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/FontAwesome.otf +0 -0
  188. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
  189. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.svg +655 -0
  190. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
  191. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
  192. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
  193. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/images/_empty_directory.html.md.erb +1 -0
  194. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/javascripts/all.js +1 -0
  195. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs.haml +11 -0
  196. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs_alt.haml +15 -0
  197. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_brethren.haml +18 -0
  198. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_brethren_index.haml +14 -0
  199. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_legitimate_children.haml +16 -0
  200. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_prev_next.haml +21 -0
  201. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_toc_index.haml +21 -0
  202. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_partials_dir_partial.erb +1 -0
  203. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/_apple_helpbook.scss +946 -0
  204. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/_github.scss +61 -0
  205. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/_normalize.scss +374 -0
  206. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/breadcrumb-separator-light.png +0 -0
  207. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/image_sizes.css.erb +8 -0
  208. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/style.css.scss +4 -0
  209. data/fixtures/middlemac_app/Contents/Resources/Base.lproj/index.html.md.erb +17 -0
  210. data/fixtures/middlemac_app/Contents/Resources/shared/icon_256x256.png +0 -0
  211. data/fixtures/middlemac_app/Contents/Resources/shared/icon_256x256@2x.png +0 -0
  212. data/fixtures/middlemac_app/Contents/Resources/shared/icon_32x32.png +0 -0
  213. data/fixtures/middlemac_app/Contents/Resources/shared/icon_32x32@2x.png +0 -0
  214. data/fixtures/middlemac_app/Gemfile +51 -0
  215. data/fixtures/middlemac_app/config.rb +309 -0
  216. data/fixtures/middlemac_app/middlemac.webloc +0 -0
  217. data/lib/middlemac.rb +6 -0
  218. data/lib/middlemac/extension.rb +274 -0
  219. data/lib/middlemac/version.rb +5 -0
  220. data/middlemac.gemspec +38 -0
  221. data/yard/readme.md +9 -0
  222. data/yard/template-grouped/default/module/html/method_details_list.erb +11 -0
  223. data/yard/template-partials/default/method_details/setup.rb +4 -0
  224. data/yard/template-partials/default/module/html/attribute_details.erb +9 -0
  225. data/yard/template-partials/default/module/html/method_details_list.erb +10 -0
  226. data/yard/template-partials/default/module/setup.rb +6 -0
  227. data/yard/template-partials/default/onefile/html/layout.erb +1 -0
  228. data/yard/template-partials/default/onefile/html/setup.rb +4 -0
  229. data/yard/yard_extensions.rb +109 -0
  230. metadata +454 -0
@@ -0,0 +1,247 @@
1
+ ---
2
+ title: Helpers
3
+ blurb: A brief look at how <em>Middlemac</em>’s Helpers can help you out.
4
+ layout: template-logo-medium
5
+ ---
6
+ <%= md_links %>
7
+ <%= md_images %>
8
+
9
+
10
+ <%= current_page.data.title %>
11
+ ==============================
12
+
13
+ <%= current_page.data.blurb %>
14
+
15
+ Helpers are methods that return a string, typically a snippet of HTML code, or
16
+ sometimes a value that can be used with ERB. This page highlights some of the
17
+ helpers available in _Middleman_ and added via _Middlemac_.
18
+
19
+
20
+ _Middleman_ helpers
21
+ -------------------
22
+
23
+ _Middleman_ has several useful, built-in helpers documented on its
24
+ [web site](http://middlemanapp.com/basics/helper_methods/). These are some of
25
+ the most common ones you will use.
26
+
27
+ `link_to`
28
+
29
+ : This helper greatly simplifies links when you’re not able or willing to use
30
+ Markdown links.
31
+
32
+ ~~~ erb
33
+ <%%= link_to 'Content text', 'http://example.com' %>
34
+ ~~~
35
+
36
+ ~~~ erb
37
+ <%= link_to 'Content text', 'http://example.com' %>
38
+ ~~~
39
+
40
+ You can even use a _Middleman_ resource for the second parameter:
41
+
42
+ ~~~ erb
43
+ <%%= link_to 'Main Page', current_page.breadcrumbs.first %>
44
+ ~~~
45
+
46
+ ~~~ erb
47
+ <%= link_to 'Main Page', current_page.breadcrumbs.first %>
48
+ ~~~
49
+
50
+ And you can specify one or more attributes like so:
51
+
52
+ ~~~ erb
53
+ <%%= link_to 'test', '#', :title => 'test' , :'data-test' => 'data attribute test' %>
54
+ ~~~
55
+
56
+ ~~~ erb
57
+ <%= link_to 'test', '#', :title => 'test' , :'data-test' => 'data attribute test' %>
58
+ ~~~
59
+
60
+
61
+ `image_tag`
62
+
63
+ : This helper simplifies adding images to your documents. It knows the location
64
+ of your images if you’ve followed the conventions.
65
+
66
+ ~~~ erb
67
+ <%%= image_tag 'my_image.png' %>
68
+ ~~~
69
+
70
+ ~~~ erb
71
+ <%= image_tag 'my_image.png' %>
72
+ ~~~
73
+
74
+ You can also specify attributes:
75
+
76
+ ~~~ erb
77
+ <%%= image_tag 'my_image.png', :alt => 'A murder of crows', :title => 'Birds' %>
78
+ ~~~
79
+
80
+ ~~~ erb
81
+ <%= image_tag 'my_image.png', :alt => 'A murder of crows', :title => 'Birds' %>
82
+ ~~~
83
+
84
+ Although these two examples describe _Middleman_’s built-in `image_tag`
85
+ helper, _Middlemac_ can extend this functionality even more.
86
+
87
+
88
+ `content_for`
89
+
90
+ : The built-in templates include an area for “See Also” where you might want to
91
+ include links in addition to the automatically generated links. You can do
92
+ this with the `contentfor` helper.
93
+
94
+ ~~~ erb
95
+ <%% content_for :seeAlso do %>
96
+ <%%= link_to 'Some interesting site', 'http://example.com' %>
97
+ <%% end %>
98
+ ~~~
99
+
100
+ As you get more advanced with your use of _Middleman_, you will certainly
101
+ think of more uses for this.
102
+
103
+
104
+ Helpers that Middlemac Overrides
105
+ --------------------------------
106
+
107
+ _Middlemac_ overrides the behavior to some _Middleman_ partials in order to
108
+ provide extra functionality and/or to provide backward compatibility. They are
109
+ fully documented in [their reference section][helpers_ext_ref].
110
+
111
+ `partial`
112
+ : Starting with _Middleman_ version 4, the use of `partials_dir` was removed,
113
+ and now _Middleman_ expects a full path to partials. _Middlemac_, though
114
+ provides this helper with backwards compatibility. If you set `partials_dir`
115
+ in the `activate :Middlemac` portion of `config.rb`, then _Middlemac_ will
116
+ first check this directory for your partial before using _Middleman_’s
117
+ default behavior.
118
+
119
+ `image_tag`
120
+ : _Middlemac_ adds considerable functionality to the base `image_tag` helper.
121
+
122
+ - If your image name begins with the magic prefix `all-`, then
123
+ _Middlemac_ will substitute an image prefixed with the name of the
124
+ current target, if it exists (otherwise the `all-` image will be used).
125
+ This magic prefix is configurable in your `config.rb` file.
126
+
127
+ - If the image that you specify has an `@2x` version, then a `srcset`
128
+ attribute specifying this Retina image will automatically be added for
129
+ you (unless you’ve added a `srcset` attribute yourself. This even works
130
+ with magic prefixes.
131
+
132
+ For example if you specify image `all-example.png` and your target is
133
+ "pro", _and_ if the images exist, then _Middlemac_ will generate an
134
+ image tag specifying "pro-example.png" and "pro-example@2x.png" for
135
+ you.
136
+
137
+ - You can specify `:target` and/or `:feature` in the `image_tag` options
138
+ to ensure that a tag is only generated if you are building the correct
139
+ target, or if the target includes the specified feature. This provides
140
+ a handy alternative to **if target_name?** and **if target_feature?**
141
+ blocks in your code.
142
+
143
+
144
+ ### `image_tag` Target/Feature example
145
+
146
+ This example is a standard use of the `image_tag` helper with an ordinary file
147
+ wherein the `@2x` resource is included as a `srcset` automatically.
148
+
149
+ ~~~ erb
150
+ <%%= image_tag 'middlemac-logo-small.png' %>
151
+ ~~~
152
+
153
+ ~~~ erb
154
+ <%= image_tag 'middlemac-logo-small.png' %>
155
+ ~~~
156
+
157
+ <%= image_tag 'middlemac-logo-small.png' %>
158
+
159
+ * * *
160
+
161
+ This example shows an icon with an image prefixed `all-`, however no target
162
+ specific images are in the image directory. There is an `@2x` version available,
163
+ though, so will be automatically used as the `srcset`.
164
+
165
+ ~~~ erb
166
+ <%%= image_tag 'all-sample.png' %>
167
+ ~~~
168
+
169
+ ~~~ erb
170
+ <%= image_tag 'all-sample.png' %>
171
+ ~~~
172
+
173
+ <%= image_tag 'all-sample.png' %>
174
+
175
+
176
+ * * *
177
+
178
+ The next example selects the image based on the target automatically. No `@2x`
179
+ resources are available and so no `srcset` is added.
180
+
181
+ ~~~ erb
182
+ <%%= image_tag 'all-middlemac-logo-small.png' %>
183
+ ~~~
184
+
185
+ ~~~ erb
186
+ <%= image_tag 'all-middlemac-logo-small.png' %>
187
+ ~~~
188
+
189
+ <%= image_tag 'all-middlemac-logo-small.png' %>
190
+
191
+
192
+ * * *
193
+
194
+ Finally, let’s add a `:target` option to the `image_tag` helper. If you’re
195
+ using the Pro version of this documentation, you will see the logo, otherwise
196
+ there will be no image.
197
+
198
+ ~~~ erb
199
+ <%%= image_tag 'all-sample.png', :target=>:pro %>
200
+ ~~~
201
+
202
+ ~~~ erb
203
+ <%= image_tag 'all-sample.png', :target=>:pro %>
204
+ ~~~
205
+
206
+ <%= image_tag 'all-sample.png', :target=>:pro %>
207
+
208
+
209
+
210
+ * * *
211
+
212
+ _Middlemac_ helpers
213
+ -------------------
214
+
215
+ _Middlemac_ introduces several other helpers that are available in your files.
216
+ A comprehensive list is available in the [reference section][reference-index],
217
+ but these highlight some of the helpers that you’ll use quite often.
218
+
219
+ `cfBundleIdentifier`
220
+ : Returns the product `CFBundleIdentifier` for the current target.
221
+
222
+ `cfBundleName`
223
+ : Returns the product `CFBundleName` for the current
224
+ target.
225
+
226
+ `product_name`
227
+ : Returns the `ProductName` for the current target.
228
+
229
+ `product_uri`
230
+ : Returns the `ProductURI` for the current target.
231
+
232
+ `target_name`
233
+ : Returns the current build target.
234
+
235
+ `target_name?(proposal)`
236
+ : Is the current target `proposal`?
237
+
238
+ `target_feature?(proposal)`
239
+ : Does the target have the feature `feature`?
240
+
241
+
242
+ Other Helpers
243
+ -------------
244
+
245
+ _Middlemac_ is a system consisting of several gems, all of which contribute
246
+ helpers of their own. These are completely documented in the [reference
247
+ section][reference-index].
@@ -0,0 +1,121 @@
1
+ ---
2
+ title: Partials
3
+ blurb: Take advantage of <em>Middlemac</em>’s partials, and maybe even learn to
4
+ write your own!
5
+ layout: template-logo-medium
6
+ ---
7
+ <%= md_links %>
8
+ <%= md_images %>
9
+
10
+
11
+ <%= current_page.data.title %>
12
+ ==============================
13
+
14
+ <%= current_page.data.blurb %>
15
+
16
+ _Middlemac_ includes several partials that it uses to provide a structured,
17
+ easy to use framework for generating Apple Help Books. You can use these
18
+ partials as they are or modify them to suit your preferences.
19
+
20
+ The included partials are mostly functional, but you can also make partials for
21
+ other content that you use repeatedly throughout your project.
22
+
23
+ Note that all partials source filenames are prefixed with an underscore, and
24
+ they also don’t have an `.html` extension. Partials will be included in your
25
+ content pages; we don’t want _Middleman_ to output them into the build
26
+ directory!
27
+ {:.note}
28
+
29
+ Although the partials discussed below are included in the source code for this
30
+ documentation project, they’re not used in this project. Instead this project
31
+ uses the helpers that correspond to the partials below.
32
+ {:.note}
33
+
34
+
35
+ Included partials
36
+ -----------------
37
+
38
+ Note: because partials are included with the `partial` helper without the
39
+ leading underscore and extension, by convention they are mentioned in this
40
+ documentation without these decorations, too.
41
+
42
+ `nav_breadcrumbs` and `nav_breadcrumbs_alt`
43
+ : These (two variations) render the breadcrumbs widget at the top of the
44
+ window.
45
+
46
+ `nav_brethren` and `nav_brethren_index`
47
+ : These partials render lists of all sibling pages that have a sort order and
48
+ are part of the current target and feature settings. `nav_brethren` includes
49
+ the page’s `:blurb` front matter data, and `nav_brethren_index` lacks this.
50
+
51
+ `nav_legitimate_children`
52
+ : Renders a list with link and blurb for all legitimate children, i.e.,
53
+ children that have a sort order and are allowed by the current target and
54
+ features settings.
55
+
56
+ `nav_prev_next`
57
+ : This partial renders the navigation widget on pages that have it enabled.
58
+
59
+ `nav_toc_index`
60
+ : Renders a site-map style index starting at `current_page` or at a passed-in
61
+ resource.
62
+
63
+ Partials are an excellent alternative to the provided helpers, especially if
64
+ you want to make modifications. Because they correspond exactly with their
65
+ eponymic helpers, you should refer to the [helper API reference][helpers_ref].
66
+
67
+
68
+ Your Own Partials
69
+ -----------------
70
+
71
+ The included partials are purely functional, i.e., they provide service to key
72
+ parts of _Middlemac_’s framework. You can write your own partials that provide
73
+ functionality, too, such as rendering something from a
74
+ [local data file][using_local_data].
75
+
76
+ You can also use partials to contain oft-used content. Maybe pieces of a change
77
+ log, should you want to present that information to your users in multiple
78
+ places. Maybe common warnings that can be included in multiple pages.
79
+
80
+
81
+ Conventions
82
+ -----------
83
+
84
+ Partials should be placed into the correct `partials` directory so that
85
+ _Middleman_’s `partial` helper can find them.
86
+
87
+ Because partials are not rendered into final HTML output files, you should
88
+ prefix their filenames with and underscore, and _not_ include `.html` in the
89
+ extensions chain.
90
+
91
+ When using the `partial` helper, _Middleman_ already expects the actual file to
92
+ be prefixed with an underscore, therefore you should _not_ include the
93
+ underscore when you use the helper.
94
+
95
+ ~~~ erb
96
+ <%%= partial 'include_me' %>
97
+ ~~~
98
+
99
+ _not_
100
+
101
+ ~~~ erb
102
+ <%%= partial '_include_me' %>
103
+ ~~~
104
+
105
+ You can pass data to partials as local variable context within the partial.
106
+ For example:
107
+
108
+ ~~~ erb
109
+ <%%= partial 'hello_world', :locals => { :one => 'Rabbit', :color => 'pink' } %>
110
+ ~~~
111
+
112
+ Then, within the code of the partial, you will have local variables `one` and
113
+ `color` available to you with their respective values.
114
+
115
+ Note: these hash key-values use a symbol as a key, and a value as the value for
116
+ the key. This is not the same as assigning a value to the Ruby symbol, because
117
+ the symbol’s value is simply itself. The hash key is like an `id` object in an
118
+ `NSDictionary`. Then when passed to the partial, there will exist a new local
119
+ variable using the symbol name. The symbol `:one` becomes the variable `one`
120
+ having a string value “pink” in this example.
121
+ {:.note}
@@ -0,0 +1,60 @@
1
+ ---
2
+ title: Middlemac extended <em>resource</em> methods
3
+ blurb: <em>Middlemac</em> extends <em>Middleman</em>’s built in resource (page)
4
+ methods by adding several methods that make developing help books even
5
+ easier.
6
+ layout: template-logo-medium
7
+ ---
8
+ <%= md_links %>
9
+ <%= md_images %>
10
+
11
+ <% content_for :seeAlso do %>
12
+ <ul>
13
+ <li><%= link_to 'Resource API Documentation', '../reference/resource_ext_ref.html' %></li>
14
+ </ul>
15
+ <% end %>
16
+
17
+ <%= current_page.data.title %>
18
+ ==============================
19
+
20
+ <%= current_page.data.blurb %>
21
+
22
+ _Resources_ in _Middleman_-speak generally refers to pages in _Middleman_’s
23
+ internal site-map. As Ruby objects, resources have a lot of useful information
24
+ about them.
25
+
26
+ Note: there’s a lot you can do with _Middlemac_ without manipulating or using
27
+ resources directly. The _Middlemac_ framework does a lot of this manipulation
28
+ for you. There’s nothing in this documentation help book, for example, that uses
29
+ features not provided by the conventions.
30
+ {:.note}
31
+
32
+
33
+ Common _Middleman_ Resources
34
+ ----------------------------
35
+
36
+ Because _Middlemac_’s resources depend so heavily on the built-in resources, a
37
+ quick review and examples are in order.
38
+
39
+ `current_page` or `current_resource`
40
+ : The `current_page` resource is available in all of your help pages, as well
41
+ as the partials that your help pages include.
42
+
43
+ `current_page.breadcrumbs.first`
44
+ : This refers to the top level landing page of your help file.
45
+
46
+ _`resource`_`.parent`
47
+ : This references the parent resource. For example `current_page.parent` would
48
+ refer to the parent page of this one:
49
+ **<%= current_page.parent.data.title %>**.
50
+
51
+ _`resource`_`.brethren_next` and _`resource`_`.brethren_previous`
52
+ : These _Middlemac_ supplied references refer to the next and previous pages,
53
+ respectively, in the current group, and they are resources, too.
54
+
55
+
56
+ API Reference
57
+ -------------
58
+
59
+ Have a closer look at all of the _Middlemac_-provided resource extensions in
60
+ the [Resource API Documentation][resource_ext_ref].
@@ -0,0 +1,68 @@
1
+ ---
2
+ title: Including and excluding targets and features
3
+ blurb: A reference of how to use targets and features in more detail than that
4
+ provided in the Help Structure section.
5
+ layout: template-logo-medium
6
+ ---
7
+ <%= md_links %>
8
+ <%= md_images %>
9
+
10
+
11
+ <%= current_page.data.title %>
12
+ ==============================
13
+
14
+ <%= current_page.data.blurb %>
15
+
16
+
17
+ Why include and exclude?
18
+ ------------------------
19
+
20
+ Although _Middlemac_ is an excellent tool for developing single-target Apple
21
+ Help Books, it really shines when you want to develop multiple versions of
22
+ help books for multiple versions of your application.
23
+
24
+ Delivering a help system tailored _specifically_ for the version of the
25
+ application that it belongs to will increase user satisfaction by allowing them
26
+ to focus on the aspects of the help that’s applicable to them. No one wants to
27
+ attempt to solve a problem and then learn, during troubleshooting, that some
28
+ fancy feature is only available in some other version of your application.
29
+
30
+ You want to promote other versions of your application, certainly. Multiple
31
+ targets allows you appropriately place upsell messages without distracting
32
+ your users. It also allows you to avoid upselling the users who are already
33
+ using your premium or top-level version.
34
+
35
+ Maybe your application is available on your website and also the Mac App Store?
36
+ In this case there are certainly going to be feature differences. You web
37
+ version uses _Sparkle_ for updates, but the MAS version doesn’t. Your MAS
38
+ version requires users to authorize writing to user directories because of
39
+ sandboxing, whereas your web-distributed version does not.
40
+
41
+ Make your help files as polished as your applications, and users will be happy
42
+ and delighted without even really knowing why!
43
+
44
+
45
+ Include and Exclude Parts of Pages
46
+ ----------------------------------
47
+
48
+ In the simplest case you have help page that is present for all versions of your
49
+ help book, but some of the content will be different for different targets and
50
+ features. You can re-visit the [`target_name?`][targets] example and the
51
+ [`target_feature?`][features] example to review how to show and hide specific
52
+ content on each page.
53
+
54
+ Limit Images to Particular Targets and Features
55
+ -----------------------------------------------
56
+
57
+ Don't forget that the [`image_tag` helper][helpers_ext_ref] can be used with
58
+ parameters to limit images to certain targets and features, too.
59
+
60
+
61
+ Include and Exclude Entire Pages
62
+ --------------------------------
63
+
64
+ In the case of wanting to hide or show entire pages based on target or feature,
65
+ you’ve also seen the `target` and `exclude` [front matter][frontmatter] keys.
66
+ When used, you have excellent control over whether entire pages are visible or
67
+ not.
68
+