Permalink
Browse files

Possibly fixed test

  • Loading branch information...
1 parent 8392856 commit 6b832bd6eabfef633627b14a5252110b8653e310 @grim8634 grim8634 committed Nov 20, 2010
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,22 @@
+LICENSE
+MANIFEST
+META.yml
+Makefile.PL
+README
+dist.ini
+lib/Dist/Zilla/App/Command/provision.pm
+lib/Dist/Zilla/Plugin/Oyster.pm
+lib/Dist/Zilla/Plugin/Oyster/Helper.pm
+lib/Dist/Zilla/Plugin/Oyster/New.pm
+lib/Dist/Zilla/PluginBundle/Oyster.pm
+lib/Oyster.pm
+lib/Oyster/Deploy/Git.pm
+lib/Oyster/Provision.pm
+lib/Oyster/Provision/AmazonEC2.pm
+lib/Oyster/Provision/Rackspace.pm
+oyster.conf
+share/deploy/git/catalyst-restart.sh
+share/deploy/git/post-receive
+share/deploy/git/post-update
+t/Deploy/git.t
+t/Provision/Oyster-Provision.t
View
@@ -0,0 +1,39 @@
+---
+abstract: 'An incubator for Perls in the Cloud'
+author:
+ - 'osfameron <osfameron@cpan.org>'
+build_requires:
+ File::Temp: 0
+ Test::Exception: 0
+ Test::More: 0
+configure_requires:
+ ExtUtils::MakeMaker: 6.31
+ File::ShareDir::Install: 0.03
+dynamic_config: 0
+generated_by: 'Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.102400'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: Oyster
+requires:
+ Carp: 0
+ Catalyst::Helper: 0
+ Config::Any: 0
+ Data::Dumper: 0
+ Dist::Zilla::App: 0
+ Dist::Zilla::File::FromCode: 0
+ Dist::Zilla::File::InMemory: 0
+ Dist::Zilla::Role::ModuleMaker: 0
+ Dist::Zilla::Role::PluginBundle::Easy: 0
+ Error::Simple: 0
+ File::Copy: 0
+ File::ShareDir: 0
+ Git::Wrapper: 0
+ MIME::Base64: 0
+ Moose: 0
+ Moose::Role: 0
+ Net::Amazon::EC2: 0
+ Net::RackSpace::CloudServers: 0
+ Net::RackSpace::CloudServers::Server: 0
+version: 0.001
@@ -0,0 +1,79 @@
+
+use strict;
+use warnings;
+
+
+
+use ExtUtils::MakeMaker 6.31;
+
+use File::ShareDir::Install;
+install_share dist => "share";
+
+
+my %WriteMakefileArgs = (
+ 'ABSTRACT' => 'An incubator for Perls in the Cloud',
+ 'AUTHOR' => 'osfameron <osfameron@cpan.org>',
+ 'BUILD_REQUIRES' => {
+ 'File::Temp' => '0',
+ 'Test::Exception' => '0',
+ 'Test::More' => '0'
+ },
+ 'CONFIGURE_REQUIRES' => {
+ 'ExtUtils::MakeMaker' => '6.31',
+ 'File::ShareDir::Install' => '0.03'
+ },
+ 'DISTNAME' => 'Oyster',
+ 'EXE_FILES' => [],
+ 'LICENSE' => 'perl',
+ 'NAME' => 'Oyster',
+ 'PREREQ_PM' => {
+ 'Carp' => '0',
+ 'Catalyst::Helper' => '0',
+ 'Config::Any' => '0',
+ 'Data::Dumper' => '0',
+ 'Dist::Zilla::App' => '0',
+ 'Dist::Zilla::File::FromCode' => '0',
+ 'Dist::Zilla::File::InMemory' => '0',
+ 'Dist::Zilla::Role::ModuleMaker' => '0',
+ 'Dist::Zilla::Role::PluginBundle::Easy' => '0',
+ 'Error::Simple' => '0',
+ 'File::Copy' => '0',
+ 'File::ShareDir' => '0',
+ 'Git::Wrapper' => '0',
+ 'MIME::Base64' => '0',
+ 'Moose' => '0',
+ 'Moose::Role' => '0',
+ 'Net::Amazon::EC2' => '0',
+ 'Net::RackSpace::CloudServers' => '0',
+ 'Net::RackSpace::CloudServers::Server' => '0'
+ },
+ 'VERSION' => '0.001',
+ 'test' => {
+ 'TESTS' => 't/Deploy/*.t t/Provision/*.t'
+ }
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
+ my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
+ my $pp = $WriteMakefileArgs{PREREQ_PM};
+ for my $mod ( keys %$br ) {
+ if ( exists $pp->{$mod} ) {
+ $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
+ }
+ else {
+ $pp->{$mod} = $br->{$mod};
+ }
+ }
+}
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+ unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
+
+WriteMakefile(%WriteMakefileArgs);
+
+package
+MY;
+use File::ShareDir::Install qw(postamble);
+
+
View
@@ -0,0 +1,13 @@
+
+
+This archive contains the distribution Oyster,
+version 0.001:
+
+ An incubator for Perls in the Cloud
+
+This software is copyright (c) 2010 by The Contributors.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+
View
@@ -0,0 +1,12 @@
+name = Oyster
+abstract = An incubator for Perls in the Cloud
+author = osfameron <osfameron@cpan.org>
+license = Perl_5
+copyright_year = 2010
+copyright_holder = The Contributors
+
+version = 0.001
+
+[@Basic]
+
+[AutoPrereqs]
@@ -0,0 +1,76 @@
+use strict;
+use warnings;
+package Dist::Zilla::App::Command::provision;
+BEGIN {
+ $Dist::Zilla::App::Command::provision::VERSION = '0.1';
+}
+# ABSTRACT: release your dist to the CPAN
+use Dist::Zilla::App -command;
+use Moose;
+use Config::Any;
+
+sub abstract { 'provision a new Oyster VM' }
+
+sub opt_spec {
+ [ 'name=s' => 'the name of the VM to create' ],
+}
+
+sub execute {
+ my ($self, $opt, $arg) = @_;
+
+ my $zilla = $self->zilla;
+
+ my $name = $opt->name
+ or die "No name provided!";
+ my @config_files = ( './oyster.conf' ); # TODO make configurable
+
+ my $cfg = Config::Any->load_files({ files => \@config_files });
+ ($cfg) = values %{ $cfg->[0] }; # FIX with ::JFDI or similar
+
+ my $Provision = $cfg->{Provision} or die "No <Provision> section";
+ my $target = $Provision->{$name} or die "No section for <Provision> <$name>";
+
+ my $type = $target->{type} || 'Rackspace';
+
+ use Oyster::Provision;
+ my $server = Oyster::Provision->new(
+ name => $name,
+ size => 1, # id 1 - ram 256 MiB - disk 10 GiB
+ image => 69, # id 69 - Ubuntu 10.10 (meerkat)
+ pub_ssh => "$ENV{HOME}/.ssh/id_rsa.pub",
+ provision_backend => $type,
+ );
+ $server->create;
+ print "Instance $name created! ($server)\n";
+}
+
+1;
+
+__END__
+=pod
+
+=head1 NAME
+
+Dist::Zilla::App::Command::provision - provision a new Oyster VM
+
+=head1 VERSION
+
+version 0.1
+
+=head1 SYNOPSIS
+
+ TODO
+
+=head1 AUTHOR
+
+CONTRIBUTORS
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is copyright (c) 2010 by CONTRIBUTORS
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut
+
@@ -0,0 +1,58 @@
+use strict;
+use warnings;
+package Dist::Zilla::Plugin::Oyster;
+BEGIN {
+ our $VERSION = 0.07;# VERSION
+}
+1;
+# ABSTRACT: set of plugins for working with Oyster
+
+
+__END__
+=pod
+
+=head1 NAME
+
+Dist::Zilla::Plugin::Oyster - set of plugins for working with Oyster
+
+=head1 VERSION
+
+version 0.07
+
+=head1 DESCRIPTION
+
+The following is a list of plugins in this distribution to help you integrate
+L<Oyster> and L<Dist::Zilla>
+
+=over
+
+=item * L<Dist::Zilla::Plugin::Oyster::New> Create a new Oyster Project
+
+=back
+
+=head1 PATCHES
+
+Please read the SubmittingPatches file included with this Distribution. Patches
+that are of sufficient quality, within the goals of the project and pass the
+checklist will probably be accepted.
+
+=head1 AUTHORS
+
+=over 4
+
+=item *
+
+see README (TODO)
+
+=back
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2010 by Caleb Cushing.
+
+This is free software, licensed under:
+
+ The Artistic License 2.0
+
+=cut
+
@@ -0,0 +1,89 @@
+use strict;
+use warnings;
+package Dist::Zilla::Plugin::Oyster::Helper;
+BEGIN {
+ our $VERSION = 0.01;# VERSION
+}
+use Moose;
+use Dist::Zilla::File::InMemory;
+
+extends 'Catalyst::Helper';
+
+has _zilla_gatherer => (
+ is => 'ro',
+ required => 1,
+ handles => {
+ _zilla_add_file => 'add_file',
+ },
+);
+
+# we don't want these to do anything
+sub _mk_changes {};
+sub _mk_makefile {};
+sub _mk_readme {};
+sub _mk_apptest {};
+sub _mk_podtest {};
+sub _mk_podcoveragetest {};
+
+sub mk_file {
+ my ( $self, $file_obj , $output ) = @_;
+
+ # unfortunately the stringified $file_obj includes a prepended
+ # {dist_repo} name which dzil already creates if we don't regex it out we
+ # end up with {dist_repo}/{dist_repo}/{files} instead of just
+ # {dist_repo}/{files}
+ my $name = "$file_obj";
+ $name =~ s{[\w-]+/}{};
+
+ my $file
+ = Dist::Zilla::File::InMemory->new({
+ name => $name,
+ content => $output,
+ });
+
+ $file->mode( oct(755) ) if $file->name =~ /script/;
+
+ $self->_zilla_add_file($file);
+}
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
+# ABSTRACT: a subclass of Catalyst::Helper
+
+
+__END__
+=pod
+
+=head1 NAME
+
+Dist::Zilla::Plugin::Oyster::Helper - a subclass of Catalyst::Helper
+
+=head1 VERSION
+
+version 0.07
+
+=head1 DESCRIPTION
+
+this is used to override methods in L<Catalyst::Helper> so that it works
+better with dzil.
+
+=head1 AUTHORS
+
+=over 4
+
+=item *
+
+CONTRIBUTORS TODO (note, based on xenoterracide & t0m's work)
+
+=back
+
+=head1 COPYRIGHT AND LICENSE
+
+TODO
+
+This is free software, licensed under:
+
+ The Artistic License 2.0
+
+=cut
+
Oops, something went wrong.

0 comments on commit 6b832bd

Please sign in to comment.