Sha256: 60d26ef03e7c8247e6d8343f56269159b3291d06d804b64e4c0d95fc6a1b822f

Contents?: true

Size: 1.84 KB

Versions: 3

Compression:

Stored size: 1.84 KB

Contents

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

require 'net/http'

Dir[File.join(File.dirname(__FILE__), 'lib', 'tasks', '*.rake')].each do |ext|
  load ext
end

# Helper for retrieving HTML files. Only used to check or trigger things so
# no highclass implementation...

def fetch(uri, limit = 10)
  raise ArgumentError, 'HTTP redirect too deep' if limit == 0

  response = Net::HTTP.get_response(URI.parse(uri))

  case response
  when Net::HTTPSuccess then
    return response
  when Net::HTTPRedirection then
    return fetch(response['location'], limit - 1)
  else
    return response.error!
  end
end

desc 'Display some help and the README'
task :help do
  puts 'Call "rake --tasks" to learn what tasks are available...'
  puts
  puts File.read('README')
end

task :default => [:help]

namespace :appengine do
  desc 'Start a local test server on port 8000'
  task :run do
    puts 'Start a local test server on port 8000'
    `(dev_appserver.rb .) 1>&2`
  end

  desc 'Force rebuilding "WEB-INF/lib/gems.jar"'
  task :rebuildgems do
    puts 'Force rebuilding "WEB-INF/lib/gems.jar"'
    `(appcfg.rb gem help install) 2> /dev/null 1>&2`
  end

  desc 'Build the application package'
  task :bundle do
    puts 'Build the application package.'
    `(appcfg.rb --email={{email}} --enable_jar_splitting bundle .) 1>&2`
  end

  desc 'Upload the application code to the server'
  task :update do
    puts 'Upload the new application code (this may take a while).'
    `(appcfg.rb --email={{email}} --enable_jar_splitting update .) 1>&2`
  end

  desc 'Roll back a blocked and halfway broken deploy'
  task :rollback do
    puts 'Roll back a blocked and halfway broken deploy.'
    `(appcfg.rb --email={{email}} rollback .) 1>&2`
  end

  desc 'Deploy the application (build package and upload application code)'
  task :deploy => [:rebuildgems, :bundle, :update]
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ulbrich-jruby-enginize-0.7.0 templates/shared/Rakefile
ulbrich-jruby-enginize-0.7.1 templates/shared/Rakefile
ulbrich-jruby-enginize-0.7.2 templates/shared/Rakefile