tmux-erb-parser 0.1.2 → 0.1.3
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 +4 -4
- data/README.md +3 -0
- data/bin/tmux-erb-parser +5 -0
- data/lib/tmux-erb-parser/command.rb +5 -8
- data/lib/tmux-erb-parser/parser.rb +1 -1
- data/lib/tmux-erb-parser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f4710a740b1fb2595955f5a74f957850146d0a85dadef0e6d5c666086c005a1
|
4
|
+
data.tar.gz: 9093fc2ff95994ce9dbc596654487c94ce40f837c20a4a2464143c882819f9c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06b12de75b04a6db27c357079d8ef0e7fcdd1ca5e143b6d5165aaf63c301db0c3df2f9f31a3c699b05aa9d17bbdfcadfccc494c642e5cb4b37ce6066d10ad594
|
7
|
+
data.tar.gz: 4346861045e56320e10ac419c43438ddddfa8ea2b0070797faacb2042f43eaa3e1dd7eff02c35752f51de1f164843a433e43189ec8b8532ce7048eda0ebbfafd
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Tmux ERB Parser
|
2
|
+
[](https://badge.fury.io/rb/tmux-erb-parser)
|
2
3
|
[](https://travis-ci.org/epaew/tmux-erb-parser)
|
4
|
+
[](https://codeclimate.com/github/epaew/tmux-erb-parser/maintainability)
|
5
|
+
[](https://codeclimate.com/github/epaew/tmux-erb-parser/test_coverage)
|
3
6
|
|
4
7
|
A Tmux plugin to load tmux.conf.erb
|
5
8
|
[What's ERB?](https://ruby-doc.org/stdlib-2.5.1/libdoc/erb/rdoc/ERB.html)
|
data/bin/tmux-erb-parser
CHANGED
@@ -4,5 +4,10 @@
|
|
4
4
|
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)
|
5
5
|
require 'tmux-erb-parser'
|
6
6
|
|
7
|
+
# limit recursive execution
|
8
|
+
command = File.basename(__FILE__)
|
9
|
+
processes = `ps ax`.each_line.map { |line| line.split(' ', 5)[4] }
|
10
|
+
exit 1 if processes.grep(/\Aruby.+#{command}/).size > 5
|
11
|
+
|
7
12
|
cmd = TmuxERBParser::Command.new(ARGV)
|
8
13
|
cmd.run
|
@@ -74,16 +74,13 @@ module TmuxERBParser
|
|
74
74
|
def exec_tmux(buf, line)
|
75
75
|
buf << line
|
76
76
|
return buf if buf.empty?
|
77
|
+
return buf.chop! if buf.end_with?('\\')
|
77
78
|
|
78
|
-
|
79
|
-
|
80
|
-
else
|
81
|
-
command = "tmux #{buf.gsub(%(\\;), %( '\\;'))}"
|
82
|
-
@logger.debug "exec: #{command}"
|
79
|
+
command = "tmux #{buf.gsub(%(\\;), %( '\\;'))}"
|
80
|
+
@logger.debug "exec: #{command}"
|
83
81
|
|
84
|
-
|
85
|
-
|
86
|
-
end
|
82
|
+
`#{command}` unless ENV['DEBUG']
|
83
|
+
+''
|
87
84
|
end
|
88
85
|
|
89
86
|
def process
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tmux-erb-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- epaew
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|