Sha256: 6ddc08bb85f13d5f499cba1069c16d2b74928e3283d4bd8c0f0302a96df767d9

Contents?: true

Size: 1.04 KB

Versions: 11

Compression:

Stored size: 1.04 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 Specs

desc "#{gemspec.name} | Spec"
task :spec do
  ruby "spec/unicode_emoji_spec.rb"
end
task default: :spec

desc "#{gemspec.name} | Generates all regex constants and saves them to lib/unicode/emoji/{generated,generated_native} directories"
task :generate_constants do
  load "data/generate_constants.rb", true
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
unicode-emoji-3.7.0 Rakefile
unicode-emoji-3.6.0 Rakefile
unicode-emoji-3.5.0 Rakefile
unicode-emoji-3.4.0 Rakefile
unicode-emoji-3.3.2 Rakefile
unicode-emoji-3.3.1 Rakefile
unicode-emoji-3.3.0 Rakefile
unicode-emoji-3.2.0 Rakefile
unicode-emoji-3.1.1 Rakefile
unicode-emoji-3.1.0 Rakefile
unicode-emoji-3.0.0 Rakefile