Permalink
Browse files

Converted to newgem.

  • Loading branch information...
Norman Clarke
Norman Clarke committed Feb 10, 2009
1 parent cd30ac6 commit b5f2f9a878909857ea8c2d4e51b62bae16d61f4b
Showing with 144 additions and 67 deletions.
  1. +3 −0 .gitignore
  2. +6 −0 History.txt
  3. +27 −0 Manifest.txt
  4. +29 −33 README.textile → README.rdoc
  5. +25 −0 Rakefile
  6. +2 −0 config/website.yml
  7. +44 −34 haml_scaffold.gemspec
  8. +8 −0 lib/haml_scaffold/version.rb
View
@@ -0,0 +1,3 @@
+doc
+*.log
+.DS_Store
View
@@ -0,0 +1,6 @@
+=== 1.0.0 / 2009-02-10
+
+* 1 major enhancement
+
+ * First rubyforge release.
+
View
@@ -0,0 +1,27 @@
+History.txt
+MIT-LICENSE
+Manifest.txt
+README.rdoc
+Rakefile
+config/website.yml
+generators/haml_scaffold/haml_scaffold_generator.rb
+generators/haml_scaffold/templates/_form.html.erb
+generators/haml_scaffold/templates/_object.html.erb
+generators/haml_scaffold/templates/controller.rb
+generators/haml_scaffold/templates/functional_test.rb
+generators/haml_scaffold/templates/helper.rb
+generators/haml_scaffold/templates/view_edit.html.erb
+generators/haml_scaffold/templates/view_index.html.erb
+generators/haml_scaffold/templates/view_new.html.erb
+generators/haml_scaffold/templates/view_show.html.erb
+haml_scaffold.gemspec
+init.rb
+lib/haml_scaffold/version.rb
+samples/posts_controller.rb
+samples/posts_controller_test.rb
+samples/views/_form.html.haml
+samples/views/_post.html.haml
+samples/views/edit.html.haml
+samples/views/index.html.haml
+samples/views/new.html.haml
+samples/views/show.html.haml
@@ -1,4 +1,4 @@
-h1. Haml Scaffold
+= Haml Scaffold
A collection of hacks to the Rails scaffold generator, to make it output
templates using Haml rather than ERB. You may like some of it, and may hate
@@ -8,84 +8,80 @@ parts you like outweigh the parts you hate.
This scaffold generator does the same thing as the default Rails scaffold
generator, with a few differences.
-h2. Differences from Rails Scaffolding:
+== Differences from Rails Scaffolding:
* Haml not ERB.
-h3. Controller
+=== Controller
* Loads object with a before_filter to be DRYer.
* "Destroy" method handles error conditions.
* Actions are alphabetized for more obvious consistency.
* Uses will_paginate.
-h3. Controller Test
+=== Controller Test
* Tests error conditions, not just the "happy-path."
* Has 100% code coverage with RCov.
* Simplifies test method names and alphabetizes them for more obvious consistency.
* Uses some very simple mocking with mocha to limit calls to the DB.
-h3. Views
+=== Views
* Have cleaner, more semantic XHTML.
* Are broken up into a couple of partials to be DRYer.
* Use will_paginate.
-h3. Misc
+=== Misc
* Doesn't generate a layout or CSS file.
-h2. Samples
+== Samples
-"View them here.":http://github.com/norman/haml-scaffold/tree/master/samples
+{View them here}[http://github.com/norman/haml-scaffold/tree/master/samples].
-h2. Installation
+== Installation
There are three ways you can install this generator:
-h3. Gem
+=== Gem
-@sudo gem install norman-haml_scaffold --source http://gems.github.com@
+ sudo gem install norman-haml_scaffold --source http://gems.github.com
-- or -
+or
-<code>
-<pre>
-git clone git://github.com/norman/haml-scaffold.git
-cd haml-scaffold
-gem build haml_scaffold.gemspec
-sudo gem install haml_scaffold-*.gem
-</pre>
-</code>
+ git clone git://github.com/norman/haml-scaffold.git
+ cd haml-scaffold
+ gem build haml_scaffold.gemspec
+ sudo gem install haml_scaffold-*.gem
-h3. Manual
+=== Manual
Download the tarball from the Github repository and unarchive it in ~/.rails/generators.
-h3. Rails Plugin
+=== Rails Plugin
-@./script/plugin install git://github.com/norman/haml-scaffold.git@
+ ./script/plugin install git://github.com/norman/haml-scaffold.git
-h2. Dependencies
+== Dependencies
The generated code will depend on:
-* "will_paginate":http://github.com/mislav/will_paginate/
-* "mocha":http://mocha.rubyforge.org/
+* will_paginate[http://github.com/mislav/will_paginate/]
+* mocha[http://mocha.rubyforge.org/]
You'll need to add the gems and/or requires to your config/environment.rb
manually.
-h2. Other stuff you might be interested in:
+== Other stuff you might be interested in:
-* "Haml":http://haml.hamptoncatlin.com/
-* "RSpec Haml scaffold generator":http://github.com/dfischer/rspec-haml-scaffold-generator
-* "Randomba scaffold":https://github.com/norman/randomba-scaffold/tree (like this one, but ERB)
+* Haml[http://haml.hamptoncatlin.com/]
+* {RSpec Haml scaffold generator}[http://github.com/dfischer/rspec-haml-scaffold-generator]
+* {Randomba scaffold}[https://github.com/norman/randomba-scaffold/tree] (like this one, but ERB)
-h2. Author
+== Author
-"Norman Clarke":mailto:norman@randomba.org
+{Norman Clarke}[mailto:norman@randomba.org]
-This work is derived from code in "Ruby on Rails":http://rubyonrails.org/ and
+This work is derived from code in {Ruby on Rails}[http://rubyonrails.org/] and
is released under its same license, the MIT License.
View
@@ -0,0 +1,25 @@
+require 'newgem'
+require File.dirname(__FILE__) + "/lib/haml_scaffold/version"
+$hoe = Hoe.new("haml_scaffold", HamlScaffold::Version::STRING) do |p|
+ p.rubyforge_name = "haml-scaffold"
+ p.author = ['Norman Clarke']
+ p.email = ['norman@randomba.org']
+ p.summary = "Rails scaffolding with HAML rather than ERB"
+ p.description = "Rails scaffolding with HAML rather than ERB"
+ p.url = 'http://haml-scaffold.rubyforge.org/'
+ p.extra_deps << ['haml', '>= 2.0.6']
+ p.extra_deps << ['will_paginate', '>= 2.2.2']
+ p.extra_deps << ['mocha', '>= 0.9.0']
+ p.extra_dev_deps << ['newgem', ">= #{::Newgem::VERSION}"]
+ p.remote_rdoc_dir = "/"
+end
+puts $hoe.inspect
+require 'newgem/tasks'
+
+desc 'Publish RDoc to RubyForge.'
+task :publish_docs => [:clean, :docs] do
+ host = "compay@rubyforge.org"
+ remote_dir = "/var/www/gforge-projects/haml-scaffold"
+ local_dir = 'doc'
+ sh %{rsync -av --delete #{local_dir}/ #{host}:#{remote_dir}}
+end
View
@@ -0,0 +1,2 @@
+host: compay@rubyforge.org
+remote_dir: /var/www/gforge-projects/friendly-id
View
@@ -1,36 +1,46 @@
+# -*- encoding: utf-8 -*-
+
Gem::Specification.new do |s|
- s.name = "haml_scaffold"
- s.version = "0.1.0"
- s.date = "2008-09-02"
- s.add_dependency('will_paginate', '>= 2.2.2')
- s.add_dependency('mocha', '>= 0.9.0')
- s.summary = "An improved Rails scaffold that uses HAML."
- s.email = 'norman@randomba.org'
- s.homepage = 'http://randomba.org'
- s.description = "An improved Rails scaffold that uses HAML."
- s.has_rdoc = false
- s.authors = ['Norman Clarke']
- s.files = [
- "MIT-LICENSE",
- "README.textile",
- "init.rb",
- "generators/haml_scaffold/haml_scaffold_generator.rb",
- "generators/haml_scaffold/templates/_form.html.erb",
- "generators/haml_scaffold/templates/_object.html.erb",
- "generators/haml_scaffold/templates/controller.rb",
- "generators/haml_scaffold/templates/functional_test.rb",
- "generators/haml_scaffold/templates/helper.rb",
- "generators/haml_scaffold/templates/view_edit.html.erb",
- "generators/haml_scaffold/templates/view_index.html.erb",
- "generators/haml_scaffold/templates/view_new.html.erb",
- "generators/haml_scaffold/templates/view_show.html.erb",
- "samples/posts_controller.rb",
- "samples/posts_controller_test.rb",
- "samples/views/_form.html.haml",
- "samples/views/_post.html.haml",
- "samples/views/edit.html.haml",
- "samples/views/index.html.haml",
- "samples/views/new.html.haml",
- "samples/views/show.html.haml"
- ]
+ s.name = %q{haml_scaffold}
+ s.version = "1.0.0"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Norman Clarke"]
+ s.date = %q{2009-02-10}
+ s.description = %q{Rails scaffolding with HAML rather than ERB}
+ s.email = ["norman@randomba.org"]
+ s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc"]
+ s.files = ["History.txt", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "config/website.yml", "generators/haml_scaffold/haml_scaffold_generator.rb", "generators/haml_scaffold/templates/_form.html.erb", "generators/haml_scaffold/templates/_object.html.erb", "generators/haml_scaffold/templates/controller.rb", "generators/haml_scaffold/templates/functional_test.rb", "generators/haml_scaffold/templates/helper.rb", "generators/haml_scaffold/templates/view_edit.html.erb", "generators/haml_scaffold/templates/view_index.html.erb", "generators/haml_scaffold/templates/view_new.html.erb", "generators/haml_scaffold/templates/view_show.html.erb", "haml_scaffold.gemspec", "init.rb", "lib/haml_scaffold/version.rb", "samples/posts_controller.rb", "samples/posts_controller_test.rb", "samples/views/_form.html.haml", "samples/views/_post.html.haml", "samples/views/edit.html.haml", "samples/views/index.html.haml", "samples/views/new.html.haml", "samples/views/show.html.haml"]
+ s.has_rdoc = true
+ s.homepage = %q{http://github.com/norman/haml-scaffold}
+ s.rdoc_options = ["--main", "README.rdoc"]
+ s.require_paths = ["lib"]
+ s.rubyforge_project = %q{haml-scaffold}
+ s.rubygems_version = %q{1.3.1}
+ s.summary = %q{Rails scaffolding with HAML rather than ERB}
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 2
+
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<haml>, [">= 2.0.6"])
+ s.add_runtime_dependency(%q<will_paginate>, [">= 2.2.2"])
+ s.add_runtime_dependency(%q<mocha>, [">= 0.9.0"])
+ s.add_development_dependency(%q<newgem>, [">= 1.2.3"])
+ s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
+ else
+ s.add_dependency(%q<haml>, [">= 2.0.6"])
+ s.add_dependency(%q<will_paginate>, [">= 2.2.2"])
+ s.add_dependency(%q<mocha>, [">= 0.9.0"])
+ s.add_dependency(%q<newgem>, [">= 1.2.3"])
+ s.add_dependency(%q<hoe>, [">= 1.8.0"])
+ end
+ else
+ s.add_dependency(%q<haml>, [">= 2.0.6"])
+ s.add_dependency(%q<will_paginate>, [">= 2.2.2"])
+ s.add_dependency(%q<mocha>, [">= 0.9.0"])
+ s.add_dependency(%q<newgem>, [">= 1.2.3"])
+ s.add_dependency(%q<hoe>, [">= 1.8.0"])
+ end
end
@@ -0,0 +1,8 @@
+module HamlScaffold
+ class Version
+ MAJOR = 1
+ MINOR = 0
+ TINY = 0
+ STRING = "#{MAJOR}.#{MINOR}.#{TINY}"
+ end
+end

0 comments on commit b5f2f9a

Please sign in to comment.