Permalink
Browse files

Big update, messed up CR+LF, LF and UTF8 encoding.

Yeah, I was responsible, sue me.
  • Loading branch information...
1 parent 3ccb019 commit 976c3288cbd6039b5a50df3f0c68bbc916e189af @luislavena luislavena committed May 19, 2008
Showing with 101 additions and 101 deletions.
  1. +1 −1 CHANGELOG.txt
  2. +4 −4 TODO.txt
  3. +44 −44 rake/downloadtask.rb
  4. +1 −1 rake/extracttask.rb
  5. +21 −21 rakefile.rb
  6. +30 −30 recipes/extract_utils/extract_utils.rake
View
@@ -1,4 +1,4 @@
-2008-05-18 Luis Lavena
+2008-05-18 Luis Lavena
* rake/extracttask.rb: Use 7-Zip as extract() utility to solve some
extration troubles and speedup extraction process.
View
@@ -1,4 +1,4 @@
-* Try getting Readline 5.0 (or 5.2) working and passing all test
- (test/test_readline.rb)
-
-* Implements all the dependencies required by Setup.nt extensions.
+* Try getting Readline 5.0 (or 5.2) working and passing all test
+ (test/test_readline.rb)
+
+* Implements all the dependencies required by Setup.nt extensions.
View
@@ -1,44 +1,44 @@
-#
-# This Rake Task is a striped down version of Buildr download task
-# I took the code from http://rubyforge.org/projects/buildr
-#
-# I've striped down dependencies on Net::SSH and Facets to
-# stay as simple as possible.
-#
-# Original code from Assaf Arkin, released under Apache License
-# (http://buildr.rubyforge.org/license.html)
-#
-
-require 'rake'
-require 'tempfile'
-
-require File.join(File.dirname(__FILE__), 'contrib', 'uri_ext')
-
-def download(args)
- args = URI.parse(args) if args.is_a?(String)
-
- options = {
- :progress => true,
- :verbose => Rake.application.options.trace
- }
-
- # Given only a download URL, download into a temporary file.
- # You can infer the file from task name.
- if URI === args
- temp = Tempfile.open(File.basename(args.to_s))
- file_create(temp.path) do |task|
- # Since temporary file exists, force a download.
- class << task ; def needed?() ; true ; end ; end
- task.sources << args
- task.enhance { args.download(temp, options) }
- end
- else
- # Download to a file task instead
- fail unless args.keys.size == 1
- uri = URI.parse(args.values.first.to_s)
- file_create(args.keys.first) do |task|
- task.sources << uri
- task.enhance { uri.download(task.name, options) }
- end
- end
-end
+#
+# This Rake Task is a striped down version of Buildr download task
+# I took the code from http://rubyforge.org/projects/buildr
+#
+# I've striped down dependencies on Net::SSH and Facets to
+# stay as simple as possible.
+#
+# Original code from Assaf Arkin, released under Apache License
+# (http://buildr.rubyforge.org/license.html)
+#
+
+require 'rake'
+require 'tempfile'
+
+require File.join(File.dirname(__FILE__), 'contrib', 'uri_ext')
+
+def download(args)
+ args = URI.parse(args) if args.is_a?(String)
+
+ options = {
+ :progress => true,
+ :verbose => Rake.application.options.trace
+ }
+
+ # Given only a download URL, download into a temporary file.
+ # You can infer the file from task name.
+ if URI === args
+ temp = Tempfile.open(File.basename(args.to_s))
+ file_create(temp.path) do |task|
+ # Since temporary file exists, force a download.
+ class << task ; def needed?() ; true ; end ; end
+ task.sources << args
+ task.enhance { args.download(temp, options) }
+ end
+ else
+ # Download to a file task instead
+ fail unless args.keys.size == 1
+ uri = URI.parse(args.values.first.to_s)
+ file_create(args.keys.first) do |task|
+ task.sources << uri
+ task.enhance { uri.download(task.name, options) }
+ end
+ end
+end
View
@@ -1,4 +1,4 @@
-require 'tmpdir'
+require 'tmpdir'
require 'fileutils'
def extract(file, target, options = {})
View
@@ -1,21 +1,21 @@
-#!/usr/bin/env ruby
-
-# Load Rake
-begin
- require 'rake'
-rescue LoadError
- require 'rubygems'
- require 'rake'
-end
-
-# Added download task from buildr
-require 'rake/downloadtask'
-require 'rake/extracttask'
-
-# RubyInstaller configuration data
-require 'config/ruby_installer'
-
-Dir.glob("#{RubyInstaller::ROOT}/recipes/**/*.rake").sort.each do |ext|
- puts "Loading #{File.basename(ext)}" if Rake.application.options.trace
- load ext
-end
+#!/usr/bin/env ruby
+
+# Load Rake
+begin
+ require 'rake'
+rescue LoadError
+ require 'rubygems'
+ require 'rake'
+end
+
+# Added download task from buildr
+require 'rake/downloadtask'
+require 'rake/extracttask'
+
+# RubyInstaller configuration data
+require 'config/ruby_installer'
+
+Dir.glob("#{RubyInstaller::ROOT}/recipes/**/*.rake").sort.each do |ext|
+ puts "Loading #{File.basename(ext)}" if Rake.application.options.trace
+ load ext
+end
@@ -1,30 +1,30 @@
-require 'rake/contrib/unzip'
-
-namespace(:extract_utils) do
- package = RubyInstaller::ExtractUtils
- directory package.target
- CLEAN.include(package.target)
-
- # Put files for the :download task
- package.files.each do |f|
- file_source = "#{package.url}/#{f}"
- file_target = "downloads/#{f}"
- download file_target => file_source
-
- # depend on downloads directory
- file file_target => "downloads"
-
- # download task need these files as pre-requisites
- task :download => file_target
- end
-
- task :extract_utils => [:download, package.target] do
- package.files.each do |f|
- filename = "downloads/#{f}"
- Zip.fake_unzip(filename, /\.exe|\.dll$/, package.target)
- end
- end
-end
-
-task :download => ['extract_utils:download']
-task :extract_utils => ['extract_utils:extract_utils']
+require 'rake/contrib/unzip'
+
+namespace(:extract_utils) do
+ package = RubyInstaller::ExtractUtils
+ directory package.target
+ CLEAN.include(package.target)
+
+ # Put files for the :download task
+ package.files.each do |f|
+ file_source = "#{package.url}/#{f}"
+ file_target = "downloads/#{f}"
+ download file_target => file_source
+
+ # depend on downloads directory
+ file file_target => "downloads"
+
+ # download task need these files as pre-requisites
+ task :download => file_target
+ end
+
+ task :extract_utils => [:download, package.target] do
+ package.files.each do |f|
+ filename = "downloads/#{f}"
+ Zip.fake_unzip(filename, /\.exe|\.dll$/, package.target)
+ end
+ end
+end
+
+task :download => ['extract_utils:download']
+task :extract_utils => ['extract_utils:extract_utils']

0 comments on commit 976c328

Please sign in to comment.