daveyeu-nightcap 0.0.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/MIT-LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2007-2008 David Yeu
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
data/README ADDED
@@ -0,0 +1,10 @@
1
+ Nightcap is a collection of helpers for Capistrano.
2
+
3
+ For Phusion Passenger:
4
+ require "nightcap/passenger"
5
+
6
+ For static sites (or PHP or something):
7
+ require "nightcap/static_server"
8
+
9
+ For some handy defaults in any case (git, master branch, staging + prod):
10
+ require "nightcap/default"
@@ -0,0 +1,32 @@
1
+ # Just some handy default settings.
2
+ #
3
+ # Be sure to add:
4
+ #
5
+ # set :application, "application_name"
6
+ # set :repository, "git@host:path/to/repo"
7
+ #
8
+ # set :staging_server, "staging.localhost"
9
+ # set :production_server, "production.localhost"
10
+ #
11
+ # And this needs to be require'd _after_ setting application.
12
+
13
+ require "nightcap"
14
+
15
+ Capistrano::Configuration.instance.load do
16
+ set :scm, :git
17
+ set :branch, "master"
18
+ set :deploy_via, :remote_cache
19
+ set :repository_cache, "git_master"
20
+ set :deploy_to, "/web/#{application}"
21
+ set :use_sudo, false
22
+
23
+ default_run_options[:pty] = true
24
+
25
+ task :staging do
26
+ server staging_server, :web, :app, :db
27
+ end
28
+
29
+ task :production do
30
+ server production_server, :web, :app, :db
31
+ end
32
+ end
@@ -0,0 +1,15 @@
1
+ # Phusion Passenger support.
2
+ require "nightcap"
3
+
4
+ module Nightcap::Passenger
5
+ Capistrano::Configuration.instance.load do
6
+ namespace :deploy do
7
+ task :restart, :roles => :app, :except => { :no_release => true } do
8
+ run "touch #{release_path}/tmp/restart.txt"
9
+ end
10
+
11
+ task :start do; puts "deploy:start disabled"; end
12
+ task :stop do; puts "deploy:stop disabled"; end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,22 @@
1
+ # Primarily suppresses many standard deploy tasks that aren't needed in a
2
+ # static (or near static) environment.
3
+ require "nightcap"
4
+
5
+ module Nightcap::StaticServer
6
+ Capistrano::Configuration.instance.load do
7
+ namespace :deploy do
8
+ task :finalize_update do; puts "deploy:finalize_update disabled"; end
9
+ task :migrate do; puts "deploy:migrate disabled"; end
10
+ task :migrations do; puts "deploy:migrations disabled"; end
11
+ task :restart do; puts "deploy:restart disabled"; end
12
+ task :start do; puts "deploy:start disabled"; end
13
+ task :stop do; puts "deploy:stop disabled"; end
14
+
15
+ # Skip shared/* directories for deploy:setup
16
+ task :setup, :except => { :no_release => true } do
17
+ dirs = [deploy_to, releases_path, shared_path]
18
+ try_sudo "umask 02 && mkdir -p #{dirs.join(' ')}"
19
+ end
20
+ end
21
+ end
22
+ end
data/lib/nightcap.rb ADDED
@@ -0,0 +1,8 @@
1
+ module Nightcap
2
+ Capistrano::Configuration.instance.load do
3
+ namespace :nightcap do
4
+ desc "Dummy task for testing"
5
+ task :dummy do; end
6
+ end
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: daveyeu-nightcap
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - David Yeu
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-05-16 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: capistrano
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.0.0
24
+ version:
25
+ description:
26
+ email: me@davidyeu.com
27
+ executables: []
28
+
29
+ extensions: []
30
+
31
+ extra_rdoc_files: []
32
+
33
+ files:
34
+ - lib/nightcap/default.rb
35
+ - lib/nightcap/passenger.rb
36
+ - lib/nightcap/static_server.rb
37
+ - lib/nightcap.rb
38
+ - MIT-LICENSE
39
+ - README
40
+ has_rdoc: false
41
+ homepage: http://github.com/daveyeu/nightcap/
42
+ licenses:
43
+ post_install_message:
44
+ rdoc_options: []
45
+
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: "0"
53
+ version:
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: "0"
59
+ version:
60
+ requirements: []
61
+
62
+ rubyforge_project:
63
+ rubygems_version: 1.3.5
64
+ signing_key:
65
+ specification_version: 2
66
+ summary: Little helpers for Capistrano
67
+ test_files: []
68
+