Sha256: a150f392fea8add773bef4407cef09d53c1316aeb7c0acb5f02638ab0d00408c

Contents?: true

Size: 1.31 KB

Versions: 15

Compression:

Stored size: 1.31 KB

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 all specs


desc "#{gemspec.name} | Test"
task :test do
  sh "rspec spec"
end
task :default => :test

# # #
# Update index table

namespace :update do
  desc "#{gemspec.name} | Update index"
  task :index do
    require File.dirname(__FILE__) + '/lib/unicode/display_width/index_builder'
    Unicode::DisplayWidth::IndexBuilder.build!
  end
end

# # #
# Update data file

namespace :update do
  desc "#{gemspec.name} | Update unicode data"
  task :data do
    require File.dirname(__FILE__) + '/lib/unicode/display_width/index_builder'
    Unicode::DisplayWidth::IndexBuilder.fetch!
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
brakeman-3.6.1 bundle/ruby/2.3.0/gems/unicode-display_width-1.1.3/Rakefile
brakeman-3.6.0 bundle/ruby/2.3.0/gems/unicode-display_width-1.1.3/Rakefile
brakeman-3.5.0 bundle/ruby/2.3.0/gems/unicode-display_width-1.1.3/Rakefile
unicode-display_width-1.1.3 Rakefile
unicode-display_width-1.1.2 Rakefile
brakeman-3.4.1 bundle/ruby/2.3.0/gems/unicode-display_width-1.1.1/Rakefile
brakeman-3.4.0 bundle/ruby/2.3.0/gems/unicode-display_width-1.1.1/Rakefile
unicode-display_width-1.1.1 Rakefile
unicode-display_width-1.1.0 Rakefile
unicode-display_width-1.0.5 Rakefile
unicode-display_width-1.0.4 Rakefile
unicode-display_width-1.0.3 Rakefile
unicode-display_width-1.0.2 Rakefile
unicode-display_width-1.0.1 Rakefile
unicode-display_width-1.0.0 Rakefile