From 8d488264b5177966217982740cdd152bfc4f8903 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 2 Apr 2005 07:29:08 +0000 Subject: Added install.rbs for all frameworks and made all of them generic enough not to require maintenance #1013, #1012 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1053 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionwebservice/install.rb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 actionwebservice/install.rb (limited to 'actionwebservice') diff --git a/actionwebservice/install.rb b/actionwebservice/install.rb new file mode 100644 index 0000000000..a3796708cb --- /dev/null +++ b/actionwebservice/install.rb @@ -0,0 +1,30 @@ +require 'rbconfig' +require 'find' +require 'ftools' + +include Config + +# this was adapted from rdoc's install.rb by ways of Log4r + +$sitedir = CONFIG["sitelibdir"] +unless $sitedir + version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"] + $libdir = File.join(CONFIG["libdir"], "ruby", version) + $sitedir = $:.find {|x| x =~ /site_ruby/ } + if !$sitedir + $sitedir = File.join($libdir, "site_ruby") + elsif $sitedir !~ Regexp.quote(version) + $sitedir = File.join($sitedir, version) + end +end + +# the acual gruntwork +Dir.chdir("lib") + +Find.find("action_web_service", "action_web_service.rb") { |f| + if f[-3..-1] == ".rb" + File::install(f, File.join($sitedir, *f.split(/\//)), 0644, true) + else + File::makedirs(File.join($sitedir, *f.split(/\//))) + end +} -- cgit v1.2.3