Changeset 7698
- Timestamp:
- 09/30/07 22:53:27 (1 year ago)
- Files:
-
- trunk/railties/CHANGELOG (modified) (1 diff)
- trunk/railties/lib/commands/plugin.rb (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/railties/CHANGELOG
r7685 r7698 1 1 *2.0.0 [Preview Release]* (September 29th, 2007) [Includes duplicates of changes from 1.1.4 - 1.2.3] 2 3 * Fixed that installing plugins from SVN repositories that use trunk/ will work #8188 [evan] 2 4 3 5 * Moved the SourceAnnotationExtractor to a separate file in case libraries try to load the rails rake tasks twice. [Rick] trunk/railties/lib/commands/plugin.rb
r7666 r7698 92 92 plugin.install 93 93 else 94 puts " plugin not found: #{name_uri_or_plugin}"94 puts "Plugin not found: #{name_uri_or_plugin}" 95 95 end 96 96 end … … 240 240 def install_using_http(options = {}) 241 241 root = rails_env.root 242 mkdir_p "#{root}/vendor/plugins "243 Dir.chdir "#{root}/vendor/plugins " do242 mkdir_p "#{root}/vendor/plugins/#{@name}" 243 Dir.chdir "#{root}/vendor/plugins/#{@name}" do 244 244 puts "fetching from '#{uri}'" if $verbose 245 fetcher = RecursiveHTTPFetcher.new(uri )245 fetcher = RecursiveHTTPFetcher.new(uri, -1) 246 246 fetcher.quiet = true if options[:quiet] 247 247 fetcher.fetch … … 766 766 ::Plugin.find(name).install(install_method, @options) 767 767 end 768 rescue 768 rescue StandardError => e 769 769 puts "Plugin not found: #{args.inspect}" 770 puts e.inspect if $verbose 770 771 exit 1 771 772 end … … 854 855 class RecursiveHTTPFetcher 855 856 attr_accessor :quiet 856 def initialize(urls_to_fetch, cwd = ".") 857 def initialize(urls_to_fetch, level = 1, cwd = ".") 858 @level = level 857 859 @cwd = cwd 858 860 @urls_to_fetch = urls_to_fetch.to_a … … 908 910 909 911 def fetch_dir(url) 910 push_d(File.basename(url)) 912 @level += 1 913 push_d(File.basename(url)) if @level > 0 911 914 open(url) do |stream| 912 915 contents = stream.read 913 916 fetch(links(url, contents)) 914 917 end 915 pop_d 918 pop_d if @level > 0 919 @level -= 1 916 920 end 917 921 end