capistrano-taillog 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 99057aecb3d9a077e5693fe46a8a59646cf5eeed
4
+ data.tar.gz: e16f9b3959ff98ed70a902e1fc59b6514362bc3f
5
+ SHA512:
6
+ metadata.gz: 72b8a8db1cd9ffaed390fcae91aeb240ad8bb4d98e31027058ee834cf38e1e08b3fb1a9bc1cb42db262ffb58a3cf765e2e70ebdde87bfcce004ea44a0d9e9ffa
7
+ data.tar.gz: f0d68c8274dceebfb5632930ed35dd4090858a399d5584dede1e59dec59bebd275349885d68e9e73ba99c1f5593552282c3bcb4eecfabfd4de0e7ce1acf2de71
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-taillog.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Aaron Qian
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.
@@ -0,0 +1,51 @@
1
+ # Capistrano::Taillog
2
+
3
+ **Note: this plugin works only with Capistrano 3.**
4
+
5
+ ### About
6
+
7
+ Capistrano Taillog makes tailing logs easier. run `cap <stage> log:tail` to tail logs from remote servers.
8
+
9
+ ### Installation
10
+
11
+ Put the following in your application's `Gemfile`:
12
+
13
+ ```ruby
14
+ group :development do
15
+ gem 'capistrano', '~> 3.2.0'
16
+ gem 'capistrano-taillog'
17
+ end
18
+ ```
19
+
20
+ Then:
21
+
22
+ ```
23
+ $ bundle install
24
+ ```
25
+
26
+ ### Usage
27
+
28
+ Put the following in your application's `Capfile`:
29
+
30
+ ```ruby
31
+ require 'capistrano/taillog'
32
+ ```
33
+
34
+ Then:
35
+
36
+ ```
37
+ cap <stage> logs:tail
38
+ ```
39
+
40
+ ### Configurations
41
+
42
+ Please see: [defaults.rb](https://github.com/aq1018/capistrano-taillog/blob/master/lib/capistrano/taillog/defaults.rb)
43
+
44
+
45
+ ### Contributing
46
+
47
+ 1. Fork it ( https://github.com/[my-github-username]/capistrano-taillog/fork )
48
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
49
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
50
+ 4. Push to the branch (`git push origin my-new-feature`)
51
+ 5. Create a new Pull Request
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,20 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'capistrano/taillog/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "capistrano-taillog"
8
+ spec.version = Capistrano::Taillog::VERSION
9
+ spec.authors = ["Aaron Qian"]
10
+ spec.email = ["aq1018@gmail.com"]
11
+ spec.summary = %q{Tail logs easily with cap logs:tail}
12
+ spec.description = %q{Capistrano plugin to allow tailing remote logs.}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+ end
@@ -0,0 +1,2 @@
1
+ load File.expand_path('../tasks/taillog.rake', __FILE__)
2
+
@@ -0,0 +1,12 @@
1
+ # :log_path
2
+ # The path to where the log files are stored.
3
+ # Defaults to shared/log
4
+ set :log_path, -> {
5
+ File.join(shared_path, 'log')
6
+ }
7
+
8
+ # :default_log
9
+ # The default log file. Change this to what you use the most
10
+ set :default_log, -> {
11
+ "#{fetch(:stage)}.log"
12
+ }
@@ -0,0 +1,5 @@
1
+ module Capistrano
2
+ module Taillog
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,20 @@
1
+ namespace :load do
2
+ task :defaults do
3
+ load "capistrano/taillog/defaults.rb"
4
+ end
5
+ end
6
+
7
+ namespace :logs do
8
+ desc "Tail remote logs"
9
+ task :tail do
10
+ ask(:file, fetch(:default_log))
11
+ on roles(:all) do
12
+ path = File.join(fetch(:log_path), fetch(:file))
13
+ if test("[ -f #{path} ]")
14
+ execute :tail, '-f', path
15
+ else
16
+ fatal "#{path} does not exist!"
17
+ end
18
+ end
19
+ end
20
+ end
metadata ADDED
@@ -0,0 +1,54 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-taillog
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Aaron Qian
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-10 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Capistrano plugin to allow tailing remote logs.
14
+ email:
15
+ - aq1018@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".gitignore"
21
+ - Gemfile
22
+ - LICENSE.txt
23
+ - README.md
24
+ - Rakefile
25
+ - capistrano-taillog.gemspec
26
+ - lib/capistrano/taillog.rb
27
+ - lib/capistrano/taillog/defaults.rb
28
+ - lib/capistrano/taillog/version.rb
29
+ - lib/capistrano/tasks/taillog.rake
30
+ homepage: ''
31
+ licenses:
32
+ - MIT
33
+ metadata: {}
34
+ post_install_message:
35
+ rdoc_options: []
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ requirements: []
49
+ rubyforge_project:
50
+ rubygems_version: 2.4.3
51
+ signing_key:
52
+ specification_version: 4
53
+ summary: Tail logs easily with cap logs:tail
54
+ test_files: []