capigen 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. data/History.txt +4 -0
  2. data/Manifest.txt +53 -50
  3. data/lib/capigen/cap_ext/configuration.rb +5 -0
  4. data/{recipes/bootstrap/patch.rb → lib/capigen/cap_ext/connections.rb} +1 -23
  5. data/lib/capigen/cap_ext/namespace.rb +6 -0
  6. data/lib/capigen/profiles.rb +1 -1
  7. data/lib/capigen/recipes.rb +8 -0
  8. data/lib/capigen/version.rb +1 -1
  9. data/lib/capigen.rb +8 -0
  10. data/lib/recipes/packages.rb +19 -0
  11. data/{templates → lib/templates}/capistrano/Capfile +4 -3
  12. data/{templates → lib/templates}/capistrano/deploy.rb.erb +1 -1
  13. data/website/index.html +1 -1
  14. metadata +54 -51
  15. data/init.rb +0 -3
  16. /data/{recipes → lib}/profiles/centos-sick.rb +0 -0
  17. /data/{recipes → lib/recipes}/README +0 -0
  18. /data/{recipes → lib/recipes}/centos.rb +0 -0
  19. /data/{recipes → lib/recipes}/deploy.rb +0 -0
  20. /data/{recipes → lib/recipes}/gems.rb +0 -0
  21. /data/{recipes → lib/recipes}/imagemagick.rb +0 -0
  22. /data/{recipes → lib/recipes}/install.rb +0 -0
  23. /data/{recipes → lib/recipes}/memcached.rb +0 -0
  24. /data/{recipes → lib/recipes}/mongrel_cluster.rb +0 -0
  25. /data/{recipes → lib/recipes}/monit.rb +0 -0
  26. /data/{recipes → lib/recipes}/mysql.rb +0 -0
  27. /data/{recipes → lib/recipes}/nginx.rb +0 -0
  28. /data/{recipes → lib/recipes}/rails.rb +0 -0
  29. /data/{recipes → lib/recipes}/ruby.rb +0 -0
  30. /data/{recipes → lib/recipes}/sphinx.rb +0 -0
  31. /data/{templates → lib/templates}/centos/setup.sh +0 -0
  32. /data/{templates → lib/templates}/centos/sudoers +0 -0
  33. /data/{templates → lib/templates}/imagemagick/install.sh +0 -0
  34. /data/{templates → lib/templates}/memcached/install.sh +0 -0
  35. /data/{templates → lib/templates}/memcached/memcached.initd.centos.erb +0 -0
  36. /data/{templates → lib/templates}/memcached/memcached.monitrc.erb +0 -0
  37. /data/{templates → lib/templates}/mongrel/mongrel_cluster.initd.erb +0 -0
  38. /data/{templates → lib/templates}/mongrel/mongrel_cluster.monitrc.erb +0 -0
  39. /data/{templates → lib/templates}/mongrel/mongrel_cluster.yml.erb +0 -0
  40. /data/{templates → lib/templates}/monit/cert.sh +0 -0
  41. /data/{templates → lib/templates}/monit/install.sh +0 -0
  42. /data/{templates → lib/templates}/monit/monit.cnf +0 -0
  43. /data/{templates → lib/templates}/monit/monit.initd.centos.erb +0 -0
  44. /data/{templates → lib/templates}/monit/monitrc.erb +0 -0
  45. /data/{templates → lib/templates}/monit/patch_inittab.sh +0 -0
  46. /data/{templates → lib/templates}/mysql/install.sh.erb +0 -0
  47. /data/{templates → lib/templates}/mysql/install_db.sql.erb +0 -0
  48. /data/{templates → lib/templates}/mysql/mysql.monitrc.erb +0 -0
  49. /data/{templates → lib/templates}/nginx/install.sh.erb +0 -0
  50. /data/{templates → lib/templates}/nginx/nginx.conf.erb +0 -0
  51. /data/{templates → lib/templates}/nginx/nginx.initd.erb +0 -0
  52. /data/{templates → lib/templates}/nginx/nginx.monitrc.erb +0 -0
  53. /data/{templates → lib/templates}/nginx/nginx_vhost.conf.erb +0 -0
  54. /data/{templates → lib/templates}/rails/database.yml.erb +0 -0
  55. /data/{templates → lib/templates}/ruby/ruby_install.sh +0 -0
  56. /data/{templates → lib/templates}/ruby/rubygems_install.sh +0 -0
  57. /data/{templates → lib/templates}/sphinx/install.sh.erb +0 -0
  58. /data/{templates → lib/templates}/sphinx/sphinx.conf.erb +0 -0
  59. /data/{templates → lib/templates}/sphinx/sphinx.monitrc.erb +0 -0
  60. /data/{templates → lib/templates}/sphinx/sphinx_app.initd.centos.erb +0 -0
  61. /data/{templates → lib/templates}/sphinx/sphinx_app.initd.erb +0 -0
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.1.2 2008-02-06
2
+
3
+ * Loading recipes from gem
4
+
1
5
  == 0.1.1 2008-02-06
2
6
 
3
7
  * Initial import
data/Manifest.txt CHANGED
@@ -6,8 +6,10 @@ README.txt
6
6
  Rakefile
7
7
  config/hoe.rb
8
8
  config/requirements.rb
9
- init.rb
10
9
  lib/capigen.rb
10
+ lib/capigen/cap_ext/configuration.rb
11
+ lib/capigen/cap_ext/connections.rb
12
+ lib/capigen/cap_ext/namespace.rb
11
13
  lib/capigen/config.rb
12
14
  lib/capigen/helper.rb
13
15
  lib/capigen/helpers/gem_helper.rb
@@ -16,25 +18,59 @@ lib/capigen/helpers/script_helper.rb
16
18
  lib/capigen/helpers/wget_helper.rb
17
19
  lib/capigen/packagers/yum.rb
18
20
  lib/capigen/profiles.rb
21
+ lib/capigen/recipes.rb
19
22
  lib/capigen/recipes.yml
20
23
  lib/capigen/templates.rb
21
24
  lib/capigen/version.rb
22
- recipes/README
23
- recipes/bootstrap/patch.rb
24
- recipes/centos.rb
25
- recipes/deploy.rb
26
- recipes/gems.rb
27
- recipes/imagemagick.rb
28
- recipes/install.rb
29
- recipes/memcached.rb
30
- recipes/mongrel_cluster.rb
31
- recipes/monit.rb
32
- recipes/mysql.rb
33
- recipes/nginx.rb
34
- recipes/profiles/centos-sick.rb
35
- recipes/rails.rb
36
- recipes/ruby.rb
37
- recipes/sphinx.rb
25
+ lib/profiles/centos-sick.rb
26
+ lib/recipes/README
27
+ lib/recipes/centos.rb
28
+ lib/recipes/deploy.rb
29
+ lib/recipes/gems.rb
30
+ lib/recipes/imagemagick.rb
31
+ lib/recipes/install.rb
32
+ lib/recipes/memcached.rb
33
+ lib/recipes/mongrel_cluster.rb
34
+ lib/recipes/monit.rb
35
+ lib/recipes/mysql.rb
36
+ lib/recipes/nginx.rb
37
+ lib/recipes/packages.rb
38
+ lib/recipes/rails.rb
39
+ lib/recipes/ruby.rb
40
+ lib/recipes/sphinx.rb
41
+ lib/templates/capistrano/Capfile
42
+ lib/templates/capistrano/deploy.rb.erb
43
+ lib/templates/centos/setup.sh
44
+ lib/templates/centos/sudoers
45
+ lib/templates/imagemagick/install.sh
46
+ lib/templates/memcached/install.sh
47
+ lib/templates/memcached/memcached.initd.centos.erb
48
+ lib/templates/memcached/memcached.monitrc.erb
49
+ lib/templates/mongrel/mongrel_cluster.initd.erb
50
+ lib/templates/mongrel/mongrel_cluster.monitrc.erb
51
+ lib/templates/mongrel/mongrel_cluster.yml.erb
52
+ lib/templates/monit/cert.sh
53
+ lib/templates/monit/install.sh
54
+ lib/templates/monit/monit.cnf
55
+ lib/templates/monit/monit.initd.centos.erb
56
+ lib/templates/monit/monitrc.erb
57
+ lib/templates/monit/patch_inittab.sh
58
+ lib/templates/mysql/install.sh.erb
59
+ lib/templates/mysql/install_db.sql.erb
60
+ lib/templates/mysql/mysql.monitrc.erb
61
+ lib/templates/nginx/install.sh.erb
62
+ lib/templates/nginx/nginx.conf.erb
63
+ lib/templates/nginx/nginx.initd.erb
64
+ lib/templates/nginx/nginx.monitrc.erb
65
+ lib/templates/nginx/nginx_vhost.conf.erb
66
+ lib/templates/rails/database.yml.erb
67
+ lib/templates/ruby/ruby_install.sh
68
+ lib/templates/ruby/rubygems_install.sh
69
+ lib/templates/sphinx/install.sh.erb
70
+ lib/templates/sphinx/sphinx.conf.erb
71
+ lib/templates/sphinx/sphinx.monitrc.erb
72
+ lib/templates/sphinx/sphinx_app.initd.centos.erb
73
+ lib/templates/sphinx/sphinx_app.initd.erb
38
74
  script/destroy
39
75
  script/generate
40
76
  script/txt2html
@@ -43,39 +79,6 @@ tasks/capigen.rake
43
79
  tasks/deployment.rake
44
80
  tasks/environment.rake
45
81
  tasks/website.rake
46
- templates/capistrano/Capfile
47
- templates/capistrano/deploy.rb.erb
48
- templates/centos/setup.sh
49
- templates/centos/sudoers
50
- templates/imagemagick/install.sh
51
- templates/memcached/install.sh
52
- templates/memcached/memcached.initd.centos.erb
53
- templates/memcached/memcached.monitrc.erb
54
- templates/mongrel/mongrel_cluster.initd.erb
55
- templates/mongrel/mongrel_cluster.monitrc.erb
56
- templates/mongrel/mongrel_cluster.yml.erb
57
- templates/monit/cert.sh
58
- templates/monit/install.sh
59
- templates/monit/monit.cnf
60
- templates/monit/monit.initd.centos.erb
61
- templates/monit/monitrc.erb
62
- templates/monit/patch_inittab.sh
63
- templates/mysql/install.sh.erb
64
- templates/mysql/install_db.sql.erb
65
- templates/mysql/mysql.monitrc.erb
66
- templates/nginx/install.sh.erb
67
- templates/nginx/nginx.conf.erb
68
- templates/nginx/nginx.initd.erb
69
- templates/nginx/nginx.monitrc.erb
70
- templates/nginx/nginx_vhost.conf.erb
71
- templates/rails/database.yml.erb
72
- templates/ruby/ruby_install.sh
73
- templates/ruby/rubygems_install.sh
74
- templates/sphinx/install.sh.erb
75
- templates/sphinx/sphinx.conf.erb
76
- templates/sphinx/sphinx.monitrc.erb
77
- templates/sphinx/sphinx_app.initd.centos.erb
78
- templates/sphinx/sphinx_app.initd.erb
79
82
  website/index.html
80
83
  website/index.txt
81
84
  website/javascripts/rounded_corners_lite.inc.js
@@ -0,0 +1,5 @@
1
+ class Capistrano::Configuration
2
+ # Load config helper for use within Capfile
3
+ include Capigen::Helper
4
+
5
+ end
@@ -1,23 +1,3 @@
1
- #
2
- # Patches
3
- #
4
-
5
- class Capistrano::Configuration::Namespaces::Namespace
6
-
7
- # Load config helper for use within recipes
8
- require File.dirname(__FILE__) + "/../../init"
9
- include Capigen::Helper
10
-
11
- end
12
-
13
- class Capistrano::Configuration
14
- # Load config helper for use within Capfile
15
- require File.dirname(__FILE__) + "/../../init"
16
- include Capigen::Helper
17
-
18
- end
19
-
20
-
21
1
  # Patch to add ability to clear sessions
22
2
  module Capistrano::Configuration::Connections
23
3
 
@@ -67,11 +47,9 @@ module Capistrano::Configuration::Connections
67
47
  Capistrano::CLI.password_prompt("Password (for #{user}): ")
68
48
  }
69
49
  end
70
-
50
+
71
51
  end
72
52
 
73
- reset_password
74
-
75
53
  # Debug connections
76
54
  # class Capistrano::SSH
77
55
  #
@@ -0,0 +1,6 @@
1
+ class Capistrano::Configuration::Namespaces::Namespace
2
+
3
+ # Load config helper for use within recipes
4
+ include Capigen::Helper
5
+
6
+ end
@@ -1,6 +1,6 @@
1
1
  module Capigen::Profiles
2
2
 
3
- ProfileDir = File.dirname(__FILE__) + "/../../recipes/profiles"
3
+ ProfileDir = File.dirname(__FILE__) + "/../../profiles"
4
4
 
5
5
  def recipe_profiles(prefix = "")
6
6
  Dir[ProfileDir + "/#{prefix}*.rb"].collect { |file| File.basename(file)[0...-3] }
@@ -0,0 +1,8 @@
1
+ # Load recipes
2
+ recipes = Dir[File.dirname(__FILE__) + "/../recipes/**/*.rb"].collect { |recipe| File.expand_path(recipe) }
3
+ recipes.each do |recipe|
4
+ Capistrano::Configuration.instance.load recipe
5
+ end
6
+
7
+ # Reset the password var
8
+ Capistrano::Configuration.instance.load(:string => "reset_password")
@@ -2,7 +2,7 @@ module Capigen #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/capigen.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'active_support'
2
2
  require 'highline'
3
+ require 'capistrano'
3
4
 
4
5
  HighLine.track_eof = false
5
6
 
@@ -24,3 +25,10 @@ require "capigen/profiles"
24
25
  require "capigen/helper"
25
26
 
26
27
  require "capigen/config"
28
+
29
+ require "capigen/cap_ext/configuration"
30
+ require "capigen/cap_ext/namespace"
31
+ require "capigen/cap_ext/connections"
32
+
33
+
34
+
@@ -0,0 +1,19 @@
1
+ namespace :packages do
2
+
3
+ task :install do
4
+
5
+ # Setup packager
6
+ setup_packager(packager_type)
7
+
8
+ # Remove packages
9
+ package_remove(packages_to_remove)
10
+
11
+ # Update all existing packages
12
+ package_update
13
+
14
+ # Install packages
15
+ package_install(packages_to_add)
16
+
17
+ end
18
+
19
+ end
@@ -1,13 +1,14 @@
1
1
  #
2
- # This file is auto-generated from Capgen
2
+ # This file is auto-generated from Capigen
3
3
  #
4
+ require 'capigen'
4
5
 
5
6
  load 'deploy' if respond_to?(:namespace) # cap2 differentiator
6
7
 
7
8
  set :project_root, File.dirname(__FILE__)
8
9
 
9
- # Load bootstrapped patch.rb
10
- Dir['vendor/plugins/*/recipes/bootstrap/patch.rb'].each { |patch| load(patch)}
10
+ # Require capigen recipes
11
+ require 'capigen/recipes'
11
12
 
12
13
  # Load recipes from plugins
13
14
  Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
@@ -1,5 +1,5 @@
1
1
  #
2
- # This file is auto-generated from Capgen
2
+ # This file is auto-generated from Capigen
3
3
  #
4
4
 
5
5
  set :application, "<%= application %>"
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>capigen</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/capigen"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/capigen" class="numbers">0.1.1</a>
36
+ <a href="http://rubyforge.org/projects/capigen" class="numbers">0.1.2</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;capigen&#8217;</h1>
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capigen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ""
6
6
  authors:
7
7
  - Gabriel Handford
@@ -35,8 +35,10 @@ files:
35
35
  - Rakefile
36
36
  - config/hoe.rb
37
37
  - config/requirements.rb
38
- - init.rb
39
38
  - lib/capigen.rb
39
+ - lib/capigen/cap_ext/configuration.rb
40
+ - lib/capigen/cap_ext/connections.rb
41
+ - lib/capigen/cap_ext/namespace.rb
40
42
  - lib/capigen/config.rb
41
43
  - lib/capigen/helper.rb
42
44
  - lib/capigen/helpers/gem_helper.rb
@@ -45,25 +47,59 @@ files:
45
47
  - lib/capigen/helpers/wget_helper.rb
46
48
  - lib/capigen/packagers/yum.rb
47
49
  - lib/capigen/profiles.rb
50
+ - lib/capigen/recipes.rb
48
51
  - lib/capigen/recipes.yml
49
52
  - lib/capigen/templates.rb
50
53
  - lib/capigen/version.rb
51
- - recipes/README
52
- - recipes/bootstrap/patch.rb
53
- - recipes/centos.rb
54
- - recipes/deploy.rb
55
- - recipes/gems.rb
56
- - recipes/imagemagick.rb
57
- - recipes/install.rb
58
- - recipes/memcached.rb
59
- - recipes/mongrel_cluster.rb
60
- - recipes/monit.rb
61
- - recipes/mysql.rb
62
- - recipes/nginx.rb
63
- - recipes/profiles/centos-sick.rb
64
- - recipes/rails.rb
65
- - recipes/ruby.rb
66
- - recipes/sphinx.rb
54
+ - lib/profiles/centos-sick.rb
55
+ - lib/recipes/README
56
+ - lib/recipes/centos.rb
57
+ - lib/recipes/deploy.rb
58
+ - lib/recipes/gems.rb
59
+ - lib/recipes/imagemagick.rb
60
+ - lib/recipes/install.rb
61
+ - lib/recipes/memcached.rb
62
+ - lib/recipes/mongrel_cluster.rb
63
+ - lib/recipes/monit.rb
64
+ - lib/recipes/mysql.rb
65
+ - lib/recipes/nginx.rb
66
+ - lib/recipes/packages.rb
67
+ - lib/recipes/rails.rb
68
+ - lib/recipes/ruby.rb
69
+ - lib/recipes/sphinx.rb
70
+ - lib/templates/capistrano/Capfile
71
+ - lib/templates/capistrano/deploy.rb.erb
72
+ - lib/templates/centos/setup.sh
73
+ - lib/templates/centos/sudoers
74
+ - lib/templates/imagemagick/install.sh
75
+ - lib/templates/memcached/install.sh
76
+ - lib/templates/memcached/memcached.initd.centos.erb
77
+ - lib/templates/memcached/memcached.monitrc.erb
78
+ - lib/templates/mongrel/mongrel_cluster.initd.erb
79
+ - lib/templates/mongrel/mongrel_cluster.monitrc.erb
80
+ - lib/templates/mongrel/mongrel_cluster.yml.erb
81
+ - lib/templates/monit/cert.sh
82
+ - lib/templates/monit/install.sh
83
+ - lib/templates/monit/monit.cnf
84
+ - lib/templates/monit/monit.initd.centos.erb
85
+ - lib/templates/monit/monitrc.erb
86
+ - lib/templates/monit/patch_inittab.sh
87
+ - lib/templates/mysql/install.sh.erb
88
+ - lib/templates/mysql/install_db.sql.erb
89
+ - lib/templates/mysql/mysql.monitrc.erb
90
+ - lib/templates/nginx/install.sh.erb
91
+ - lib/templates/nginx/nginx.conf.erb
92
+ - lib/templates/nginx/nginx.initd.erb
93
+ - lib/templates/nginx/nginx.monitrc.erb
94
+ - lib/templates/nginx/nginx_vhost.conf.erb
95
+ - lib/templates/rails/database.yml.erb
96
+ - lib/templates/ruby/ruby_install.sh
97
+ - lib/templates/ruby/rubygems_install.sh
98
+ - lib/templates/sphinx/install.sh.erb
99
+ - lib/templates/sphinx/sphinx.conf.erb
100
+ - lib/templates/sphinx/sphinx.monitrc.erb
101
+ - lib/templates/sphinx/sphinx_app.initd.centos.erb
102
+ - lib/templates/sphinx/sphinx_app.initd.erb
67
103
  - script/destroy
68
104
  - script/generate
69
105
  - script/txt2html
@@ -72,39 +108,6 @@ files:
72
108
  - tasks/deployment.rake
73
109
  - tasks/environment.rake
74
110
  - tasks/website.rake
75
- - templates/capistrano/Capfile
76
- - templates/capistrano/deploy.rb.erb
77
- - templates/centos/setup.sh
78
- - templates/centos/sudoers
79
- - templates/imagemagick/install.sh
80
- - templates/memcached/install.sh
81
- - templates/memcached/memcached.initd.centos.erb
82
- - templates/memcached/memcached.monitrc.erb
83
- - templates/mongrel/mongrel_cluster.initd.erb
84
- - templates/mongrel/mongrel_cluster.monitrc.erb
85
- - templates/mongrel/mongrel_cluster.yml.erb
86
- - templates/monit/cert.sh
87
- - templates/monit/install.sh
88
- - templates/monit/monit.cnf
89
- - templates/monit/monit.initd.centos.erb
90
- - templates/monit/monitrc.erb
91
- - templates/monit/patch_inittab.sh
92
- - templates/mysql/install.sh.erb
93
- - templates/mysql/install_db.sql.erb
94
- - templates/mysql/mysql.monitrc.erb
95
- - templates/nginx/install.sh.erb
96
- - templates/nginx/nginx.conf.erb
97
- - templates/nginx/nginx.initd.erb
98
- - templates/nginx/nginx.monitrc.erb
99
- - templates/nginx/nginx_vhost.conf.erb
100
- - templates/rails/database.yml.erb
101
- - templates/ruby/ruby_install.sh
102
- - templates/ruby/rubygems_install.sh
103
- - templates/sphinx/install.sh.erb
104
- - templates/sphinx/sphinx.conf.erb
105
- - templates/sphinx/sphinx.monitrc.erb
106
- - templates/sphinx/sphinx_app.initd.centos.erb
107
- - templates/sphinx/sphinx_app.initd.erb
108
111
  - website/index.html
109
112
  - website/index.txt
110
113
  - website/javascripts/rounded_corners_lite.inc.js
data/init.rb DELETED
@@ -1,3 +0,0 @@
1
- require File.dirname(__FILE__) + '/lib/capigen'
2
-
3
- #load File.dirname(__FILE__) + "/tasks/capigen.rake'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes