mina-logs 0.0.9 → 0.0.99

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42e2aa98ca7e50451a180a2c5680caf79766857d
4
- data.tar.gz: 9aaaa4c0ce6e96b566387bd5d6804833b42183be
3
+ metadata.gz: 2f9c536c7ba1a723b9235b53cf19f4683cac0614
4
+ data.tar.gz: 28324d9cc198172d2565cc9fbf208f6e2b4f6d6b
5
5
  SHA512:
6
- metadata.gz: 9f62fb548e7c757be5dce597fe56c0db0094ecec8d6284c545595990ff200e3922e0fa6327540320ce8cb31c36fd1925960d811a57a5407d1baf4056b2a143a1
7
- data.tar.gz: 56a5ae91525c8d339d729ce6d7d1c71afb8b80cd601e36bb7778b87f98eef3dfa90a30eecaad485206ca062c6b011dc60373442768b03e7fa2ff4a522370f0df
6
+ metadata.gz: f5781dd4b2931bbe43a3f386e037d5aacc41a0fd5bebe5a071524ca87248eb0c553e25bbe9a760b488be1aff4bd0ae1c207c73635677704095e66af030e11900
7
+ data.tar.gz: 57eeb74e888ce5a683e1c3bd150ac25a5a63276c2bc7789f37cfb0ce3c59e427ac9587e1d88299458f28fdaa1d789bcac13abd19df5353cc95618b604baf9a83
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A mina plugin that watch production logs in local machine.
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/mina-logs.svg)]
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your Rails application's Gemfile:
@@ -24,17 +26,20 @@ require 'mina/logs'
24
26
 
25
27
  Then:
26
28
 
27
- # tail -f log/production.log
28
- $ mina logs
29
- # tail -f log/puma.log
30
- $ mina puma_logs
31
- # tail -f log/unicorn.log
32
- $ mina unicorn_logs
33
- # tail -f log/sidekiq.log
34
- $ mina sidekiq_logs
35
- # tail -f log/resque.log
36
- $ mina resque_logs
37
-
29
+ ```shell
30
+ # tail -f log/production.log
31
+ $ mina logs
32
+ # tail -f log/puma.log
33
+ $ mina puma_logs
34
+ # tail -f log/unicorn.log
35
+ $ mina unicorn_logs
36
+ # tail -f log/sidekiq.log
37
+ $ mina sidekiq_logs
38
+ # tail -f log/resque.log
39
+ $ mina resque_logs
40
+ # tail -f log/xx.log
41
+ $ mina '_logs[xx]'
42
+ ```
38
43
  ## Contributing
39
44
 
40
45
  1. Fork it
@@ -3,7 +3,7 @@ require 'mina/rails'
3
3
 
4
4
  desc "Show production logs"
5
5
  task logs: :environment do
6
- queue %[tail -f #{deploy_to}/#{current_path}/log/#{rails_env}.log]
6
+ invoke :'_log[production]'
7
7
  end
8
8
 
9
9
  desc "An alias name for `mina logs`"
@@ -13,20 +13,24 @@ end
13
13
 
14
14
  desc "Show puma logs"
15
15
  task puma_logs: :environment do
16
- queue %[tail -f #{deploy_to}/#{current_path}/log/puma.log]
16
+ invoke :'_log[puma]'
17
17
  end
18
18
 
19
19
  desc "Show unicorn logs"
20
20
  task unicorn_logs: :environment do
21
- queue %[tail -f #{deploy_to}/#{current_path}/log/unicorn.log]
21
+ invoke :'_log[unicorn]'
22
22
  end
23
23
 
24
24
  desc "Show sidekiq logs"
25
25
  task sidekiq_logs: :environment do
26
- queue %[tail -f #{deploy_to}/#{current_path}/log/sidekiq.log]
26
+ invoke :'_log[sidekiq]'
27
27
  end
28
28
 
29
29
  desc "Show resque logs"
30
30
  task resque_logs: :environment do
31
- queue %[tail -f #{deploy_to}/#{current_path}/log/resque.log]
31
+ invoke :'_log[resque]'
32
+ end
33
+
34
+ task :_logs, [:file] => [:environment] do |_, args|
35
+ queue %[tail -f #{deploy_to}/#{current_path}/log/#{args[:file]}.log]
32
36
  end
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Logs
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.99"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.99
5
5
  platform: ruby
6
6
  authors:
7
7
  - yafeilee
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-15 00:00:00.000000000 Z
11
+ date: 2016-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mina
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.4.5.1
109
+ rubygems_version: 2.6.4
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Show logs for mina