Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d6bebb0256
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 32 lines (25 sloc) 0.841 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
require 'rake'

gem_name = 'use_tinymce'

# snarf gemspec and set version
gem_spec = eval File.new("#{gem_name}.gemspec").read
gem_version = gem_spec.version.to_s
tinymce_version = Dir.new('./assets/').map { |x| $1 if x =~ /tinymce_(.*).zip/ }.select {|x| x }.max
gem_zip = "#{gem_name}_#{gem_version}.zip"
gem_tgz = "#{gem_name}_#{gem_version}.tgz"

task :default => :test

desc "Run use_tinymce unit tests"
task :test do
  require "./test/test_#{gem_name}_base"
end

desc "build gem"
task :gem do
  system "gem build #{gem_name}.gemspec"
  if 'mike.local' == IO.popen('hostname').read.chomp
    system "cp #{gem_name}-#{gem_version}.gem ~/Rails/GemCache/gems/"
    system "(cd ~/Rails/GemCache ; gem generate_index -d . )"
  end
end

desc "push to rubygems"
task :gem_push => :gem do
  system "gem push #{gem_name}-#{gem_version}.gem"
end
Something went wrong with that request. Please try again.