瀏覽代碼

Fix dependencies on install/make test

Andy Baugh 8 年之前
父節點
當前提交
07b4f2567c
共有 3 個文件被更改,包括 6 次插入8 次删除
  1. 5 0
      Makefile
  2. 0 5
      README.md
  3. 1 3
      t/Cpanel-iContact-Provider-Slack.t

+ 5 - 0
Makefile

@@ -1,8 +1,13 @@
 install:
+	make depend
 	[ -d /var/cpanel/perl/Cpanel/iContact/Provider/Schema ] || mkdir -p /var/cpanel/perl/Cpanel/iContact/Provider/Schema/
 	cp -f lib/Cpanel/iContact/Provider/Schema/*.pm /var/cpanel/perl/Cpanel/iContact/Provider/Schema/
 	cp -f lib/Cpanel/iContact/Provider/*.pm /var/cpanel/perl/Cpanel/iContact/Provider/
 
 test:
+	make depend
 	[ ! -x /usr/local/cpanel/3rdparty/bin/prove ] || /usr/local/cpanel/3rdparty/bin/prove t/*.t
 	[ -x /usr/local/cpanel/3rdparty/bin/prove ] || prove t/*.t
+
+depend:
+	sudo cpan -i Net::XMPP Mozilla::CA Test::More Test::Fatal Test::MockModule

+ 0 - 5
README.md

@@ -10,11 +10,6 @@ Current plugins:
 Installation and Use:
 ---------------------
 * Clone this repo with git onto a cPanel host of at least 11.64+
-* Install Net::XMPP
-
-    cpan
-    install Net:XMPP
-
 * Run the Tests
 
     make test

+ 1 - 3
t/Cpanel-iContact-Provider-Slack.t

@@ -8,15 +8,13 @@ use lib abs_path( dirname(__FILE__) . "/../lib" );
 use Test::More;
 use Test::Fatal;
 use Test::MockModule();
-use Test::NoWarnings;
 
--d "/usr/local/cpanel" ? plan tests => 4 : plan SKIP_ALL => "cPanel not installed";    # 3 + 1 for NoWarnings
+-d "/usr/local/cpanel" ? plan tests => 3 : plan skip_all => "cPanel not installed";
 
 require Cpanel::HTTP::Client;
 require Cpanel::HTTP::Client::Response;
 require Cpanel::iContact::Provider::Slack;
 
-
 # First, let's mock out the parent, and other stuff we wouldn't wanna do in a unit test
 my $provider    = Test::MockModule->new("Cpanel::iContact::Provider");
 my $text_scalar = 'lol, jk';