Sha256: f27d74e70da7b23e98722d31031cebe20b8be77825943da509724072ce72b1bb
Contents?: true
Size: 852 Bytes
Versions: 4
Compression:
Stored size: 852 Bytes
Contents
namespace :test do task :build_rails do require 'fileutils' def cmd(str, clean_env = true) puts "* #{str}" retval = if clean_env Bundler.with_clean_env { `#{str}` } else `#{str}` end puts retval.strip retval end rpush_root = Dir.pwd path = '/tmp/rails_test' cmd("rm -rf #{path}") FileUtils.mkdir_p(path) pwd = Dir.pwd cmd("bundle exec rails --version", false) cmd("bundle exec rails new #{path} --skip-bundle", false) begin Dir.chdir(path) cmd('echo "gem \'rake\'" >> Gemfile') cmd("echo \"gem 'rpush', :path => '#{rpush_root}'\" >> Gemfile") cmd('bundle install') cmd('bundle exec rails g rpush') cmd('bundle exec rake db:migrate') ensure Dir.chdir(pwd) end puts "Built into #{path}" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rpush-2.0.0.beta2 | lib/tasks/test.rake |
rpush-2.0.0.beta1 | lib/tasks/test.rake |
rpush-1.0.0-java | lib/tasks/test.rake |
rpush-1.0.0 | lib/tasks/test.rake |