Sha256: 1ce991d110f86d77a1be1a42ae90701354645935799450e0822a39490df0ee59

Contents?: true

Size: 995 Bytes

Versions: 16

Compression:

Stored size: 995 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 '-','/'}/kernel_method"
end

# # #
# Run specs

desc "#{gemspec.name} | Spec"
task :spec do
  if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
    sh "for %f in (spec/\*.rb) do ruby spec/%f"
  else
    sh "for file in spec/*.rb; do ruby $file; done"
  end
end
task default: :spec

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
unibits-2.13.1 Rakefile
uniscribe-1.11.1 Rakefile
uniscribe-1.11.0 Rakefile
uniscribe-1.10.0 Rakefile
unibits-2.13.0 Rakefile
unicopy-1.0.3 Rakefile
unicopy-1.0.2 Rakefile
unibits-2.12.0 Rakefile
uniscribe-1.9.0 Rakefile
unibits-2.11.0 Rakefile
uniscribe-1.8.0 Rakefile
uniscribe-1.7.0 Rakefile
unibits-2.10.0 Rakefile
unicopy-1.0.1 Rakefile
uniscribe-1.6.0 Rakefile
unibits-2.9.0 Rakefile