Sha256: ce67699eef932ee6697ed17f652ee28a7d3f0bd40af12e6abdae948dc7c47198

Contents?: true

Size: 1.33 KB

Versions: 35

Compression:

Stored size: 1.33 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 :spec => :test
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

35 entries across 32 versions & 6 rubygems

Version Path
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/Rakefile
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/Rakefile
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/Rakefile
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/Rakefile
dirwatch-0.0.9 vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/Rakefile
dirwatch-0.0.9 vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/Rakefile
dirwatch-0.0.8 vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/Rakefile
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/unicode-display_width-1.4.0/Rakefile
brakeman-4.3.1 bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/Rakefile
unicode-display_width-1.4.0 Rakefile
unicode-display_width-1.3.3 Rakefile
brakeman-4.3.0 bundle/ruby/2.5.0/gems/unicode-display_width-1.3.2/Rakefile
unicode-display_width-1.3.2 Rakefile
unicode-display_width-1.3.1 Rakefile
brakeman-4.2.1 bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/Rakefile
brakeman-4.2.0 bundle/ruby/2.3.0/gems/unicode-display_width-1.3.0/Rakefile
brakeman-4.1.1 bundle/ruby/2.3.0/gems/unicode-display_width-1.3.0/Rakefile
brakeman-4.1.0 bundle/ruby/2.3.0/gems/unicode-display_width-1.3.0/Rakefile
dirwatch-0.0.6 vendor/bundle/ruby/2.3.0/gems/unicode-display_width-1.3.0/Rakefile
dirwatch-0.0.5 vendor/bundle/ruby/2.3.0/gems/unicode-display_width-1.3.0/Rakefile