middleman-presentation-core 0.16.0.alpha

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.
Files changed (223) hide show
  1. checksums.yaml +7 -0
  2. data/.rdebugrc +7 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +52 -0
  5. data/.simplecov +25 -0
  6. data/.yardopts +5 -0
  7. data/Guardfile +13 -0
  8. data/LICENSE.software +21 -0
  9. data/Rakefile +200 -0
  10. data/config/license_finder.yml +13 -0
  11. data/cucumber.yml +2 -0
  12. data/doc/licenses/dependencies.csv +55 -0
  13. data/doc/licenses/dependencies.db +0 -0
  14. data/doc/licenses/dependencies.html +1415 -0
  15. data/doc/licenses/dependencies.md +603 -0
  16. data/doc/licenses/dependencies_detailed.csv +190 -0
  17. data/doc/yard/.keep +0 -0
  18. data/features/build_presentation.feature +62 -0
  19. data/features/code_highlighting.feature +43 -0
  20. data/features/components.feature +29 -0
  21. data/features/create_plugin-cli.feature +11 -0
  22. data/features/create_presentation-cli.feature +349 -0
  23. data/features/create_slide-cli.feature +188 -0
  24. data/features/create_slides-templates-cli.feature +114 -0
  25. data/features/create_theme-cli.feature +58 -0
  26. data/features/default_slides.feature +58 -0
  27. data/features/edit_slide-cli.feature +121 -0
  28. data/features/export_presentation-cli.feature +23 -0
  29. data/features/grouping_slides.feature +150 -0
  30. data/features/ignore_slides.feature +103 -0
  31. data/features/init_application-cli.feature +59 -0
  32. data/features/init_predefined_slides.feature +9 -0
  33. data/features/language_detection.feature +0 -0
  34. data/features/list_assets-cli.feature +13 -0
  35. data/features/list_components-cli.feature +13 -0
  36. data/features/list_helpers-cli.feature +13 -0
  37. data/features/list_plugins-cli.feature +13 -0
  38. data/features/list_styles-cli.feature +17 -0
  39. data/features/plugins.feature +63 -0
  40. data/features/presentation.feature +57 -0
  41. data/features/rename_slide-cli.feature +176 -0
  42. data/features/render_slides.feature +76 -0
  43. data/features/show_config-cli.feature +25 -0
  44. data/features/show_footer.feature +14 -0
  45. data/features/show_slide_number.feature +31 -0
  46. data/features/show_support_information-cli.feature +12 -0
  47. data/features/support/aruba.rb +18 -0
  48. data/features/support/ci.rb +3 -0
  49. data/features/support/env.rb +25 -0
  50. data/features/support/fixtures.rb +21 -0
  51. data/features/support/hash.rb +2 -0
  52. data/features/support/reporting.rb +2 -0
  53. data/features/version_number.feature +15 -0
  54. data/fixtures/middleman-presentation-simple_plugin/Rakefile +1 -0
  55. data/fixtures/middleman-presentation-simple_plugin/lib/middleman-presentation-plugin.rb +0 -0
  56. data/fixtures/middleman-presentation-simple_plugin/lib/middleman-presentation-simple_plugin/helpers.rb +13 -0
  57. data/fixtures/middleman-presentation-simple_plugin/lib/middleman-presentation-simple_plugin/plugin.rb +34 -0
  58. data/fixtures/middleman-presentation-simple_plugin/lib/middleman-presentation-simple_plugin/version.rb +8 -0
  59. data/fixtures/middleman-presentation-simple_plugin/lib/middleman-presentation-simple_plugin.rb +11 -0
  60. data/fixtures/middleman-presentation-simple_plugin/middleman-presentation-simple_plugin.gemspec +22 -0
  61. data/fixtures/middleman-presentation-simple_plugin/vendor/assets/stylesheets/test_simple.scss +3 -0
  62. data/lib/middleman-presentation-core/application_config.rb +198 -0
  63. data/lib/middleman-presentation-core/asset.rb +103 -0
  64. data/lib/middleman-presentation-core/asset_component.rb +34 -0
  65. data/lib/middleman-presentation-core/asset_list.rb +84 -0
  66. data/lib/middleman-presentation-core/asset_store.rb +73 -0
  67. data/lib/middleman-presentation-core/assets_loader.rb +95 -0
  68. data/lib/middleman-presentation-core/assets_manager.rb +73 -0
  69. data/lib/middleman-presentation-core/cache.rb +49 -0
  70. data/lib/middleman-presentation-core/cli/base.rb +30 -0
  71. data/lib/middleman-presentation-core/cli/base_group.rb +11 -0
  72. data/lib/middleman-presentation-core/cli/build.rb +13 -0
  73. data/lib/middleman-presentation-core/cli/build_presentation.rb +57 -0
  74. data/lib/middleman-presentation-core/cli/change.rb +13 -0
  75. data/lib/middleman-presentation-core/cli/change_slide.rb +82 -0
  76. data/lib/middleman-presentation-core/cli/create.rb +16 -0
  77. data/lib/middleman-presentation-core/cli/create_plugin.rb +62 -0
  78. data/lib/middleman-presentation-core/cli/create_presentation.rb +300 -0
  79. data/lib/middleman-presentation-core/cli/create_slide.rb +52 -0
  80. data/lib/middleman-presentation-core/cli/create_theme.rb +81 -0
  81. data/lib/middleman-presentation-core/cli/edit.rb +13 -0
  82. data/lib/middleman-presentation-core/cli/edit_slide.rb +49 -0
  83. data/lib/middleman-presentation-core/cli/export.rb +11 -0
  84. data/lib/middleman-presentation-core/cli/export_presentation.rb +55 -0
  85. data/lib/middleman-presentation-core/cli/init.rb +12 -0
  86. data/lib/middleman-presentation-core/cli/init_application.rb +48 -0
  87. data/lib/middleman-presentation-core/cli/init_predefined_slides.rb +31 -0
  88. data/lib/middleman-presentation-core/cli/list.rb +66 -0
  89. data/lib/middleman-presentation-core/cli/reset_thor.rb +18 -0
  90. data/lib/middleman-presentation-core/cli/runner.rb +47 -0
  91. data/lib/middleman-presentation-core/cli/serve.rb +13 -0
  92. data/lib/middleman-presentation-core/cli/serve_presentation.rb +30 -0
  93. data/lib/middleman-presentation-core/cli/shared.rb +51 -0
  94. data/lib/middleman-presentation-core/cli/show.rb +70 -0
  95. data/lib/middleman-presentation-core/comparable_slide.rb +69 -0
  96. data/lib/middleman-presentation-core/component.rb +86 -0
  97. data/lib/middleman-presentation-core/components_manager.rb +96 -0
  98. data/lib/middleman-presentation-core/configuration_file.rb +15 -0
  99. data/lib/middleman-presentation-core/css_class_extracter.rb +41 -0
  100. data/lib/middleman-presentation-core/custom_template.rb +15 -0
  101. data/lib/middleman-presentation-core/erb_template.rb +15 -0
  102. data/lib/middleman-presentation-core/errors.rb +10 -0
  103. data/lib/middleman-presentation-core/existing_slide.rb +92 -0
  104. data/lib/middleman-presentation-core/frontend_component.rb +75 -0
  105. data/lib/middleman-presentation-core/group_template.rb +15 -0
  106. data/lib/middleman-presentation-core/helpers_manager.rb +37 -0
  107. data/lib/middleman-presentation-core/ignore_file.rb +52 -0
  108. data/lib/middleman-presentation-core/liquid_template.rb +15 -0
  109. data/lib/middleman-presentation-core/list.rb +7 -0
  110. data/lib/middleman-presentation-core/locale_configurator.rb +84 -0
  111. data/lib/middleman-presentation-core/logger.rb +8 -0
  112. data/lib/middleman-presentation-core/main.rb +55 -0
  113. data/lib/middleman-presentation-core/markdown_template.rb +15 -0
  114. data/lib/middleman-presentation-core/middleman_environment.rb +108 -0
  115. data/lib/middleman-presentation-core/middleman_extension.rb +12 -0
  116. data/lib/middleman-presentation-core/middleman_step_definitions.rb +131 -0
  117. data/lib/middleman-presentation-core/new_slide.rb +140 -0
  118. data/lib/middleman-presentation-core/overwrite_sass.rb +22 -0
  119. data/lib/middleman-presentation-core/plugin.rb +8 -0
  120. data/lib/middleman-presentation-core/plugin_api.rb +65 -0
  121. data/lib/middleman-presentation-core/plugins_manager.rb +7 -0
  122. data/lib/middleman-presentation-core/predefined_slide_templates_directory.rb +15 -0
  123. data/lib/middleman-presentation-core/presentation_helper.rb +69 -0
  124. data/lib/middleman-presentation-core/register_extension.rb +4 -0
  125. data/lib/middleman-presentation-core/roles/comparable_by_name.rb +24 -0
  126. data/lib/middleman-presentation-core/slide_group.rb +33 -0
  127. data/lib/middleman-presentation-core/slide_list.rb +52 -0
  128. data/lib/middleman-presentation-core/slide_name.rb +61 -0
  129. data/lib/middleman-presentation-core/start.rb +68 -0
  130. data/lib/middleman-presentation-core/step_definitions.rb +238 -0
  131. data/lib/middleman-presentation-core/syntax_highlighter.rb +42 -0
  132. data/lib/middleman-presentation-core/test_helpers.rb +22 -0
  133. data/lib/middleman-presentation-core/transformers/file_keeper.rb +13 -0
  134. data/lib/middleman-presentation-core/transformers/group_slides.rb +34 -0
  135. data/lib/middleman-presentation-core/transformers/ignore_slides.rb +28 -0
  136. data/lib/middleman-presentation-core/transformers/remove_duplicate_slides.rb +32 -0
  137. data/lib/middleman-presentation-core/transformers/sort_slides.rb +13 -0
  138. data/lib/middleman-presentation-core/utils.rb +40 -0
  139. data/lib/middleman-presentation-core/version.rb +8 -0
  140. data/lib/middleman-presentation-core.rb +127 -0
  141. data/locales/de.yml +233 -0
  142. data/locales/en.yml +236 -0
  143. data/middleman-presentation-core.gemspec +40 -0
  144. data/source/slides/01.html.liquid +0 -0
  145. data/spec/asset_component_spec.rb +13 -0
  146. data/spec/asset_list_spec.rb +50 -0
  147. data/spec/asset_spec.rb +45 -0
  148. data/spec/asset_store_spec.rb +61 -0
  149. data/spec/assets_manager_spec.rb +111 -0
  150. data/spec/components_manager_spec.rb +142 -0
  151. data/spec/css_class_extracter_spec.rb +28 -0
  152. data/spec/existing_slide_spec.rb +177 -0
  153. data/spec/frontend_component_spec.rb +94 -0
  154. data/spec/helpers_manager_spec.rb +90 -0
  155. data/spec/ignore_file_spec.rb +75 -0
  156. data/spec/new_slide_spec.rb +155 -0
  157. data/spec/presentation_helper_spec.rb +137 -0
  158. data/spec/shared_examples/.keep +0 -0
  159. data/spec/slide_group_spec.rb +54 -0
  160. data/spec/slide_list_spec.rb +125 -0
  161. data/spec/slide_name_spec.rb +53 -0
  162. data/spec/spec_helper.rb +19 -0
  163. data/spec/support/aruba.rb +53 -0
  164. data/spec/support/ci.rb +20 -0
  165. data/spec/support/environment.rb +18 -0
  166. data/spec/support/filesystem.rb +22 -0
  167. data/spec/support/locale.rb +2 -0
  168. data/spec/support/reporting.rb +2 -0
  169. data/spec/support/rspec.rb +9 -0
  170. data/spec/support/string.rb +2 -0
  171. data/spec/transformers/file_keeper_spec.rb +24 -0
  172. data/spec/transformers/group_slides_spec.rb +44 -0
  173. data/spec/transformers/ignore_slides_spec.rb +64 -0
  174. data/spec/transformers/remove_duplicate_slides_spec.rb +120 -0
  175. data/spec/transformers/sort_slides_spec.rb +17 -0
  176. data/spec/utils_spec.rb +14 -0
  177. data/templates/.bowerrc.tt +4 -0
  178. data/templates/.gitignore +5 -0
  179. data/templates/Gemfile.tt +32 -0
  180. data/templates/LICENSE.presentation +1 -0
  181. data/templates/Rakefile +59 -0
  182. data/templates/bower.json.tt +8 -0
  183. data/templates/bundler_config.tt +6 -0
  184. data/templates/config.rb.tt +2 -0
  185. data/templates/config.yaml.tt +17 -0
  186. data/templates/gitignore.tt +14 -0
  187. data/templates/plugin/%plugin_name%.gemspec.tt +24 -0
  188. data/templates/plugin/.gitignore +13 -0
  189. data/templates/plugin/Gemfile.tt +4 -0
  190. data/templates/plugin/LICENSE.txt.tt +22 -0
  191. data/templates/plugin/README.md.tt +31 -0
  192. data/templates/plugin/Rakefile +1 -0
  193. data/templates/plugin/lib/%plugin_name%/version.rb.tt +8 -0
  194. data/templates/plugin/lib/%plugin_name%.rb.tt +10 -0
  195. data/templates/predefined_slides.d/00_00.html.erb.tt +26 -0
  196. data/templates/predefined_slides.d/00_01.html.md.tt +6 -0
  197. data/templates/predefined_slides.d/999980.html.erb.tt +4 -0
  198. data/templates/predefined_slides.d/999981.html.erb.tt +27 -0
  199. data/templates/predefined_slides.d/999982.html.erb.tt +4 -0
  200. data/templates/presentation_theme/bower.json.tt +20 -0
  201. data/templates/presentation_theme/images/.keep +0 -0
  202. data/templates/presentation_theme/javascripts/%theme_name%.js.tt +0 -0
  203. data/templates/presentation_theme/stylesheets/%theme_name%.scss.tt +9 -0
  204. data/templates/presentation_theme/stylesheets/_fonts.scss.tt +0 -0
  205. data/templates/presentation_theme/stylesheets/_images.scss.tt +5 -0
  206. data/templates/presentation_theme/stylesheets/_theme.scss.tt +251 -0
  207. data/templates/rackup.config.erb +16 -0
  208. data/templates/script/bootstrap +5 -0
  209. data/templates/script/build +3 -0
  210. data/templates/script/export +3 -0
  211. data/templates/script/presentation +3 -0
  212. data/templates/script/slide +3 -0
  213. data/templates/script/start +43 -0
  214. data/templates/slides/custom.md.tt +3 -0
  215. data/templates/slides/erb.tt +5 -0
  216. data/templates/slides/group.tt +3 -0
  217. data/templates/slides/liquid.tt +5 -0
  218. data/templates/slides/markdown.tt +3 -0
  219. data/templates/source/index.html.erb +1 -0
  220. data/templates/source/javascripts/application.js.tt +3 -0
  221. data/templates/source/layout.erb +133 -0
  222. data/templates/source/stylesheets/application.scss.tt +3 -0
  223. metadata +574 -0
@@ -0,0 +1,58 @@
1
+ Feature: Create new presentation theme
2
+
3
+ As a presentator
4
+ I want to create my own presentation template
5
+ In order to have a default theme for all presentations created with middleman-presentation
6
+
7
+ Scenario: Non existing template
8
+ Given a presentation theme named "new_theme" does not exist
9
+ When I successfully run `middleman-presentation create theme new_theme`
10
+ Then a presentation theme named "new_theme" should exist with default files/directories created
11
+ And a directory named "middleman-presentation-theme-new_theme" is a git repository
12
+
13
+ Scenario: No javascripts
14
+ Given a presentation theme named "new_theme" does not exist
15
+ When I successfully run `middleman-presentation create theme new_theme --no-javascripts-directory`
16
+ Then a presentation theme named "new_theme" should exist
17
+ And a directory named "middleman-presentation-theme-new_theme/javascripts" should not exist
18
+
19
+ Scenario: No stylesheets
20
+ Given a presentation theme named "new_theme" does not exist
21
+ When I successfully run `middleman-presentation create theme new_theme --no-stylesheets-directory`
22
+ Then a presentation theme named "new_theme" should exist
23
+ And a directory named "middleman-presentation-theme-new_theme/stylesheets" should not exist
24
+
25
+ Scenario: No images
26
+ Given a presentation theme named "new_theme" does not exist
27
+ When I successfully run `middleman-presentation create theme new_theme --no-images-directory`
28
+ Then a presentation theme named "new_theme" should exist
29
+ And a directory named "middleman-presentation-theme-new_theme/images" should not exist
30
+
31
+ Scenario: Cleaned css classes
32
+ Given a presentation theme named "new_theme" does not exist
33
+ When I successfully run `middleman-presentation create theme new_theme --clean-css`
34
+ Then the file "middleman-presentation-theme-new_theme/stylesheets/_theme.scss" should contain:
35
+ """
36
+ // "999981.html.erb.tt"
37
+ .mp-external-url {
38
+ }
39
+ """
40
+
41
+ Scenario: No prefix for theme directory
42
+ Given a presentation theme named "new_theme" does not exist
43
+ When I successfully run `middleman-presentation create theme new_theme --no-prefix`
44
+ Then a directory named "new_theme" should exist
45
+
46
+ Scenario: Predefined css classes
47
+ Given a presentation theme named "new_theme" does not exist
48
+ When I successfully run `middleman-presentation create theme new_theme`
49
+ Then the file "middleman-presentation-theme-new_theme/stylesheets/_theme.scss" should contain:
50
+ """
51
+ a.mp-external-url:after {
52
+ font-family: "FontAwesome";
53
+ content: "\f08e";
54
+ margin-left: 12px;
55
+ margin-right: 12px;
56
+ font-size: 0.7em;
57
+ }
58
+ """
@@ -0,0 +1,58 @@
1
+ Feature: Default slides
2
+
3
+ As a presentator
4
+ I want to use default slides
5
+ In order to reuse them
6
+
7
+ Background:
8
+ Given a user config file for middleman-presentation with:
9
+ """
10
+ github_url: http://example.com
11
+ email_address: mail@example.com
12
+ phone_number: 1111
13
+ """
14
+ And I use presentation fixture "default_slides1" with title "My Presentation"
15
+
16
+ Scenario: Contact information
17
+ When the Server is running
18
+ And I go to "/"
19
+ Then I should see:
20
+ """
21
+ Contact
22
+ """
23
+ And I should see:
24
+ """
25
+ http://example.com
26
+ """
27
+ And I should see:
28
+ """
29
+ mail@example.com
30
+ """
31
+ And I should see:
32
+ """
33
+ 1111
34
+ """
35
+
36
+ Scenario: Agenda
37
+ When the Server is running
38
+ And I go to "/"
39
+ Then I should see:
40
+ """
41
+ Agenda
42
+ """
43
+
44
+ Scenario: Questions
45
+ When the Server is running
46
+ And I go to "/"
47
+ Then I should see:
48
+ """
49
+ Questions
50
+ """
51
+
52
+ Scenario: The end
53
+ When the Server is running
54
+ And I go to "/"
55
+ Then I should see:
56
+ """
57
+ The End
58
+ """
@@ -0,0 +1,121 @@
1
+ Feature: Edit slide
2
+
3
+ As a presentator
4
+ I want to edit an already existing slide
5
+ In order to make changes
6
+
7
+ Background:
8
+ Given I use presentation fixture "presentation1" with title "My Presentation"
9
+
10
+ Scenario: Existing slide
11
+ Given a slide named "01.html.erb" with:
12
+ """
13
+ <section>
14
+ <h1>Hello World</h1>
15
+ </section>
16
+ """
17
+ When I successfully run `middleman-presentation edit slide 01 --editor-command echo`
18
+ Then the output should contain:
19
+ """
20
+ 01.html.erb
21
+ """
22
+
23
+ Scenario: Matching regular expression
24
+ Given a slide named "01.html.erb" with:
25
+ """
26
+ <section>
27
+ <h1>Hello World</h1>
28
+ </section>
29
+ """
30
+ And a slide named "002.html.erb" with:
31
+ """
32
+ <section>
33
+ <h1>Hello World</h1>
34
+ </section>
35
+ """
36
+ When I successfully run `middleman-presentation edit slide '0\d\d' --editor-command echo --regex`
37
+ Then the output should not contain:
38
+ """
39
+ 01.html.erb
40
+ """
41
+ And the output should contain:
42
+ """
43
+ 002.html.erb
44
+ """
45
+
46
+ Scenario: Matching substring
47
+ Given a slide named "01.html.erb" with:
48
+ """
49
+ <section>
50
+ <h1>Hello World</h1>
51
+ </section>
52
+ """
53
+ And a slide named "02.html.erb" with:
54
+ """
55
+ <section>
56
+ <h1>Hello World</h1>
57
+ </section>
58
+ """
59
+ When I successfully run `middleman-presentation edit slide 0 --type md --regex --editor-command echo`
60
+ Then the output should contain:
61
+ """
62
+ 01.html.erb
63
+ """
64
+ And the output should contain:
65
+ """
66
+ 02.html.erb
67
+ """
68
+
69
+ Scenario: Multiple slides
70
+ Given a slide named "01.html.erb" with:
71
+ """
72
+ <section>
73
+ <h1>Hello World</h1>
74
+ </section>
75
+ """
76
+ And a slide named "02.html.erb" with:
77
+ """
78
+ <section>
79
+ <h1>Hello World</h1>
80
+ </section>
81
+ """
82
+ When I successfully run `middleman-presentation edit slide 01 02 --editor-command echo`
83
+ Then the output should contain:
84
+ """
85
+ 01.html.erb
86
+ """
87
+ And the output should contain:
88
+ """
89
+ 02.html.erb
90
+ """
91
+
92
+ Scenario: Missing slide name = All existing slides
93
+ Given a slide named "01.html.erb" with:
94
+ """
95
+ <section>
96
+ <h1>Hello World</h1>
97
+ </section>
98
+ """
99
+ And a slide named "02.html.erb" with:
100
+ """
101
+ <section>
102
+ <h1>Hello World</h1>
103
+ </section>
104
+ """
105
+ When I successfully run `middleman-presentation edit slide --editor-command echo`
106
+ Then the output should contain:
107
+ """
108
+ 01.html.erb
109
+ """
110
+ And the output should contain:
111
+ """
112
+ 02.html.erb
113
+ """
114
+
115
+ Scenario: Non-Existing slide
116
+ Given a slide named "01.html.erb" does not exist
117
+ When I successfully run `middleman-presentation edit slide 01 --editor-command echo`
118
+ Then the output should not contain:
119
+ """
120
+ 01.html.erb
121
+ """
@@ -0,0 +1,23 @@
1
+ Feature: Export presentation
2
+
3
+ As a presentator
4
+ I want to export an already created presentation
5
+ In order to give to the audience
6
+
7
+ Background:
8
+ Given I use presentation fixture "presentation1" with title "My Presentation" and date "20140901"
9
+
10
+ Scenario: Default file name
11
+ When I successfully run `middleman-presentation export presentation`
12
+ Then a file named "20140901-my-presentation.zip" should exist
13
+
14
+ Scenario: Different file name
15
+ When I successfully run `middleman-presentation export presentation --output-file presentation.zip`
16
+ Then a file named "presentation.zip" should exist
17
+
18
+ Scenario: Wrong file name
19
+ When I run `middleman-presentation export presentation --output-file presentation.tar.gz`
20
+ Then the output should contain:
21
+ """
22
+ The provided zip filename "presentation.tar.gz" is invalid. It needs to end with ".zip".
23
+ """
@@ -0,0 +1,150 @@
1
+ Feature: Grouping slides
2
+
3
+ As a presentator
4
+ I want to group slides
5
+ In order to use vertical slides feature
6
+
7
+ Background:
8
+ Given I use presentation fixture "presentation1" with title "My Presentation"
9
+
10
+ Scenario: Read slides from filesystem
11
+ Given a slide named "01namespace/01.html.erb" with:
12
+ """
13
+ <section>
14
+ <h1>Hello World</h1>
15
+ </section>
16
+ """
17
+ And the Server is running
18
+ When I go to "/"
19
+ Then I should see:
20
+ """
21
+ <section>
22
+ <!-- slides/01namespace/01.html.erb -->
23
+ <section>
24
+ <h1>Hello World</h1>
25
+ </section>
26
+ </section>
27
+ """
28
+
29
+ Scenario: Read multiple slides from filesystem
30
+ Given a slide named "01namespace/01.html.erb" with:
31
+ """
32
+ <section>
33
+ <h1>Hello World #1</h1>
34
+ </section>
35
+ """
36
+ And a slide named "01namespace/02.html.erb" with:
37
+ """
38
+ <section>
39
+ <h1>Hello World #2</h1>
40
+ </section>
41
+ """
42
+ And the Server is running
43
+ And I go to "/"
44
+ Then I should see:
45
+ """
46
+ <section>
47
+ <!-- slides/01namespace/01.html.erb -->
48
+ <section>
49
+ <h1>Hello World #1</h1>
50
+ </section>
51
+ <!-- slides/01namespace/02.html.erb -->
52
+ <section>
53
+ <h1>Hello World #2</h1>
54
+ </section>
55
+ </section>
56
+ """
57
+
58
+ Scenario: Read multiple slides within multiple groups from filesystem
59
+ Given a slide named "01.html.md" with:
60
+ """
61
+ <section>
62
+ # Test
63
+ </section>
64
+ """
65
+ And a slide named "01namespace/01.html.erb" with:
66
+ """
67
+ <section>
68
+ <h1>Hello World #1.1</h1>
69
+ </section>
70
+ """
71
+ And a slide named "01namespace/02.html.md" with:
72
+ """
73
+ <section>
74
+ # Hello World #1.2
75
+ </section>
76
+ """
77
+ And a slide named "02namespace/01.html.erb" with:
78
+ """
79
+ <section>
80
+ <h1>Hello World #2.1</h1>
81
+ </section>
82
+ """
83
+ And a slide named "02namespace/02.html.erb" with:
84
+ """
85
+ <section>
86
+ <h1>Hello World #2.2</h1>
87
+ </section>
88
+ """
89
+ And the Server is running
90
+ And I go to "/"
91
+ Then I should see:
92
+ """
93
+ <section>
94
+ <!-- slides/01namespace/01.html.erb -->
95
+ <section>
96
+ <h1>Hello World #1.1</h1>
97
+ </section>
98
+ <!-- slides/01namespace/02.html.md -->
99
+ <section>
100
+ <h1 id="hello-world-12">Hello World #1.2</h1>
101
+ </section>
102
+ </section>
103
+ <section>
104
+ <!-- slides/02namespace/01.html.erb -->
105
+ <section>
106
+ <h1>Hello World #2.1</h1>
107
+ </section>
108
+ <!-- slides/02namespace/02.html.erb -->
109
+ <section>
110
+ <h1>Hello World #2.2</h1>
111
+ </section>
112
+ </section>
113
+ """
114
+
115
+ Scenario: Project Group template
116
+ Given a project template named "group.tt" with:
117
+ """
118
+ <section>
119
+ <h1>Group Title</h1>
120
+ <%= slides %>
121
+ </section>
122
+ """
123
+ And a slide named "01namespace/01.html.erb" with:
124
+ """
125
+ <section>
126
+ <h1>Hello World</h1>
127
+ </section>
128
+ """
129
+ And a slide named "01namespace/02.html.erb" with:
130
+ """
131
+ <section>
132
+ <h1>Hello World</h1>
133
+ </section>
134
+ """
135
+ And the Server is running
136
+ When I go to "/"
137
+ Then I should see:
138
+ """
139
+ <section>
140
+ <h1>Group Title</h1>
141
+ <!-- slides/01namespace/01.html.erb -->
142
+ <section>
143
+ <h1>Hello World</h1>
144
+ </section>
145
+ <!-- slides/01namespace/02.html.erb -->
146
+ <section>
147
+ <h1>Hello World</h1>
148
+ </section>
149
+ </section>
150
+ """
@@ -0,0 +1,103 @@
1
+ Feature: Ignore slides
2
+
3
+ As a presentator
4
+ I want to ignore some slides in output
5
+ In order to make them invisible
6
+
7
+ Background:
8
+ Given I use presentation fixture "presentation1" with title "My Presentation"
9
+
10
+ Scenario: Ignore a slide by basename
11
+ Given a slide named "01.html.md" with:
12
+ """
13
+ <section>
14
+ # Slide 01
15
+ </section>
16
+ """
17
+ And a slide named "02.html.md" with:
18
+ """
19
+ <section>
20
+ # Slide 02
21
+ </section>
22
+ """
23
+ And the Server is running
24
+ And a file named ".slidesignore" with:
25
+ """
26
+ 01
27
+ """
28
+ Then the following files should exist:
29
+ | source/slides/01.html.md |
30
+ | source/slides/02.html.md |
31
+ When I go to "/"
32
+ Then I should not see:
33
+ """
34
+ Slide 01
35
+ """
36
+ Then I should see:
37
+ """
38
+ Slide 02
39
+ """
40
+ When I go to "javascripts/application.js"
41
+ Then I should see:
42
+ """
43
+ jQuery JavaScript Library
44
+ """
45
+ When I go to "stylesheets/application.css"
46
+ Then I should see:
47
+ """
48
+ Hakim El Hattab
49
+ """
50
+ #When I go to "images/lightbox2/img/close.png"
51
+ #Then the status code should be "200"
52
+
53
+ Scenario: Unignore a slide
54
+ Given a slide named "01.html.md" with:
55
+ """
56
+ <section>
57
+ # Slide 01
58
+ </section>
59
+ """
60
+ And a slide named "02.html.md" with:
61
+ """
62
+ <section>
63
+ # Slide 02
64
+ </section>
65
+ """
66
+ And the Server is running
67
+ And a file named ".slidesignore" with:
68
+ """
69
+ \.md
70
+ !02
71
+ """
72
+ Then the following files should exist:
73
+ | source/slides/01.html.md |
74
+ | source/slides/02.html.md |
75
+ When I go to "/"
76
+ Then I should not see:
77
+ """
78
+ Slide 01
79
+ """
80
+ Then I should see:
81
+ """
82
+ Slide 02
83
+ """
84
+ When I go to "javascripts/application.js"
85
+ Then I should see:
86
+ """
87
+ jQuery JavaScript Library
88
+ """
89
+ When I go to "stylesheets/application.css"
90
+ Then I should see:
91
+ """
92
+ Hakim El Hattab
93
+ """
94
+ #When I go to "images/lightbox2/img/close.png"
95
+ #Then the status code should be "200"
96
+
97
+ Scenario: Warning on invalid ignore file
98
+ Given an empty file named ".slideignore"
99
+ When I run `middleman build`
100
+ Then the output should contain:
101
+ """
102
+ Invalid ignore file
103
+ """
@@ -0,0 +1,59 @@
1
+ Feature: Initialize middleman-presentation
2
+
3
+ As a presentator
4
+ I want to initialize middleman-presentation
5
+ In order to have defaults for all presentations created with middleman-presentation
6
+
7
+ Scenario: Before init
8
+ Given I set the environment variables to:
9
+ | variable | value |
10
+ | USER | my_user|
11
+ When I successfully run `middleman-presentation init application`
12
+ Then the user config file for middleman-presentation should contain:
13
+ """
14
+ # activate_center: true
15
+ """
16
+
17
+ Scenario: Overwrite existing config file
18
+ Given I set the environment variables to:
19
+ | variable | value |
20
+ | USER | my_user|
21
+ And a user config file for middleman-presentation with:
22
+ """
23
+ # activate_center: false
24
+ # theme:
25
+ # name: new_theme
26
+ # github: account/new_theme
27
+ # javascripts:
28
+ # - javascripts/new_theme
29
+ # stylesheets:
30
+ # - stylesheets/new_theme
31
+ """
32
+ When I successfully run `middleman-presentation init application --force`
33
+ Then the user config file for middleman-presentation should contain:
34
+ """
35
+ # activate_center: true
36
+ """
37
+ And the user config file for middleman-presentation should contain:
38
+ """
39
+ # theme: {:name=>"middleman-presentation-theme-default", :github=>"maxmeyer/middleman-presentation-theme-default", :importable_files=>[/stylesheets\/middleman-presentation-theme-default.scss$/], :loadable_files=>[/.*\.png$/]}
40
+ """
41
+
42
+ Scenario: Local for presentation
43
+ Given I set the environment variables to:
44
+ | variable | value |
45
+ | USER | my_user|
46
+ And I create a new presentation with title "My Presentation"
47
+ When I successfully run `middleman-presentation init application --local`
48
+ Then the presentation config file for middleman-presentation should contain:
49
+ """
50
+ title: My Presentation
51
+ """
52
+ And the presentation config file for middleman-presentation should contain:
53
+ """
54
+ version: v0.0.1
55
+ """
56
+ And the presentation config file for middleman-presentation should contain:
57
+ """
58
+ speaker: my_user
59
+ """
@@ -0,0 +1,9 @@
1
+ Feature: Initialize predefined slides
2
+
3
+ As a presentator
4
+ I want to initialize predefined slides
5
+ In order to have defaults for all presentations created with middleman-presentation
6
+
7
+ Scenario: Default directory
8
+ When I successfully run `middleman-presentation init predefined_slides`
9
+ Then a file named "~/.config/middleman-presentation/templates/predefined_slides.d/00_00.html.erb.tt" should exist
File without changes
@@ -0,0 +1,13 @@
1
+ Feature: Show known assets
2
+
3
+ As a presentator
4
+ I want to show all known asset files which I can use in my presentation
5
+ In order to have an overview
6
+
7
+ Scenario: List available assets
8
+ Given I create a new presentation with title "My Presentation"
9
+ When I successfully run `middleman-presentation list assets`
10
+ Then the output should contain:
11
+ """
12
+ | Source path
13
+ """
@@ -0,0 +1,13 @@
1
+ Feature: Show available components
2
+
3
+ As a presentator
4
+ I want to show all available components which I can use in my presentation
5
+ In order to have an overview
6
+
7
+ Scenario: List available components
8
+ Given I create a new presentation with title "My Presentation"
9
+ When I successfully run `middleman-presentation list components`
10
+ Then the output should contain:
11
+ """
12
+ Name:
13
+ """
@@ -0,0 +1,13 @@
1
+ Feature: Show available helpers
2
+
3
+ As a presentator
4
+ I want to show all available helpers which I can use in my presentation
5
+ In order to have an overview
6
+
7
+ Scenario: List available helpers
8
+ Given I create a new presentation with title "My Presentation"
9
+ When I successfully run `middleman-presentation list helpers`
10
+ Then the output should contain:
11
+ """
12
+ | Name
13
+ """
@@ -0,0 +1,13 @@
1
+ Feature: Show available plugins
2
+
3
+ As a presentator
4
+ I want to show all available plugins
5
+ In order to have an overview
6
+
7
+ Scenario: List available plugins
8
+ Given I create a new presentation with title "My Presentation"
9
+ When I successfully run `middleman-presentation list plugins`
10
+ Then the output should contain:
11
+ """
12
+ | Name
13
+ """
@@ -0,0 +1,17 @@
1
+ Feature: Show available default css classes
2
+
3
+ As a presentator
4
+ I want to get a list of css classess which are used in default templates
5
+ In order to know what needs to be defined
6
+
7
+ Scenario: Available css classes
8
+ Given I successfully run `middleman-presentation list style`
9
+ Then the output should contain:
10
+ """
11
+ Available css classes in templates used by middleman-presentation:
12
+ """
13
+ And the output should contain:
14
+ """
15
+ mp-external-url: "999981.html.erb.tt"
16
+ """
17
+