Sha256: 92a9d18ed3718810dcdfc90b4bdae1a7e394d72a875abdccdd817eb483633ec3

Contents?: true

Size: 930 Bytes

Versions: 1

Compression:

Stored size: 930 Bytes

Contents

# # #
# Get gemspec info

gemspec_file = Dir["*.gemspec"].first
gemspec = eval File.read(gemspec_file), binding, gemspec_file
info = "#{gemspec.name} | #{gemspec.version} | " \
       "#{gemspec.runtime_dependencies.size} dependencies | " \
       "#{gemspec.files.size} files"

# # #
# Gem build and install task

desc info
task :gem do
  puts info + "\n\n"
  print "  "; sh "gem build #{gemspec_file}"
  FileUtils.mkdir_p "pkg"
  FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", "pkg"
  puts; sh %{gem install --no-document pkg/#{gemspec.name}-#{gemspec.version}.gem}
end

# # #
# Start an IRB session with the gem loaded

desc "#{gemspec.name} | IRB"
task :irb do
  sh "irb -I ./lib -r #{gemspec.name.gsub '-','/'}"
end

# # #
# Run specs

desc "#{gemspec.name} | Spec"
task :spec do
  ruby "spec/object_shadow_instance_variables_spec.rb"
  ruby "spec/object_shadow_method_introspection_spec.rb"
end
task default: :spec

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
object_shadow-1.1.1 Rakefile