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,63 @@
1
+ Feature: Support plugins for middleman-presentation
2
+
3
+ As a presentator
4
+ I want to group assets and helpers in a plugin
5
+ In order to make them more re-usable
6
+
7
+ Background:
8
+ Given a user config file for middleman-presentation with:
9
+ """
10
+ plugins:
11
+ - middleman-presentation-simple_plugin
12
+ """
13
+ And I use presentation fixture "presentation1" with title "My Presentation"
14
+
15
+ Scenario: Use method in plugin
16
+ Given a slide named "01.html.erb" with:
17
+ """
18
+ <section>
19
+ <h1>Hello World</h1>
20
+ <%= test_simple_helper1 %>
21
+ </section>
22
+ """
23
+ And a slide named "02.html.erb" with:
24
+ """
25
+ <section>
26
+ <h1>Hello World</h1>
27
+ <%= test_simple_helper2 %>
28
+ </section>
29
+ """
30
+ And the Server is running
31
+ When I go to "/"
32
+ Then I should see:
33
+ """
34
+ <section>
35
+ <h1>Hello World</h1>
36
+ test_simple_helper1
37
+ </section>
38
+ """
39
+ And I should see:
40
+ """
41
+ <section>
42
+ <h1>Hello World</h1>
43
+ test_simple_helper2
44
+ </section>
45
+ """
46
+
47
+ Scenario: Use asset in plugin
48
+ Given I add a stylesheet asset named "test_simple" to the presentation
49
+ And the Server is running
50
+ When I go to "/stylesheets/application.css"
51
+ Then I should see:
52
+ """
53
+ .test_simple {
54
+ color: black; }
55
+ """
56
+
57
+ Scenario: Use frontend from plugin
58
+ Given the Server is running
59
+ When I go to "/javascripts/application.js"
60
+ Then I should see:
61
+ """
62
+ angular
63
+ """
@@ -0,0 +1,57 @@
1
+ Feature: Run presentation
2
+
3
+ As a presentator
4
+ I want to run an already created presentation
5
+ In order to use it
6
+
7
+ Background:
8
+ Given I use presentation fixture "presentation1" with title "My Presentation"
9
+
10
+ Scenario: Simple Slide
11
+ Given a slide named "01.html.erb" with:
12
+ """
13
+ <section>
14
+ </section>
15
+ <section>
16
+ <h1>Hello World</h1>
17
+ </section>
18
+ """
19
+ And the Server is running
20
+ And I go to "/"
21
+ Then I should see:
22
+ """
23
+ Hello World
24
+ """
25
+
26
+ Scenario: Malformed Slide
27
+ Given a slide named "01.html.erb" with:
28
+ """
29
+ <section>
30
+ <%= asdfasdf() %>
31
+ </section>
32
+ """
33
+ And the Server is running
34
+ And I go to "/" and see the following error message:
35
+ """
36
+ NoMethodError: undefined method `asdfasdf
37
+ """
38
+
39
+ Scenario: Run it
40
+ Given the Server is running
41
+ When I go to "/"
42
+ Then I should see:
43
+ """
44
+ My Presentation
45
+ """
46
+ When I go to "javascripts/application.js"
47
+ Then I should see:
48
+ """
49
+ jQuery JavaScript Library
50
+ """
51
+ When I go to "stylesheets/application.css"
52
+ Then I should see:
53
+ """
54
+ Hakim El Hattab
55
+ """
56
+ #When I go to "images/lightbox2/img/close.png"
57
+ #Then the status code should be "200"
@@ -0,0 +1,176 @@
1
+ Feature: Rename slide
2
+
3
+ As a presentator
4
+ I want to rename an already existing slide
5
+ In order to make its name fit the need
6
+
7
+ Background:
8
+ Given I use presentation fixture "presentation1" with title "My Presentation"
9
+
10
+ Scenario: Full-name
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 change slide 01 --base-name 02`
18
+ Then a slide named "02.html.erb" should exist
19
+
20
+ Scenario: Full-name for multiple files
21
+ Given a slide named "01.html.erb" with:
22
+ """
23
+ <section>
24
+ <h1>Hello World</h1>
25
+ </section>
26
+ """
27
+ When I run `middleman-presentation change slide 01 02 --base-name 02.html.md`
28
+ Then the output should contain:
29
+ """
30
+ You pass to many arguments. Only "1" argument(s) are allowed.
31
+ """
32
+
33
+ Scenario: File suffix
34
+ Given a slide named "01.html.erb" with:
35
+ """
36
+ <section>
37
+ <h1>Hello World</h1>
38
+ </section>
39
+ """
40
+ When I successfully run `middleman-presentation change slide 01 --type md`
41
+ Then a slide named "01.html.md" should exist
42
+
43
+ Scenario: File suffix with prefixing dot
44
+ Given a slide named "01.html.erb" with:
45
+ """
46
+ <section>
47
+ <h1>Hello World</h1>
48
+ </section>
49
+ """
50
+ When I successfully run `middleman-presentation change slide 01 --type .md`
51
+ Then a slide named "01.html.md" should exist
52
+
53
+ Scenario: File suffix for multiple files
54
+ Given a slide named "01.html.erb" with:
55
+ """
56
+ <section>
57
+ <h1>Hello World</h1>
58
+ </section>
59
+ """
60
+ And a slide named "02.html.erb" with:
61
+ """
62
+ <section>
63
+ <h1>Hello World</h1>
64
+ </section>
65
+ """
66
+ When I successfully run `middleman-presentation change slide 01 02 --type md`
67
+ Then a slide named "01.html.md" should exist
68
+ And a slide named "02.html.md" should exist
69
+
70
+ Scenario: Missing slide name = All existing slides
71
+ Given a slide named "01.html.erb" with:
72
+ """
73
+ <section>
74
+ <h1>Hello World</h1>
75
+ </section>
76
+ """
77
+ And a slide named "02.html.erb" with:
78
+ """
79
+ <section>
80
+ <h1>Hello World</h1>
81
+ </section>
82
+ """
83
+ When I successfully run `middleman-presentation change slide --type md`
84
+ Then a slide named "01.html.md" should exist
85
+ Then a slide named "02.html.md" should exist
86
+
87
+ Scenario: Matching substring
88
+ Given a slide named "01.html.erb" with:
89
+ """
90
+ <section>
91
+ <h1>Hello World</h1>
92
+ </section>
93
+ """
94
+ And a slide named "02.html.erb" with:
95
+ """
96
+ <section>
97
+ <h1>Hello World</h1>
98
+ </section>
99
+ """
100
+ When I successfully run `middleman-presentation change slide 0 --type md --regex`
101
+ Then a slide named "01.html.md" should exist
102
+ Then a slide named "02.html.md" should exist
103
+
104
+ Scenario: Matching regular expression
105
+ Given a slide named "00.html.erb" with:
106
+ """
107
+ <section>
108
+ <h1>Hello World</h1>
109
+ </section>
110
+ """
111
+ And a slide named "01.html.erb" with:
112
+ """
113
+ <section>
114
+ <h1>Hello World</h1>
115
+ </section>
116
+ """
117
+ And a slide named "002.html.erb" with:
118
+ """
119
+ <section>
120
+ <h1>Hello World</h1>
121
+ </section>
122
+ """
123
+ When I successfully run `middleman-presentation change slide '0[0-1]' --type md --regex`
124
+ Then a slide named "00.html.md" should exist
125
+ Then a slide named "01.html.md" should exist
126
+
127
+ Scenario: Change erb => md automatically
128
+ Given a slide named "01.html.erb" with:
129
+ """
130
+ <section>
131
+ <h1>Hello World</h1>
132
+ </section>
133
+ """
134
+ When I successfully run `middleman-presentation change slide 01`
135
+ Then a slide named "01.html.md" should exist
136
+
137
+ Scenario: Change md => erb automatically
138
+ Given a slide named "01.html.md" with:
139
+ """
140
+ <section>
141
+ # Hello World
142
+ </section>
143
+ """
144
+ When I successfully run `middleman-presentation change slide 01`
145
+ Then a slide named "01.html.erb" should exist
146
+
147
+ Scenario: Change other => md automatically
148
+ Given a slide named "01.html.liquid" with:
149
+ """
150
+ <section>
151
+ <h1>Hello World</h1>
152
+ </section>
153
+ """
154
+ When I successfully run `middleman-presentation change slide 01`
155
+ Then a slide named "01.html.md" should exist
156
+
157
+ Scenario: Non existing slide
158
+ Given a slide named "01.html.erb" does not exist
159
+ When I run `middleman-presentation change slide 01 --type md`
160
+ Then the output should contain:
161
+ """
162
+ I cannot find a slide which matches "01"
163
+ """
164
+
165
+ Scenario: Edit after change
166
+ Given a slide named "01.html.erb" with:
167
+ """
168
+ <section>
169
+ <h1>Hello World</h1>
170
+ </section>
171
+ """
172
+ When I successfully run `middleman-presentation change slide 01 --type md --edit --editor-command echo`
173
+ Then the output should contain:
174
+ """
175
+ 01.html.erb
176
+ """
@@ -0,0 +1,76 @@
1
+ Feature: Render different kind of templates
2
+
3
+ As a presentator
4
+ I want to use the template engine which fits best for a given use case
5
+ In order to reduce the amount of time to create a new presentation
6
+
7
+ Background:
8
+ Given I use presentation fixture "presentation1" with title "My Presentation"
9
+
10
+ Scenario: Markdown Slide
11
+ Given a slide named "01.html.md" with:
12
+ """
13
+ <section>
14
+ # Hello world
15
+ </section>
16
+ """
17
+ And the Server is running
18
+ And I go to "/"
19
+ Then I should see:
20
+ """
21
+ <section>
22
+ <h1 id="hello-world">Hello world</h1>
23
+ </section>
24
+ """
25
+
26
+ Scenario: Erb Slide
27
+ Given a slide named "01.html.erb" with:
28
+ """
29
+ <section>
30
+ <%= 'test_string' %>
31
+ </section>
32
+ """
33
+ And the Server is running
34
+ And I go to "/"
35
+ Then I should see:
36
+ """
37
+ <section>
38
+ test_string
39
+ </section>
40
+ """
41
+
42
+ Scenario: Liquid Slide
43
+ Given a slide named "01.html.liquid" with:
44
+ """
45
+ <section>
46
+ {{ 'test_string' }}
47
+ </section>
48
+ """
49
+ And the Server is running
50
+ And I go to "/"
51
+ Then I should see:
52
+ """
53
+ <section>
54
+ test_string
55
+ </section>
56
+ """
57
+
58
+ Scenario: Markdown + Erb Slide
59
+ Given a slide named "01.html.md.erb" with:
60
+ """
61
+ <section>
62
+ # Hello world
63
+
64
+ <%= 'test_string' %>
65
+ </section>
66
+ """
67
+ And the Server is running
68
+ And I go to "/"
69
+ Then I should see:
70
+ """
71
+ <section>
72
+ <h1 id="hello-world">Hello world</h1>
73
+
74
+ <p>test_string</p>
75
+ </section>
76
+ """
@@ -0,0 +1,25 @@
1
+ Feature: Configuration
2
+
3
+ As a presentator
4
+ I want to a list of configuration options
5
+ In order to use it
6
+
7
+ Background:
8
+ Given a user config file for middleman-presentation with:
9
+ """
10
+ slides_ignore_file: '.ignore'
11
+ """
12
+
13
+ Scenario: Show config
14
+ When I successfully run `middleman-presentation show config`
15
+ Then the output should contain:
16
+ """
17
+ .ignore
18
+ """
19
+
20
+ Scenario: Show config with default values
21
+ When I successfully run `middleman-presentation show config --defaults`
22
+ Then the output should contain:
23
+ """
24
+ .slidesignore
25
+ """
@@ -0,0 +1,14 @@
1
+ Feature: Show footer
2
+
3
+ As a presentator
4
+ I want to show a footer fot the presentation
5
+ In order to make to add some meta information
6
+
7
+ Scenario: Print link
8
+ Given I create a new presentation with title "My Presentation"
9
+ And the Server is running
10
+ When I go to "/"
11
+ Then I should see:
12
+ """
13
+ <footer
14
+ """
@@ -0,0 +1,31 @@
1
+ Feature: Show slide number on slides
2
+
3
+ As a presentator
4
+ I want to show the number of the current slide on the current slide
5
+ In order to make the audience aware what comes next
6
+
7
+ Scenario: Slide number is activated
8
+ Given a user config file for middleman-presentation with:
9
+ """
10
+ activate_slide_number: true
11
+ """
12
+ And I create a new presentation with title "My Presentation"
13
+ And the Server is running
14
+ When I go to "/"
15
+ Then I should see:
16
+ """
17
+ slideNumber: true
18
+ """
19
+
20
+ Scenario: Slide number is not activated
21
+ Given a user config file for middleman-presentation with:
22
+ """
23
+ activate_slide_number: false
24
+ """
25
+ And I create a new presentation with title "My Presentation"
26
+ And the Server is running
27
+ When I go to "/"
28
+ Then I should see:
29
+ """
30
+ slideNumber: false
31
+ """
@@ -0,0 +1,12 @@
1
+ Feature: Show information
2
+
3
+ As a user
4
+ I want to get information about the system
5
+ In order to provide them for support
6
+
7
+ Scenario: Show support information
8
+ When I successfully run `middleman-presentation show support_information`
9
+ Then the output should contain:
10
+ """
11
+ kernelversion
12
+ """
@@ -0,0 +1,18 @@
1
+ # encoding: utf-8
2
+ require 'aruba/cucumber'
3
+
4
+ module Middleman
5
+ module Presentation
6
+ # Spec Helpers
7
+ module FeatureHelper
8
+ # Helpers for aruba
9
+ module Aruba
10
+ def dirs
11
+ @dirs ||= %w(tmp cucumber)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+
18
+ World(Middleman::Presentation::FeatureHelper::Aruba)
@@ -0,0 +1,3 @@
1
+ # Test helpers
2
+ require 'middleman-presentation-core/test_helpers'
3
+ World(Middleman::Presentation::TestHelpers)
@@ -0,0 +1,25 @@
1
+ # encoding: utf-8
2
+ require 'aruba/cucumber'
3
+
4
+ require 'simplecov'
5
+ SimpleCov.command_name 'cucumber'
6
+ SimpleCov.start
7
+
8
+ # middleman
9
+ require 'middleman-core'
10
+ require 'middleman-core/step_definitions'
11
+ require 'middleman-core/step_definitions/builder_steps'
12
+ require 'middleman-core/step_definitions/middleman_steps'
13
+ # require 'middleman-presentation-core/middleman_step_definitions'
14
+
15
+ # middleman-presentation
16
+ require 'middleman-presentation-core/step_definitions'
17
+
18
+ # Pull in all of the gems including those in the `test` group
19
+ require 'bundler'
20
+ Bundler.require :default, :test, :development
21
+
22
+ ENV['TEST'] = 'true'
23
+ ENV['AUTOLOAD_SPROCKETS'] = 'false'
24
+
25
+ PROJECT_ROOT_PATH = File.expand_path('../../../', __FILE__)
@@ -0,0 +1,21 @@
1
+ # encoding: utf-8
2
+ module Middleman
3
+ module Presentation
4
+ module FeatureHelper
5
+ # Helper for fixtures
6
+ module Fixtures
7
+ def fixtures_manager
8
+ @fixtures_manager ||= FeduxOrgStdlib::FixturesManagement::FixturesManager.new
9
+
10
+ @fixtures_manager.load_fixtures(File.expand_path('../../../fixtures', __FILE__))
11
+
12
+ @fixtures_manager
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ World(Middleman::Presentation::FeatureHelper::Fixtures)
20
+
21
+ FileUtils.rm_rf Middleman::Presentation::TestHelpers.temporary_fixture_path('.')
@@ -0,0 +1,2 @@
1
+ # encoding: utf-8
2
+ require 'fedux_org_stdlib/core_ext/hash/options'
@@ -0,0 +1,2 @@
1
+ # encoding: utf-8
2
+ require 'active_support/core_ext/kernel/reporting'
@@ -0,0 +1,15 @@
1
+ Feature: Show version number
2
+
3
+ As a presentator
4
+ I want to add a version number to a new presentation
5
+ In order to display it
6
+
7
+ Scenario: Default version number
8
+ Given I successfully run `middleman-presentation create presentation presentation1 --title "Test"`
9
+ And I cd to "presentation1"
10
+ And the Server is running
11
+ When I go to "/"
12
+ Then I should see:
13
+ """
14
+ v0.0.1
15
+ """
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,13 @@
1
+ # encoding: utf-8
2
+ module Middleman
3
+ module Presentation
4
+ module SimplePlugin
5
+ # Helpers modules
6
+ module Helpers
7
+ def test_simple_helper2
8
+ 'test_simple_helper2'
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,34 @@
1
+ # encoding: utf-8
2
+ module Middleman
3
+ module Presentation
4
+ # Simple Plugin
5
+ module SimplePlugin
6
+ extend PluginApi
7
+
8
+ add_assets(
9
+ path: File.expand_path('../../../../../../vendor/assets', __FILE__),
10
+ importable_files: ['.*\.scss']
11
+ )
12
+
13
+ add_component(
14
+ name: 'angular',
15
+ version: 'latest',
16
+ importable_files: ['.*\.js']
17
+ )
18
+
19
+ add_component(
20
+ name: 'impress.js',
21
+ version: 'latest',
22
+ importable_files: ['js/impress\.js']
23
+ )
24
+
25
+ add_helpers do
26
+ def test_simple_helper1
27
+ 'test_simple_helper1'
28
+ end
29
+ end
30
+
31
+ add_helpers Middleman::Presentation::SimplePlugin::Helpers
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,8 @@
1
+ module Middleman
2
+ module Presentation
3
+ # Simple
4
+ module SimplePlugin
5
+ VERSION = '0.0.1'
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ require 'middleman-presentation-simple_plugin/version'
2
+ require 'middleman-presentation-simple_plugin/helpers'
3
+ require 'middleman-presentation-simple_plugin/plugin'
4
+
5
+ module Middleman
6
+ module Presentation
7
+ # Fixture for testing
8
+ module SimplePlugin
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'middleman-presentation-simple_plugin/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'middleman-presentation-simple_plugin'
8
+ spec.version = Middleman::Presentation::SimplePlugin::VERSION
9
+ spec.authors = ['blub']
10
+ spec.email = ['eamil@examlple.com']
11
+ spec.summary = 'Simple plugin fixture'
12
+ spec.homepage = ''
13
+ spec.license = 'MIT'
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ['lib']
19
+
20
+ spec.add_development_dependency 'bundler', '~> 1.6'
21
+ spec.add_development_dependency 'rake', '~> 10.0'
22
+ end