Permalink
Browse files

Updated to work with RubyGems >= 1.0

  • Loading branch information...
1 parent 757631b commit 8e3da7b80f087b6e8ab36ab821618ea8bb86cb9b Avdi Grimm committed Oct 10, 2008
Showing with 57 additions and 54 deletions.
  1. +2 −0 CHANGELOG
  2. +10 −10 bin/feed_updater
  3. +42 −40 lib/feed_updater.rb
  4. +2 −2 lib/feed_updater/version.rb
  5. +1 −2 rakefile
View
@@ -1,3 +1,5 @@
+== FeedUpdater 0.2.6
+ * Updated for compatibility with RubyGems >= 1.0
== FeedUpdater 0.2.5
* fixed bug with redefinition of file searching system
== FeedUpdater 0.2.4
View
@@ -61,7 +61,7 @@ require 'feed_updater'
if ARGV[0].nil?
# Exit quickly if no command line arguments given.
-
+
feed_updater_version = FeedTools::FEED_UPDATER_VERSION::STRING
feed_tools_version = "<error: not loaded>"
if defined?(FeedTools::FEED_TOOLS_VERSION::STRING)
@@ -97,7 +97,7 @@ elsif ARGV[0] == "install"
install_vendor_directory = nil
install_config_directory = nil
install_script_directory = nil
-
+
current_directory = File.expand_path(".")
loop do
entries = Dir.entries(current_directory)
@@ -118,32 +118,32 @@ elsif ARGV[0] == "install"
install_vendor_directory = File.expand_path(rails_root + "/vendor")
install_config_directory = File.expand_path(rails_root + "/config")
install_script_directory = File.expand_path(rails_root + "/script")
-
+
# Install FeedUpdater gem to application vendor directory
system("rm -rf #{install_vendor_directory}/feedupdater")
unpack_string = `gem unpack feedupdater`
feed_updater_version =
- unpack_string.scan(/\'feedupdater\-(.*)\'/).flatten[0]
+ unpack_string.scan(/feedupdater\-(.*)\'/).flatten[0]
if feed_updater_version.nil? || feed_updater_version == ""
puts "You need to have the feedupdater gem installed for the install"
puts "subcommand to run correctly."
exit
end
puts "Installing FeedUpdater #{feed_updater_version} " +
"to vendor directory..."
-
+
system("cp -rp feedupdater-#{feed_updater_version} " +
"#{install_vendor_directory}")
system("rm -rf feedupdater-#{feed_updater_version}")
- system("mv #{install_vendor_directory}/" +
+ system("mv #{install_vendor_directory}/" +
"feedupdater-#{feed_updater_version} " +
"#{install_vendor_directory}/feedupdater")
# Install FeedTools gem to application vendor directory
system("rm -rf #{install_vendor_directory}/feedtools")
unpack_string = `gem unpack feedtools`
feed_tools_version =
- unpack_string.scan(/\'feedtools\-(.*)\'/).flatten[0]
+ unpack_string.scan(/feedtools\-(.*)\'/).flatten[0]
if feed_tools_version.nil? || feed_tools_version == ""
puts "You need to have the feedtools gem installed for the install"
puts "subcommand to run correctly."
@@ -154,7 +154,7 @@ elsif ARGV[0] == "install"
system("cp -rp feedtools-#{feed_tools_version} " +
"#{install_vendor_directory}")
system("rm -rf feedtools-#{feed_tools_version}")
- system("mv #{install_vendor_directory}/" +
+ system("mv #{install_vendor_directory}/" +
"feedtools-#{feed_tools_version} " +
"#{install_vendor_directory}/feedtools")
@@ -174,7 +174,7 @@ elsif ARGV[0] == "install"
system("rm -rf #{install_script_directory}/feed_updater")
system("cp -p #{__FILE__} #{install_script_directory}")
system("chmod +x #{install_script_directory}/feed_updater")
-
+
puts "Use script/feed_updater to run FeedUpdater."
end
exit
@@ -314,4 +314,4 @@ when "stop"
updater.stop()
when "restart"
updater.restart()
-end
+end
Oops, something went wrong.

0 comments on commit 8e3da7b

Please sign in to comment.