xgamerx-cap-recipes 0.0.2 → 0.0.3

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.
data/Manifest.txt CHANGED
@@ -16,6 +16,9 @@ script/destroy
16
16
  script/generate
17
17
  script/txt2html
18
18
  setup.rb
19
+ tasks/development.rake
20
+ tasks/environment.rake
21
+ tasks/website.rake
19
22
  test/test_cap_recipes.rb
20
23
  test/test_helper.rb
21
24
  website/index.html
data/README.txt CHANGED
@@ -1,32 +1,79 @@
1
1
  = cap_recipes
2
2
 
3
- * FIX (url)
4
-
5
3
  == DESCRIPTION:
6
4
 
7
- FIX (describe your package)
8
-
9
- == FEATURES/PROBLEMS:
10
-
11
- * FIX (list of features or problems)
5
+ This is a collection of capistrano recipes which will grow to encompass many useful recipes. Currently included:
12
6
 
7
+ * Phusion Passenger (Setup and Deployment)
8
+ * Apache Server
9
+ * Juggernaut Process
10
+ * Backgroundrb Processes
11
+
13
12
  == SYNOPSIS:
14
13
 
15
- FIX (code sample of usage)
16
-
17
- == REQUIREMENTS:
18
-
19
- * FIX (list of requirements)
14
+ To include any of these into your deploy.rb configuration file for Capistrano:
15
+
16
+ require 'cap_recipes/tasks/passenger'
17
+ require 'cap_recipes/tasks/apache'
18
+ require 'cap_recipes/tasks/backgroundrb'
19
+ require 'cap_recipes/tasks/juggernaut'
20
+
21
+ == USAGE
22
+
23
+ Passenger
24
+
25
+ deploy
26
+ :stop
27
+ :start
28
+ :restart
29
+ :with_migrations
30
+ :copy_config
31
+ :tail
32
+ :install
33
+ sweep
34
+ :cache
35
+ :log
36
+
37
+ Apache
38
+ variables: apache_init_path
39
+ tasks:
40
+ apache
41
+ :stop
42
+ :start
43
+ :restart
44
+ :install
45
+
46
+ Backgroundrb
47
+ variables: backgroundrb_log
48
+ tasks:
49
+ backgroundrb
50
+ :stop
51
+ :start
52
+ :restart
53
+ :copy_config
54
+ :tail
55
+
56
+ Juggernaut
57
+
58
+ variables: juggernaut_config, juggernaut_pid, juggernaut_log
59
+ tasks:
60
+ juggernaut
61
+ :start
62
+ :stop
63
+ :restart
64
+ :copy_config
65
+ :tail
20
66
 
21
67
  == INSTALL:
22
68
 
23
- * FIX (sudo gem install, anything else)
69
+ * gem sources -a http://gems.github.com/
70
+ * sudo gem install xgamerx-cap-recipes
24
71
 
25
72
  == LICENSE:
26
73
 
27
74
  (The MIT License)
28
75
 
29
- Copyright (c) 2008 FIX
76
+ Copyright (c) 2008 Nathan Esquenazi
30
77
 
31
78
  Permission is hereby granted, free of charge, to any person obtaining
32
79
  a copy of this software and associated documentation files (the
@@ -1,7 +1,6 @@
1
1
  require 'yaml'
2
2
 
3
3
  Capistrano::Configuration.instance(true).load do
4
- set :backgroundrb_log, "log/backgroundrb-cap.log"
5
4
  set :backgroundrb_host, 'localhost'
6
5
  set :backgroundrb_env, 'production'
7
6
 
@@ -33,7 +33,7 @@ Capistrano::Configuration.instance(true).load do
33
33
  end
34
34
 
35
35
  desc "Displays the juggernaut log from the server"
36
- task :tail do
36
+ task :tail, :role => :app do
37
37
  stream "tail -f #{shared_path}/log/juggernaut.log"
38
38
  end
39
39
  end
@@ -65,13 +65,13 @@ Capistrano::Configuration.instance(true).load do
65
65
  # ===============================================================
66
66
  namespace :sweep do
67
67
  desc "Clear file-based fragment and action caching"
68
- task :log do
68
+ task :log, :role => :app do
69
69
  puts "Sweeping all the log files"
70
70
  run "cd #{current_path} && sudo rake log:clear RAILS_ENV=production"
71
71
  end
72
72
 
73
73
  desc "Clear file-based fragment and action caching"
74
- task :cache do
74
+ task :cache, :role => :app do
75
75
  puts "Sweeping the fragment and action cache stores"
76
76
  run "cd #{current_path} && rake tmp:cache:clear RAILS_ENV=production"
77
77
  end
@@ -2,7 +2,7 @@ module CapRecipes #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -0,0 +1,7 @@
1
+ task :ruby_env do
2
+ RUBY_APP = if RUBY_PLATFORM =~ /java/
3
+ "jruby"
4
+ else
5
+ "ruby"
6
+ end unless defined? RUBY_APP
7
+ end
@@ -0,0 +1,17 @@
1
+ desc 'Generate website files'
2
+ task :website_generate => :ruby_env do
3
+ (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
4
+ sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
5
+ end
6
+ end
7
+
8
+ desc 'Upload website files to rubyforge'
9
+ task :website_upload do
10
+ host = "#{rubyforge_username}@rubyforge.org"
11
+ remote_dir = "/var/www/gforge-projects/#{PATH}/"
12
+ local_dir = 'website'
13
+ sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
14
+ end
15
+
16
+ desc 'Generate and upload website files'
17
+ task :website => [:website_generate, :website_upload, :publish_docs]
data/website/index.html CHANGED
@@ -1,11 +1,141 @@
1
- <html>
2
- <head>
3
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
4
- <title>cap_recipes</title>
5
-
6
- </head>
7
- <body id="body">
8
- <p>This page has not yet been created for RubyGem <code>cap_recipes</code></p>
9
- <p>To the developer: To generate it, update website/index.txt and run the rake task <code>website</code> to generate this <code>index.html</code> file.</p>
10
- </body>
11
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <title>
8
+ cap_recipes
9
+ </title>
10
+ <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
11
+ <style>
12
+
13
+ </style>
14
+ <script type="text/javascript">
15
+ window.onload = function() {
16
+ settings = {
17
+ tl: { radius: 10 },
18
+ tr: { radius: 10 },
19
+ bl: { radius: 10 },
20
+ br: { radius: 10 },
21
+ antiAlias: true,
22
+ autoPad: true,
23
+ validTags: ["div"]
24
+ }
25
+ var versionBox = new curvyCorners(settings, document.getElementById("version"));
26
+ versionBox.applyCornersToAll();
27
+ }
28
+ </script>
29
+ </head>
30
+ <body>
31
+ <div id="main">
32
+
33
+ <h1>cap_recipes</h1>
34
+ <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/cap_recipes"; return false'>
35
+ <p>Get Version</p>
36
+ <a href="http://rubyforge.org/projects/cap_recipes" class="numbers">0.0.2</a>
37
+ </div>
38
+ <h1>&#x2192; &#8216;cap_recipes&#8217;</h1>
39
+
40
+
41
+ <h2>What</h2>
42
+
43
+
44
+ <h2>Installing</h2>
45
+
46
+
47
+ <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">cap_recipes</span></pre></p>
48
+
49
+
50
+ <h2>The basics</h2>
51
+
52
+
53
+ <h2>Demonstration of usage</h2>
54
+
55
+
56
+ <h2>Forum</h2>
57
+
58
+
59
+ <p><a href="http://groups.google.com/group/cap_recipes">http://groups.google.com/group/cap_recipes</a></p>
60
+
61
+
62
+ <p><span class="caps">TODO</span> &#8211; create Google Group &#8211; cap_recipes</p>
63
+
64
+
65
+ <h2>How to submit patches</h2>
66
+
67
+
68
+ <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
69
+
70
+
71
+ <p><span class="caps">TODO</span> &#8211; pick <span class="caps">SVN</span> or Git instructions</p>
72
+
73
+
74
+ <p>The trunk repository is <code>svn://rubyforge.org/var/svn/cap_recipes/trunk</code> for anonymous access.</p>
75
+
76
+
77
+ <p><span class="caps">OOOORRRR</span></p>
78
+
79
+
80
+ <p>You can fetch the source from either:</p>
81
+
82
+
83
+ <ul>
84
+ <li>rubyforge: <span class="caps">MISSING IN ACTION</span></li>
85
+ </ul>
86
+
87
+
88
+ <p><span class="caps">TODO</span> &#8211; You can not created a RubyForge project, OR have not run <code>rubyforge config</code>
89
+ yet to refresh your local rubyforge data with this projects&#8217; id information.</p>
90
+
91
+
92
+ <p>When you do this, this message will magically disappear!</p>
93
+
94
+
95
+ <p>Or you can hack website/index.txt and make it all go away!!</p>
96
+
97
+
98
+ <ul>
99
+ <li>github: <a href="http://github.com/GITHUB_USERNAME/cap_recipes/tree/master">http://github.com/GITHUB_USERNAME/cap_recipes/tree/master</a></li>
100
+ </ul>
101
+
102
+
103
+ <pre>git clone git://github.com/GITHUB_USERNAME/cap_recipes.git</pre>
104
+
105
+ <p><span class="caps">TODO</span> &#8211; add &#8220;github_username: username&#8221; to ~/.rubyforge/user-config.yml and newgem will reuse it for future projects.</p>
106
+
107
+
108
+ <ul>
109
+ <li>gitorious: <a href="git://gitorious.org/cap_recipes/mainline.git">git://gitorious.org/cap_recipes/mainline.git</a></li>
110
+ </ul>
111
+
112
+
113
+ <pre>git clone git://gitorious.org/cap_recipes/mainline.git</pre>
114
+
115
+ <h3>Build and test instructions</h3>
116
+
117
+
118
+ <pre>cd cap_recipes
119
+ rake test
120
+ rake install_gem</pre>
121
+
122
+ <h2>License</h2>
123
+
124
+
125
+ <p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
126
+
127
+
128
+ <h2>Contact</h2>
129
+
130
+
131
+ <p>Comments are welcome. Send an email to <a href="mailto:FIXME"><span class="caps">FIXME</span> full name</a> email via the <a href="http://groups.google.com/group/cap_recipes">forum</a></p>
132
+ <p class="coda">
133
+ <a href="FIXME email">FIXME full name</a>, 26th April 2008<br>
134
+ Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
135
+ </p>
136
+ </div>
137
+
138
+ <!-- insert site tracking codes here, like Google Urchin -->
139
+
140
+ </body>
141
+ </html>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xgamerx-cap-recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Esquenazi
@@ -45,6 +45,9 @@ files:
45
45
  - script/generate
46
46
  - script/txt2html
47
47
  - setup.rb
48
+ - tasks/development.rake
49
+ - tasks/environment.rake
50
+ - tasks/website.rake
48
51
  - test/test_cap_recipes.rb
49
52
  - test/test_helper.rb
50
53
  - website/index.html
@@ -54,7 +57,7 @@ files:
54
57
  - website/template.html.erb
55
58
  has_rdoc: true
56
59
  homepage: http://caprecipes.rubyforge.org
57
- post_install_message:
60
+ post_install_message: ""
58
61
  rdoc_options:
59
62
  - --main
60
63
  - README.txt