From: "Ara.T.Howard" Date: 2005-06-24T00:00:48+09:00 Subject: Re: [ANN] traits-0.4.0 - the coffee release --uAKRQypu60I7Lcqm Content-Type: MULTIPART/Mixed; BOUNDARY=uAKRQypu60I7Lcqm This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --uAKRQypu60I7Lcqm Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; format=flowed Content-ID: Content-Disposition: INLINE On Thu, 23 Jun 2005, Jeremy Hinegardner wrote: > On Thu, Jun 23, 2005 at 09:00:36AM +0900, Jeremy Hinegardner wrote: >> On Thu, Jun 23, 2005 at 08:31:35AM +0900, Ara.T.Howard wrote: >>> On Thu, 23 Jun 2005, James Britt wrote: >>> >>>> Ara.T.Howard wrote: >>>>> >>>>> i wasn't drinking enough coffee while coding the 0.3.0 release. this is a >>>>> remedy release. >>>> >>>> Very very cool. >>>> >>>> Is there a gem for this? >>> >>> not yet. i'm having gem issues ;-) >>> >>> i keep codeforpeople.com in sync like like >>> >>> scp -r ruby/ codeforpeople.com/lib/ >>> >>> and all my ruby projects are updated. with rubyforge and gems i have to do >>> each one individually and this tends to take me a while to get to... how are >>> others dealing with this? >> >> Rakefile's are your friend. Check out: > > And I really mean it this time. See the attached Rakefile as an > example one for traits. I haven't yet tried recursive Rakefiles. > Executing 'rake publish' in your top level ruby directory and watching > it build gems and sync everything up, that could be nice. > > There is a rake task for publishing to rubyforge, but I haven't played > with it yet. > > > enjoy, > > -jeremy thanks - i'll play with it and get back to you - this is exactly what i need! -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | My religion is very simple. My religion is kindness. | --Tenzin Gyatso =============================================================================== --uAKRQypu60I7Lcqm Content-Type: TEXT/PLAIN; CHARSET=us-ascii Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME=Rakefile require 'rake' require 'rake/clean' require 'rake/contrib/sshpublisher' require 'rake/gempackagetask' PKG_VERSION = IO::read 'VERSION' PKG_VERSION.strip! PKG_NAME = "traits" PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" #----------------------------------------------------------------------- desc "Default Task" task :default => :package #----------------------------------------------------------------------- # cleanup #----------------------------------------------------------------------- CLOBBER.include( "pkg/**", "README" ) #----------------------------------------------------------------------- # generate README # # - maybe make a task lib out of the gen_readme.rb code ? # #----------------------------------------------------------------------- desc "Generate README" task :readme => [:clobber] do File.open('README','w') do |f| $stdout = f tmpl = IO::read 'gen_readme.rb' eval tmpl $stdout = STDOUT end end #----------------------------------------------------------------------- # Publish to website #----------------------------------------------------------------------- desc "Publish the gem on codeforpeople.com" PUBLISH_HOST = "codeforpeople.com" PUBLISH_ROOT = "/lib/ruby" task :publish => [:package] do `ssh #{PUBLISH_HOST} 'mkdir -p #{PUBLISH_ROOT}/#{PKG_NAME}/#{PKG_FILE_NAME}'` `scp -rq ./ #{PUBLISH_HOST}:#{PUBLISH_ROOT}/#{PKG_NAME}/#{PKG_FILE_NAME}` # if packages should go somewhere else Rake::SshFilePublisher.new(PUBLISH_HOST, "#{PUBLISH_ROOT}/pkg", "pkg", "#{PKG_FILE_NAME}.zip").upload Rake::SshFilePublisher.new(PUBLISH_HOST, "#{PUBLISH_ROOT}/pkg", "pkg", "#{PKG_FILE_NAME}.tgz").upload Rake::SshFilePublisher.new(PUBLISH_HOST, "#{PUBLISH_ROOT}/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload end #----------------------------------------------------------------------- # install #----------------------------------------------------------------------- task :install => [:package] do `gem install pkg/#{PKG_FILE_NAME}.gem` end #----------------------------------------------------------------------- # gem specification for :package #----------------------------------------------------------------------- task :package => [:clobber, :readme] spec = Gem::Specification.new do |s| s.name = PKG_NAME s.version = PKG_VERSION s.platform = Gem::Platform::RUBY s.summary = "better living through metaprogramming:" s.description = <= version') s.files = %w(README VERSION) + Dir['lib/**/*'] + Dir['sample/**/*'] s.require_path = '.' s.author = "Ara T. Howard" s.email = "ara [dot] t [dot] howard [at] noaa [dot] gov" end Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec p.need_tar = true p.need_zip = true end --uAKRQypu60I7Lcqm-- --uAKRQypu60I7Lcqm--