Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

making tools into a rubygem, and pushed initial gem to rubygems (stil…

…l need to fix install process)
  • Loading branch information...
commit eaaa9b574f4eab6594f5becf0008288af1fd17d9 1 parent 4150f47
@shatterednirvana shatterednirvana authored
Showing with 59 additions and 7 deletions.
  1. +59 −7 Rakefile
  2. BIN  pkg/appscale-tools-1.6.0.gem
View
66 Rakefile
@@ -1,15 +1,67 @@
-# install pre-reqs with
-# gem install flexmock
+require 'rubygems'
+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|
test.libs << "test"
test.test_files = Dir[ "test/tc*.rb" ]
test.verbose = true
end
+
+# 'rake' should run all tests
+task :default => [:test]
View
BIN  pkg/appscale-tools-1.6.0.gem
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.