utils 0.21.1 → 0.21.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4acf9179f8893734592685b7801d3535fafb7f7e8a7570242a29d14f43b70ca7
4
- data.tar.gz: b9e7fd5e52c177280e2b16486f99181430834b6ad62397d93cc58e66c5bbe4c4
3
+ metadata.gz: afb36522c028e7038dbc5fb7adfc0654a1943d8c8d57ae1e39ce5b4314dedc8c
4
+ data.tar.gz: 652cd7c050b83f151af992e665751ea2fb871614a33744afe89388ebb2b3ab46
5
5
  SHA512:
6
- metadata.gz: c68f43798710b4fbf89d5ce7fa04e277a3e64b1bda9a3902a2cef102d3c5204fed1fb06f52e78e495351e8494563a4717fa5afbbafb7b51f60c331857eca18c8
7
- data.tar.gz: c87ba6f18c4da23680f734bcb2f366913e03485ebd5f948e33a51afcd729a3eca3265a7ec599f5ce186044ac6ea244e913349e35c5652f1c7993ad72c37f4bc6
6
+ metadata.gz: 07eca4ba5ab9b9925a5fbbb7a84b5a72d909e0f000f88c1e4ef2f6ec0b69cc004321fd210a88bdd71b120379d7a150ec0490b4e171e9c56fa2be584131aa002e
7
+ data.tar.gz: aded8038db38b9bb0d600338a3cd6b46f8b763eebca818b98b6b7edd582497a3c50af905b721bcdf563556267a2418918d7681b8da64d4491a4b3b9de129b846
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.21.1
1
+ 0.21.2
data/bin/edit CHANGED
@@ -43,10 +43,6 @@ editor = Editor.new do |c|
43
43
  c.mkdir = $opt[?m]
44
44
  end
45
45
 
46
- if ENV['TMUX']
47
- system "tmux rename-window #{File.basename($0)}"
48
- end
49
-
50
46
  if $opt[?l]
51
47
  puts editor.serverlist
52
48
  exit 0
@@ -15,12 +15,11 @@ module Utils
15
15
  yield self if block_given?
16
16
  end
17
17
 
18
- def derive_server_name
18
+ private def derive_server_name
19
19
  name = ENV['VIM_SERVER'] || Dir.pwd
20
20
  RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ and name = "G_#{name}"
21
21
  name.upcase
22
22
  end
23
- private :derive_server_name
24
23
 
25
24
  attr_accessor :pause_duration
26
25
 
@@ -90,14 +89,13 @@ module Utils
90
89
  end
91
90
  end
92
91
 
93
- def make_dirs(*filenames)
92
+ private def make_dirs(*filenames)
94
93
  if mkdir
95
94
  for filename in filenames
96
95
  FileUtils.mkdir_p File.dirname(filename)
97
96
  end
98
97
  end
99
98
  end
100
- private :make_dirs
101
99
 
102
100
  def edit_file(*filenames)
103
101
  make_dirs(*filenames)
@@ -129,7 +127,13 @@ module Utils
129
127
  )
130
128
  end
131
129
 
130
+ private def rename_window
131
+ return if started?
132
+ ENV['TMUX'] and system "tmux rename-window #{File.basename($0)}"
133
+ end
134
+
132
135
  def start
136
+ rename_window
133
137
  started? or cmd(*vim, '--servername', servername)
134
138
  end
135
139
 
@@ -165,14 +169,17 @@ module Utils
165
169
  end
166
170
 
167
171
  def edit_remote(*args)
172
+ rename_window
168
173
  cmd(*vim, '--servername', servername, '--remote', *args)
169
174
  end
170
175
 
171
- def edit_remote_wait(*args)
176
+ def edit_remote(*args)
177
+ rename_window
172
178
  cmd(*vim, '--servername', servername, '--remote-wait', *args)
173
179
  end
174
180
 
175
181
  def edit_remote_send(*args)
182
+ rename_window
176
183
  cmd(*vim, '--servername', servername, '--remote-send', *args)
177
184
  end
178
185
 
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.21.1'
3
+ VERSION = '0.21.2'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: utils 0.21.1 ruby lib
2
+ # stub: utils 0.21.2 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "utils".freeze
6
- s.version = "0.21.1"
6
+ s.version = "0.21.2"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2020-02-05"
11
+ s.date = "2020-02-06"
12
12
  s.description = "This ruby gem provides some useful command line utilities".freeze
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.executables = ["discover".freeze, "classify".freeze, "sedit".freeze, "irb_connect".freeze, "ascii7".freeze, "path".freeze, "enum".freeze, "unquarantine_apps".freeze, "ssh-tunnel".freeze, "xmp".freeze, "brakeman2err".freeze, "search".freeze, "chroot-exec".freeze, "edit".freeze, "tmproc".freeze, "json_check".freeze, "edit_wait".freeze, "errf".freeze, "untest".freeze, "blameline".freeze, "remote_copy".freeze, "git-empty".freeze, "create_cstags".freeze, "vacuum_firefox_sqlite".freeze, "same_files".freeze, "chroot-libs".freeze, "git-versions".freeze, "strip_spaces".freeze, "number_files".freeze, "rssr".freeze, "serve".freeze, "vcf2alias".freeze, "on_change".freeze, "utils-utilsrc".freeze, "myex".freeze, "long_lines".freeze, "dialog-pick".freeze, "probe".freeze, "create_tags".freeze]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.1
4
+ version: 0.21.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-05 00:00:00.000000000 Z
11
+ date: 2020-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar