-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Big update, messed up CR+LF, LF and UTF8 encoding.
Yeah, I was responsible, sue me.
- Loading branch information
1 parent
3ccb019
commit 976c328
Showing
6 changed files
with
101 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
require 'tmpdir' | ||
require 'tmpdir' | ||
require 'fileutils' | ||
|
||
def extract(file, target, options = {}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'] |