utils 0.0.87 → 0.0.88

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: 004b410eccaece7453569464e3b75461cfb7170e
4
- data.tar.gz: e1b554b0e44210fdf1939bab0db842d997bc0f5c
3
+ metadata.gz: 3b6f2488601d15d6765f39728624f5f7e0366771
4
+ data.tar.gz: b5a6cf29901556154c84aa30040960aed5a82505
5
5
  SHA512:
6
- metadata.gz: 13d8d08a0bef2b3c9baafd0f7ed76f6c8d95ee2005b155d805be017b6600c91606c2c92662127d14757945cd0f42505f03c36d3e2135530827d344034061a086
7
- data.tar.gz: a86533457a1f063d8e64e87608e7fdc68948c64e0bd28a895a436aee7cf037dc88e26469db8c829693e225722431106b554cc5e93122bcafa84076c8046d055c
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.6'
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.87
1
+ 0.0.88
@@ -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
@@ -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 or test-unit)
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
- opts = $opt.subhash('n', 't').map { |k, v| v.full? { %W[-#{k} #{v}] } }.compact.flatten
76
- probe_server.enqueue opts + args
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
@@ -48,11 +48,13 @@ module Utils
48
48
  Utils::IRB::Service.start(hostname, port) {}
49
49
  end
50
50
 
51
- # Conenct to an irb server.
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
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.0.87'
3
+ VERSION = '0.0.88'
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:
@@ -2,20 +2,20 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "utils"
5
- s.version = "0.0.87"
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-06-21"
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.3"
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.6"])
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.6"])
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.6"])
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.87
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-06-21 00:00:00.000000000 Z
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.6'
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.6'
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.3
231
+ rubygems_version: 2.0.4
224
232
  signing_key:
225
233
  specification_version: 4
226
234
  summary: Some useful command line utilities