[Jifty-commit] r3411 - in jifty/trunk: . lib/Jifty/Plugin
lib/Jifty/Plugin/SiteNews/Mixin/Model
lib/Jifty/Plugin/TabView lib/Jifty/View/Declare
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Jun 8 17:47:39 EDT 2007
Author: sartak
Date: Fri Jun 8 17:47:39 2007
New Revision: 3411
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/CompressedCSSandJS.pm
jifty/trunk/lib/Jifty/Plugin/Feedback.pm
jifty/trunk/lib/Jifty/Plugin/SiteNews/Mixin/Model/News.pm
jifty/trunk/lib/Jifty/Plugin/TabView/View.pm
jifty/trunk/lib/Jifty/Schema.pm
jifty/trunk/lib/Jifty/View/Declare/Page.pm
Log:
r20470 at caladan: sartak | 2007-06-08 17:46:44 -0400
Add a little pod coverage
Modified: jifty/trunk/lib/Jifty/Plugin/CompressedCSSandJS.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/CompressedCSSandJS.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/CompressedCSSandJS.pm Fri Jun 8 17:47:39 2007
@@ -4,9 +4,6 @@
package Jifty::Plugin::CompressedCSSandJS;
use base qw/Jifty::Plugin Class::Accessor/;
-# Your plugin goes here. If takes any configuration or arguments, you
-# probably want to override L<Jifty::Plugin/init>.
-
=head1 NAME
Jifty::Plugin::CompressedCSSandJS
@@ -19,6 +16,12 @@
__PACKAGE__->mk_accessors(qw(css js));
+=head2 init
+
+Initializes the compression object. Takes a paramhash containing keys 'css' and 'js' which can be used to disable compression on files of that type.
+
+=cut
+
sub init {
my $self = shift;
my %opt = @_;
@@ -26,11 +29,23 @@
$self->js ($opt{js});
}
+=head2 js_enabled
+
+Returns whether JS compression is enabled (which it is by default)
+
+=cut
+
sub js_enabled {
my $self = shift;
defined $self->js ? $self->js : 1;
}
+=head2 css_enabled
+
+Returns whether CSS compression is enabled (which it is by default)
+
+=cut
+
sub css_enabled {
my $self = shift;
defined $self->css ? $self->css : 1;
Modified: jifty/trunk/lib/Jifty/Plugin/Feedback.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Feedback.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Feedback.pm Fri Jun 8 17:47:39 2007
@@ -32,6 +32,12 @@
__PACKAGE__->mk_accessors(qw(from to));
+=head2 init
+
+Initializes the Feedback object. Takes a paramhash with keys 'from' and 'to', which are email addresses.
+
+=cut
+
sub init {
my $self = shift;
my %opt = @_;
Modified: jifty/trunk/lib/Jifty/Plugin/SiteNews/Mixin/Model/News.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/SiteNews/Mixin/Model/News.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/SiteNews/Mixin/Model/News.pm Fri Jun 8 17:47:39 2007
@@ -25,6 +25,11 @@
render_as is 'Textarea';
};
+=head2 create
+
+Create the News model. Takes a paramhash with keys author_id, created, title, and content.
+
+=cut
sub create {
my $self = shift;
Modified: jifty/trunk/lib/Jifty/Plugin/TabView/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/TabView/View.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/TabView/View.pm Fri Jun 8 17:47:39 2007
@@ -23,8 +23,9 @@
template 'foo' => sub { ... };
template 'bar' => sub { ... };
-=head1 DESCRIPTION
+=head2 render_tabs
+Returns some Template::Declare with tabs rendered with the yui tabs
If a tab ends in _tab, it means it should contain a stub region to be
replaced by the corresponding fragment onclick to that tab.
Modified: jifty/trunk/lib/Jifty/Schema.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Schema.pm (original)
+++ jifty/trunk/lib/Jifty/Schema.pm Fri Jun 8 17:47:39 2007
@@ -26,7 +26,11 @@
delete $_SQL_RESERVED{ lc($_) } for (@_SQL_RESERVED_OVERRIDE);
+=head2 new
+Returns a new Jifty::Schema. Takes no arguments. Will automatically figure out and initialize the models defined in the app's source.
+
+=cut
sub new {
my $class = shift;
@@ -58,6 +62,11 @@
);
}
+=head2 serialize_current_schema
+
+Returns a serialization of the models in the app
+
+=cut
sub serialize_current_schema {
my $self = shift;
@@ -73,7 +82,11 @@
}
+=head2 upgrade_schema
+Looks at the current schemas as defined by the source and the database and updates the database by adding, dropping, and renaming columns.
+
+=cut
sub upgrade_schema {
my $self = shift;
@@ -269,7 +282,11 @@
return "(" . ( join ", ", @_ ) . ")";
}
+=head2 connect_to_db_for_management
+Returns a database handle suitable for direct manipulation.
+
+=cut
sub connect_to_db_for_management {
my $handle = Jifty::Handle->new();
Modified: jifty/trunk/lib/Jifty/View/Declare/Page.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/Page.pm (original)
+++ jifty/trunk/lib/Jifty/View/Declare/Page.pm Fri Jun 8 17:47:39 2007
@@ -54,12 +54,24 @@
return '';
};
+=head2 render_body $body_code
+
+Renders $body_code inside a body tag
+
+=cut
+
sub render_body {
my ($self, $body_code) = @_;
body { $body_code->() };
}
+=head2 render_page
+
+Renders the skeleton of the page
+
+=cut
+
sub render_page {
my $self = shift;
@@ -89,6 +101,12 @@
};
}
+=head2 mk_title_handler
+
+Returns a coderef that will make headers for each thing passed to it
+
+=cut
+
sub mk_title_handler {
my $self = shift;
return sub {
More information about the Jifty-commit
mailing list