visionmedia-mini 0.0.3 → 0.0.4

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 (7) hide show
  1. data/History.rdoc +4 -0
  2. data/Manifest +0 -8
  3. data/README.rdoc +2 -2
  4. data/Todo.rdoc +1 -1
  5. data/bin/mini +23 -11
  6. data/mini.gemspec +2 -2
  7. metadata +1 -9
data/History.rdoc CHANGED
@@ -1,4 +1,8 @@
1
1
 
2
+ === 0.0.4 / 2009-03-09
3
+
4
+ * Added html exception messages
5
+
2
6
  === 0.0.3 / 2009-03-09
3
7
 
4
8
  * Added --branch to init sub-command for creating "empty" branch
data/Manifest CHANGED
@@ -11,12 +11,4 @@ tasks/gemspec.rake
11
11
  tasks/spec.rake
12
12
  templates/light/index.haml
13
13
  templates/light/style.sass
14
- test/assets/foo/foo.sass
15
- test/assets/index.haml
16
- test/assets/index.html
17
- test/assets/style.css
18
- test/assets/style.sass
19
- test/foo/foo.css
20
- test/index.html
21
- test/style.css
22
14
  Todo.rdoc
data/README.rdoc CHANGED
@@ -15,8 +15,8 @@ static Sass / Haml mini-sites within seconds.
15
15
  View mini's help
16
16
  $ mini help
17
17
 
18
- Initialize a new mini project in the current working directory
19
- $ mini init
18
+ Initialize a new mini project in the current working directory (generates new root or "empty" gh-pages branch)
19
+ $ mini init --branch
20
20
 
21
21
  Refresh Safari and Firefox to index.html and recompile when a file is changed (use from the root of your project)
22
22
  $ mini refresh --browsers Safari,Firefox
data/Todo.rdoc CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  == Minor:
9
9
 
10
- * Nothing
10
+ * Build index.html and style.css initially after 'init' sub-command
11
11
 
12
12
  == Brainstorming:
13
13
 
data/bin/mini CHANGED
@@ -6,9 +6,13 @@ require 'commander'
6
6
  require 'bind'
7
7
 
8
8
  program :name, 'mini'
9
- program :version, '0.0.3'
9
+ program :version, '0.0.4'
10
10
  program :description, 'Github project page framework'
11
11
 
12
+ def html_error message
13
+ %(<div class="error">#{message}</div>)
14
+ end
15
+
12
16
  def current_branch
13
17
  `git branch | grep '*' | awk '{print $2}'`.strip
14
18
  end
@@ -51,15 +55,24 @@ command :refresh do |c|
51
55
  c.example 'Refresh Firefox and Safari to foo.html once compiled', 'mini refresh foo --browsers Safari,Firefox'
52
56
  c.option '-b', '--browsers BROWSERS', Array, 'List browsers to refresh. Defaults to Safari'
53
57
  c.when_called do |args, options|
54
- actions = []
55
- page = args.shift || 'index'
56
- browsers = options.browsers || ['Safari']
57
- haml = Dir["assets/**/*.haml"]
58
- sass = Dir["assets/**/*.sass"]
59
- uri = File.join Dir.getwd, "#{page}.html"
60
- actions << CompileHaml.new(uri, *browsers)
61
- listener = Bind::Listener.new :interval => 1, :debug => $stdout, :actions => actions, :paths => haml + sass
62
- listener.run!
58
+ begin
59
+ actions = []
60
+ page = args.shift || 'index'
61
+ uri = File.join Dir.getwd, "#{page}.html"
62
+ browsers = options.browsers || ['Safari']
63
+ haml = Dir["assets/**/*.haml"]
64
+ sass = Dir["assets/**/*.sass"]
65
+ actions << CompileHaml.new(uri, *browsers)
66
+ listener = Bind::Listener.new :interval => 1, :debug => $stdout, :actions => actions, :paths => haml + sass
67
+ listener.run!
68
+ rescue => e
69
+ if File.exists? uri
70
+ File.open(uri, 'w+') do |file|
71
+ file.write html_error(e.message)
72
+ end
73
+ end
74
+ raise
75
+ end
63
76
  end
64
77
  end
65
78
 
@@ -76,7 +89,6 @@ command :init do |c|
76
89
  `git symbolic-ref HEAD refs/heads/gh-pages`
77
90
  `rm .git/index`
78
91
  `git clean -fdx`
79
- say 'gh-pages branch created'
80
92
  end
81
93
  raise 'you are still on your master branch. Checkout gh-pages, or use `mini init --branch`' if master?
82
94
  dest = args.shift || '.'
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.3"
5
+ s.version = "0.0.4"
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"]
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.email = %q{tj@vision-media.ca}
13
13
  s.executables = ["mini"]
14
14
  s.extra_rdoc_files = ["bin/mini", "README.rdoc", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake"]
15
- s.files = ["bin/mini", "History.rdoc", "Manifest", "mini.gemspec", "Rakefile", "README.rdoc", "spec/mini_spec.rb", "spec/spec_helper.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake", "templates/light/index.haml", "templates/light/style.sass", "test/assets/foo/foo.sass", "test/assets/index.haml", "test/assets/index.html", "test/assets/style.css", "test/assets/style.sass", "test/foo/foo.css", "test/index.html", "test/style.css", "Todo.rdoc"]
15
+ s.files = ["bin/mini", "History.rdoc", "Manifest", "mini.gemspec", "Rakefile", "README.rdoc", "spec/mini_spec.rb", "spec/spec_helper.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake", "templates/light/index.haml", "templates/light/style.sass", "Todo.rdoc"]
16
16
  s.has_rdoc = true
17
17
  s.homepage = %q{http://visionmedia.github.com/mini}
18
18
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Mini", "--main", "README.rdoc"]
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.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk
@@ -58,14 +58,6 @@ files:
58
58
  - tasks/spec.rake
59
59
  - templates/light/index.haml
60
60
  - templates/light/style.sass
61
- - test/assets/foo/foo.sass
62
- - test/assets/index.haml
63
- - test/assets/index.html
64
- - test/assets/style.css
65
- - test/assets/style.sass
66
- - test/foo/foo.css
67
- - test/index.html
68
- - test/style.css
69
61
  - Todo.rdoc
70
62
  has_rdoc: true
71
63
  homepage: http://visionmedia.github.com/mini