Permalink
Browse files

MAJOR cleanup of RubyForge cruft all made possible by GitHub gem host…

…ing.

It's amazing how much crap was in the gem just to support deployment of
the gem on RubyForge.  Now it feels...  lighter.
  • Loading branch information...
1 parent dc68752 commit 5b3a2c0ac915a75ed147c52d49c9e80f17cad295 @grempe committed Apr 26, 2008
View
@@ -0,0 +1,2 @@
+pkg/*
+
@@ -1,3 +1,7 @@
+=== 0.2.11 2008-04-25
+ * Moved gem completely to GitHub.
+ * Removed a LOT of RubyForge related cruft that's no longer needed.
+
=== 0.2.10 2008-04-13
* Fix bug where ec2#disassociate_address would return 'undefined method 'reject!' for "xxx.xxx.xxx.xxx":String'.
Thanks to Brian Thomas for reporting.
View
File renamed without changes.
View
@@ -1,46 +0,0 @@
-History.txt
-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/elastic_ips.rb
-lib/EC2/exceptions.rb
-lib/EC2/image_attributes.rb
-lib/EC2/images.rb
-lib/EC2/instances.rb
-lib/EC2/keypairs.rb
-lib/EC2/products.rb
-lib/EC2/responses.rb
-lib/EC2/security_groups.rb
-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_elastic_ips.rb
-test/test_EC2_image_attributes.rb
-test/test_EC2_images.rb
-test/test_EC2_instances.rb
-test/test_EC2_keypairs.rb
-test/test_EC2_products.rb
-test/test_EC2_responses.rb
-test/test_EC2_security_groups.rb
-test/test_EC2_version.rb
-test/test_helper.rb
-website/index.html
-website/index.txt
-website/javascripts/rounded_corners_lite.inc.js
-website/stylesheets/screen.css
-website/template.rhtml
View
@@ -29,8 +29,6 @@ The following gems should be installed automatically as part of your install of
Mocha (optional for testing)
Rcov (optional for testing)
Test-Spec (optional for testing)
- Syntax (optional for building your own copy of the gem and its docs)
- RedCloth (optional for building your own copy of the gem and its docs)
=== Install the amazon-ec2 gem
View
@@ -1,4 +1,30 @@
-require 'config/requirements'
-require 'config/hoe' # setup Hoe + all gem configuration
-
-Dir['tasks/**/*.rake'].each { |rake| load rake }
+require 'rubygems'
+require 'rake/gempackagetask'
+require 'rake/testtask'
+require 'rake/rdoctask'
+
+# read the contents of the gemspec, eval it, and assign it to 'spec'
+# this lets us maintain all gemspec info in one place. Nice and DRY.
+spec = eval(IO.read("amazon-ec2.gemspec"))
+
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.gem_spec = spec
+end
+
+task :install => [:package] do
+ sh %{sudo gem install pkg/#{GEM}-#{VERSION}}
+end
+
+Rake::TestTask.new do |t|
+ t.libs << "test"
+ t.test_files = FileList['test/test*.rb']
+ t.verbose = true
+end
+
+Rake::RDocTask.new do |rd|
+ rd.main = "README.rdoc"
+ rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
+ rd.rdoc_dir = 'doc'
+ rd.options = spec.rdoc_options
+end
+
View
@@ -1,25 +1,35 @@
-Gem::Specification.new do |s|
- s.name = %q{amazon-ec2}
- s.version = "0.2.10"
- s.summary = %q{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.}
- s.email = %q{glenn.rempe@gmail.com}
- s.homepage = %q{http://github.com/grempe/amazon-ec2/}
- s.description = %q{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.}
- s.has_rdoc = true
- s.authors = ["Glenn Rempe"]
- s.files = ["History.txt", "License.txt", "Manifest.txt", "README.rdoc", "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/elastic_ips.rb", "lib/EC2/exceptions.rb", "lib/EC2/image_attributes.rb", "lib/EC2/images.rb", "lib/EC2/instances.rb", "lib/EC2/keypairs.rb", "lib/EC2/products.rb", "lib/EC2/responses.rb", "lib/EC2/security_groups.rb", "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_elastic_ips.rb", "test/test_EC2_image_attributes.rb", "test/test_EC2_images.rb", "test/test_EC2_instances.rb", "test/test_EC2_keypairs.rb", "test/test_EC2_products.rb", "test/test_EC2_responses.rb", "test/test_EC2_security_groups.rb", "test/test_EC2_version.rb", "test/test_helper.rb", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.rhtml"]
- s.test_files = ["test/test_EC2.rb", "test/test_EC2_console.rb", "test/test_EC2_elastic_ips.rb", "test/test_EC2_image_attributes.rb", "test/test_EC2_images.rb", "test/test_EC2_instances.rb", "test/test_EC2_keypairs.rb", "test/test_EC2_products.rb", "test/test_EC2_responses.rb", "test/test_EC2_security_groups.rb", "test/test_EC2_version.rb", "test/test_helper.rb"]
- s.rdoc_options = ["--quiet", "--title", "amazon-ec2 documentation", "--opname", "index.html", "--line-numbers", "--main", "README.txt", "--inline-source"]
- s.extra_rdoc_files = ["README.rdoc", "History.txt", "License.txt"]
+GEM = "amazon-ec2"
+VER = "0.2.11"
+AUTHOR = "Glenn Rempe"
+EMAIL = "glenn.rempe@gmail.com"
+HOMEPAGE = "http://github.com/grempe/amazon-ec2/"
+SUMMARY = "An interface library that allows Ruby applications to easily connect to the HTTP 'Query API' for the Amazon Web Services Elastic Compute Cloud (EC2) and manipulate cloud servers."
- s.add_dependency(%q<xml-simple>, [">= 1.0.11"])
- s.add_dependency(%q<mocha>, [">= 0.4.0"])
- s.add_dependency(%q<test-spec>, [">= 0.3.0"])
- s.add_dependency(%q<rcov>, [">= 0.8.0.2"])
- s.add_dependency(%q<syntax>, [">= 1.0.0"])
- s.add_dependency(%q<RedCloth>, [">= 3.0.4"])
+Gem::Specification.new do |s|
+ s.name = GEM
+ s.version = VER
+ s.author = AUTHOR
+ s.email = EMAIL
+ s.homepage = HOMEPAGE
+ s.summary = SUMMARY
+ s.description = s.summary
- s.autorequire = %q{EC2}
+ s.require_path = 'lib'
+ s.autorequire = 'EC2'
s.executables = ["ec2-gem-example.rb", "ec2sh", "setup.rb"]
- s.require_paths = ["lib"]
+
+ # get this easily and accurately by running 'Dir.glob("{lib,test}/**/*")'
+ # in an IRB session. However, GitHub won't allow that command hence
+ # we spell it out.
+ s.files = ["README.rdoc", "LICENSE", "CHANGELOG", "Rakefile", "lib/EC2", "lib/EC2/console.rb", "lib/EC2/elastic_ips.rb", "lib/EC2/exceptions.rb", "lib/EC2/image_attributes.rb", "lib/EC2/images.rb", "lib/EC2/instances.rb", "lib/EC2/keypairs.rb", "lib/EC2/products.rb", "lib/EC2/responses.rb", "lib/EC2/security_groups.rb", "lib/EC2.rb", "test/test_EC2.rb", "test/test_EC2_console.rb", "test/test_EC2_elastic_ips.rb", "test/test_EC2_image_attributes.rb", "test/test_EC2_images.rb", "test/test_EC2_instances.rb", "test/test_EC2_keypairs.rb", "test/test_EC2_products.rb", "test/test_EC2_responses.rb", "test/test_EC2_security_groups.rb", "test/test_helper.rb"]
+ s.test_files = ["test/test_EC2.rb", "test/test_EC2_console.rb", "test/test_EC2_elastic_ips.rb", "test/test_EC2_image_attributes.rb", "test/test_EC2_images.rb", "test/test_EC2_instances.rb", "test/test_EC2_keypairs.rb", "test/test_EC2_products.rb", "test/test_EC2_responses.rb", "test/test_EC2_security_groups.rb", "test/test_helper.rb"]
+
+ s.has_rdoc = true
+ s.rdoc_options = ["--quiet", "--title", "amazon-ec2 documentation", "--opname", "index.html", "--line-numbers", "--main", "README.rdoc", "--inline-source"]
+ s.extra_rdoc_files = ["README.rdoc", "CHANGELOG", "LICENSE"]
+
+ s.add_dependency 'xml-simple'
+ s.add_dependency 'mocha'
+ s.add_dependency 'test-spec'
+ s.add_dependency 'rcov'
end
View
@@ -31,9 +31,6 @@
ec2 = EC2::Base.new( :access_key_id => ACCESS_KEY_ID, :secret_access_key => SECRET_ACCESS_KEY )
-puts "----- GEM Version -----"
-puts EC2::VERSION::STRING
-
puts "----- ec2.methods.sort -----"
p ec2.methods.sort
View
@@ -1,76 +0,0 @@
-require 'EC2/version'
-
-AUTHOR = 'Glenn Rempe' # can also be an array of Authors
-EMAIL = "grempe@rubyforge.org"
-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
-RUBYFORGE_PROJECT = 'amazon-ec2' # The unix name for your project
-HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
-DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
-
-@config_file = "~/.rubyforge/user-config.yml"
-@config = nil
-RUBYFORGE_USERNAME = "grempe"
-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.replace @config["username"]
-end
-
-
-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}" : "")
-RDOC_OPTS = ['--quiet', '--title', 'amazon-ec2 documentation',
- "--opname", "index.html",
- "--line-numbers",
- "--main", "README.rdoc",
- "--inline-source"]
-
-class Hoe
- def extra_deps
- @extra_deps.reject! { |x| Array(x).first == 'hoe' }
- @extra_deps
- 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.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 |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
-
- # == Optional
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\\n\\n")
- #p.extra_deps = [] # 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']]
-
- #p.spec_extras = {} # A hash of extra values to set in the gemspec.
- p.spec_extras = {
- :extra_rdoc_files => ["README.rdoc", "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')
View
@@ -1,17 +0,0 @@
-require 'fileutils'
-include FileUtils
-
-require 'rubygems'
-%w[rake hoe newgem rubigen].each do |req_gem|
- begin
- require req_gem
- rescue LoadError
- puts "This Rakefile requires the '#{req_gem}' RubyGem."
- puts "Installation: gem install #{req_gem} -y"
- exit
- end
-end
-
-$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
-
-require 'EC2'
View
@@ -24,13 +24,6 @@ module EC2
# This is the version of the API as defined by Amazon Web Services
API_VERSION = '2008-02-01'
- # This release version is passed in with each request as part
- # of the HTTP 'User-Agent' header. Set this be the same value
- # as what is stored in the lib/EC2/version.rb module constant instead.
- # This way we keep it nice and DRY and only have to define the
- # version number in a single place.
- RELEASE_VERSION = EC2::VERSION::STRING
-
# Builds the canonical string for signing. This strips out all '&', '?', and '='
# from the query string to be signed.
# Note: The parameters in the path passed in must already be sorted in
@@ -174,7 +167,7 @@ def make_request(action, params, data='')
req = Net::HTTP::Post.new("/")
req.content_type = 'application/x-www-form-urlencoded'
- req['User-Agent'] = "rubyforge-amazon-ec2-ruby-gem-query-api v-#{RELEASE_VERSION}"
+ req['User-Agent'] = "github-amazon-ec2-ruby-gem"
response = @http.request(req, query)
View
@@ -1,18 +0,0 @@
-#--
-# Amazon Web Services EC2 Query API Ruby library
-#
-# Ruby Gem Name:: amazon-ec2
-# Author:: Glenn Rempe (mailto:grempe@rubyforge.org)
-# Copyright:: Copyright (c) 2007-2008 Glenn Rempe
-# License:: Distributes under the same terms as Ruby
-# Home:: http://amazon-ec2.rubyforge.org
-#++
-
-module EC2 #:nodoc:
- module VERSION #:nodoc:
- MAJOR = 0
- MINOR = 2
- TINY = 10
- STRING = [MAJOR, MINOR, TINY].join('.')
- end
-end
View
@@ -1 +0,0 @@
-*.log
View
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-APP_ROOT = File.join(File.dirname(__FILE__), '..')
-
-begin
- require 'rubigen'
-rescue LoadError
- require 'rubygems'
- require 'rubigen'
-end
-require 'rubigen/scripts/destroy'
-
-ARGV.shift if ['--help', '-h'].include?(ARGV[0])
-RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme]
-RubiGen::Scripts::Destroy.new.run(ARGV)
View
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-APP_ROOT = File.join(File.dirname(__FILE__), '..')
-
-begin
- require 'rubigen'
-rescue LoadError
- require 'rubygems'
- require 'rubigen'
-end
-require 'rubigen/scripts/generate'
-
-ARGV.shift if ['--help', '-h'].include?(ARGV[0])
-RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme]
-RubiGen::Scripts::Generate.new.run(ARGV)
Oops, something went wrong.

0 comments on commit 5b3a2c0

Please sign in to comment.