visionmedia-mini 0.0.2 → 0.0.3
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.
- data/History.rdoc +4 -0
- data/Todo.rdoc +1 -1
- data/bin/mini +18 -2
- data/mini.gemspec +1 -1
- metadata +1 -1
data/History.rdoc
CHANGED
data/Todo.rdoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
== Major:
|
3
3
|
|
4
|
-
* ERB templates / allow templates to have a .rb file to gather input for the erb vars
|
4
|
+
* ERB templates / allow templates to have a .rb file to gather input for the erb vars (gen gem?)
|
5
5
|
* RDoc deployment (find a good default theme or make one)
|
6
6
|
* Git branch without relation to others (document)
|
7
7
|
|
data/bin/mini
CHANGED
@@ -6,9 +6,17 @@ require 'commander'
|
|
6
6
|
require 'bind'
|
7
7
|
|
8
8
|
program :name, 'mini'
|
9
|
-
program :version, '0.0.
|
9
|
+
program :version, '0.0.3'
|
10
10
|
program :description, 'Github project page framework'
|
11
11
|
|
12
|
+
def current_branch
|
13
|
+
`git branch | grep '*' | awk '{print $2}'`.strip
|
14
|
+
end
|
15
|
+
|
16
|
+
def master?
|
17
|
+
current_branch == 'master'
|
18
|
+
end
|
19
|
+
|
12
20
|
class CompileHaml < Bind::Actions::RefreshBrowsers
|
13
21
|
def call file
|
14
22
|
type = sass?(file) ? :sass : :haml
|
@@ -60,9 +68,17 @@ command :init do |c|
|
|
60
68
|
c.summary = 'Initialize a mini template'
|
61
69
|
c.description = 'Initialize a mini template to <dest_dir> or the current working directory.'
|
62
70
|
c.example 'Initialize a template in the current directory', 'mini init'
|
71
|
+
c.option '-g', '--branch', "Creates an 'empty' gh-pages branch without ancestry"
|
63
72
|
#c.option '--template TEMPLATE', 'Name of template to use'
|
64
73
|
c.when_called do |args, options|
|
65
|
-
|
74
|
+
if options.branch
|
75
|
+
`git checkout -b gh-pages`
|
76
|
+
`git symbolic-ref HEAD refs/heads/gh-pages`
|
77
|
+
`rm .git/index`
|
78
|
+
`git clean -fdx`
|
79
|
+
say 'gh-pages branch created'
|
80
|
+
end
|
81
|
+
raise 'you are still on your master branch. Checkout gh-pages, or use `mini init --branch`' if master?
|
66
82
|
dest = args.shift || '.'
|
67
83
|
template = options.template || 'light'
|
68
84
|
template_dir = File.join File.dirname(__FILE__), '..', 'templates', template
|
data/mini.gemspec
CHANGED