capistrano3-taillog 1.0.0

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: 85e4aa51a1b2dd10d769aca49ce550df01bd3c2f
4
+ data.tar.gz: 401a38e94e876b0aaa13abe18bf1e8339825de85
5
+ SHA512:
6
+ metadata.gz: 994145b23251ac5b92a3ef241e22103dec7ab3406dee660025fc7c74b0fec8de5de1a6704041aa4482a2d14339c910ae27e4efd14c03dd18ab7df173540873fa
7
+ data.tar.gz: eae53e25dd3ad340c8097bd3b5f9eb2fde63af93c8311a311e7302a5f0fbea51e0261cba4941b10eb0e86243637f937f8efda5814fe92b3faf48ab6195d3bc68
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
@@ -0,0 +1,5 @@
1
+ # Capistrano3 Tail log Changelog
2
+
3
+ ## `1.0.0`
4
+
5
+ - first release
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Takahiro Ooishi
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,33 @@
1
+ # Capistrano3 Taillog
2
+
3
+ This is a capistrano v3 plugin that integrates `tail` application log task.
4
+
5
+ ## Setup
6
+
7
+ Add the library to your `Gemfile`:
8
+
9
+ ```ruby
10
+ group :development do
11
+ gem 'capistrano3-taillog'
12
+ end
13
+ ```
14
+
15
+ Add the library to your `Capfile`:
16
+
17
+ ```ruby
18
+ require 'capistrano3/taillog'
19
+ ```
20
+
21
+ ## Configuration
22
+
23
+ - `:taillog_roles`
24
+
25
+ Roles to `tail` commands on. Defaults to `:app`
26
+
27
+ ## Contributing
28
+
29
+ 1. Fork it ( https://github.com/taka0125/capistrano3-taillog/fork )
30
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
31
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
32
+ 4. Push to the branch (`git push origin my-new-feature`)
33
+ 5. Create a new Pull Request
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "capistrano3-taillog"
7
+ spec.version = '1.0.0'
8
+ spec.authors = ["Takahiro Ooishi"]
9
+ spec.email = ["taka0125@gmail.com"]
10
+ spec.summary = %q{Tail log tasks}
11
+ spec.description = %q{Tail log tasks}
12
+ spec.homepage = "https://github.com/taka0125/capistrano3-taillog"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
+ spec.require_paths = ["lib"]
18
+
19
+ spec.add_dependency 'capistrano', '~> 3.1.0'
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake"
23
+ end
File without changes
@@ -0,0 +1 @@
1
+ load File.expand_path("../tasks/taillog.cap", __FILE__)
@@ -0,0 +1,31 @@
1
+ namespace :load do
2
+ task :defaults do
3
+ set :taillog_roles, -> { :app }
4
+ end
5
+ end
6
+
7
+ namespace :taillog do
8
+ desc 'Tail application log'
9
+ task :application_log do
10
+ on roles(fetch(:taillog_roles)) do
11
+ tail "#{shared_path}/log/#{fetch(:rails_env)}.log"
12
+ end
13
+ end
14
+
15
+ def with_verbosity(output_verbosity)
16
+ old_verbosity = SSHKit.config.output_verbosity
17
+
18
+ begin
19
+ SSHKit.config.output_verbosity = output_verbosity
20
+ yield
21
+ ensure
22
+ SSHKit.config.output_verbosity = old_verbosity
23
+ end
24
+ end
25
+
26
+ def tail(path)
27
+ with_verbosity(Logger::DEBUG) do
28
+ execute "tail -f #{path}"
29
+ end
30
+ end
31
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano3-taillog
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Takahiro Ooishi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-05-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capistrano
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 3.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 3.1.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Tail log tasks
56
+ email:
57
+ - taka0125@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - CHANGELOG.md
64
+ - LICENSE
65
+ - README.md
66
+ - Rakefile
67
+ - capistrano3-taillog.gemspec
68
+ - lib/capistrano3-taillog.rb
69
+ - lib/capistrano3/taillog.rb
70
+ - lib/capistrano3/tasks/taillog.cap
71
+ homepage: https://github.com/taka0125/capistrano3-taillog
72
+ licenses:
73
+ - MIT
74
+ metadata: {}
75
+ post_install_message:
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubyforge_project:
91
+ rubygems_version: 2.2.2
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: Tail log tasks
95
+ test_files: []