presechute 0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in highgroove-generator.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,8 @@
1
+ # Presechute
2
+
3
+ Open your presechute and have a branch new deck.js + slim + guard + github
4
+ based presentation ready and waiting for you!
5
+
6
+ ## Usage
7
+
8
+ `$presechute new [name]`
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
data/bin/presechute ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/presechute'
4
+ Presechute.start
data/file ADDED
@@ -0,0 +1,5 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'slim'
4
+ gem 'guard'
5
+ gem 'guard-slim', git: 'https://github.com/stevehodgkiss/guard-slim.git'
@@ -0,0 +1,3 @@
1
+ module Presechute
2
+ VERSION = "0.1"
3
+ end
data/lib/presechute.rb ADDED
@@ -0,0 +1,70 @@
1
+ require "thor"
2
+
3
+ class Presechute < Thor
4
+ include Thor::Actions
5
+
6
+ desc "new NAME", "Generates a new project with the given name"
7
+ def new(path)
8
+ presentation_name = File.basename(path)
9
+ run "git clone https://github.com/imakewebthings/deck.js.git #{path}"
10
+ inside path do |full_path|
11
+ %w(.git introduction test).each do |dir|
12
+ remove_dir dir
13
+ end
14
+ %w(GPL-license.txt MIT-license.txt README.md).each do |file|
15
+ remove_file file
16
+ end
17
+
18
+ %w(js images css).each do |dir|
19
+ empty_directory(dir)
20
+ end
21
+
22
+ %w(jquery-1.7.min.js modernizr.custom.js).each do |js_file|
23
+ copy_file "#{full_path}/#{js_file}", "#{full_path}/js/#{js_file}"
24
+ remove_file "#{full_path}/#{js_file}"
25
+ end
26
+
27
+ create_file "css/#{presentation_name}.css"
28
+ end
29
+
30
+ copy_file "templates/presechute.slim", "#{path}/#{presentation_name}.slim"
31
+ %w(Gemfile Guardfile Rakefile).each do |file|
32
+ copy_file "templates/#{file}", "#{path}/#{file}"
33
+ end
34
+
35
+ inside path do
36
+ ["#{presentation_name}.slim", "Rakefile"].each do |file|
37
+ gsub_file file, /_presechute_/, presentation_name
38
+ end
39
+ run "git init ."
40
+
41
+ remove_file ".gitignore"
42
+ run "git add ."
43
+ run "git commit -m 'Fresh presechute presentation #{presentation_name}'"
44
+ end
45
+
46
+ copy_file "templates/.gitignore-master", "#{path}/.gitignore"
47
+
48
+ inside path do
49
+ run "git co -b gh-pages"
50
+ remove_file ".gitignore"
51
+ end
52
+
53
+ copy_file "templates/.gitignore-gh-pages", "#{path}/.gitignore"
54
+
55
+ inside path do
56
+ run "rake"
57
+ run "git add index.html"
58
+ run "git commit -m 'Created fresh index.html for Github pages'"
59
+ run "git co master"
60
+ puts "Remember to create a Github repo and add a remote and push your branches via:"
61
+ puts "\t`$git remote add origin git@github.com:username/#{presentation_name}.git`"
62
+ puts "\t`$git push -u origin master`"
63
+ puts "\t`$git push -u origin gh-pages`"
64
+ end
65
+ end
66
+
67
+ def self.source_root
68
+ File.dirname(__FILE__)
69
+ end
70
+ end
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ *.html
@@ -0,0 +1,5 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'slim'
4
+ gem 'guard'
5
+ gem 'guard-slim', git: 'https://github.com/stevehodgkiss/guard-slim.git'
@@ -0,0 +1,6 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard 'slim', :slim => { :pretty => true } do
5
+ watch(%r'^.+\.slim$')
6
+ end
@@ -0,0 +1,6 @@
1
+ task default: :slimify
2
+
3
+ desc "Convert slim to html"
4
+ task :slimify do
5
+ `slimrb -p _presechute_.slim > index.html`
6
+ end
@@ -0,0 +1,61 @@
1
+ head
2
+ title=""
3
+ meta name="description" content=""
4
+ meta name="author" content=""
5
+ meta name="viewport" content="width=1024, user-scalable=no"
6
+
7
+ script src="js/jquery-1.7.min.js"
8
+ script src="js/modernizr.custom.js"
9
+
10
+ link rel="stylesheet" href="core/deck.core.css"
11
+ script src="core/deck.core.js"
12
+
13
+ /link rel="stylesheet" href="extensions/goto/deck.goto.css"
14
+ /script src="extensions/goto/deck.goto.js"
15
+
16
+ /link rel="stylesheet" href="extensions/hash/deck.hash.css"
17
+ /script src="extensions/hash/deck.hash.js"
18
+
19
+ /link rel="stylesheet" href="extensions/menu/deck.menu.css"
20
+ /script src="extensions/menu/deck.menu.js"
21
+
22
+ /link rel="stylesheet" href="extensions/navigation/deck.navigation.css"
23
+ /script src="extensions/navigation/deck.navigation.js"
24
+
25
+ /link rel="stylesheet" href="extensions/scale/deck.scale.css"
26
+ /script src="extensions/scale/deck.scale.js"
27
+
28
+ /link rel="stylesheet" href="extensions/status/deck.status.css"
29
+ /script src="extensions/status/deck.status.js"
30
+
31
+ /link rel="stylesheet" href="themes/style/web-2.0.css"
32
+ /link rel="stylesheet" href="themes/style/swiss.css"
33
+ /link rel="stylesheet" href="themes/style/neon.css"
34
+
35
+ /link rel="stylesheet" href="themes/transition/horizontal-slide.css"
36
+ /link rel="stylesheet" href="themes/transition/vertical-slide.css"
37
+ link rel="stylesheet" href="_presechute_.css"
38
+
39
+ javascript:
40
+ $(function() { $.deck('.slide'); });
41
+
42
+ body
43
+ // use .deck-menu if you've enabled the menu extension above
44
+ /article.deck-container.deck-menu
45
+ article.deck-container
46
+ section.slide
47
+ // Permalinks are available if you've enabled the hash exntension
48
+ /a.deck-permalink href="." title="Permalink to this slide" #
49
+
50
+ // If you've enabled the navigation extension
51
+ /p.deck-navigation
52
+ / a href="#"
53
+ / span.deck-prev-link title="Previous" &#8592;
54
+ / a href="#"
55
+ / span.deck-next-link title="Next" &#8594;
56
+
57
+ // If you've enabled the status extension
58
+ /p.deck-status
59
+ / span.deck-status-current
60
+ / | /
61
+ / span.deck-status-total
Binary file
Binary file
Binary file
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/presechute/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["David Worth"]
6
+ gem.email = ["dave@highgroove.com"]
7
+ gem.description = %q{Tool to generate a new deck.js/slim/github based presentation}
8
+ gem.summary = %q{Deck.js based presentation generator}
9
+ gem.homepage = "http://github.com/daveworth/presechute"
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "presechute"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = Presechute::VERSION
17
+
18
+ gem.add_dependency "thor"
19
+ end
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: presechute
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - David Worth
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-05-29 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: thor
16
+ requirement: &70193418249600 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70193418249600
25
+ description: Tool to generate a new deck.js/slim/github based presentation
26
+ email:
27
+ - dave@highgroove.com
28
+ executables:
29
+ - presechute
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - Gemfile
34
+ - README.md
35
+ - Rakefile
36
+ - bin/presechute
37
+ - file
38
+ - lib/presechute.rb
39
+ - lib/presechute/version.rb
40
+ - lib/templates/.gitignore-gh-pages
41
+ - lib/templates/.gitignore-master
42
+ - lib/templates/Gemfile
43
+ - lib/templates/Guardfile
44
+ - lib/templates/Rakefile
45
+ - lib/templates/presechute.slim
46
+ - pkg/presechute-0.2.gem
47
+ - pkg/preseshoot-0.1.gem
48
+ - pkg/preseshoot-0.2.gem
49
+ - presechute.gemspec
50
+ homepage: http://github.com/daveworth/presechute
51
+ licenses: []
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ! '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubyforge_project:
70
+ rubygems_version: 1.8.17
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: Deck.js based presentation generator
74
+ test_files: []