update to use Resource::Pack::jQuery rather than a custom resource
Jesse Luehrs [Mon, 19 Apr 2010 20:56:06 +0000 (15:56 -0500)]
Build.PL
lib/Moose/Website/Resource/Templates/wrapper/root.tt
lib/Moose/Website/Resource/WebFiles.pm
lib/Moose/Website/Resource/jQuery.pm [deleted file]

index 0c90b2c..1d406a5 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -24,7 +24,8 @@ my $self = Local::Moose::Website::Build->new(
         'MooseX::Role::Parameterized'=> 0,
         'MooseX::Types::Path::Class' => 0,
         'Path::Class'                => 0,
-        'Resource::Pack'             => 0,   # http://github.com/stevan/Resource-Pack
+        'Resource::Pack'             => 0.02,
+        'Resource::Pack::jQuery'     => 0,
         Template                     => 0,
         'YAML::XS'                   => 0,
     },
index e839efe..465bc7b 100644 (file)
@@ -5,7 +5,7 @@
 <title>[% loc('moose page title') %]</title>
 <link rel="stylesheet" href="css/style.css" type="text/css" />
 <link rel="stylesheet" href="css/facebox.css" type="text/css" />
-<script type="text/javascript" src="js/jquery.min.js"></script>
+<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
 <script type="text/javascript" src="js/facebox.js"></script>
 <script type="text/javascript">
 
index 763bc0e..658afa2 100644 (file)
@@ -2,7 +2,7 @@ package Moose::Website::Resource::WebFiles;
 use Moose;
 use Resource::Pack;
 
-use Moose::Website::Resource::jQuery;
+use Resource::Pack::jQuery;
 
 our $VERSION   = '0.01';
 our $AUTHORITY = 'cpan:STEVAN';
@@ -18,13 +18,16 @@ sub BUILD {
         install_from(Path::Class::File->new(__FILE__)->parent
                                                      ->subdir('WebFiles'));
 
-        resource(Moose::Website::Resource::jQuery->new);
+        resource(Resource::Pack::jQuery->new(
+            version    => '1.4.2',
+            install_to => 'js',
+        ));
 
         dir 'css';
         dir 'images';
         dir js => (
             dir          => 'js',
-            dependencies => ['jquery/core'],
+            dependencies => ['jquery/js'],
         );
     };
 }
diff --git a/lib/Moose/Website/Resource/jQuery.pm b/lib/Moose/Website/Resource/jQuery.pm
deleted file mode 100644 (file)
index 2d3ca74..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-package Moose::Website::Resource::jQuery;
-use Moose;
-use Resource::Pack;
-
-our $VERSION   = '0.01';
-our $AUTHORITY = 'cpan:STEVAN';
-
-extends 'Resource::Pack::Resource';
-
-has '+name' => (default => 'jquery');
-
-sub BUILD {
-    my $self = shift;
-
-    resource $self => as {
-        install_to 'js';
-        url core => 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js';
-    };
-}
-
-__PACKAGE__->meta->make_immutable;
-
-no Moose; no Resource::Pack; 1;
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Moose::Website::Resource::jQuery - A Moosey solution to this problem
-
-=head1 SYNOPSIS
-
-  use Moose::Website::Resource::jQuery;
-
-=head1 DESCRIPTION
-
-=head1 METHODS
-
-=over 4
-
-=item B<>
-
-=back
-
-=head1 BUGS
-
-All complex software has bugs lurking in it, and this module is no
-exception. If you find a bug please either email me, or add the bug
-to cpan-RT.
-
-=head1 AUTHOR
-
-Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2010 Infinity Interactive, Inc.
-
-L<http://www.iinteractive.com>
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut