This repository has been archived by the owner on Jan 20, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to use new version of the 'newgem' generator. Updated email a…
…ddress. Signed-off-by: Glenn Rempe <glenn@rempe.us> git-svn-id: svn+ssh://rubyforge.org/var/svn/amazon-ec2/trunk@101 2e111c3a-5438-44ef-9c14-21a960333853
- Loading branch information
grempe
committed
Sep 27, 2007
1 parent
7ce6c4e
commit 83c2e7f
Showing
42 changed files
with
478 additions
and
405 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
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,66 @@ | ||
Copyright (c) 2007 Glenn Rempe | ||
|
||
This software is distributed under the Ruby License. A copy of which is | ||
provided below. | ||
|
||
RUBY LICENSE | ||
|
||
http://www.ruby-lang.org/en/LICENSE.txt | ||
|
||
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.co.jp>. | ||
You can redistribute it and/or modify it under either the terms of the GPL | ||
(see COPYING.txt file), or the conditions below: | ||
|
||
1. You may make and give away verbatim copies of the source form of the | ||
software without restriction, provided that you duplicate all of the | ||
original copyright notices and associated disclaimers. | ||
|
||
2. You may modify your copy of the software in any way, provided that | ||
you do at least ONE of the following: | ||
|
||
a) place your modifications in the Public Domain or otherwise | ||
make them Freely Available, such as by posting said | ||
modifications to Usenet or an equivalent medium, or by allowing | ||
the author to include your modifications in the software. | ||
|
||
b) use the modified software only within your corporation or | ||
organization. | ||
|
||
c) rename any non-standard executables so the names do not conflict | ||
with standard executables, which must also be provided. | ||
|
||
d) make other distribution arrangements with the author. | ||
|
||
3. You may distribute the software in object code or executable | ||
form, provided that you do at least ONE of the following: | ||
|
||
a) distribute the executables and library files of the software, | ||
together with instructions (in the manual page or equivalent) | ||
on where to get the original distribution. | ||
|
||
b) accompany the distribution with the machine-readable source of | ||
the software. | ||
|
||
c) give non-standard executables non-standard names, with | ||
instructions on where to get the original software distribution. | ||
|
||
d) make other distribution arrangements with the author. | ||
|
||
4. You may modify and include the part of the software into any other | ||
software (possibly commercial). But some files in the distribution | ||
are not written by the author, so that they are not under this terms. | ||
|
||
They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some | ||
files under the ./missing directory. See each file for the copying | ||
condition. | ||
|
||
5. The scripts and library files supplied as input to or produced as | ||
output from the software do not automatically fall under the | ||
copyright of the software, but belong to whomever generated them, | ||
and may be sold commercially, and may be aggregated with this | ||
software. | ||
|
||
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR | ||
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
PURPOSE. | ||
|
||
Copyright (c) 2007 Glenn Rempe | ||
|
||
This software is distributed under the Ruby License. A copy of which is | ||
provided below. | ||
|
||
RUBY LICENSE | ||
|
||
http://www.ruby-lang.org/en/LICENSE.txt | ||
|
||
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.co.jp>. | ||
You can redistribute it and/or modify it under either the terms of the GPL | ||
(see COPYING.txt file), or the conditions below: | ||
|
||
1. You may make and give away verbatim copies of the source form of the | ||
software without restriction, provided that you duplicate all of the | ||
original copyright notices and associated disclaimers. | ||
|
||
2. You may modify your copy of the software in any way, provided that | ||
you do at least ONE of the following: | ||
|
||
a) place your modifications in the Public Domain or otherwise | ||
make them Freely Available, such as by posting said | ||
modifications to Usenet or an equivalent medium, or by allowing | ||
the author to include your modifications in the software. | ||
|
||
b) use the modified software only within your corporation or | ||
organization. | ||
|
||
c) rename any non-standard executables so the names do not conflict | ||
with standard executables, which must also be provided. | ||
|
||
d) make other distribution arrangements with the author. | ||
|
||
3. You may distribute the software in object code or executable | ||
form, provided that you do at least ONE of the following: | ||
|
||
a) distribute the executables and library files of the software, | ||
together with instructions (in the manual page or equivalent) | ||
on where to get the original distribution. | ||
|
||
b) accompany the distribution with the machine-readable source of | ||
the software. | ||
|
||
c) give non-standard executables non-standard names, with | ||
instructions on where to get the original software distribution. | ||
|
||
d) make other distribution arrangements with the author. | ||
|
||
4. You may modify and include the part of the software into any other | ||
software (possibly commercial). But some files in the distribution | ||
are not written by the author, so that they are not under this terms. | ||
|
||
They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some | ||
files under the ./missing directory. See each file for the copying | ||
condition. | ||
|
||
5. The scripts and library files supplied as input to or produced as | ||
output from the software do not automatically fall under the | ||
copyright of the software, but belong to whomever generated them, | ||
and may be sold commercially, and may be aggregated with this | ||
software. | ||
|
||
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR | ||
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
PURPOSE. |
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
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,142 +1,4 @@ | ||
require 'rubygems' | ||
require 'rake' | ||
require 'rake/clean' | ||
require 'rake/testtask' | ||
require 'rake/packagetask' | ||
require 'rake/gempackagetask' | ||
require 'rake/rdoctask' | ||
require 'rake/contrib/rubyforgepublisher' | ||
require 'fileutils' | ||
require 'hoe' | ||
|
||
include FileUtils | ||
require File.join(File.dirname(__FILE__), 'lib', 'EC2', 'version') | ||
|
||
AUTHOR = ["Glenn Rempe"] # can also be an array of Authors | ||
EMAIL = "glenn@elasticworkbench.com" | ||
DESCRIPTION = "An interface library that allows Ruby or Ruby on Rails applications to easily connect to the HTTP 'Query API' for the Amazon Web Services Elastic Compute Cloud (EC2) and manipulate server instances." | ||
GEM_NAME = "amazon-ec2" # what ppl will type to install your gem | ||
|
||
@config_file = "~/.rubyforge/user-config.yml" | ||
@config = nil | ||
def rubyforge_username | ||
unless @config | ||
begin | ||
@config = YAML.load(File.read(File.expand_path(@config_file))) | ||
rescue | ||
puts <<-EOS | ||
ERROR: No rubyforge config file found: #{@config_file}" | ||
Run 'rubyforge setup' to prepare your env for access to Rubyforge | ||
- See http://newgem.rubyforge.org/rubyforge.html for more details | ||
EOS | ||
exit | ||
end | ||
end | ||
@rubyforge_username ||= @config["username"] | ||
end | ||
|
||
RUBYFORGE_PROJECT = 'amazon-ec2' # The unix name for your project | ||
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org" | ||
DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}" | ||
RELEASE_TYPES = %w( gem ) # can use: gem, tar, zip | ||
|
||
NAME = "amazon-ec2" | ||
REV = nil | ||
# UNCOMMENT IF REQUIRED: | ||
# REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil | ||
VERS = EC2::VERSION::STRING + (REV ? ".#{REV}" : "") | ||
CLEAN.include ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] | ||
RDOC_OPTS = ['--quiet', '--title', 'Amazon EC2 documentation', | ||
"--opname", "index.html", | ||
"--line-numbers", | ||
"--main", "README.txt", | ||
"--inline-source"] | ||
|
||
class Hoe | ||
def extra_deps | ||
@extra_deps.reject { |x| Array(x).first == 'hoe' } | ||
end | ||
end | ||
|
||
# Generate all the Rake tasks | ||
# Run 'rake -T' to see list of generated tasks (from gem root directory) | ||
hoe = Hoe.new(GEM_NAME, VERS) do |p| | ||
p.name = NAME | ||
p.version = VERS | ||
p.author = AUTHOR | ||
p.description = DESCRIPTION | ||
p.email = EMAIL | ||
p.summary = DESCRIPTION | ||
p.url = HOMEPATH | ||
p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT | ||
p.test_globs = ["test/**/test_*.rb"] | ||
p.clean_globs = CLEAN #An array of file patterns to delete on clean. | ||
|
||
# == Optional | ||
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n") | ||
|
||
# An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ] | ||
p.extra_deps = [['xml-simple', '>= 1.0.11'], ['mocha', '>= 0.4.0'], ['test-spec', '>= 0.3.0'], ['rcov', '>= 0.8.0.2'], ['syntax', '>= 1.0.0'], ['RedCloth', '>= 3.0.4']] | ||
|
||
# A hash of extra values to set in the gemspec. | ||
p.spec_extras = { | ||
:extra_rdoc_files => ["README.txt", "History.txt", "License.txt"], | ||
:rdoc_options => RDOC_OPTS, | ||
:autorequire => "EC2" | ||
} | ||
|
||
end | ||
|
||
CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\n\n") | ||
PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}" | ||
hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc') | ||
|
||
desc 'Generate website files' | ||
task :website_generate do | ||
Dir['website/**/*.txt'].each do |txt| | ||
sh %{ ruby scripts/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} } | ||
end | ||
end | ||
|
||
desc 'Upload website files to rubyforge' | ||
task :website_upload do | ||
host = "#{rubyforge_username}@rubyforge.org" | ||
remote_dir = "/var/www/gforge-projects/#{PATH}/" | ||
local_dir = 'website' | ||
sh %{rsync -av #{local_dir}/ #{host}:#{remote_dir}} | ||
end | ||
|
||
desc 'Generate and upload website files' | ||
task :website => [:website_generate, :website_upload] | ||
|
||
desc 'Run all types of tests that we have defined' | ||
task :test_all => [:test, :test_deps, :test_coverage] | ||
|
||
desc 'Release the website and new gem version' | ||
task :deploy => [:check_version, :website, :release] do | ||
puts "Remember to create SVN tag:" | ||
puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " + | ||
"svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} " | ||
puts "Suggested comment:" | ||
puts "Tagging release #{CHANGES}" | ||
end | ||
|
||
desc 'Runs tasks website_generate and install_gem as a local deployment of the gem' | ||
task :local_deploy => [:website_generate, :install_gem] | ||
|
||
task :check_version do | ||
unless ENV['VERSION'] | ||
puts 'Must pass a VERSION=x.y.z release version' | ||
exit | ||
end | ||
unless ENV['VERSION'] == VERS | ||
puts "Please update your version.rb to match the release version, currently #{VERS}" | ||
exit | ||
end | ||
end | ||
|
||
desc 'Runs RCOV and generates test coverage reports which are stored in coverage/ dir' | ||
task :test_coverage do | ||
sh %{rcov -T test/*.rb} | ||
end | ||
|
||
require 'config/requirements' | ||
require 'config/hoe' # setup Hoe + all gem configuration | ||
|
||
Dir['tasks/**/*.rake'].each { |rake| load rake } |
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
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
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
Oops, something went wrong.