capistrano-info 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +2 -0
- data/capistrano-info.gemspec +25 -0
- data/lib/capistrano-info.rb +5 -0
- data/lib/capistrano-info/capistrano.rb +40 -0
- data/lib/capistrano-info/version.rb +5 -0
- metadata +80 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Matthias Viehweger
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Capistrano::Info
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'capistrano-info'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install capistrano-info
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/capistrano-info/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Matthias Viehweger"]
|
6
|
+
gem.email = ["kronn@kronn.de"]
|
7
|
+
gem.summary = 'output of remote information through capistrano'
|
8
|
+
gem.description = <<-EOT
|
9
|
+
A set of capistrano recipes for outputting various info from the remote server.
|
10
|
+
|
11
|
+
Features include:
|
12
|
+
- tail -f of a logfile (info:tail)
|
13
|
+
- deployed version (info:version)
|
14
|
+
EOT
|
15
|
+
gem.homepage = 'https://github.com/kronn/capistrano-info'
|
16
|
+
|
17
|
+
gem.files = `git ls-files`.split($\)
|
18
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
19
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
20
|
+
gem.name = "capistrano-info"
|
21
|
+
gem.require_paths = ["lib"]
|
22
|
+
gem.version = Capistrano::Info::VERSION
|
23
|
+
|
24
|
+
gem.add_dependency 'capistrano', '~> 2.9'
|
25
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
Capistrano::Configuration.instance.load do
|
2
|
+
namespace :info do
|
3
|
+
desc <<-DESC
|
4
|
+
Tail all or a single remote file
|
5
|
+
|
6
|
+
The logfile can be specified with a LOGFILE-environment variable.
|
7
|
+
It defaults to RAILS_ENV.log
|
8
|
+
DESC
|
9
|
+
task :tail, :roles => :app do
|
10
|
+
ENV["LOGFILE"] ||= "#{fetch(:rails_env, 'production')}.log"
|
11
|
+
begin
|
12
|
+
stream "tail -f #{shared_path}/log/#{ENV["LOGFILE"]}"
|
13
|
+
rescue Interrupt
|
14
|
+
puts "\n--interrupted by user--"
|
15
|
+
puts ""
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
desc "Display the currently deployed Application, Revision and Release"
|
20
|
+
task :version, :roles => :app, :except => { :no_release => true } do
|
21
|
+
rev = current_revision
|
22
|
+
rel = current_release.split('/').pop
|
23
|
+
rel_date = Time.local(*rel.unpack("a4a2a2a2a2a2"))
|
24
|
+
|
25
|
+
puts <<-EOT
|
26
|
+
|
27
|
+
AppName: #{fetch(:application)}
|
28
|
+
Version: #{rev}
|
29
|
+
Release: #{rel}
|
30
|
+
Deploy: #{rel_date}
|
31
|
+
|
32
|
+
EOT
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Display the uname"
|
36
|
+
task :uname do
|
37
|
+
run "uname -a"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-info
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Matthias Viehweger
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-08-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: capistrano
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.9'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.9'
|
30
|
+
description: ! 'A set of capistrano recipes for outputting various info from the remote
|
31
|
+
server.
|
32
|
+
|
33
|
+
|
34
|
+
Features include:
|
35
|
+
|
36
|
+
- tail -f of a logfile (info:tail)
|
37
|
+
|
38
|
+
- deployed version (info:version)
|
39
|
+
|
40
|
+
'
|
41
|
+
email:
|
42
|
+
- kronn@kronn.de
|
43
|
+
executables: []
|
44
|
+
extensions: []
|
45
|
+
extra_rdoc_files: []
|
46
|
+
files:
|
47
|
+
- .gitignore
|
48
|
+
- Gemfile
|
49
|
+
- LICENSE
|
50
|
+
- README.md
|
51
|
+
- Rakefile
|
52
|
+
- capistrano-info.gemspec
|
53
|
+
- lib/capistrano-info.rb
|
54
|
+
- lib/capistrano-info/capistrano.rb
|
55
|
+
- lib/capistrano-info/version.rb
|
56
|
+
homepage: https://github.com/kronn/capistrano-info
|
57
|
+
licenses: []
|
58
|
+
post_install_message:
|
59
|
+
rdoc_options: []
|
60
|
+
require_paths:
|
61
|
+
- lib
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
requirements: []
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 1.8.24
|
77
|
+
signing_key:
|
78
|
+
specification_version: 3
|
79
|
+
summary: output of remote information through capistrano
|
80
|
+
test_files: []
|