middleman-presentation-core 0.16.0.beta → 0.16.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +5 -2
  3. data/doc/licenses/dependencies.db +0 -0
  4. data/features/build_presentation.feature +49 -8
  5. data/features/create_presentation-cli.feature +35 -75
  6. data/features/init_application-cli.feature +7 -1
  7. data/features/init_predefined_slides.feature +1 -1
  8. data/features/predefined_slides.feature +79 -0
  9. data/lib/middleman-presentation-core.rb +3 -0
  10. data/lib/middleman-presentation-core/application_config.rb +13 -2
  11. data/lib/middleman-presentation-core/build_readme_template.rb +15 -0
  12. data/lib/middleman-presentation-core/cli/build_presentation.rb +30 -0
  13. data/lib/middleman-presentation-core/cli/create_presentation.rb +38 -14
  14. data/lib/middleman-presentation-core/cli/export.rb +2 -0
  15. data/lib/middleman-presentation-core/cli/init.rb +2 -0
  16. data/lib/middleman-presentation-core/cli/init_application.rb +5 -1
  17. data/lib/middleman-presentation-core/cli/runner.rb +4 -0
  18. data/lib/middleman-presentation-core/cli/serve_presentation.rb +3 -0
  19. data/lib/middleman-presentation-core/cli/shared.rb +0 -3
  20. data/lib/middleman-presentation-core/frontend_component.rb +0 -2
  21. data/lib/middleman-presentation-core/middleman_environment.rb +1 -1
  22. data/lib/middleman-presentation-core/presentation_license_template.rb +15 -0
  23. data/lib/middleman-presentation-core/step_definitions.rb +14 -1
  24. data/lib/middleman-presentation-core/utils.rb +0 -1
  25. data/lib/middleman-presentation-core/version.rb +1 -1
  26. data/locales/de.yml +4 -0
  27. data/locales/en.yml +4 -0
  28. data/middleman-presentation-core.gemspec +2 -2
  29. data/spec/components_manager_spec.rb +0 -1
  30. data/spec/existing_slide_spec.rb +0 -1
  31. data/spec/new_slide_spec.rb +0 -1
  32. data/spec/presentation_helper_spec.rb +0 -1
  33. data/spec/slide_list_spec.rb +0 -1
  34. data/templates/Gemfile.tt +2 -2
  35. data/templates/Rakefile +0 -1
  36. data/templates/build_readme.md.tt +80 -0
  37. data/templates/gitignore.tt +4 -0
  38. data/templates/{LICENSE.presentation → presentation_license.md.tt} +0 -0
  39. data/templates/script/bootstrap +0 -1
  40. data/templates/script/build +1 -2
  41. data/templates/script/export +1 -2
  42. data/templates/script/start +2 -43
  43. data/utils/server/server.darwin.amd64 +0 -0
  44. data/utils/server/server.linux.amd64 +0 -0
  45. data/utils/server/server.windows.amd64.exe +0 -0
  46. metadata +13 -9
  47. data/lib/middleman-presentation-core/middleman_step_definitions.rb +0 -131
  48. data/templates/config.yaml.tt +0 -17
  49. data/templates/script/presentation +0 -3
  50. data/templates/script/slide +0 -3
data/templates/Rakefile CHANGED
@@ -32,7 +32,6 @@ desc 'Export presentation as tar-archive'
32
32
  task export: 'export:tar'
33
33
 
34
34
  namespace :edit do
35
-
36
35
  desc 'Edit all user defined slides'
37
36
  task slides: 'slides:user_defined'
38
37
 
@@ -0,0 +1,80 @@
1
+ # Presentation "<%= @title %>"
2
+
3
+ ## Metadata
4
+
5
+ This ZIP-file contains the presentation "<%= @title %>" authored by "<%= @author %>" and presented by "<%= @speaker %>". It was held on "<%= @date %>".
6
+
7
+ ## Run presentation
8
+
9
+
10
+ ### Use rubygem `rack`
11
+
12
+ **Install `rack`**
13
+
14
+ ```bash
15
+ gem install rack
16
+ ```
17
+
18
+ **Unzip presentation**
19
+
20
+ ```bash
21
+ unzip <presentation>.zip
22
+ ```
23
+
24
+ **Switch working directory**
25
+
26
+ ```bash
27
+ cd <presentation>
28
+ ```
29
+
30
+ **Run rack**
31
+
32
+ ```bash
33
+ rackup
34
+ ```
35
+
36
+ <%- if @add_static_servers -%>
37
+ ### Use static webserver
38
+
39
+ There are static webservers for Windows (64bit), Linux (64bit) and Mac OS X
40
+ (64bit) available in this package.
41
+
42
+ **Unzip presentation**
43
+
44
+ ```bash
45
+ unzip <presentation>.zip
46
+ ```
47
+
48
+ **Switch working directory**
49
+
50
+ ```bash
51
+ cd <presentation>
52
+ ```
53
+
54
+ **Start webserver**
55
+
56
+ ```bash
57
+ ./server.<Operating System>.<Architecture>
58
+ ```
59
+
60
+ <%- end -%>
61
+ ### Use normal webservers
62
+
63
+ Just copy the files from this ZIP-file to your `docroot` and configure your
64
+ webserver correctly.
65
+
66
+ **Unzip presentation**
67
+
68
+ ```bash
69
+ unzip <presentation>.zip
70
+ ```
71
+
72
+ **Copy presentation**
73
+
74
+ ```bash
75
+ mv <presentation> <docroot>
76
+ ```
77
+
78
+ ## License
79
+
80
+ Please see the included license "<%= File.basename(@license_file) %>".
@@ -12,3 +12,7 @@
12
12
  *.zip
13
13
  *.tar.gz
14
14
  tmp/
15
+
16
+ # local config file
17
+ .middleman-presentation.local.yaml
18
+ middleman-presentation.local.yaml
@@ -1,5 +1,4 @@
1
1
  #!/bin/sh
2
-
3
2
  echo "Make sure you've got 'bower' installed on your system! Please see http://bower.io/ for more information about installing 'bower' on your system."
4
3
 
5
4
  gem install bundler && bundle install
@@ -1,3 +1,2 @@
1
1
  #!/bin/sh
2
-
3
- bundle exec middleman build $*
2
+ bundle exec middleman-presentation build presentation $*
@@ -1,3 +1,2 @@
1
1
  #!/bin/sh
2
-
3
- bundle exec middleman-presentation export presentation
2
+ bundle exec middleman-presentation export presentation $*
@@ -1,43 +1,2 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'optparse'
4
- require 'ostruct'
5
- require 'addressable/uri'
6
-
7
- uri = Addressable::URI.parse('http://127.0.0.1:1234')
8
-
9
- options = OpenStruct.new
10
- options.listen = uri
11
- options.verbose = false
12
-
13
- OptionParser.new do |opts|
14
- opts.banner = 'Usage: script/start [options]'
15
-
16
- opts.on('-p PORT', '--network-port PORT', 'Port to listen on') do |p|
17
- options.listen.port = p
18
- end
19
-
20
- opts.on('-i INTERFACE', '--network-interface INTERFACE', 'Interface to listen on') do |h|
21
- options.listen.interface = h
22
- end
23
-
24
- opts.on('-d', '--debug-mode', 'Debug mode') do |_h|
25
- options.debug_mode = true
26
- end
27
-
28
- end.parse!
29
-
30
- launchy_pid = fork do
31
- system("bundle exec launchy #{options.listen}")
32
- end
33
-
34
- Process.waitpid(launchy_pid)
35
-
36
- command = []
37
- command << 'bundle exec'
38
- command << 'middleman-presentation serve'
39
- command << "--network-port #{options.listen.port}"
40
- command << "--network-interface #{options.listen.interface}"
41
- command << '--debug-mode' if options.debug_mode
42
-
43
- system(command.join(' '))
1
+ #!/bin/sh
2
+ bundle exec middleman-presentation serve presentation --open-in-browser $*
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-presentation-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0.beta
4
+ version: 0.16.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Meyer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-12 00:00:00.000000000 Z
12
+ date: 2014-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: middleman
@@ -101,14 +101,14 @@ dependencies:
101
101
  requirements:
102
102
  - - ">="
103
103
  - !ruby/object:Gem::Version
104
- version: 0.10.1
104
+ version: 0.11.1
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - ">="
110
110
  - !ruby/object:Gem::Version
111
- version: 0.10.1
111
+ version: 0.11.1
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: rake
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -297,6 +297,7 @@ files:
297
297
  - features/metadata-footer.feature
298
298
  - features/metadata-headline.feature
299
299
  - features/plugins.feature
300
+ - features/predefined_slides.feature
300
301
  - features/presentation.feature
301
302
  - features/quoting_markdown.feature
302
303
  - features/rename_slide-cli.feature
@@ -328,6 +329,7 @@ files:
328
329
  - lib/middleman-presentation-core/asset_store.rb
329
330
  - lib/middleman-presentation-core/assets_loader.rb
330
331
  - lib/middleman-presentation-core/assets_manager.rb
332
+ - lib/middleman-presentation-core/build_readme_template.rb
331
333
  - lib/middleman-presentation-core/cache.rb
332
334
  - lib/middleman-presentation-core/cli/base.rb
333
335
  - lib/middleman-presentation-core/cli/base_group.rb
@@ -375,7 +377,6 @@ files:
375
377
  - lib/middleman-presentation-core/markdown_template.rb
376
378
  - lib/middleman-presentation-core/middleman_environment.rb
377
379
  - lib/middleman-presentation-core/middleman_extension.rb
378
- - lib/middleman-presentation-core/middleman_step_definitions.rb
379
380
  - lib/middleman-presentation-core/new_slide.rb
380
381
  - lib/middleman-presentation-core/overwrite_sass.rb
381
382
  - lib/middleman-presentation-core/plugin.rb
@@ -383,6 +384,7 @@ files:
383
384
  - lib/middleman-presentation-core/plugins_manager.rb
384
385
  - lib/middleman-presentation-core/predefined_slide_templates_directory.rb
385
386
  - lib/middleman-presentation-core/presentation_helper.rb
387
+ - lib/middleman-presentation-core/presentation_license_template.rb
386
388
  - lib/middleman-presentation-core/register_extension.rb
387
389
  - lib/middleman-presentation-core/roles/comparable_by_name.rb
388
390
  - lib/middleman-presentation-core/slide_group.rb
@@ -438,12 +440,11 @@ files:
438
440
  - templates/.bowerrc.tt
439
441
  - templates/.gitignore
440
442
  - templates/Gemfile.tt
441
- - templates/LICENSE.presentation
442
443
  - templates/Rakefile
443
444
  - templates/bower.json.tt
445
+ - templates/build_readme.md.tt
444
446
  - templates/bundler_config.tt
445
447
  - templates/config.rb.tt
446
- - templates/config.yaml.tt
447
448
  - templates/gitignore.tt
448
449
  - templates/plugin/%plugin_name%.gemspec.tt
449
450
  - templates/plugin/.gitignore
@@ -458,6 +459,7 @@ files:
458
459
  - templates/predefined_slides.d/999980.html.erb.tt
459
460
  - templates/predefined_slides.d/999981.html.erb.tt
460
461
  - templates/predefined_slides.d/999982.html.erb.tt
462
+ - templates/presentation_license.md.tt
461
463
  - templates/presentation_theme/bower.json.tt
462
464
  - templates/presentation_theme/images/.keep
463
465
  - templates/presentation_theme/javascripts/%theme_name%.js.tt
@@ -469,8 +471,6 @@ files:
469
471
  - templates/script/bootstrap
470
472
  - templates/script/build
471
473
  - templates/script/export
472
- - templates/script/presentation
473
- - templates/script/slide
474
474
  - templates/script/start
475
475
  - templates/slides/custom.md.tt
476
476
  - templates/slides/erb.tt
@@ -481,6 +481,9 @@ files:
481
481
  - templates/source/javascripts/application.js.tt
482
482
  - templates/source/layout.erb
483
483
  - templates/source/stylesheets/application.scss.tt
484
+ - utils/server/server.darwin.amd64
485
+ - utils/server/server.linux.amd64
486
+ - utils/server/server.windows.amd64.exe
484
487
  homepage: https://github.com/maxmeyer/middleman-presentation
485
488
  licenses:
486
489
  - MIT
@@ -530,6 +533,7 @@ test_files:
530
533
  - features/metadata-footer.feature
531
534
  - features/metadata-headline.feature
532
535
  - features/plugins.feature
536
+ - features/predefined_slides.feature
533
537
  - features/presentation.feature
534
538
  - features/quoting_markdown.feature
535
539
  - features/rename_slide-cli.feature
@@ -1,131 +0,0 @@
1
- # encoding: UTF-8
2
- require 'rack/test'
3
-
4
- Given /^a clean server$/ do
5
- @initialize_commands = []
6
- end
7
-
8
- Given /^"([^\"]*)" feature is "([^\"]*)"$/ do |feature, state|
9
- @initialize_commands ||= []
10
-
11
- if state == 'enabled'
12
- @initialize_commands << lambda { activate(feature.to_sym) }
13
- end
14
- end
15
-
16
- Given /^"([^\"]*)" feature is "enabled" with "([^\"]*)"$/ do |feature, options_str|
17
- @initialize_commands ||= []
18
-
19
- options = eval("{#{options_str}}")
20
-
21
- @initialize_commands << lambda { activate(feature.to_sym, options) }
22
- end
23
-
24
- Given /^"([^\"]*)" is set to "([^\"]*)"$/ do |variable, value|
25
- @initialize_commands ||= []
26
- @initialize_commands << lambda { set(variable.to_sym, value) }
27
- end
28
-
29
- Given /^current environment is "([^\"]*)"$/ do |env|
30
- @current_env = env.to_sym
31
- end
32
-
33
- Given /^the Server is running$/ do
34
- root_dir = File.expand_path(current_dir)
35
- in_current_dir do
36
-
37
- if File.exist?(File.join(root_dir, 'source'))
38
- ENV['MM_SOURCE'] = 'source'
39
- else
40
- ENV['MM_SOURCE'] = ''
41
- end
42
-
43
- ENV['MM_ROOT'] = root_dir
44
-
45
- initialize_commands = @initialize_commands || []
46
- initialize_commands.unshift lambda {
47
- set :environment, @current_env || :development
48
- set :show_exceptions, false
49
- }
50
-
51
- in_current_dir do
52
- @server_inst = Middleman::Application.server.inst do
53
- initialize_commands.each do |p|
54
- instance_exec(&p)
55
- end
56
- end
57
- end
58
-
59
- app_rack = @server_inst.class.to_rack_app
60
- @browser = ::Rack::Test::Session.new(::Rack::MockSession.new(app_rack))
61
- end
62
- end
63
-
64
- Given /^the Server is running at "([^\"]*)"$/ do |app_path|
65
- step %(a fixture app "#{app_path}")
66
- step %(the Server is running)
67
- end
68
-
69
- Given /^a template named "([^\"]*)" with:$/ do |name, string|
70
- step %(a file named "source/#{name}" with:), string
71
- end
72
-
73
- When /^I go to "([^\"]*)"$/ do |url|
74
- in_current_dir do
75
- @browser.get(URI.escape(url))
76
- end
77
- end
78
-
79
- Then /^going to "([^\"]*)" should not raise an exception$/ do |url|
80
- in_current_dir do
81
- expect { @browser.get(URI.escape(url)) }.to_not raise_exception
82
- end
83
- end
84
-
85
- Then /^the content type should be "([^\"]*)"$/ do |expected|
86
- in_current_dir do
87
- expect(@browser.last_response.content_type).to start_with(expected)
88
- end
89
- end
90
-
91
- Then /^I should see "([^\"]*)"$/ do |expected|
92
- in_current_dir do
93
- expect(@browser.last_response.body).to include(expected)
94
- end
95
- end
96
-
97
- Then /^I should see '([^\']*)'$/ do |expected|
98
- in_current_dir do
99
- expect(@browser.last_response.body).to include(expected)
100
- end
101
- end
102
-
103
- Then /^I should see:$/ do |expected|
104
- in_current_dir do
105
- expect(@browser.last_response.body).to include(expected)
106
- end
107
- end
108
-
109
- Then /^I should not see "([^\"]*)"$/ do |expected|
110
- in_current_dir do
111
- expect(@browser.last_response.body).to_not include(expected)
112
- end
113
- end
114
-
115
- Then /^I should not see:$/ do |expected|
116
- in_current_dir do
117
- expect(@browser.last_response.body).to_not include(expected.chomp)
118
- end
119
- end
120
-
121
- Then /^the status code should be "([^\"]*)"$/ do |expected|
122
- in_current_dir do
123
- expect(@browser.last_response.status).to eq expected.to_i
124
- end
125
- end
126
-
127
- Then /^I should see "([^\"]*)" lines$/ do |lines|
128
- in_current_dir do
129
- expect(@browser.last_response.body.chomp.split($INPUT_RECORD_SEPARATOR).length).to eq(lines.to_i)
130
- end
131
- end
@@ -1,17 +0,0 @@
1
- # middleman-presentation version <%= @version %>
2
- ---
3
- <% @config.known_options.sort.each do |field| -%>
4
- <% if field == :theme && @config.public_send(field).blank? -%>
5
- # theme:
6
- # name: <name>
7
- # github: <github_account>/<repository>
8
- # javascripts:
9
- # - javascripts/<name>
10
- # stylesheets:
11
- # - stylesheets/<name>
12
- <% elsif @config.public_send(field).nil? -%>
13
- # <%= field %>: ''
14
- <% else -%>
15
- # <%= field %>: <%= @config.public_send field %>
16
- <% end -%>
17
- <% end -%>
@@ -1,3 +0,0 @@
1
- #!/bin/sh
2
-
3
- bundle exec middleman-presentation serve presentation $*
@@ -1,3 +0,0 @@
1
- #!/bin/sh
2
-
3
- bundle exec middleman-presentation create slide $*