-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update gem structure from current boilerplate
- Loading branch information
1 parent
d37b6ac
commit e4bd25e
Showing
8 changed files
with
59 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
*.o | ||
*.bundle | ||
Gemfile.lock | ||
|
||
/.bundle/ | ||
/.yardoc | ||
/_yardoc/ | ||
/coverage/ | ||
/doc/ | ||
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
*.bundle | ||
*.so | ||
*.o | ||
*.a | ||
mkmf.log | ||
Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,20 @@ | ||
$:.unshift 'lib' | ||
require 'rake/clean' | ||
require 'rake/testtask' | ||
|
||
dlext = RbConfig::CONFIG['DLEXT'] | ||
direc = File.expand_path(File.dirname(__FILE__)) | ||
CLOBBER.include("**/*.#{dlext}", "**/*~", "**/*#*", "**/*.log", "**/*.o") | ||
CLEAN.include("ext/**/*.#{dlext}", "ext/**/*.log", "ext/**/*.o", | ||
"ext/**/*~", "ext/**/*#*", "ext/**/*.obj", "**/*#*", "**/*#*.*", | ||
"ext/**/*.def", "ext/**/*.pdb", "**/*_flymake*.*", "**/*_flymake", "**/*.rbc") | ||
require "bundler/gem_tasks" | ||
require "rake/testtask" | ||
|
||
Rake::TestTask.new(:test) do |t| | ||
t.libs << "test" | ||
t.libs << "lib" | ||
t.test_files = FileList["test/**/*_test.rb"] | ||
t.warning = true | ||
t.verbose = true | ||
end | ||
|
||
desc "Show version" | ||
task :version do | ||
require "rubyvm/debug_inspector/version" | ||
puts "debug_inspector version: #{RubyVM::DebugInspector::VERSION}" | ||
end | ||
|
||
desc "run tests" | ||
task :default => [:compile, :test] | ||
|
||
task :pry do | ||
puts "loading debug_inspector into pry" | ||
sh "pry -Ilib -rdebug_inspector" | ||
end | ||
|
||
desc "build the binaries" | ||
task :compile do | ||
chdir "#{direc}/ext/rubyvm/debug_inspector/" do | ||
sh "ruby extconf.rb" | ||
sh "make clean" | ||
sh "make" | ||
sh "cp *.#{dlext} ../../../lib/rubyvm/" | ||
end | ||
end | ||
|
||
desc 'cleanup the extensions' | ||
task :cleanup do | ||
sh "rm -rf lib/debug_inspector.#{dlext}" | ||
chdir "#{direc}/ext/rubyvm/debug_inspector/" do | ||
sh 'make clean' rescue nil | ||
end | ||
end | ||
|
||
desc "(re)install gem" | ||
task :reinstall => :gem do | ||
require "rubyvm/debug_inspector/version" | ||
sh "gem uninstall debug_inspector" rescue nil | ||
sh "gem install -l #{direc}/debug_inspector-#{RubyVM::DebugInspector::VERSION}.gem" | ||
end | ||
require "rake/extensiontask" | ||
|
||
task :install => :reinstall | ||
task :build => :compile | ||
|
||
desc "build all platform gems at once" | ||
task :gem => [:clean, :rmgems] do | ||
sh "gem build #{direc}/debug_inspector.gemspec" | ||
Rake::ExtensionTask.new("rubyvm/debug_inspector") do |ext| | ||
ext.lib_dir = "lib" | ||
end | ||
|
||
desc "remove all platform gems" | ||
task :rmgems do | ||
sh "rm #{direc}/*.gem" rescue nil | ||
end | ||
|
||
desc "build and push latest gems" | ||
task :pushgems => :gem do | ||
chdir(direc) do | ||
Dir["*.gem"].each do |gemfile| | ||
sh "gem push #{gemfile}" | ||
end | ||
end | ||
end | ||
task :default => [:clobber, :compile, :test] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require "bundler/setup" | ||
require "debug_inspector" | ||
|
||
# You can add fixtures and/or initialization code here to make experimenting | ||
# with your gem easier. You can also use a different console, if you like. | ||
|
||
# (If you use this, don't forget to add pry to your Gemfile!) | ||
# require "pry" | ||
# Pry.start | ||
|
||
require "irb" | ||
IRB.start(__FILE__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -vx | ||
|
||
bundle install | ||
|
||
# Do any other automated setup that you need to do here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
begin | ||
require 'bundler/setup' | ||
rescue LoadError | ||
# Bundler is missing. This should happen rarely (eg while running tests from Fedora package). | ||
# See https://github.com/banister/debug_inspector/pull/16 for more details. | ||
$LOAD_PATH.push File.expand_path(File.join("..", "lib"), File.dirname(__FILE__)) | ||
warn "WARN: Bundler is not being used." | ||
end | ||
require 'minitest' | ||
require 'minitest/autorun' | ||
require 'debug_inspector' | ||
$LOAD_PATH.unshift File.expand_path("../lib", __dir__) | ||
require "debug_inspector" | ||
|
||
require "minitest/autorun" |