capistrano-notify 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,21 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
data/Capfile ADDED
@@ -0,0 +1,2 @@
1
+ # this file is for testing
2
+ set :application, 'capistrano-growwwwwwllllll'
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Lee Jones
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.
@@ -0,0 +1,63 @@
1
+ # CapistranoGrowl #
2
+
3
+ CapistranoGrowl notifies you via growl when your deployment is finished.
4
+
5
+ [example picture]
6
+
7
+ ## Usage ##
8
+
9
+ Install growl and growlnotify.
10
+
11
+ Install capistrano-growl:
12
+
13
+ gem install capistrano-growl
14
+
15
+ Require capitrano-growl in your deploy.rb:
16
+
17
+ require 'capistrano/growl'
18
+
19
+ ## Default notifications ##
20
+
21
+ after :deploy - "#{application} was successfully deployed to #{deploy_stage}"
22
+ after "deploy:setup" - "#{application} was successfully prepared for deployment on #{deploy_stage}"
23
+ on :rollback - "There was a problem with your deploy to #{application} #{deploy_stage}"
24
+ # you are using moonshine aren't you? :)
25
+ before "moonshine:apply" - "Moonshine is applying the #{fetch(:moonshine_manifest)} for #{fetch(:application)}."
26
+
27
+ ## Options ##
28
+
29
+ :growl_deploy_message - sets the message for when a deployment is complete.
30
+
31
+ set :growl_deploy_message, "Your deploy is now diamonds."
32
+
33
+ :growl_rollback_message - sets the message for when a deploy fails and roll back (default: app name deploy failed1111)
34
+
35
+ set :growl_rollback_message, "Doh, you just drove a golf cart into the lake."
36
+
37
+ :growl_stickiness - sets wether the growl should be sticky (default false)
38
+
39
+ set :growl_stickiness, true
40
+
41
+ :growl_enabled - sets wether capistrano-growl is enabled/disable for a project (default: true)
42
+
43
+ set :growl_enabled, false
44
+
45
+ Example of overriding a default message:
46
+
47
+ namespace :growl
48
+ namespace :deploy
49
+ task :success
50
+ set :growl_stickyness, true
51
+ set :growl_message, "Your deploy is now diamonds."
52
+ growlnotify
53
+ end
54
+ end
55
+ end
56
+
57
+ ## Can't get enough? Easily add capistrano-growl to all projects ##
58
+
59
+ You can add capistrano-growl to all your projects by adding the following to you ~/.caprc
60
+
61
+ on :load do
62
+ require 'capistrano-growl'
63
+ end
@@ -0,0 +1,29 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "capistrano-notify"
8
+ gem.version = '0.0.1'
9
+ gem.summary = %Q{System notifications with Capistrano}
10
+ gem.description = %Q{Trigger growl messages with Capistrano callbacks}
11
+ gem.email = "scribblethink@gmail.com"
12
+ gem.homepage = "http://github.com/leejones/capistrano-notify"
13
+ gem.authors = ["Lee Jones"]
14
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
+ end
16
+ Jeweler::GemcutterTasks.new
17
+ rescue LoadError
18
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
19
+ end
20
+
21
+ require 'rake/rdoctask'
22
+ Rake::RDocTask.new do |rdoc|
23
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
24
+
25
+ rdoc.rdoc_dir = 'rdoc'
26
+ rdoc.title = "capistrano-notify #{version}"
27
+ rdoc.rdoc_files.include('README*')
28
+ rdoc.rdoc_files.include('lib/**/*.rb')
29
+ end
@@ -0,0 +1,46 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{capistrano-notify}
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Lee Jones"]
12
+ s.date = %q{2010-12-07}
13
+ s.description = %q{Trigger growl messages with Capistrano callbacks}
14
+ s.email = %q{scribblethink@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.mdown"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "Capfile",
23
+ "LICENSE",
24
+ "README.mdown",
25
+ "Rakefile",
26
+ "capistrano-notify.gemspec",
27
+ "lib/capistrano-notify.rb",
28
+ "lib/capistrano/notify.rb"
29
+ ]
30
+ s.homepage = %q{http://github.com/leejones/capistrano-notify}
31
+ s.rdoc_options = ["--charset=UTF-8"]
32
+ s.require_paths = ["lib"]
33
+ s.rubygems_version = %q{1.3.7}
34
+ s.summary = %q{System notifications with Capistrano}
35
+
36
+ if s.respond_to? :specification_version then
37
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
38
+ s.specification_version = 3
39
+
40
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
41
+ else
42
+ end
43
+ else
44
+ end
45
+ end
46
+
@@ -0,0 +1 @@
1
+ require 'capistrano/notify'
@@ -0,0 +1,47 @@
1
+ Capistrano::Configuration.instance.load do
2
+ after :deploy, "notify:deploy:success"
3
+ after :rollback, "notify:deploy:failure"
4
+ after "deploy:setup", "notify:deploy:setup:success"
5
+ before "moonshine:apply", "notify:moonshine:apply"
6
+
7
+ set :notify_stickyness, true
8
+ set :notify_title, "Capistrano"
9
+
10
+ namespace :notify do
11
+ namespace :deploy do
12
+ task :success do
13
+ set :notify_message, "The deploy to #{fetch(:application)} finished."
14
+ notify
15
+ end
16
+
17
+ task :failure do
18
+ set :notify_message, "The deploy to #{fetch(:application)} failed."
19
+ notify
20
+ end
21
+
22
+ namespace :setup do
23
+ task :success do
24
+ set :notify_message, "The deploy:setup for #{fetch(:application)} finished."
25
+ notify
26
+ end
27
+ end
28
+ end
29
+
30
+ namespace :moonshine do
31
+ task :apply do
32
+ set :notify_stickyness, false
33
+ set :notify_message, "Moonshine is applying the #{fetch(:moonshine_manifest)} for #{fetch(:application)}."
34
+ notify
35
+ end
36
+ end
37
+
38
+ task :notify do
39
+ command = []
40
+ command << "growlnotify"
41
+ command << "--message '#{fetch(:notify_message)}'"
42
+ command << "--sticky" if fetch(:notify_stickyness)
43
+ command << "--title '#{fetch(:notify_title)}'"
44
+ system command.join(' ')
45
+ end
46
+ end
47
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-notify
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Lee Jones
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-12-07 00:00:00 -05:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: Trigger growl messages with Capistrano callbacks
23
+ email: scribblethink@gmail.com
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files:
29
+ - LICENSE
30
+ - README.mdown
31
+ files:
32
+ - .document
33
+ - .gitignore
34
+ - Capfile
35
+ - LICENSE
36
+ - README.mdown
37
+ - Rakefile
38
+ - capistrano-notify.gemspec
39
+ - lib/capistrano-notify.rb
40
+ - lib/capistrano/notify.rb
41
+ has_rdoc: true
42
+ homepage: http://github.com/leejones/capistrano-notify
43
+ licenses: []
44
+
45
+ post_install_message:
46
+ rdoc_options:
47
+ - --charset=UTF-8
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ hash: 3
56
+ segments:
57
+ - 0
58
+ version: "0"
59
+ required_rubygems_version: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ hash: 3
65
+ segments:
66
+ - 0
67
+ version: "0"
68
+ requirements: []
69
+
70
+ rubyforge_project:
71
+ rubygems_version: 1.3.7
72
+ signing_key:
73
+ specification_version: 3
74
+ summary: System notifications with Capistrano
75
+ test_files: []
76
+