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.
Files changed (5) hide show
  1. data/History.rdoc +4 -0
  2. data/Todo.rdoc +1 -1
  3. data/bin/mini +18 -2
  4. data/mini.gemspec +1 -1
  5. metadata +1 -1
data/History.rdoc CHANGED
@@ -1,4 +1,8 @@
1
1
 
2
+ === 0.0.3 / 2009-03-09
3
+
4
+ * Added --branch to init sub-command for creating "empty" branch
5
+
2
6
  === 0.0.2 / 2009-03-09
3
7
 
4
8
  * Fixed license typo that snuck in
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.2'
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
- require 'fileutils'
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{mini}
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["TJ Holowaychuk"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visionmedia-mini
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk