utils 0.0.74 → 0.0.75

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: deaf61a0df60f65e04301eb84fa27629fceef709
4
- data.tar.gz: 16cc2ea9dbd7444a678a50933c116ec3ec81e8ae
3
+ metadata.gz: 7a27640c1300f8e1d96431224cdc6b892d65f2dc
4
+ data.tar.gz: bf1845e030bbe5dec1dd8aaccd19ab3e8eefb4c2
5
5
  SHA512:
6
- metadata.gz: 1d31164ba3abf67beb45d57b3d549fafcd10e459cf139b657d48f582d6b8a1da9c6152af8ab26dbf6ee8ad553159be0ce4b2e369372f1478800324bbe14b19fa
7
- data.tar.gz: ad04f5f16545cb81cb1fe086250dbf333983eeee4c4600267237ae4e62488cd7ad2070bc1bd9d772aaf8bc7c8291cc16618b54e801946563c48383cde193214e
6
+ metadata.gz: 9bdaf7edf8049757f61db019889b59ff9a2e8b92e9c8b3416a2d5eb7f1eba3c987aa912a36e2c86671e2e819d50d00c5c390cb26e57ccd8aaa0c06b7d34027bd
7
+ data.tar.gz: da25bd790d57b15237a193301867d554fe483113e4179453441c8f7791e0f8a06139916f078658f7fada0cb8a043d9e4f71c402816a8038f68594aa7f4eeac03
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.74
1
+ 0.0.75
data/bin/edit CHANGED
@@ -62,7 +62,9 @@ else
62
62
  argv << file.path
63
63
  end
64
64
  end
65
- unless argv.empty?
65
+ if argv.empty?
66
+ editor.start
67
+ else
66
68
  if editor.file_linenumber?(argv.first)
67
69
  editor.wait = argv.size > 1
68
70
  for current_file in argv
@@ -190,7 +190,7 @@ class Utils::Config::ConfigFile
190
190
  when 'screen'
191
191
  'screen -DUR "%s"' % session
192
192
  when 'tmux'
193
- 'tmux -u attach -t "%s"' % session
193
+ 'tmux -u attach -d -t "%s"' % session
194
194
  end
195
195
  end
196
196
 
data/lib/utils/editor.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'tins/xt/full'
2
2
  require 'tins/deep_const_get'
3
3
  require 'fileutils'
4
+ require 'rbconfig'
4
5
 
5
6
  module Utils
6
7
  class Editor
@@ -49,13 +50,20 @@ module Utils
49
50
  def initialize
50
51
  self.wait = false
51
52
  self.pause_duration = 1
52
- self.servername = ENV['VIM_SERVER'] || "G#{ENV['USER'].upcase}"
53
- config = Utils::Config::ConfigFile.new
53
+ self.servername = derive_server_name
54
+ config = Utils::Config::ConfigFile.new
54
55
  config.configure_from_paths
55
56
  self.config = config.edit
56
57
  yield self if block_given?
57
58
  end
58
59
 
60
+ def derive_server_name
61
+ name = ENV['VIM_SERVER'] || File.dirname(Dir.pwd)
62
+ RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ and name = "G_#{name}"
63
+ name.upcase
64
+ end
65
+ private :derive_server_name
66
+
59
67
  attr_accessor :pause_duration
60
68
 
61
69
  attr_accessor :wait
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.0.74'
3
+ VERSION = '0.0.75'
4
4
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/utils.gemspec CHANGED
@@ -2,20 +2,20 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "utils"
5
- s.version = "0.0.74"
5
+ s.version = "0.0.75"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Florian Frank"]
9
- s.date = "2013-03-11"
9
+ s.date = "2013-05-10"
10
10
  s.description = "This ruby gem provides some useful command line utilities"
11
11
  s.email = "flori@ping.de"
12
- s.executables = ["create_tags", "untest", "chroot-libs", "edit_wait", "chroot-exec", "irb_connect", "number_files", "search", "strip_spaces", "path", "enum", "edit", "git-empty", "classify", "utils-install-config", "xmp", "discover", "ssh-tunnel", "myex", "probe", "remote_copy", "errf", "same_files", "utils-utilsrc", "unquarantine_apps", "vacuum_firefox_sqlite", "on_change", "sedit"]
12
+ s.executables = ["chroot-exec", "chroot-libs", "classify", "create_tags", "discover", "edit", "edit_wait", "enum", "errf", "git-empty", "irb_connect", "myex", "number_files", "on_change", "path", "probe", "remote_copy", "same_files", "search", "sedit", "ssh-tunnel", "strip_spaces", "unquarantine_apps", "untest", "utils-install-config", "utils-utilsrc", "vacuum_firefox_sqlite", "xmp"]
13
13
  s.extra_rdoc_files = ["README.rdoc", "lib/utils.rb", "lib/utils/config.rb", "lib/utils/config/config_file.rb", "lib/utils/editor.rb", "lib/utils/file_xt.rb", "lib/utils/finder.rb", "lib/utils/grepper.rb", "lib/utils/irb.rb", "lib/utils/md5.rb", "lib/utils/patterns.rb", "lib/utils/version.rb"]
14
14
  s.files = [".gitignore", "COPYING", "Gemfile", "README.rdoc", "Rakefile", "TODO", "VERSION", "bin/chroot-exec", "bin/chroot-libs", "bin/classify", "bin/create_tags", "bin/discover", "bin/edit", "bin/edit_wait", "bin/enum", "bin/errf", "bin/git-empty", "bin/irb_connect", "bin/myex", "bin/number_files", "bin/on_change", "bin/path", "bin/probe", "bin/remote_copy", "bin/same_files", "bin/search", "bin/sedit", "bin/ssh-tunnel", "bin/strip_spaces", "bin/unquarantine_apps", "bin/untest", "bin/utils-install-config", "bin/utils-utilsrc", "bin/vacuum_firefox_sqlite", "bin/xmp", "lib/utils.rb", "lib/utils/config.rb", "lib/utils/config/config_file.rb", "lib/utils/config/gdb/asm", "lib/utils/config/gdb/ruby", "lib/utils/config/gdbinit", "lib/utils/config/irbrc", "lib/utils/config/rdebugrc", "lib/utils/config/rvmrc", "lib/utils/config/screenrc", "lib/utils/config/utilsrc", "lib/utils/editor.rb", "lib/utils/file_xt.rb", "lib/utils/finder.rb", "lib/utils/grepper.rb", "lib/utils/irb.rb", "lib/utils/md5.rb", "lib/utils/patterns.rb", "lib/utils/version.rb", "utils.gemspec"]
15
15
  s.homepage = "http://github.com/flori/utils"
16
16
  s.rdoc_options = ["--title", "Utils - Some useful command line utilities", "--main", "README.rdoc"]
17
17
  s.require_paths = ["lib"]
18
- s.rubygems_version = "2.0.2"
18
+ s.rubygems_version = "2.0.3"
19
19
  s.summary = "Some useful command line utilities"
20
20
 
21
21
  if s.respond_to? :specification_version then
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.0.74
4
+ version: 0.0.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-11 00:00:00.000000000 Z
11
+ date: 2013-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -83,34 +83,34 @@ dependencies:
83
83
  description: This ruby gem provides some useful command line utilities
84
84
  email: flori@ping.de
85
85
  executables:
86
- - create_tags
87
- - untest
86
+ - chroot-exec
88
87
  - chroot-libs
88
+ - classify
89
+ - create_tags
90
+ - discover
91
+ - edit
89
92
  - edit_wait
90
- - chroot-exec
91
- - irb_connect
92
- - number_files
93
- - search
94
- - strip_spaces
95
- - path
96
93
  - enum
97
- - edit
94
+ - errf
98
95
  - git-empty
99
- - classify
100
- - utils-install-config
101
- - xmp
102
- - discover
103
- - ssh-tunnel
96
+ - irb_connect
104
97
  - myex
98
+ - number_files
99
+ - on_change
100
+ - path
105
101
  - probe
106
102
  - remote_copy
107
- - errf
108
103
  - same_files
109
- - utils-utilsrc
104
+ - search
105
+ - sedit
106
+ - ssh-tunnel
107
+ - strip_spaces
110
108
  - unquarantine_apps
109
+ - untest
110
+ - utils-install-config
111
+ - utils-utilsrc
111
112
  - vacuum_firefox_sqlite
112
- - on_change
113
- - sedit
113
+ - xmp
114
114
  extensions: []
115
115
  extra_rdoc_files:
116
116
  - README.rdoc
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
204
  version: '0'
205
205
  requirements: []
206
206
  rubyforge_project:
207
- rubygems_version: 2.0.2
207
+ rubygems_version: 2.0.3
208
208
  signing_key:
209
209
  specification_version: 4
210
210
  summary: Some useful command line utilities