automateit 0.71226.1 → 0.71230
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/CHANGES.txt +13 -1
- data/Hoe.rake +1 -2
- data/Rakefile +13 -9
- data/TODO.txt +4 -1
- data/bin/aifield +0 -11
- data/bin/aitag +16 -23
- data/helpers/cpan_wrapper.pl +138 -16
- data/lib/automateit.rb +1 -15
- data/lib/automateit/account_manager/base.rb +8 -4
- data/lib/automateit/address_manager/freebsd.rb +6 -3
- data/lib/automateit/address_manager/openbsd.rb +6 -3
- data/lib/automateit/edit_manager.rb +13 -5
- data/lib/automateit/package_manager.rb +16 -8
- data/lib/automateit/package_manager/cpan.rb +4 -6
- data/lib/automateit/platform_manager/lsb.rb +15 -11
- data/lib/automateit/root.rb +1 -1
- data/lib/automateit/service_manager/sysv.rb +6 -3
- data/lib/automateit/template_manager/base.rb +30 -26
- data/lib/inactive_support.rb +50 -0
- data/lib/inactive_support/basic_object.rb +5 -0
- data/lib/inactive_support/clean_logger.rb +127 -0
- data/lib/inactive_support/core_ext/array/extract_options.rb +19 -0
- data/lib/inactive_support/core_ext/blank.rb +50 -0
- data/lib/inactive_support/core_ext/class/attribute_accessors.rb +48 -0
- data/lib/inactive_support/core_ext/class/inheritable_attributes.rb +140 -0
- data/lib/inactive_support/core_ext/enumerable.rb +63 -0
- data/lib/inactive_support/core_ext/hash/keys.rb +54 -0
- data/lib/inactive_support/core_ext/module/aliasing.rb +70 -0
- data/lib/inactive_support/core_ext/numeric/time.rb +91 -0
- data/lib/inactive_support/core_ext/string/inflections.rb +153 -0
- data/lib/inactive_support/core_ext/symbol.rb +14 -0
- data/lib/inactive_support/core_ext/time/conversions.rb +94 -0
- data/lib/inactive_support/duration.rb +96 -0
- data/lib/inactive_support/inflections.rb +53 -0
- data/lib/inactive_support/inflector.rb +282 -0
- data/lib/nitpick.rb +8 -4
- data/spec/integration/package_manager_spec.rb +1 -1
- data/spec/integration/platform_manager_spec.rb +0 -16
- data/spec/unit/edit_manager_spec.rb +1 -0
- data/spec/unit/package_manager_spec.rb +1 -0
- metadata +19 -23
- metadata.gz.sig +0 -0
- data/helpers/cpan_install.pl +0 -59
- data/helpers/cpan_is_installed.pl +0 -37
- data/helpers/cpan_uninstall.pl +0 -58
metadata.gz.sig
CHANGED
Binary file
|
data/helpers/cpan_install.pl
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
#!/usr/bin/env perl
|
2
|
-
|
3
|
-
# Example: ./install.pl Acme::please
|
4
|
-
|
5
|
-
use warnings "all";
|
6
|
-
use File::Basename;
|
7
|
-
my $wrapper = dirname($0)."/cpan_wrapper.pl";
|
8
|
-
require $wrapper;
|
9
|
-
|
10
|
-
sub usage {
|
11
|
-
my($message) = @_;
|
12
|
-
print <<EOB;
|
13
|
-
usage: install.pl [--quiet|--help|--dryrun] module [modules...]
|
14
|
-
EOB
|
15
|
-
if ($message) {
|
16
|
-
print "ERROR: $message\n";
|
17
|
-
exit 1;
|
18
|
-
} else {
|
19
|
-
exit 0;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
|
23
|
-
use Getopt::Long;
|
24
|
-
our $quiet = 0;
|
25
|
-
our $dryrun = 0;
|
26
|
-
our $help = 0;
|
27
|
-
GetOptions(
|
28
|
-
'quiet' => \$quiet,
|
29
|
-
'dryrun' => \$dryrun,
|
30
|
-
'n' => \$dryrun,
|
31
|
-
'help' => \$help
|
32
|
-
);
|
33
|
-
|
34
|
-
if (1 == $help) {
|
35
|
-
usage(0);
|
36
|
-
}
|
37
|
-
|
38
|
-
@modules = @ARGV;
|
39
|
-
unless ($#modules >= 0) {
|
40
|
-
usage "No modules specified";
|
41
|
-
}
|
42
|
-
|
43
|
-
$CpanWrapper::DRYRUN = $dryrun;
|
44
|
-
if (0 && $CpanWrapper::DRYRUN) { die } # Squelch warnings
|
45
|
-
|
46
|
-
# Uninstall modules
|
47
|
-
foreach my $module (@modules) {
|
48
|
-
if (CpanWrapper->is_installed($module)) {
|
49
|
-
print "! Module already installed: $module\n";
|
50
|
-
next;
|
51
|
-
}
|
52
|
-
|
53
|
-
if (CpanWrapper->install($module)) {
|
54
|
-
print "* Installed: $module\n" unless $quiet;
|
55
|
-
} else {
|
56
|
-
print "! Can't find CPAN module: $module\n";
|
57
|
-
exit 1
|
58
|
-
}
|
59
|
-
}
|
@@ -1,37 +0,0 @@
|
|
1
|
-
#!/usr/bin/env perl
|
2
|
-
|
3
|
-
# Example: ./is_available.pl Acme::please CPAN
|
4
|
-
|
5
|
-
use warnings "all";
|
6
|
-
use File::Basename;
|
7
|
-
my $wrapper = dirname($0)."/cpan_wrapper.pl";
|
8
|
-
require $wrapper;
|
9
|
-
|
10
|
-
@modules = @ARGV;
|
11
|
-
unless ($#modules >= 0) {
|
12
|
-
print "Usage: uninstall.pl mymodule [mymodule]\n";
|
13
|
-
exit 1
|
14
|
-
}
|
15
|
-
|
16
|
-
my @available;
|
17
|
-
my @unavailable;
|
18
|
-
foreach my $module (@modules) {
|
19
|
-
if (CpanWrapper->is_installed($module)) {
|
20
|
-
push(@available, $module);
|
21
|
-
} else {
|
22
|
-
push(@unavailable, $module);
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
|
-
sub print_contents {
|
27
|
-
my($name, @modules) = @_;
|
28
|
-
return if $#modules < 0;
|
29
|
-
print "$name:\n";
|
30
|
-
foreach my $module (@modules) {
|
31
|
-
print " - $module\n";
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
print "--- %YAML:1.0\n";
|
36
|
-
print_contents 'available', @available;
|
37
|
-
print_contents 'unavailable', @unavailable;
|
data/helpers/cpan_uninstall.pl
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
#!/usr/bin/env perl
|
2
|
-
|
3
|
-
# Example: ./uninstall.pl Acme::please
|
4
|
-
|
5
|
-
use warnings "all";
|
6
|
-
use File::Basename;
|
7
|
-
my $wrapper = dirname($0)."/cpan_wrapper.pl";
|
8
|
-
require $wrapper;
|
9
|
-
|
10
|
-
sub usage {
|
11
|
-
my($message) = @_;
|
12
|
-
print <<EOB;
|
13
|
-
usage: uninstall.pl [--quiet|--help|--dryrun] module [modules...]
|
14
|
-
EOB
|
15
|
-
if ($message) {
|
16
|
-
print "ERROR: $message\n";
|
17
|
-
exit 1;
|
18
|
-
} else {
|
19
|
-
exit 0;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
|
23
|
-
use Getopt::Long;
|
24
|
-
our $quiet = 0;
|
25
|
-
our $dryrun = 0;
|
26
|
-
our $help = 0;
|
27
|
-
GetOptions(
|
28
|
-
'quiet' => \$quiet,
|
29
|
-
'dryrun' => \$dryrun,
|
30
|
-
'n' => \$dryrun,
|
31
|
-
'help' => \$help
|
32
|
-
);
|
33
|
-
|
34
|
-
if (1 == $help) {
|
35
|
-
usage(0);
|
36
|
-
}
|
37
|
-
|
38
|
-
@modules = @ARGV;
|
39
|
-
unless ($#modules >= 0) {
|
40
|
-
usage "No modules specified";
|
41
|
-
}
|
42
|
-
|
43
|
-
$CpanWrapper::DRYRUN = $dryrun;
|
44
|
-
if (0 && $CpanWrapper::DRYRUN) { die } # Squelch warnings
|
45
|
-
|
46
|
-
foreach my $module (@modules) {
|
47
|
-
unless (CpanWrapper->is_installed($module)) {
|
48
|
-
print "! Module isn't installed: $module\n";
|
49
|
-
next;
|
50
|
-
}
|
51
|
-
|
52
|
-
print "* Uninstalling module: $module\n" unless $quiet;
|
53
|
-
|
54
|
-
my(@files) = CpanWrapper->uninstall($module);
|
55
|
-
foreach my $file (@files) {
|
56
|
-
print "- File: $file\n" unless $quiet;
|
57
|
-
}
|
58
|
-
}
|