vmbuilder_plugins 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,3 +7,7 @@
7
7
 
8
8
  * Applied patch - remove incorrect directory check in 'su_put'.
9
9
 
10
+ == 0.1.2 / 2007-06-06
11
+
12
+ * Applied patch - add 'Emerge' module. Thanks to monki(Wesley Beary)
13
+
@@ -7,4 +7,5 @@ lib/vmbuilder_plugins/all.rb
7
7
  lib/vmbuilder_plugins/apt.rb
8
8
  lib/vmbuilder_plugins/gem.rb
9
9
  lib/vmbuilder_plugins/std.rb
10
+ lib/vmbuilder_plugins/emerge.rb
10
11
  tools/rakehelp.rb
data/README.txt CHANGED
@@ -1,5 +1,5 @@
1
1
  vmbuilder_plugins
2
- http://rubyforge.org/projects/vmbuilder
2
+ http://rubyforge.org/projects/accounts4free
3
3
  neil |at| aldur.co.uk
4
4
  Neil Wilson
5
5
 
@@ -9,10 +9,11 @@ Capistrano plugins abstracted from the vmbuilder project.
9
9
 
10
10
  == FEATURES/PROBLEMS:
11
11
 
12
- Currently contains three plugins.
12
+ Currently contains four plugins.
13
13
 
14
14
  * Std. Contains commands that enhance the facilities available in Capistrano.
15
15
  * Apt. Used to control the Debian 'apt' package manager
16
+ * Emerge. Used to control the Gentoo 'emerge' package manager
16
17
  * Gem. Used to control the automated installation of Gems.
17
18
 
18
19
  Look at the rdoc for each module for a full run down of the features
@@ -36,7 +37,7 @@ Look at the rdoc for each module for a full run down of the features
36
37
  == LICENCE:
37
38
 
38
39
  Capistrano Plugins - abstracted from the vmbuilder project
39
- Copyright (C) 2007, Neil Wilson, Aldur Systems Ltd
40
+ Copyright (C) 2007, Neil Wilson, Aldur Systems Ltd and others.
40
41
 
41
42
  This program is free software; you can redistribute it and/or modify
42
43
  it under the terms of the GNU General Public License as published by
data/Rakefile CHANGED
@@ -3,14 +3,14 @@
3
3
  require 'rubygems'
4
4
  require 'hoe'
5
5
 
6
- Hoe.new('vmbuilder_plugins', '0.1.1') do |p|
7
- p.rubyforge_name = 'vmbuilder'
8
- p.summary = 'Gem, Std, and Apt Capistrano plugins'
6
+ Hoe.new('vmbuilder_plugins', '0.1.2') do |p|
7
+ p.rubyforge_name = 'accounts4free'
8
+ p.summary = 'Gem, Std, Emerge and Apt Capistrano plugins'
9
9
  p.author = 'Neil Wilson'
10
10
  p.email = 'neil@aldur.co.uk'
11
11
  p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
12
12
  p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
13
- p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
13
+ p.changes = p.paragraphs_of('History.txt', 4..5).join("\n\n")
14
14
  p.extra_deps << ['capistrano', '~> 1.4']
15
15
  end
16
16
 
@@ -0,0 +1,76 @@
1
+ # =emerge.rb: Gentoo 'emerge' Installer library
2
+ # Capistrano task library to install and manage portage packages
3
+ #
4
+ # Copyright (c) 2007 monki(Wesley Beary)
5
+ #
6
+ # inspiration: vmbuilder by Neil Wilson, Aldur Systems Ltd
7
+ #
8
+ # Licenced under the GNU Public License v2. No warranty is provided.
9
+
10
+ require 'capistrano'
11
+
12
+ # =Purpose
13
+ # emerge is a Capistrano plugin module providing a set of methods
14
+ # that invoke the portage package manage (as used in Gentoo)
15
+ #
16
+ # Installs within Capistrano as the plugin _emerge_.
17
+ #
18
+ # =Usage
19
+ #
20
+ # require 'marshall/plugins/emerge'
21
+ #
22
+ # Prefix all calls to the library with <tt>emerge.</tt>
23
+ #
24
+ module Emerge
25
+ # Default emerge command - reduce interactivity to the minimum
26
+ EMERGE="emerge -q"
27
+
28
+ # Emerge a new package or packages
29
+ def install(packages, options={})
30
+ cmd = <<-CMD
31
+ sh -c "#{EMERGE} #{packages.join(" ")}"
32
+ CMD
33
+ sudo(cmd, options)
34
+ end
35
+
36
+ # Run clean old/unused packages
37
+ def clean(options={})
38
+ cmd = <<-CMD
39
+ sh -c "#{EMERGE} -clean"
40
+ CMD
41
+ sudo(cmd, options)
42
+ end
43
+
44
+ # Upgrade installed package list
45
+ def upgrade(options={})
46
+ cmd = <<-CMD
47
+ sh -c "#{EMERGE} --sync"
48
+ CMD
49
+ sudo(cmd, options)
50
+ end
51
+
52
+ # Update portage
53
+ def update_system(options={})
54
+ cmd = <<-CMD
55
+ sh -c "#{EMERGE} portage"
56
+ CMD
57
+ sudo(cmd, options)
58
+ end
59
+
60
+ # Update all installed packages
61
+ def update(options={})
62
+ cmd = <<-CMD
63
+ sh -c "#{EMERGE} --update --deep --newuse world"
64
+ CMD
65
+ sudo(cmd, options)
66
+ end
67
+
68
+ # Boot script manipulation command
69
+ def rc_update(packages, setting)
70
+ packages.each do |service|
71
+ sudo "rc_update add #{service} #{setting}"
72
+ end
73
+ end
74
+ end
75
+
76
+ Capistrano.plugin :emerge, Emerge
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.2
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: vmbuilder_plugins
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.1
7
- date: 2007-05-05 00:00:00 +01:00
8
- summary: Gem, Std, and Apt Capistrano plugins
6
+ version: 0.1.2
7
+ date: 2007-06-17 00:00:00 +01:00
8
+ summary: Gem, Std, Emerge and Apt Capistrano plugins
9
9
  require_paths:
10
10
  - lib
11
11
  email: neil@aldur.co.uk
12
- homepage: " http://rubyforge.org/projects/vmbuilder"
13
- rubyforge_project: vmbuilder
14
- description: "== FEATURES/PROBLEMS: Currently contains three plugins. * Std. Contains commands that enhance the facilities available in Capistrano. * Apt. Used to control the Debian 'apt' package manager * Gem. Used to control the automated installation of Gems. Look at the rdoc for each module for a full run down of the features"
12
+ homepage: " http://rubyforge.org/projects/accounts4free"
13
+ rubyforge_project: accounts4free
14
+ description: "== FEATURES/PROBLEMS: Currently contains four plugins. * Std. Contains commands that enhance the facilities available in Capistrano. * Apt. Used to control the Debian 'apt' package manager * Emerge. Used to control the Gentoo 'emerge' package manager * Gem. Used to control the automated installation of Gems. Look at the rdoc for each module for a full run down of the features"
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin
@@ -38,13 +38,17 @@ files:
38
38
  - lib/vmbuilder_plugins/apt.rb
39
39
  - lib/vmbuilder_plugins/gem.rb
40
40
  - lib/vmbuilder_plugins/std.rb
41
+ - lib/vmbuilder_plugins/emerge.rb
41
42
  - tools/rakehelp.rb
42
43
  test_files: []
43
44
 
44
- rdoc_options: []
45
-
46
- extra_rdoc_files: []
47
-
45
+ rdoc_options:
46
+ - --main
47
+ - README.txt
48
+ extra_rdoc_files:
49
+ - History.txt
50
+ - Manifest.txt
51
+ - README.txt
48
52
  executables: []
49
53
 
50
54
  extensions: []
@@ -68,5 +72,5 @@ dependencies:
68
72
  requirements:
69
73
  - - ">="
70
74
  - !ruby/object:Gem::Version
71
- version: 1.2.0
75
+ version: 1.2.1
72
76
  version: