Sha256: 9673d8b0bafabdd496ecbe9a9cf9dae8df770636a4faebc48547a95dfb09e4bc

Contents?: true

Size: 896 Bytes

Versions: 13

Compression:

Stored size: 896 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
<% if specs %>
# # #
# Run specs

desc "#{gemspec.name} | Spec"
task :spec do
  sh "for file in spec/*_spec.rb; do ruby $file; done"
end
task default: :spec
<% end %>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
microgem-1.0.23 template/Rakefile.tt
microgem-1.0.22 template/Rakefile.tt
microgem-1.0.21 template/Rakefile.tt
microgem-1.0.20 template/Rakefile.tt
microgem-1.0.19 template/Rakefile.tt
microgem-1.0.18 template/Rakefile.tt
microgem-1.0.17 template/Rakefile.tt
microgem-1.0.16 template/Rakefile.tt
microgem-1.0.15 template/Rakefile.tt
microgem-1.0.14 template/Rakefile.tt
microgem-1.0.13 template/Rakefile.tt
microgem-1.0.12 template/Rakefile.tt
microgem-1.0.11 template/Rakefile.tt