utils 0.0.87 → 0.0.88
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bin/brakeman2err +22 -0
- data/bin/chroot-libs +1 -1
- data/bin/myex +2 -0
- data/bin/probe +9 -5
- data/lib/utils/irb.rb +3 -1
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +8 -8
- metadata +13 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b6f2488601d15d6765f39728624f5f7e0366771
|
4
|
+
data.tar.gz: b5a6cf29901556154c84aa30040960aed5a82505
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7af0d7c82fb1cd295330fae466de08153236c869e99d7b587d8d9f25427fa53dfa8c125a5597e577b8c594a7d978791f029f5da34d0aba9dfbd345db36ec170
|
7
|
+
data.tar.gz: b8cbaa6b2370d57320652010eb6ead03b4c03bcc7b9fa1b711726c26e5e16bea020ca0a188efc3fe21170c204f4ce9eddeba22fe6b536098be47f8617cacc304
|
data/Rakefile
CHANGED
@@ -15,7 +15,7 @@ GemHadar do
|
|
15
15
|
ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.rvmrc', '.AppleDouble', 'tags'
|
16
16
|
readme 'README.rdoc'
|
17
17
|
|
18
|
-
dependency 'tins', '~>0.
|
18
|
+
dependency 'tins', '~>0.8', '>=0.8.3'
|
19
19
|
dependency 'term-ansicolor', '~>1.0'
|
20
20
|
dependency 'dslkit', '~>0.2.10'
|
21
21
|
dependency 'pstree'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.88
|
data/bin/brakeman2err
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'json'
|
4
|
+
require 'tins/xt'
|
5
|
+
require 'tins/go'
|
6
|
+
include Tins::GO
|
7
|
+
|
8
|
+
opt = go 'c'
|
9
|
+
if opt['c']
|
10
|
+
brakeman = `bundle exec which brakeman`.full? or fail "cannot find brakeman in path"
|
11
|
+
system *%w'bundle exec brakeman -q -o .brakeman.json' or fail "calling brakeman failed"
|
12
|
+
else
|
13
|
+
results = JSON File.read('.brakeman.json'), object_class: JSON::GenericObject
|
14
|
+
for error in results.errors
|
15
|
+
puts error.location, "Error #{error.error.inspect}"
|
16
|
+
end
|
17
|
+
for warning in results.warnings
|
18
|
+
puts "#{warning.file}:#{warning.line}",
|
19
|
+
"#{warning.warning_type} (#{warning.confidence}) #{warning.message.inspect}",
|
20
|
+
warning.code
|
21
|
+
end
|
22
|
+
end
|
data/bin/chroot-libs
CHANGED
@@ -12,7 +12,7 @@ mkdir_p dir
|
|
12
12
|
unless executable.start_with? '/'
|
13
13
|
executable = `which #{executable}`.chomp
|
14
14
|
end
|
15
|
-
libs = `ldd #{executable}`.gsub(/^(?:.*?\s+=>\s+|\s+)(.*?)\(.*/, '\1').grep(/\S/).map { |x| x.strip }
|
15
|
+
libs = `ldd #{executable}`.gsub(/^(?:.*?\s+=>\s+|\s+)(.*?)\(.*/, '\1').lines.grep(/\S/).map { |x| x.strip }
|
16
16
|
libs.concat ARGV
|
17
17
|
cd dir do
|
18
18
|
cp executable, File.basename(executable)
|
data/bin/myex
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# encoding: ascii-8bit
|
2
3
|
|
3
4
|
require 'tins/go'
|
4
5
|
include Tins::GO
|
@@ -40,6 +41,7 @@ cmd = ARGV.shift or usage
|
|
40
41
|
opts = go('dtDi')
|
41
42
|
|
42
43
|
STDOUT.sync = true
|
44
|
+
STDIN.set_encoding 'ascii-8bit'
|
43
45
|
case cmd
|
44
46
|
when 'list'
|
45
47
|
STDIN.grep(/^CREATE TABLE `([^`]+)` \(/) { puts $1 }
|
data/bin/probe
CHANGED
@@ -15,7 +15,10 @@ Usage: #{File.basename($0)} [OPTS] FILENAME[:LINENO] [FILENAME]
|
|
15
15
|
Options are
|
16
16
|
|
17
17
|
-n TESTNAME run the test TESTNAME in file FILENAME
|
18
|
-
-t FRAMEWORK use test framework FRAMEWORK (rspec
|
18
|
+
-t FRAMEWORK use test framework FRAMEWORK (rspec, test-unit or cucumber)
|
19
|
+
-c start probe as a client
|
20
|
+
-l start probe as a server
|
21
|
+
-p PORT listen on/connect to local port PORT
|
19
22
|
-h display this help
|
20
23
|
|
21
24
|
Version is #{File.basename($0)} #{Utils::VERSION}.
|
@@ -66,17 +69,18 @@ if $opt['l']
|
|
66
69
|
end
|
67
70
|
end
|
68
71
|
|
69
|
-
args.empty? and fail "require filename or filename:linenumber as arguments"
|
70
|
-
|
71
72
|
if $opt['c']
|
72
73
|
puts "Connecting probe server on #{uri.inspect}."
|
73
74
|
DRb.start_service
|
74
75
|
probe_server = DRbObject.new_with_uri(uri)
|
75
|
-
|
76
|
-
|
76
|
+
unless args.empty?
|
77
|
+
opts = $opt.subhash('n', 't').map { |k, v| v.full? { %W[-#{k} #{v}] } }.compact.flatten
|
78
|
+
probe_server.enqueue opts + args
|
79
|
+
end
|
77
80
|
exit
|
78
81
|
end
|
79
82
|
|
83
|
+
args.empty? and fail "require filename or filename:linenumber as arguments"
|
80
84
|
puts "Running tests in #{args.inspect}"
|
81
85
|
|
82
86
|
case ($opt['t'] || $config.probe.test_framework).to_sym
|
data/lib/utils/irb.rb
CHANGED
@@ -48,11 +48,13 @@ module Utils
|
|
48
48
|
Utils::IRB::Service.start(hostname, port) {}
|
49
49
|
end
|
50
50
|
|
51
|
-
#
|
51
|
+
# Connect to an irb server.
|
52
52
|
def irb_connect(hostname = nil, port = nil)
|
53
53
|
Utils::IRB::Service.connect(hostname, port)
|
54
54
|
end
|
55
55
|
|
56
|
+
# TODO: change the API of this stuff
|
57
|
+
|
56
58
|
# Return all instance methods of obj's class.
|
57
59
|
def irb_all_class_instance_methods(obj)
|
58
60
|
methods = obj.class.instance_methods
|
data/lib/utils/version.rb
CHANGED
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.
|
5
|
+
s.version = "0.0.88"
|
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-
|
9
|
+
s.date = "2013-08-02"
|
10
10
|
s.description = "This ruby gem provides some useful command line utilities"
|
11
11
|
s.email = "flori@ping.de"
|
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"]
|
12
|
+
s.executables = ["brakeman2err", "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/probe_server.rb", "lib/utils/version.rb"]
|
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/probe_server.rb", "lib/utils/version.rb", "utils.gemspec"]
|
14
|
+
s.files = [".gitignore", "COPYING", "Gemfile", "README.rdoc", "Rakefile", "TODO", "VERSION", "bin/brakeman2err", "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/probe_server.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.
|
18
|
+
s.rubygems_version = "2.0.4"
|
19
19
|
s.summary = "Some useful command line utilities"
|
20
20
|
|
21
21
|
if s.respond_to? :specification_version then
|
@@ -23,14 +23,14 @@ Gem::Specification.new do |s|
|
|
23
23
|
|
24
24
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
25
25
|
s.add_development_dependency(%q<gem_hadar>, ["~> 0.1.8"])
|
26
|
-
s.add_runtime_dependency(%q<tins>, ["~> 0.
|
26
|
+
s.add_runtime_dependency(%q<tins>, [">= 0.8.3", "~> 0.8"])
|
27
27
|
s.add_runtime_dependency(%q<term-ansicolor>, ["~> 1.0"])
|
28
28
|
s.add_runtime_dependency(%q<dslkit>, ["~> 0.2.10"])
|
29
29
|
s.add_runtime_dependency(%q<pstree>, [">= 0"])
|
30
30
|
s.add_runtime_dependency(%q<pry-editline>, [">= 0"])
|
31
31
|
else
|
32
32
|
s.add_dependency(%q<gem_hadar>, ["~> 0.1.8"])
|
33
|
-
s.add_dependency(%q<tins>, ["~> 0.
|
33
|
+
s.add_dependency(%q<tins>, [">= 0.8.3", "~> 0.8"])
|
34
34
|
s.add_dependency(%q<term-ansicolor>, ["~> 1.0"])
|
35
35
|
s.add_dependency(%q<dslkit>, ["~> 0.2.10"])
|
36
36
|
s.add_dependency(%q<pstree>, [">= 0"])
|
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
end
|
39
39
|
else
|
40
40
|
s.add_dependency(%q<gem_hadar>, ["~> 0.1.8"])
|
41
|
-
s.add_dependency(%q<tins>, ["~> 0.
|
41
|
+
s.add_dependency(%q<tins>, [">= 0.8.3", "~> 0.8"])
|
42
42
|
s.add_dependency(%q<term-ansicolor>, ["~> 1.0"])
|
43
43
|
s.add_dependency(%q<dslkit>, ["~> 0.2.10"])
|
44
44
|
s.add_dependency(%q<pstree>, [">= 0"])
|
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.
|
4
|
+
version: 0.0.88
|
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-
|
11
|
+
date: 2013-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -30,14 +30,20 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.8'
|
34
|
+
- - '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 0.8.3
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
41
|
- - ~>
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
43
|
+
version: '0.8'
|
44
|
+
- - '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.8.3
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: term-ansicolor
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -97,6 +103,7 @@ dependencies:
|
|
97
103
|
description: This ruby gem provides some useful command line utilities
|
98
104
|
email: flori@ping.de
|
99
105
|
executables:
|
106
|
+
- brakeman2err
|
100
107
|
- chroot-exec
|
101
108
|
- chroot-libs
|
102
109
|
- classify
|
@@ -148,6 +155,7 @@ files:
|
|
148
155
|
- Rakefile
|
149
156
|
- TODO
|
150
157
|
- VERSION
|
158
|
+
- bin/brakeman2err
|
151
159
|
- bin/chroot-exec
|
152
160
|
- bin/chroot-libs
|
153
161
|
- bin/classify
|
@@ -220,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
228
|
version: '0'
|
221
229
|
requirements: []
|
222
230
|
rubyforge_project:
|
223
|
-
rubygems_version: 2.0.
|
231
|
+
rubygems_version: 2.0.4
|
224
232
|
signing_key:
|
225
233
|
specification_version: 4
|
226
234
|
summary: Some useful command line utilities
|