On 7/2/07, barsalou <barjunk at attglobal.net>
wrote:> A couple of things:
>
> - it is defaulted to 1.0.5, but if there was a "current" I could
> probably use that instead.
>
http://rspec.rubyforge.org/download.html says 1.0.5, I''ll try to
remember to mention svn://rubyforge.org/var/svn/rspec/tags/CURRENT,
which is pointing to (and will continue to point to) the latest
release.
> - it seems like everyone might not use the rspec_on_rails piece...what
> do other think?
>
Your observation is correct. Many people use RSpec without Rails. It
was always meant to be a generic tool, and it will remain that way,
while continuing Rails support in the sister Spec::Rails project.
> - there are some other checks I could put in here, suggestions are welcome.
>
I prefer cash. I will send you my account number privately :-).
> - general code suggestions are welcome as well.
>
> Mike B.
>
>
> Here is my ruby version:
>
> #!/usr/bin/ruby -w
>
> require ''ftools''
>
> def usage
> puts
> puts "Usage: makespec.rb <path> [<dotted-version>]"
> puts
> puts "Version defaults to 1.0.5"
> puts
> puts "Example: "
> puts " makespec.rb /var/www/rails/railsapp 1.0.5"
> puts
> end
>
> if ARGV[0].nil? then
> usage
> puts
> puts "You must include a pathname"
> puts
> exit 1
> end
>
> version = ARGV[1]
>
> if ARGV[1].nil? then
> puts
> puts "Defaulting to version: 1.0.5"
> puts
> version = "1.0.5"
> end
>
> rspec="rspec-" + version + ".tgz"
> rspecrails="rspec_on_rails-" + version + ".tgz"
> app = ARGV[0]
>
> if ! File.exist?(rspec) then
> puts
> puts "Rspec tarball (" + rspec + ") does not exist in the
current directory"
> puts
> exit 1
> end
>
> if ! File.exist?(rspecrails) then
> puts
> puts "Rspec-rails tarball (" + rspecrails + ") does not
exist in the
> current d
> irectory"
> puts
> exit 1
> end
>
> if FileTest.directory? app + "/vendor/plugins" then
> system("tar","zxvf", rspec)
> system("tar","zxvf", rspecrails)
> cwd = Dir.pwd
> Dir.chdir(app + "/vendor/plugins")
> File.move(cwd + "/" +
File.basename(rspec,".tgz"),app +
> "/vendor/plugins/rspec")
> File.move(cwd + "/" +
File.basename(rspecrails,".tgz"),app +
> "/vendor/plugins/rspec_on_rails")
> else
> puts app + "/vendor/plugins doesn''t exist"
> exit 1
> end
>
Rake also makes tarballs, and I think correctly so. It seems like the
reason why our (gzipped) tarballs are broken
(http://rubyforge.org/frs/?group_id=797) is the upload/release tool we
use - or possibly (but not likely) a RubyForge bug. I don''t think your
script will make a difference, but I''ll definitely look into it the
next time I adress the tarball bug.
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>