Permalink
Browse files

modernizing for newer 1.9+ rubies

  • Loading branch information...
1 parent cd1428b commit a436e243bc0ccae8b3204e2535b90b45787d17fc @emonti committed Mar 3, 2014
View
@@ -0,0 +1,4 @@
+source 'https://rubygems.org'
+
+# Specify your gem's dependencies in rbkb.gemspec
+gemspec
View
@@ -0,0 +1,27 @@
+PATH
+ remote: .
+ specs:
+ rbkb (0.7.0)
+
+GEM
+ remote: https://rubygems.org/
+ specs:
+ diff-lcs (1.2.1)
+ rake (10.1.0)
+ rspec (2.13.0)
+ rspec-core (~> 2.13.0)
+ rspec-expectations (~> 2.13.0)
+ rspec-mocks (~> 2.13.0)
+ rspec-core (2.13.1)
+ rspec-expectations (2.13.0)
+ diff-lcs (>= 1.1.3, < 2.0)
+ rspec-mocks (2.13.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bundler (~> 1.3)
+ rake
+ rbkb!
+ rspec
View
@@ -0,0 +1,22 @@
+Copyright (c) 2009 Eric Monti
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,47 +1,5 @@
-# Look in the tasks/setup.rb file for the various options that can be
-# configured in this Rakefile. The .rake files in the tasks directory
-# are where the options are used.
+require "bundler/gem_tasks"
-begin
- require 'bones'
- Bones.setup
-rescue LoadError
- begin
- load 'tasks/setup.rb'
- rescue LoadError
- raise RuntimeError, '### please install the "bones" gem ###'
- end
-end
-
-ensure_in_path 'lib'
-require 'rbkb'
-
-task :default => 'test:run'
-
-PROJ.name = 'rbkb'
-PROJ.authors = 'Eric Monti'
-PROJ.email = 'emonti@matasano.com'
-PROJ.description = 'Rbkb is a collection of ruby-based pen-testing and reversing tools. Inspired by Matasano Blackbag.'
-PROJ.url = 'http://emonti.github.com/rbkb'
-PROJ.version = Rbkb::VERSION
-PROJ.rubyforge.name = 'rbkb'
-PROJ.readme_file = 'README.rdoc'
-
-PROJ.spec.opts << '--color'
-
-PROJ.rdoc.opts << '--line-numbers'
-
-#PROJ.rdoc.opts << '--diagram'
-PROJ.notes.tags << "X"+"XX" # muhah! so we don't note our-self
-
-# exclude rcov.rb and external libs from rcov report
-PROJ.rcov.opts += [
- "--exclude", "rcov.rb",
- "--exclude", "eventmachine",
- "--exclude", "pcap_misc.rb",
- "--exclude", "pcaplet.rb"
-]
-
-depend_on 'eventmachine', '>= 0.12.8'
-
-# EOF
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new
+task :default => :spec
View
@@ -1,51 +1,5 @@
+require "rbkb/version"
module Rbkb
- # :stopdoc:
- VERSION = '0.6.14'
- LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
- PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
- # :startdoc:
-
- # Returns the version string for the library.
- #
- def self.version
- VERSION
- end
-
- # Returns the library path for the module. If any arguments are given,
- # they will be joined to the end of the libray path using
- # <tt>File.join</tt>.
- #
- def self.libpath( *args )
- args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
- end
-
- # Returns the lpath for the module. If any arguments are given,
- # they will be joined to the end of the path using
- # <tt>File.join</tt>.
- #
- def self.path( *args )
- args.empty? ? PATH : ::File.join(PATH, args.flatten)
- end
-
- # Utility method used to require all files ending in .rb that lie in the
- # directory below this file that has the same name as the filename passed
- # in. Optionally, a specific _directory_ name can be passed in such that
- # the _filename_ does not have to be equivalent to the directory.
- #
- def self.require_all_libs_relative_to( fname, dir = nil )
- dir ||= ::File.basename(fname, '.*')
- search_me = ::File.expand_path(
- ::File.join(::File.dirname(fname), dir, '**', '*.rb'))
-
- Dir.glob(search_me).sort.each {|rb| require rb}
- end
-
-end # module Rbkb
-
-#Rbkb.require_all_libs_relative_to(__FILE__)
-
-require 'rbkb/extends'
-
-# EOF
+end
Oops, something went wrong.

0 comments on commit a436e24

Please sign in to comment.