chrisrec 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.
data/Manifest CHANGED
@@ -1,6 +1,7 @@
1
1
  Manifest
2
2
  README
3
3
  Rakefile
4
+ chrisrec.gemspec
4
5
  lib/backgroundrb/backgroundrb.rb
5
6
  lib/chrisrec.rb
6
7
  lib/console/console.rb
@@ -14,6 +15,7 @@ lib/mysql/mysql.rb
14
15
  lib/rake/rake.rb
15
16
  lib/rakecron/rakecron.rb
16
17
  lib/starling/starling.rb
18
+ lib/static/static.rb
17
19
  lib/tomcat/tomcat.rb
18
20
  lib/workling/workling.rb
19
21
  template/daemon/daemon-init-script.erb
@@ -29,6 +31,7 @@ template/munin/munin_nginx_vhost.conf.erb
29
31
  template/rakecron/rakecron.erb
30
32
  template/starling/monit.conf.erb
31
33
  template/starling/starling-init-script.erb
34
+ template/static/httpd-vhost-static.conf.erb
32
35
  template/tomcat/conf/server.xml.erb
33
36
  template/tomcat/conf/web.xml
34
37
  template/tomcat/logs/empty.txt
data/Rakefile CHANGED
@@ -2,15 +2,14 @@
2
2
  ## rake gem
3
3
  ## sudo rake install
4
4
 
5
- ## rake package
6
- ## gem push pkg/chrisrec-0.1.0.gem
5
+ ## gem push pkg/chrisrec-X.Y.Z.gem
7
6
 
8
7
  # Rakefile
9
8
  require 'rubygems'
10
9
  require 'rake'
11
10
  require 'echoe'
12
11
 
13
- Echoe.new('chrisrec', '0.1.1') do |p|
12
+ Echoe.new('chrisrec', '0.1.2') do |p|
14
13
  p.description = "Extend Deprec with other recipies."
15
14
  p.url = "http://github.com/dougochris/chrisrec"
16
15
  p.author = "Chris Douglas"
data/chrisrec.gemspec CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{chrisrec}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Chris Douglas"]
9
- s.date = %q{2010-06-15}
9
+ s.date = %q{2010-08-10}
10
10
  s.description = %q{Extend Deprec with other recipies.}
11
11
  s.email = %q{dougo.chris@gmail.com}
12
- s.extra_rdoc_files = ["README", "lib/backgroundrb/backgroundrb.rb", "lib/chrisrec.rb", "lib/console/console.rb", "lib/daemon/daemon.rb", "lib/gitosis/gitosis.rb", "lib/jekyll/jekyll.rb", "lib/memcached/memcached.rb", "lib/munin/munin.rb", "lib/mysql/mysql.rake", "lib/mysql/mysql.rb", "lib/rake/rake.rb", "lib/rakecron/rakecron.rb", "lib/starling/starling.rb", "lib/tomcat/tomcat.rb", "lib/workling/workling.rb"]
13
- s.files = ["Manifest", "README", "Rakefile", "lib/backgroundrb/backgroundrb.rb", "lib/chrisrec.rb", "lib/console/console.rb", "lib/daemon/daemon.rb", "lib/gitosis/gitosis.rb", "lib/jekyll/jekyll.rb", "lib/memcached/memcached.rb", "lib/munin/munin.rb", "lib/mysql/mysql.rake", "lib/mysql/mysql.rb", "lib/rake/rake.rb", "lib/rakecron/rakecron.rb", "lib/starling/starling.rb", "lib/tomcat/tomcat.rb", "lib/workling/workling.rb", "template/daemon/daemon-init-script.erb", "template/daemon/monit.conf.erb", "template/jekyll/httpd-vhost-jekyll.conf.erb", "template/memcached/memcached-conf.erb", "template/memcached/memcached.erb", "template/memcached/monit.conf.erb", "template/memcached/start-memcached.erb", "template/munin/httpd-vhost-munin.conf.erb", "template/munin/munin.conf.erb", "template/munin/munin_nginx_vhost.conf.erb", "template/rakecron/rakecron.erb", "template/starling/monit.conf.erb", "template/starling/starling-init-script.erb", "template/tomcat/conf/server.xml.erb", "template/tomcat/conf/web.xml", "template/tomcat/logs/empty.txt", "template/tomcat/monit.conf.erb", "template/tomcat/temp/empty.txt", "template/tomcat/tomcat.erb", "template/tomcat/webapps/empty.txt", "template/tomcat/work/empty.txt", "template/workling/monit.conf.erb", "template/workling/workling-init-script.erb", "chrisrec.gemspec"]
12
+ s.extra_rdoc_files = ["README", "lib/backgroundrb/backgroundrb.rb", "lib/chrisrec.rb", "lib/console/console.rb", "lib/daemon/daemon.rb", "lib/gitosis/gitosis.rb", "lib/jekyll/jekyll.rb", "lib/memcached/memcached.rb", "lib/munin/munin.rb", "lib/mysql/mysql.rake", "lib/mysql/mysql.rb", "lib/rake/rake.rb", "lib/rakecron/rakecron.rb", "lib/starling/starling.rb", "lib/static/static.rb", "lib/tomcat/tomcat.rb", "lib/workling/workling.rb"]
13
+ s.files = ["Manifest", "README", "Rakefile", "chrisrec.gemspec", "lib/backgroundrb/backgroundrb.rb", "lib/chrisrec.rb", "lib/console/console.rb", "lib/daemon/daemon.rb", "lib/gitosis/gitosis.rb", "lib/jekyll/jekyll.rb", "lib/memcached/memcached.rb", "lib/munin/munin.rb", "lib/mysql/mysql.rake", "lib/mysql/mysql.rb", "lib/rake/rake.rb", "lib/rakecron/rakecron.rb", "lib/starling/starling.rb", "lib/static/static.rb", "lib/tomcat/tomcat.rb", "lib/workling/workling.rb", "template/daemon/daemon-init-script.erb", "template/daemon/monit.conf.erb", "template/jekyll/httpd-vhost-jekyll.conf.erb", "template/memcached/memcached-conf.erb", "template/memcached/memcached.erb", "template/memcached/monit.conf.erb", "template/memcached/start-memcached.erb", "template/munin/httpd-vhost-munin.conf.erb", "template/munin/munin.conf.erb", "template/munin/munin_nginx_vhost.conf.erb", "template/rakecron/rakecron.erb", "template/starling/monit.conf.erb", "template/starling/starling-init-script.erb", "template/static/httpd-vhost-static.conf.erb", "template/tomcat/conf/server.xml.erb", "template/tomcat/conf/web.xml", "template/tomcat/logs/empty.txt", "template/tomcat/monit.conf.erb", "template/tomcat/temp/empty.txt", "template/tomcat/tomcat.erb", "template/tomcat/webapps/empty.txt", "template/tomcat/work/empty.txt", "template/workling/monit.conf.erb", "template/workling/workling-init-script.erb"]
14
14
  s.homepage = %q{http://github.com/dougochris/chrisrec}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Chrisrec", "--main", "README"]
16
16
  s.require_paths = ["lib"]
data/lib/chrisrec.rb CHANGED
@@ -10,4 +10,5 @@ require "#{File.dirname(__FILE__)}/memcached/memcached.rb"
10
10
  require "#{File.dirname(__FILE__)}/daemon/daemon.rb"
11
11
  require "#{File.dirname(__FILE__)}/tomcat/tomcat.rb"
12
12
  require "#{File.dirname(__FILE__)}/console/console.rb"
13
- require "#{File.dirname(__FILE__)}/jekyll/jekyll.rb"
13
+ require "#{File.dirname(__FILE__)}/jekyll/jekyll.rb"
14
+ require "#{File.dirname(__FILE__)}/static/static.rb"
data/lib/jekyll/jekyll.rb CHANGED
@@ -2,11 +2,6 @@ Capistrano::Configuration.instance(:must_exist).load do
2
2
  namespace :chrisrec do
3
3
  namespace :jekyll do
4
4
 
5
- set :tomcat_address, '127.0.0.1'
6
- set :tomcat_port, 8080
7
- set :tomcat_shutdown_port, 8009
8
- set :tomcat_ssl_port, 8443
9
-
10
5
  set :local_template_dir, "#{File.dirname(__FILE__)}/../../template"
11
6
 
12
7
  desc "Install jekyll"
@@ -0,0 +1,80 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :chrisrec do
3
+ namespace :static do
4
+
5
+ set :local_template_dir, "#{File.dirname(__FILE__)}/../../template"
6
+
7
+ desc "Install static site"
8
+ task :install, :roles => :app do
9
+ top.deprec.rails.setup_user_perms
10
+ top.deprec.rails.create_app_user_and_group
11
+ top.deprec.rails.setup_paths
12
+ top.deprec.rails.setup_shared_dirs
13
+
14
+ top.chrisrec.static.deploy.setup
15
+ end
16
+
17
+ PROJECT_CONFIG_FILES[:static] = [
18
+
19
+ {:template => "httpd-vhost-static.conf.erb",
20
+ :path => 'conf/httpd-vhost-static.conf',
21
+ :mode => 0755,
22
+ :owner => 'root:root'}
23
+ ]
24
+
25
+
26
+ desc "Generate configuration file(s) for static site from template(s)"
27
+ task :config_gen do
28
+ PROJECT_CONFIG_FILES[:static].each do |file|
29
+ deprec2.render_template(:static, file)
30
+ end
31
+ end
32
+
33
+ desc 'Deploy configuration files(s) for static site'
34
+ task :config, :roles => :web do
35
+ deprec2.push_configs(:static, PROJECT_CONFIG_FILES[:static])
36
+ symlink_apache_vhost
37
+
38
+ top.deprec.apache.restart
39
+ end
40
+
41
+ task :symlink_apache_vhost, :roles => :web do
42
+ sudo "ln -sf #{deploy_to}/static/conf/httpd-vhost-static.conf /etc/apache2/sites-available/#{application}"
43
+ sudo "ln -sf #{deploy_to}/static/conf/httpd-vhost-static.conf /etc/apache2/sites-enabled/#{application}"
44
+ end
45
+
46
+ namespace :deploy do
47
+ desc 'deploy'
48
+ task :default do
49
+ strategy.deploy!
50
+
51
+ run "rm -f #{current_path} && ln -s #{latest_release}/www #{current_path}"
52
+
53
+ top.deprec.apache.restart
54
+ end
55
+
56
+ desc 'setup'
57
+ task :setup do
58
+ dirs = [deploy_to, releases_path]
59
+ sudo "mkdir -p #{dirs.join(' ')}"
60
+ sudo "chgrp -R #{group} #{dirs.join(' ')}"
61
+ sudo "chmod g+w #{dirs.join(' ')}"
62
+ end
63
+
64
+ desc 'rollback'
65
+ task :rollback do
66
+ if previous_release
67
+ run "rm #{current_path}; ln -s #{previous_release} #{current_path}"
68
+ else
69
+ abort "could not rollback the code because there is no prior release"
70
+ end
71
+
72
+ run "if [ `readlink #{current_path}` != #{current_release} ]; then rm -rf #{current_release}; fi"
73
+
74
+ top.deprec.apache.restart
75
+ end
76
+ end
77
+
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,16 @@
1
+ Listen 8090
2
+ <VirtualHost *:8090>
3
+ ServerName <%= domain %>
4
+
5
+ DocumentRoot <%= "#{deploy_to}/current" %>
6
+
7
+ <Directory <%= "#{deploy_to}/current" %>>
8
+ Options Indexes FollowSymLinks MultiViews
9
+ AllowOverride None
10
+ Order allow,deny
11
+ allow from all
12
+ </Directory>
13
+
14
+ ErrorLog /var/log/jekyll_log
15
+ CustomLog /var/log/jekyll-access_log combined
16
+ </VirtualHost>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chrisrec
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Douglas
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-15 00:00:00 +10:00
18
+ date: 2010-08-10 00:00:00 +10:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -40,12 +40,14 @@ extra_rdoc_files:
40
40
  - lib/rake/rake.rb
41
41
  - lib/rakecron/rakecron.rb
42
42
  - lib/starling/starling.rb
43
+ - lib/static/static.rb
43
44
  - lib/tomcat/tomcat.rb
44
45
  - lib/workling/workling.rb
45
46
  files:
46
47
  - Manifest
47
48
  - README
48
49
  - Rakefile
50
+ - chrisrec.gemspec
49
51
  - lib/backgroundrb/backgroundrb.rb
50
52
  - lib/chrisrec.rb
51
53
  - lib/console/console.rb
@@ -59,6 +61,7 @@ files:
59
61
  - lib/rake/rake.rb
60
62
  - lib/rakecron/rakecron.rb
61
63
  - lib/starling/starling.rb
64
+ - lib/static/static.rb
62
65
  - lib/tomcat/tomcat.rb
63
66
  - lib/workling/workling.rb
64
67
  - template/daemon/daemon-init-script.erb
@@ -74,6 +77,7 @@ files:
74
77
  - template/rakecron/rakecron.erb
75
78
  - template/starling/monit.conf.erb
76
79
  - template/starling/starling-init-script.erb
80
+ - template/static/httpd-vhost-static.conf.erb
77
81
  - template/tomcat/conf/server.xml.erb
78
82
  - template/tomcat/conf/web.xml
79
83
  - template/tomcat/logs/empty.txt
@@ -84,7 +88,6 @@ files:
84
88
  - template/tomcat/work/empty.txt
85
89
  - template/workling/monit.conf.erb
86
90
  - template/workling/workling-init-script.erb
87
- - chrisrec.gemspec
88
91
  has_rdoc: true
89
92
  homepage: http://github.com/dougochris/chrisrec
90
93
  licenses: []