middlemac 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +24 -0
- data/.yardopts +7 -0
- data/CHANGELOG.md +43 -0
- data/Gemfile +18 -0
- data/LICENSE.md +22 -0
- data/README.md +225 -0
- data/Rakefile +213 -0
- data/bin/middlemac +103 -0
- data/documentation_project/.gitignore +37 -0
- data/documentation_project/Contents/Info.plist.erb +42 -0
- data/documentation_project/Contents/Resources/Base.lproj/010_what_is_middlemac/index.html.md.erb +126 -0
- data/documentation_project/Contents/Resources/Base.lproj/020_setup_tutorial/index.html.md.erb +168 -0
- data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/10_markdown_skill.html.md.erb +63 -0
- data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/20_frontmatter_skill.html.md.erb +54 -0
- data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/30_middleman_skill.html.md.erb +93 -0
- data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/40_ruby_skill.html.md.erb +67 -0
- data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/50_ruby_ecosystem.html.md.erb +136 -0
- data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/60_filetypes_skill.html.md.erb +165 -0
- data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/index.html.md.erb +35 -0
- data/documentation_project/Contents/Resources/Base.lproj/040_setup/index.html.md.erb +88 -0
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/010_directories_and_images.html.md.erb +176 -0
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/020_layouts_and_templates.html.md.erb +71 -0
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/025_css.html.md.erb +71 -0
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/030_groups.html.md.erb +83 -0
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/040_breadcrumbs.html.md.erb +43 -0
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/050_navigator.html.md.erb +26 -0
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/060_targets.html.md.erb +63 -0
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/070_features.html.md.erb +122 -0
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/index.html.md.erb +21 -0
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/not_free.html.md.erb +43 -0
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/not_pro.html.md.erb +43 -0
- data/documentation_project/Contents/Resources/Base.lproj/060_content/010_frontmatter.html.md.erb +88 -0
- data/documentation_project/Contents/Resources/Base.lproj/060_content/030_helpers.html.md.erb +247 -0
- data/documentation_project/Contents/Resources/Base.lproj/060_content/040_partials.html.md.erb +121 -0
- data/documentation_project/Contents/Resources/Base.lproj/060_content/050_resources.html.md.erb +60 -0
- data/documentation_project/Contents/Resources/Base.lproj/060_content/070_including_excluding.html.md.erb +68 -0
- data/documentation_project/Contents/Resources/Base.lproj/060_content/080_markdown_links_images.html.md.erb +93 -0
- data/documentation_project/Contents/Resources/Base.lproj/060_content/090_css_image_sizes.html.md.erb +90 -0
- data/documentation_project/Contents/Resources/Base.lproj/060_content/100_using_local_data.html.md.erb +37 -0
- data/documentation_project/Contents/Resources/Base.lproj/060_content/index.html.md.erb +21 -0
- data/documentation_project/Contents/Resources/Base.lproj/070_preview_build/index.html.md.erb +78 -0
- data/documentation_project/Contents/Resources/Base.lproj/090_build_application/10_apple_help_setup.html.md.erb +110 -0
- data/documentation_project/Contents/Resources/Base.lproj/090_build_application/20_xcode_integration.html.md.erb +64 -0
- data/documentation_project/Contents/Resources/Base.lproj/090_build_application/index.html.md.erb +25 -0
- data/documentation_project/Contents/Resources/Base.lproj/100_reference/10_cli_ref.html.md.erb +72 -0
- data/documentation_project/Contents/Resources/Base.lproj/100_reference/20_config_ref.html.md.erb +56 -0
- data/documentation_project/Contents/Resources/Base.lproj/100_reference/30_helpers_ext_ref.html.md.erb +51 -0
- data/documentation_project/Contents/Resources/Base.lproj/100_reference/40_helpers_ref.html.md.erb +45 -0
- data/documentation_project/Contents/Resources/Base.lproj/100_reference/50_resource_ext_ref.html.md.erb +25 -0
- data/documentation_project/Contents/Resources/Base.lproj/100_reference/index.html.md.erb +26 -0
- data/documentation_project/Contents/Resources/Base.lproj/110_acknowledgements/index.html.md.erb +61 -0
- data/documentation_project/Contents/Resources/Base.lproj/120_backwards_compatibility/index.html.md.erb +88 -0
- data/documentation_project/Contents/Resources/Base.lproj/130_all_help_content/index.html.md.erb +15 -0
- data/documentation_project/Contents/Resources/Base.lproj/InfoPlist.strings.erb +10 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/_data/globals.yml +11 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/layout-html4.haml +22 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/layout-xhtml.haml +28 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/template-logo-large.haml +30 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/template-logo-medium.haml +30 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/template-logo-small.haml +30 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/FontAwesome.otf +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.svg +655 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/all-sample.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/all-sample@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/free-middlemac-logo-small.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/free-middlemac-logo-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/free-middlemac-logo.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/free-middlemac-logo@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/middlemac-logo-small.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/middlemac-logo-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/middlemac-logo.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/middlemac-logo@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras-small.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras-small.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-pagegroups/middleman-pagegroups-small.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-pagegroups/middleman-pagegroups.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/free-logo-small.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/free-logo-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/free-logo.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/free-logo@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/pro-logo-small.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/pro-logo-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/pro-logo.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-targets/pro-logo@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/pro-middlemac-logo-small.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/pro-middlemac-logo-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/pro-middlemac-logo.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/pro-middlemac-logo@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/javascripts/all.js +1 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs.haml +11 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs_alt.haml +15 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_brethren.haml +18 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_brethren_index.haml +14 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_legitimate_children.haml +16 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_prev_next.haml +21 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_toc_index.haml +21 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_extras_config.erb +200 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_extras_helpers.erb +146 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_extras_helpers_extended.erb +135 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_middlemac_config.erb +207 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_middlemac_helpers.erb +297 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_middlemac_helpers_extended.erb +96 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_config.erb +744 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_helpers.erb +710 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_helpers_css.erb +523 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_helpers_extended.erb +56 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_resources.erb +540 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_targets_config.erb +402 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_targets_helpers.erb +235 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_targets_helpers_extended.erb +138 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_targets_instance.erb +81 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_targets_resources.erb +109 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/_apple_helpbook.scss +946 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/_github.scss +61 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/_normalize.scss +374 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/breadcrumb-separator-light.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/image_sizes.css.erb +8 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/style.css.scss +4 -0
- data/documentation_project/Contents/Resources/Base.lproj/index.html.md.erb +31 -0
- data/documentation_project/Contents/Resources/shared/free-icon_256x256.png +0 -0
- data/documentation_project/Contents/Resources/shared/free-icon_256x256@2x.png +0 -0
- data/documentation_project/Contents/Resources/shared/free-icon_32x32.png +0 -0
- data/documentation_project/Contents/Resources/shared/free-icon_32x32@2x.png +0 -0
- data/documentation_project/Contents/Resources/shared/icon_256x256.png +0 -0
- data/documentation_project/Contents/Resources/shared/icon_256x256@2x.png +0 -0
- data/documentation_project/Contents/Resources/shared/icon_32x32.png +0 -0
- data/documentation_project/Contents/Resources/shared/icon_32x32@2x.png +0 -0
- data/documentation_project/Contents/Resources/shared/pro-icon_256x256.png +0 -0
- data/documentation_project/Contents/Resources/shared/pro-icon_256x256@2x.png +0 -0
- data/documentation_project/Contents/Resources/shared/pro-icon_32x32.png +0 -0
- data/documentation_project/Contents/Resources/shared/pro-icon_32x32@2x.png +0 -0
- data/documentation_project/Gemfile +51 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/project.pbxproj +529 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/xcshareddata/xcschemes/Help (free).xcscheme +80 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/xcshareddata/xcschemes/HelpViewerApp (free).xcscheme +91 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/xcshareddata/xcschemes/HelpViewerApp (pro).xcscheme +91 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp/AppDelegate.h +16 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp/AppDelegate.m +45 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp/Assets.xcassets/AppIcon.appiconset/Contents.json +58 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp/Base.lproj/MainMenu.xib +115 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp/Info-free.plist +38 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp/Info-pro.plist +38 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp/main.m +13 -0
- data/documentation_project/HelpViewerApp/README.md +43 -0
- data/documentation_project/Middlemac (free).help/.gitignore +3 -0
- data/documentation_project/Middlemac (pro).help/.gitignore +3 -0
- data/documentation_project/config.rb +309 -0
- data/documentation_project/middlemac.webloc +0 -0
- data/features/main_features.feature +44 -0
- data/features/support/env.rb +20 -0
- data/fixtures/middlemac_app/.gitignore +25 -0
- data/fixtures/middlemac_app/Contents/Info.plist.erb +42 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/10_hello_world_file.html.md.erb +22 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/20_goodbye_world_file.html.md.erb +22 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/30_sample_group_number_one/index.html.md.erb +24 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/30_sample_group_number_one/page_one.html.md.erb +20 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/30_sample_group_number_one/page_two.html.md.erb +19 -0
- 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
- 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
- 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
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/01_nested_group_example/index.html.md.erb +18 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/02_page_two.html.md.erb +19 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/03_page_three.html.md.erb +19 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/index.html.md.erb +24 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/45_testing_world_file.html.md.erb +55 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/50_entire_world_file.html.md.erb +15 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/InfoPlist.strings.erb +10 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/_new_style_partial.erb +1 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_data/globals.yml +11 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/layout-html4.haml +22 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/layout-xhtml.haml +28 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/template-logo-large.haml +30 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/template-logo-medium.haml +30 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/template-logo-small.haml +30 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/FontAwesome.otf +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.svg +655 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/images/_empty_directory.html.md.erb +1 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/javascripts/all.js +1 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs.haml +11 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs_alt.haml +15 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_brethren.haml +18 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_brethren_index.haml +14 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_legitimate_children.haml +16 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_prev_next.haml +21 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_toc_index.haml +21 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_partials_dir_partial.erb +1 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/_apple_helpbook.scss +946 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/_github.scss +61 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/_normalize.scss +374 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/breadcrumb-separator-light.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/image_sizes.css.erb +8 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/style.css.scss +4 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/index.html.md.erb +17 -0
- data/fixtures/middlemac_app/Contents/Resources/shared/icon_256x256.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/shared/icon_256x256@2x.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/shared/icon_32x32.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/shared/icon_32x32@2x.png +0 -0
- data/fixtures/middlemac_app/Gemfile +51 -0
- data/fixtures/middlemac_app/config.rb +309 -0
- data/fixtures/middlemac_app/middlemac.webloc +0 -0
- data/lib/middlemac.rb +6 -0
- data/lib/middlemac/extension.rb +274 -0
- data/lib/middlemac/version.rb +5 -0
- data/middlemac.gemspec +38 -0
- data/yard/readme.md +9 -0
- data/yard/template-grouped/default/module/html/method_details_list.erb +11 -0
- data/yard/template-partials/default/method_details/setup.rb +4 -0
- data/yard/template-partials/default/module/html/attribute_details.erb +9 -0
- data/yard/template-partials/default/module/html/method_details_list.erb +10 -0
- data/yard/template-partials/default/module/setup.rb +6 -0
- data/yard/template-partials/default/onefile/html/layout.erb +1 -0
- data/yard/template-partials/default/onefile/html/setup.rb +4 -0
- data/yard/yard_extensions.rb +109 -0
- metadata +454 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: d2b3410abbcf1647fe5bb583455675fc72a44c94
|
|
4
|
+
data.tar.gz: 92adcc43e61ddf09e65e84c99eb031fb183b3cb1
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b8ec6cd32d7a0f7c23fff233455cb8b9d52ab4031db52c3561516f06879ba07f915142f70c208f0da68c23d88ac696ecd1eb889c6a52a8dbbed059d30624fb0e
|
|
7
|
+
data.tar.gz: e523e9deb1141f927269495e61aa0fa8afdde9105f8e9fef6545e6cb88c12f156d599e708713b0e94a69968d7060a73cd8964606fbfe2d94c1ff69d3723019d4
|
data/.gitignore
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Rubymine noise
|
|
2
|
+
.idea/
|
|
3
|
+
|
|
4
|
+
# BBedit noise
|
|
5
|
+
*.bbprojectd
|
|
6
|
+
|
|
7
|
+
# Mac OS X noise
|
|
8
|
+
.DS_Store
|
|
9
|
+
|
|
10
|
+
# Ignore bundler lock files
|
|
11
|
+
Gemfile.lock
|
|
12
|
+
|
|
13
|
+
# Ignore pkg folder
|
|
14
|
+
/pkg
|
|
15
|
+
|
|
16
|
+
# Ignore build folders
|
|
17
|
+
build/*
|
|
18
|
+
|
|
19
|
+
# Yard cruft
|
|
20
|
+
/doc/
|
|
21
|
+
/.yardoc
|
|
22
|
+
|
|
23
|
+
# Aruba
|
|
24
|
+
/tmp/
|
data/.yardopts
ADDED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
middlemac change log
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
- Version 2.0.0 / 2016-May-15
|
|
5
|
+
|
|
6
|
+
- All new Middlemac version 2.0.0!
|
|
7
|
+
- _Significant_, major upgrade to _Middlemac_.
|
|
8
|
+
- Now packaged as a real Ruby gem.
|
|
9
|
+
- Uses the latest Middleman 4.1 series (4.1.7 or newer required).
|
|
10
|
+
- This version _will_ break old projects.
|
|
11
|
+
- Read the full documentation to understand the full scope of changes.
|
|
12
|
+
|
|
13
|
+
- Previous
|
|
14
|
+
- Updated to newer middleman.
|
|
15
|
+
- Use font-awesome-sass gem instead of keeping it in the file system.
|
|
16
|
+
- Fixed 256x256 image file.
|
|
17
|
+
- Added built output. RC1
|
|
18
|
+
- Content. Readme. Version.
|
|
19
|
+
- Ibid.
|
|
20
|
+
- More content added.
|
|
21
|
+
- Typo.
|
|
22
|
+
- More content
|
|
23
|
+
- More yummy content\!
|
|
24
|
+
- Partials overview complete.
|
|
25
|
+
- More content. yay
|
|
26
|
+
- Added new content.
|
|
27
|
+
- Header information added.
|
|
28
|
+
- Header information added.
|
|
29
|
+
- Content cleanup; new features content.
|
|
30
|
+
- Reverted to full breadcrumbs; breadcrumb css tweak.
|
|
31
|
+
- Separate navigate (children do) and navigator (I do)
|
|
32
|
+
- Content enhancements.
|
|
33
|
+
- Fixed indentation error.
|
|
34
|
+
- README, getting started.
|
|
35
|
+
- Overhaul of helpers and sitemap manipulators complete.
|
|
36
|
+
- BRETHREN checkpoint
|
|
37
|
+
- Continued refactoring resources.
|
|
38
|
+
- Begin refactor helpers to methods.
|
|
39
|
+
- Topical content.
|
|
40
|
+
- Bug-proofing.
|
|
41
|
+
- Added topical content.
|
|
42
|
+
- Removed conflicting LESS stuff.
|
|
43
|
+
- More content.
|
data/Gemfile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# If you do not have OpenSSL installed, update
|
|
2
|
+
# the following line to use "http://" instead
|
|
3
|
+
source 'https://rubygems.org'
|
|
4
|
+
|
|
5
|
+
# Specify your gem's dependencies in middleman-pagegroups.gemspec
|
|
6
|
+
gemspec
|
|
7
|
+
|
|
8
|
+
group :development do
|
|
9
|
+
gem 'rake'
|
|
10
|
+
gem 'rdoc'
|
|
11
|
+
gem 'yard'
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
group :test do
|
|
15
|
+
gem 'cucumber'
|
|
16
|
+
gem 'aruba'
|
|
17
|
+
gem 'rspec'
|
|
18
|
+
end
|
data/LICENSE.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
===============
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2016 Jim Derry
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
Middlemac, the Middleman Build System for Mac OS X Help Projects
|
|
2
|
+
================================================================
|
|
3
|
+
[](https://badge.fury.io/rb/middlemac)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
_Middlemac_
|
|
7
|
+
|
|
8
|
+
This gem provides a complete solution to generating help documentation for
|
|
9
|
+
Mac OS X applications in the form of Help Books, using Middleman and a
|
|
10
|
+
selection of custom extensions to provide everything a developer needs.
|
|
11
|
+
|
|
12
|
+
Using this Apple Help Book building system leverages the tools of _Middleman_ to
|
|
13
|
+
make building end-user documentation for your Mac OS X applications a snap.
|
|
14
|
+
Whether you are targeting multiple versions of your application or a single
|
|
15
|
+
version, once properly configured, _Middlemac_ will take all of the pain out of
|
|
16
|
+
building help files.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Simple README
|
|
20
|
+
-------------
|
|
21
|
+
Jump to the [verbose README](#verbose-readme) and instructions below, otherwise…
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
Install the Gem
|
|
25
|
+
---------------
|
|
26
|
+
|
|
27
|
+
Install the gem in your preferred way, typically:
|
|
28
|
+
|
|
29
|
+
~~~ bash
|
|
30
|
+
gem install middlemac
|
|
31
|
+
~~~
|
|
32
|
+
|
|
33
|
+
From git source:
|
|
34
|
+
|
|
35
|
+
~~~ bash
|
|
36
|
+
rake install
|
|
37
|
+
~~~
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
Documentation
|
|
41
|
+
-------------
|
|
42
|
+
|
|
43
|
+
The complete documentation leverages the features of this gem in order to better
|
|
44
|
+
document them. Having installed the gem, read the full documentation in your
|
|
45
|
+
web browser:
|
|
46
|
+
|
|
47
|
+
~~~ bash
|
|
48
|
+
middlemac documentation
|
|
49
|
+
cd middlemac-docs/
|
|
50
|
+
bundle install
|
|
51
|
+
bundle exec middleman server
|
|
52
|
+
~~~
|
|
53
|
+
|
|
54
|
+
And then open your web browser to the address specified (typically
|
|
55
|
+
`localhost:4567`).
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
License
|
|
59
|
+
-------
|
|
60
|
+
|
|
61
|
+
MIT. See `LICENSE.md`.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
Changelog
|
|
65
|
+
---------
|
|
66
|
+
|
|
67
|
+
See `CHANGELOG.md` for point changes, or simply have a look at the commit
|
|
68
|
+
history for non-version changes (such as readme updates).
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
Verbose README
|
|
72
|
+
==============
|
|
73
|
+
|
|
74
|
+
About
|
|
75
|
+
-----
|
|
76
|
+
|
|
77
|
+
_Middlemac_ makes it simple to do this in Terminal…
|
|
78
|
+
|
|
79
|
+
`bundle exec middleman build_all`
|
|
80
|
+
|
|
81
|
+
…and end up with versions of your helpbooks with all of the Apple-required files
|
|
82
|
+
in the Apple-required formats in the correct locations of your XCode build
|
|
83
|
+
directory. Simply build your help target, run your application, and find that
|
|
84
|
+
it just works!
|
|
85
|
+
|
|
86
|
+
At its simplest _Middlemac_ offers:
|
|
87
|
+
|
|
88
|
+
- Write your help files with plain text using the **Markdown** format (if you
|
|
89
|
+
are reading this file in a text editor, this is an example of Markdown).
|
|
90
|
+
- Single or multiple build **targets**, e.g., your `pro` target can include
|
|
91
|
+
content specific to the professional version of your application.
|
|
92
|
+
- **Features** support for each build target, e.g. each of your build targets
|
|
93
|
+
can specify whether or not they support specific features, and this content
|
|
94
|
+
will be included or excluded as your needs require.
|
|
95
|
+
- A low learning curve if you’re a developer.
|
|
96
|
+
- A set of conventions and tools that make automatic tables of contents,
|
|
97
|
+
automatic sections, and automatic behavior effortless to implement.
|
|
98
|
+
- A basic, Apple-like CSS stylesheet and set of templates that can be used as-is
|
|
99
|
+
or easily tweaked to suit your needs.
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
**Please note that _Middlemac_ is not associated in any way with the team at
|
|
103
|
+
_Middleman_.**
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
Documentation
|
|
107
|
+
-------------
|
|
108
|
+
|
|
109
|
+
_Middlemac_’s documentation is included in the starter project (and more than
|
|
110
|
+
likely at [http://www.balthisar.com/manuals](http://www.balthisar.com/manuals)).
|
|
111
|
+
There are multiple ways you could be reading this content now, but for now we
|
|
112
|
+
will assume that you have not yet installed _Middlemac_ and its dependencies.
|
|
113
|
+
|
|
114
|
+
To get started and read the full documentation, make sure that your system has
|
|
115
|
+
[Ruby](https://www.ruby-lang.org/) installed (it comes pre-installed on Mac OS X
|
|
116
|
+
and some Linuxes), and follow these steps below.
|
|
117
|
+
|
|
118
|
+
We now recommend the use of the Ruby Version Manager [(RVM)](https://rvm.io/).
|
|
119
|
+
While installation and setup of RVM is entirely outside the scope of this
|
|
120
|
+
tutorial, it avoids the use of `sudo` and the occasional hassles involved with
|
|
121
|
+
using the built in version of Ruby.
|
|
122
|
+
|
|
123
|
+
Note that depending on your system’s setup you might have to prefix some of the
|
|
124
|
+
commands below with `sudo`. For example if the instruction is given as
|
|
125
|
+
`gem install bundler` and a permissions error is reported, you may probably
|
|
126
|
+
have to use `sudo gem install bundler` instead.
|
|
127
|
+
|
|
128
|
+
If you’re behind a proxy and haven’t already setup an `http-proxy` environment
|
|
129
|
+
variable, then that previous clause is a good hint and Google is your friend.
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
Installation
|
|
133
|
+
------------
|
|
134
|
+
|
|
135
|
+
### Install XCode
|
|
136
|
+
|
|
137
|
+
If you’re on a Mac you’ll have to install XCode first, or at least the XCode
|
|
138
|
+
command line tools. You can _try_ just installing the tools first:
|
|
139
|
+
|
|
140
|
+
~~~ bash
|
|
141
|
+
xcode-select --install
|
|
142
|
+
~~~
|
|
143
|
+
|
|
144
|
+
If that fails or the rest of the installation fails, then install all of XCode.
|
|
145
|
+
It’s available in the App Store. It’s free of charge. And you’re using this
|
|
146
|
+
project to develop help for Mac OS X applications that you’re developing using
|
|
147
|
+
XCode anyway. Install it, already!
|
|
148
|
+
|
|
149
|
+
Dependencies on Linux are left up to you. Most modern Linuxes will prompt you to
|
|
150
|
+
install packages that are missing.
|
|
151
|
+
|
|
152
|
+
_Middlemac_ works quite well on Linux, but keep in mind that Linux doesn’t have
|
|
153
|
+
the help indexing tool that’s required in order to build a proper helpbook.
|
|
154
|
+
Other than for generating your final helpbook, Linux makes a fine development
|
|
155
|
+
environment.
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### Install _Middlemac_
|
|
159
|
+
|
|
160
|
+
~~~ bash
|
|
161
|
+
gem install middlemac
|
|
162
|
+
~~~
|
|
163
|
+
|
|
164
|
+
### Install the documentation project
|
|
165
|
+
|
|
166
|
+
~~~ bash
|
|
167
|
+
middleman documentation
|
|
168
|
+
~~~
|
|
169
|
+
|
|
170
|
+
This will install _Middlemac_’s documentation project into a new directory
|
|
171
|
+
`middlemac-docs`.
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
### Go into the documentation directory
|
|
175
|
+
|
|
176
|
+
~~~ bash
|
|
177
|
+
cd middlemac-docs
|
|
178
|
+
~~~
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
### Install bundler (if not already installed)
|
|
182
|
+
|
|
183
|
+
~~~ bash
|
|
184
|
+
gem install bundler
|
|
185
|
+
~~~
|
|
186
|
+
|
|
187
|
+
Bundler is the most common Ruby package management system, and it will be used
|
|
188
|
+
to ensure that all of _Middlemac_’s dependencies are present.
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### Make sure all of the project dependencies are met
|
|
192
|
+
|
|
193
|
+
~~~ bash
|
|
194
|
+
bundle install
|
|
195
|
+
~~~
|
|
196
|
+
|
|
197
|
+
This tells bundler to install the remaining gems that _Middlemac_ requires to
|
|
198
|
+
function.
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
### Start the _Middleman_ server
|
|
202
|
+
|
|
203
|
+
_Middleman_ comes with its own HTTP server and requires no configuration. It
|
|
204
|
+
simply works, serving your helpbook as a website.
|
|
205
|
+
|
|
206
|
+
~~~ bash
|
|
207
|
+
bundle exec middleman --target free
|
|
208
|
+
~~~
|
|
209
|
+
|
|
210
|
+
This will start the server using our `:free` target.
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
### Open the site in your browser
|
|
214
|
+
|
|
215
|
+
Simply open the `middlemac.webloc` file from Finder to view the project results
|
|
216
|
+
in your default browser.
|
|
217
|
+
|
|
218
|
+
Or can open the bookmark file from Terminal with `open middleman.webloc`.
|
|
219
|
+
|
|
220
|
+
Or you prefer to open the help site manually, or if the .webloc file doesn’t
|
|
221
|
+
work on your Linux distro, you can usually go to
|
|
222
|
+
[http://localhost:4567/Resources/Base.lproj/](http://localhost:4567/Resources/Base.lproj/).
|
|
223
|
+
If you have setup a custom hostname, then `localhost` may not work for you.
|
|
224
|
+
|
|
225
|
+
See also the [change log](CHANGELOG.md) and the [license](LICENSE.md).
|
data/Rakefile
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
require 'bundler/gem_tasks'
|
|
2
|
+
require 'cucumber/rake/task'
|
|
3
|
+
require 'yard'
|
|
4
|
+
require 'git'
|
|
5
|
+
require File.expand_path('../lib/middlemac/version.rb', __FILE__)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
###############################################################################
|
|
9
|
+
# :default
|
|
10
|
+
# Define the default task.
|
|
11
|
+
###############################################################################
|
|
12
|
+
task :default => :test
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
###############################################################################
|
|
16
|
+
# :test
|
|
17
|
+
# Perform Cucumber testing.
|
|
18
|
+
###############################################################################
|
|
19
|
+
Cucumber::Rake::Task.new(:test, 'Features that must pass') do |task|
|
|
20
|
+
task.cucumber_opts = '--require features --color --tags ~@wip --strict --format QuietFormatter'
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
###############################################################################
|
|
25
|
+
# :yard
|
|
26
|
+
# Generate documentation using YARD. Note that there is a `.yardopts` file
|
|
27
|
+
# present that will load the `yard/yard_extensions.rb` file in order to
|
|
28
|
+
# control how output is generated. Output will be to the default `doc`
|
|
29
|
+
# directory using the template-grouped template, as a single page.
|
|
30
|
+
###############################################################################
|
|
31
|
+
YARD::Rake::YardocTask.new(:yard) do |task|
|
|
32
|
+
task.stats_options = ['--list-undoc']
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
###############################################################################
|
|
37
|
+
# :partials
|
|
38
|
+
# Generate documentation partials using YARD. These are used by the
|
|
39
|
+
# documentation project in order to include the API documentation.
|
|
40
|
+
###############################################################################
|
|
41
|
+
desc 'Make separate documents for documentation_project'
|
|
42
|
+
task :partials do
|
|
43
|
+
|
|
44
|
+
# Define the @!group to output file relationships.
|
|
45
|
+
sections = [
|
|
46
|
+
{ :file => '_yard_middlemac_helpers.erb', :group => 'Helpers', },
|
|
47
|
+
{ :file => '_yard_middlemac_helpers_extended.erb', :group => 'Extended Helpers' },
|
|
48
|
+
{ :file => '_yard_middlemac_config.erb', :group => 'Extension Configuration' },
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
# Define the output directory.
|
|
52
|
+
dest = File.join('documentation_project', 'Contents', 'Resources', 'Base.lproj', 'assets', 'partials')
|
|
53
|
+
|
|
54
|
+
# Run YARD multiple times, filtering the group that interests us.
|
|
55
|
+
sections.each do |s|
|
|
56
|
+
params = [
|
|
57
|
+
"--query 'o.group == \"#{s[:group]}\" || has_tag?(:author)'",
|
|
58
|
+
"-o #{dest}",
|
|
59
|
+
"-t default",
|
|
60
|
+
"-p #{File.join(File.dirname(__FILE__), 'yard', 'template-partials')}"
|
|
61
|
+
]
|
|
62
|
+
command = "yardoc #{params.join(' ')}"
|
|
63
|
+
puts command
|
|
64
|
+
system(command)
|
|
65
|
+
File.rename( File.join(dest, 'index.html'), File.join(dest, s[:file]) )
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
###############################################################################
|
|
72
|
+
# :version
|
|
73
|
+
# Displays the current version.
|
|
74
|
+
###############################################################################
|
|
75
|
+
desc 'Displays the current version'
|
|
76
|
+
task :version do
|
|
77
|
+
puts "Current version: #{Middleman::Middlemac::VERSION}"
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
###############################################################################
|
|
82
|
+
# :version_finalize
|
|
83
|
+
# Remove any wip suffix from the version, as we are ready to release.
|
|
84
|
+
###############################################################################
|
|
85
|
+
desc 'Remove any wip suffix from the version'
|
|
86
|
+
task :version_finalize do
|
|
87
|
+
version_old = Middleman::Middlemac::VERSION
|
|
88
|
+
version_new = version_old.sub('.wip', '')
|
|
89
|
+
update_versions( version_new )
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
###############################################################################
|
|
94
|
+
# :version_next_wip
|
|
95
|
+
# Increment the patch level and add a wip suffix. We are ready for work.
|
|
96
|
+
###############################################################################
|
|
97
|
+
desc 'Increment the patch level and add a wip suffix'
|
|
98
|
+
task :version_next_wip do
|
|
99
|
+
version_old = Middleman::Middlemac::VERSION
|
|
100
|
+
version_new = version_old.sub('.wip', '').split('.')
|
|
101
|
+
version_new.last.succ!
|
|
102
|
+
version_new = version_new.join('.') + '.wip'
|
|
103
|
+
update_versions( version_new )
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
###############################################################################
|
|
108
|
+
# :version_set
|
|
109
|
+
# Sets an arbitrary version.
|
|
110
|
+
###############################################################################
|
|
111
|
+
desc 'Sets all of the files to the version specified. Use rake version_set[value].'
|
|
112
|
+
task :version_set, :new_version do |t, args|
|
|
113
|
+
update_versions( args[:new_version] )
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
###############################################################################
|
|
118
|
+
# :log
|
|
119
|
+
# Generate the CHANGELOG.md file.
|
|
120
|
+
###############################################################################
|
|
121
|
+
desc 'Generate the CHANGELOG.md file'
|
|
122
|
+
task :log do
|
|
123
|
+
report = ''
|
|
124
|
+
report << "middlemac change log\n"
|
|
125
|
+
report << "====================\n"
|
|
126
|
+
|
|
127
|
+
Git.open( File.expand_path('..', __FILE__) ).log.each_with_index do |l, i|
|
|
128
|
+
|
|
129
|
+
version = nil
|
|
130
|
+
if i == 0 && !l.name.start_with?('tags/')
|
|
131
|
+
version = "Version #{Middleman::Middlemac::VERSION}"
|
|
132
|
+
elsif l.name.end_with?('^0')
|
|
133
|
+
version = "Version #{l.name.match(/tags\/v(.*)\^0/)[1]}"
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if version
|
|
137
|
+
report << "\n- #{version} / #{l.date.strftime('%Y-%B-%d')}\n"
|
|
138
|
+
report << "\n"
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
l.message.each_line.with_index do |line, lineno|
|
|
142
|
+
if lineno == 0
|
|
143
|
+
report << " - #{line}"
|
|
144
|
+
else
|
|
145
|
+
report << " #{line}" unless line.strip == ''
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
report << "\n"
|
|
149
|
+
end # Git.open
|
|
150
|
+
|
|
151
|
+
file = File.expand_path('../CHANGELOG.md', __FILE__)
|
|
152
|
+
File.write(file, report)
|
|
153
|
+
puts "The changelog has been written."
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
###############################################################################
|
|
158
|
+
# :pre_release
|
|
159
|
+
# Prepares the project for release.
|
|
160
|
+
###############################################################################
|
|
161
|
+
desc "Prepares the project for release"
|
|
162
|
+
task :pre_release do
|
|
163
|
+
|
|
164
|
+
if `git status -s`.length > 0
|
|
165
|
+
puts "Cannot continue because you have uncommitted changes."
|
|
166
|
+
exit 1
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
Rake::Task[:version_finalize].execute
|
|
170
|
+
Rake::Task[:partials].execute
|
|
171
|
+
Rake::Task[:log].execute
|
|
172
|
+
sh "git add -A"
|
|
173
|
+
sh "git commit --amend --no-edit"
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
private
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
###############################################################################
|
|
180
|
+
# update_versions
|
|
181
|
+
# Update the version in various files that depend on the correct version.
|
|
182
|
+
###############################################################################
|
|
183
|
+
def update_versions( version_new )
|
|
184
|
+
[ {
|
|
185
|
+
:file => File.expand_path('../lib/middlemac/version.rb', __FILE__),
|
|
186
|
+
:regex => /(?<=VERSION = ')(.*)(?=')/
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
:file => File.expand_path('../documentation_project/Gemfile', __FILE__),
|
|
190
|
+
:regex => /(?<=gem 'middlemac', '~> ).*(?=')/
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
:file => File.expand_path('../documentation_project/config.rb', __FILE__),
|
|
194
|
+
:regex => /(?<=:ProductVersion => ')(.*)(?=')/
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
:file => File.expand_path('../fixtures/middlemac_app/Gemfile', __FILE__),
|
|
198
|
+
:regex => /(?<=gem 'middlemac', '~> ).*(?=')/
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
:file => File.expand_path('../fixtures/middlemac_app/config.rb', __FILE__),
|
|
202
|
+
:regex => /(?<=:ProductVersion => ')(.*)(?=')/
|
|
203
|
+
},
|
|
204
|
+
].each do | item |
|
|
205
|
+
|
|
206
|
+
content = File.read( item[:file] )
|
|
207
|
+
content.gsub!( item[:regex], version_new )
|
|
208
|
+
File.write( item[:file], content )
|
|
209
|
+
puts "#{File.basename( item[:file] )} changed to '#{version_new}'."
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
Middleman::Middlemac::VERSION.replace version_new
|
|
213
|
+
end
|