Sha256: e1d921e2db21e9c7a568676f1599b65ccf5129ec086bd6dbffd6b2554e6eebe5

Contents?: true

Size: 873 Bytes

Versions: 6

Compression:

Stored size: 873 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
  sh "for file in spec/*_spec.rb; do ruby $file; done"
end
task default: :spec

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
unicode-version-1.0.0 Rakefile
object_shadow-1.1.0 Rakefile
object_shadow-1.0.0 Rakefile
watchbuffy-1.0.2 Rakefile
watchbuffy-1.0.1 Rakefile
watchbuffy-1.0.0 Rakefile