-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
making tools into a rubygem, and pushed initial gem to rubygems (stil…
…l need to fix install process)
- Loading branch information
1 parent
4150f47
commit eaaa9b5
Showing
2 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.