Skip to content

Commit

Permalink
making tools into a rubygem, and pushed initial gem to rubygems (stil…
Browse files Browse the repository at this point in the history
…l need to fix install process)
  • Loading branch information
shatterednirvana committed Sep 22, 2012
1 parent 4150f47 commit eaaa9b5
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 7 deletions.
66 changes: 59 additions & 7 deletions Rakefile
Original file line number Original file line Diff line number Diff line change
@@ -1,15 +1,67 @@
# install pre-reqs with require 'rubygems'
# gem install flexmock require 'rake'
require 'rake/gempackagetask'
require 'rake/testtask'


require "rubygems"
require "rake"
require "rake/testtask"
require "flexmock"


task :default => [:test] # TODO(cgb): This probably should be moved into a Gemfile and out of this file.
# I'm just not sure how to do this right now.
spec = Gem::Specification.new do |s|
s.name = 'appscale-tools'
s.version = '1.6.0'

s.summary = "A toolkit for running the AppScale cloud platform"
s.description = <<-EOF
AppScale is a cloud platform that automatically configures and deploys
applications over cloud infrastructures (Amazon EC2, Microsoft Azure),
as well as cloud platforms (Google App Engine). It runs Google App
Engine applications as well as arbitrary programs via the Neptune
domain specific language.
EOF

s.author = "Chris Bunch"
s.email = "appscale_community@googlegroups.com"
s.homepage = "http://appscale.cs.ucsb.edu"

# Anything in bin is an executable - strip off the preceding bin/
# and take just the remainder
executables_with_bin = Dir.glob("{bin}/**/*")
executables = executables_with_bin.map { |e|
e.match(/\/(.*)/)[1]
}
s.executables = executables


s.platform = Gem::Platform::RUBY

candidates = Dir.glob("{bin,doc,lib,test,samples}/**/*")
s.files = candidates.delete_if do |item|
item.include?(".git") || item.include?("rdoc")
end
s.require_path = "lib"
s.autorequire = "appscale_tools"

s.has_rdoc = true
s.extra_rdoc_files = ["README", "LICENSE"]

# We test via flexmock and run tests via rake, so make sure those are
# installed.
s.add_development_dependency('flexmock')
s.add_development_dependency('rake')
end


# responds to 'rake gem'
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_tar = true
end


# responds to 'rake test'
Rake::TestTask.new do |test| Rake::TestTask.new do |test|
test.libs << "test" test.libs << "test"
test.test_files = Dir[ "test/tc*.rb" ] test.test_files = Dir[ "test/tc*.rb" ]
test.verbose = true test.verbose = true
end end

# 'rake' should run all tests
task :default => [:test]
Binary file added pkg/appscale-tools-1.6.0.gem
Binary file not shown.

0 comments on commit eaaa9b5

Please sign in to comment.