Skip to content

Commit

Permalink
Applied most of patch by hcatlin (excepting logger piece as that has …
Browse files Browse the repository at this point in the history
…changed).
  • Loading branch information
wayneeseguin committed Jan 31, 2008
1 parent ce36419 commit 711120a
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
40 changes: 40 additions & 0 deletions DOCUMENTATION_STANDARDS
@@ -0,0 +1,40 @@
Every method should have documentation above the method definition that fits this basic model...

# Render the specified item, with the specified options.
#
# ==== Parameters
# thing<String, Symbol, nil>::
# The thing to render. This will default to the current action
# opts<Hash>:: An options hash (see below)
#
# ==== Options (opts)
# :format<Symbol>:: A registered mime-type format
# :template<String>::
# The path to the template relative to the template root
# :status<~to_i>::
# The status to send to the client. Typically, this would
# be an integer (200), or a Merb status code (Accepted)
# :layout<~to_s>::
# A layout to use instead of the default. This should be
# relative to the layout root. By default, the layout will
# be either the controller_name or application. If you
# want to use an alternative content-type than the one
# that the base template was rendered as, you will need
# to do :layout => “foo.#{content_type}” (i.e. “foo.json”)
#
# ==== Returns
# String:: The rendered template, including layout, if appropriate.
#
# ==== Raises
# TemplateNotFound::
# There is no template for the specified location.
#
# ==== Alternatives
# If you pass a Hash as the first parameter, it will be moved to
# opts and “thing” will be the current action
#
#—
# @public
def render(thing = nil, opts = {})
<snip>
end
17 changes: 16 additions & 1 deletion README
@@ -1 +1,16 @@
hello merb-core
merb-core is a new branch of Merb (also referred to as merb-next or the 0.9 series) which aims to provide a stable, stripped down API for a future Merb 1.0 release.

This branch is based off the 0.5 release series but with significant rewrites.

Goals of this release:

* Stabilize the @public interface methods to provide for a more consistent application development experience.
* Remove features until nothing except a central application API is left
* Improve comments on methods using a standard documentation methodology as described in DOCUMENTATION_STANDARDS
* Separate the tests into two sections... "private" and "public"
* Public methods are methods tagged with @public that will be part of the standard, stable Merb API
* Private methods are implementation methods that might
* Implement a new render API
* Build more extensions to regain selected features when needed

To familiarize yourself with how a merb-core application might look, reference the /sample directory
2 changes: 1 addition & 1 deletion lib/merb-core/boot/bootloader.rb
Expand Up @@ -129,7 +129,7 @@ def run
class Merb::BootLoader::Dependencies < Merb::BootLoader
def self.run
require Merb.dir_for(:config) / "init" if File.exists?(Merb.dir_for(:config) / "init.rb")
if File.exist?(Merb.dir_for(:environments) / (Merb.environment + ".rb"))
if !Merb.environment.nil? && File.exist?(Merb.dir_for(:environments) / (Merb.environment + ".rb"))
require Merb.dir_for(:environments) / Merb.environment
end
end
Expand Down
5 changes: 5 additions & 0 deletions tools/annotation_extract.rb
Expand Up @@ -64,6 +64,11 @@ def display(results, options={})

desc "Enumerate all annotations"
task :notes do
desc "Enumerate all DOC annotations"
task :doc do
SourceAnnotationExtractor.enumerate "DOC"
end

SourceAnnotationExtractor.enumerate "OPTIMIZE|FIXME|TODO", :tag => true
end

Expand Down

0 comments on commit 711120a

Please sign in to comment.