Skip to content
This repository has been archived by the owner on Jan 20, 2019. It is now read-only.

Commit

Permalink
Updated to use new version of the 'newgem' generator. Updated email a…
Browse files Browse the repository at this point in the history
…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
Show file tree
Hide file tree
Showing 42 changed files with 478 additions and 405 deletions.
6 changes: 5 additions & 1 deletion amazon-ec2/History.txt
@@ -1,3 +1,8 @@
=== 0.2.5 2007-09-26
* Updated using Dr. Nic's newgem v. 0.13.5
* Updated email address.
* No functional changes in the gem.

=== 0.2.4 2007-07-09
* Changed how require statement for xmlsimple is called so we don't get warnings when running in rails.
Now it looks like: require 'xmlsimple' unless defined? XmlSimple
Expand Down Expand Up @@ -201,4 +206,3 @@
Amazon Web Services as example code. No changes or enhancements to that code were made other than
packaging it as a Ruby Gem.
* RubyForge project created. http://amazon-ec2.rubyforge.org

133 changes: 66 additions & 67 deletions amazon-ec2/License.txt
@@ -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.
27 changes: 18 additions & 9 deletions amazon-ec2/Manifest.txt
@@ -1,24 +1,31 @@
History.txt
bin/ec2sh
License.txt
Manifest.txt
README.txt
Rakefile
bin/ec2-gem-example.rb
bin/ec2sh
bin/setup.rb
config/hoe.rb
config/requirements.rb
lib/EC2.rb
lib/EC2/console.rb
lib/EC2/exceptions.rb
lib/EC2/version.rb
lib/EC2/responses.rb
lib/EC2/image_attributes.rb
lib/EC2/images.rb
lib/EC2/instances.rb
lib/EC2/keypairs.rb
lib/EC2/products.rb
lib/EC2/image_attributes.rb
lib/EC2/responses.rb
lib/EC2/security_groups.rb
License.txt
Manifest.txt
Rakefile
README.txt
scripts/txt2html
lib/EC2/version.rb
script/destroy
script/generate
script/txt2html
setup.rb
tasks/deployment.rake
tasks/environment.rake
tasks/website.rake
test/test_EC2.rb
test/test_EC2_console.rb
test/test_EC2_image_attributes.rb
Expand All @@ -30,6 +37,8 @@ test/test_EC2_responses.rb
test/test_EC2_security_groups.rb
test/test_EC2_version.rb
test/test_helper.rb
website/announce.html
website/announce.txt
website/index.html
website/index.txt
website/javascripts/rounded_corners_lite.inc.js
Expand Down
146 changes: 4 additions & 142 deletions amazon-ec2/Rakefile
@@ -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 }
2 changes: 1 addition & 1 deletion amazon-ec2/bin/ec2-gem-example.rb
Expand Up @@ -3,7 +3,7 @@
# Amazon Web Services EC2 Query API Ruby library
#
# Ruby Gem Name:: amazon-ec2
# Author:: Glenn Rempe (mailto:glenn@elasticworkbench.com)
# Author:: Glenn Rempe (mailto:grempe@rubyforge.org)
# Copyright:: Copyright (c) 2007 Glenn Rempe
# License:: Distributes under the same terms as Ruby
# Home:: http://amazon-ec2.rubyforge.org
Expand Down
2 changes: 1 addition & 1 deletion amazon-ec2/bin/ec2sh
Expand Up @@ -3,7 +3,7 @@
# Amazon Web Services EC2 Query API Ruby library
#
# Ruby Gem Name:: amazon-ec2
# Author:: Glenn Rempe (mailto:glenn@elasticworkbench.com)
# Author:: Glenn Rempe (mailto:grempe@rubyforge.org)
# Copyright:: Copyright (c) 2007 Glenn Rempe
# License:: Distributes under the same terms as Ruby
# Home:: http://amazon-ec2.rubyforge.org
Expand Down
2 changes: 1 addition & 1 deletion amazon-ec2/bin/setup.rb
Expand Up @@ -3,7 +3,7 @@
# Amazon Web Services EC2 Query API Ruby library
#
# Ruby Gem Name:: amazon-ec2
# Author:: Glenn Rempe (mailto:glenn@elasticworkbench.com)
# Author:: Glenn Rempe (mailto:grempe@rubyforge.org)
# Copyright:: Copyright (c) 2007 Glenn Rempe
# License:: Distributes under the same terms as Ruby
# Home:: http://amazon-ec2.rubyforge.org
Expand Down

0 comments on commit 83c2e7f

Please sign in to comment.