rake 0.8.0 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +113 -2
- data/README +86 -132
- data/Rakefile +41 -13
- data/bin/rake +0 -0
- data/doc/command_line_usage.rdoc +102 -0
- data/doc/rakefile.rdoc +126 -3
- data/doc/release_notes/rake-0.7.3.rdoc +0 -0
- data/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/doc/release_notes/rake-0.8.6.rdoc +55 -0
- data/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/lib/rake/alt_system.rb +108 -0
- data/lib/rake/contrib/ftptools.rb +24 -10
- data/lib/rake/contrib/publisher.rb +1 -1
- data/lib/rake/contrib/sys.rb +5 -2
- data/lib/rake/gempackagetask.rb +0 -6
- data/lib/rake/loaders/makefile.rb +17 -15
- data/lib/rake/rdoctask.rb +83 -21
- data/lib/rake/ruby182_test_unit_fix.rb +0 -0
- data/lib/rake/tasklib.rb +8 -3
- data/lib/rake/testtask.rb +1 -1
- data/lib/rake/win32.rb +55 -0
- data/lib/rake.rb +490 -225
- data/test/check_expansion.rb +5 -0
- data/test/check_no_expansion.rb +5 -0
- data/test/data/file_creation_task/Rakefile +4 -1
- data/test/data/sample.mf +6 -1
- data/test/filecreation.rb +0 -2
- data/test/functional.rb +1 -1
- data/test/in_environment.rb +30 -0
- data/test/rake_test_setup.rb +21 -2
- data/test/session_functional.rb +109 -33
- data/test/shellcommand.rb +0 -0
- data/test/test_application.rb +269 -96
- data/test/test_definitions.rb +4 -1
- data/test/test_earlytime.rb +2 -2
- data/test/test_file_task.rb +20 -16
- data/test/test_filelist.rb +48 -7
- data/test/test_fileutils.rb +59 -38
- data/test/test_ftp.rb +5 -1
- data/test/test_invocation_chain.rb +8 -2
- data/test/test_makefile_loader.rb +5 -2
- data/test/test_namespace.rb +30 -11
- data/test/test_package_task.rb +3 -1
- data/test/test_pathmap.rb +3 -2
- data/test/test_pseudo_status.rb +26 -0
- data/test/test_rake.rb +9 -2
- data/test/test_rdoc_task.rb +88 -0
- data/test/test_require.rb +3 -1
- data/test/test_rules.rb +25 -7
- data/test/test_task_arguments.rb +14 -1
- data/test/test_task_manager.rb +27 -2
- data/test/test_tasklib.rb +12 -0
- data/test/test_tasks.rb +72 -54
- data/test/test_test_task.rb +2 -0
- data/test/test_top_level_functions.rb +4 -2
- data/test/test_win32.rb +72 -0
- metadata +99 -75
- /data/test/contrib/{testsys.rb → test_sys.rb} +0 -0
data/lib/rake/win32.rb
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
module Rake
|
|
3
|
+
require 'rake/alt_system'
|
|
4
|
+
|
|
5
|
+
# Win 32 interface methods for Rake. Windows specific functionality
|
|
6
|
+
# will be placed here to collect that knowledge in one spot.
|
|
7
|
+
module Win32
|
|
8
|
+
|
|
9
|
+
# Error indicating a problem in locating the home directory on a
|
|
10
|
+
# Win32 system.
|
|
11
|
+
class Win32HomeError < RuntimeError
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
class << self
|
|
15
|
+
# True if running on a windows system.
|
|
16
|
+
def windows?
|
|
17
|
+
AltSystem::WINDOWS
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Run a command line on windows.
|
|
21
|
+
def rake_system(*cmd)
|
|
22
|
+
AltSystem.system(*cmd)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# The standard directory containing system wide rake files on
|
|
26
|
+
# Win 32 systems. Try the following environment variables (in
|
|
27
|
+
# order):
|
|
28
|
+
#
|
|
29
|
+
# * HOME
|
|
30
|
+
# * HOMEDRIVE + HOMEPATH
|
|
31
|
+
# * APPDATA
|
|
32
|
+
# * USERPROFILE
|
|
33
|
+
#
|
|
34
|
+
# If the above are not defined, the return nil.
|
|
35
|
+
def win32_system_dir #:nodoc:
|
|
36
|
+
win32_shared_path = ENV['HOME']
|
|
37
|
+
if win32_shared_path.nil? && ENV['HOMEDRIVE'] && ENV['HOMEPATH']
|
|
38
|
+
win32_shared_path = ENV['HOMEDRIVE'] + ENV['HOMEPATH']
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
win32_shared_path ||= ENV['APPDATA']
|
|
42
|
+
win32_shared_path ||= ENV['USERPROFILE']
|
|
43
|
+
raise Win32HomeError, "Unable to determine home path environment variable." if
|
|
44
|
+
win32_shared_path.nil? or win32_shared_path.empty?
|
|
45
|
+
normalize(File.join(win32_shared_path, 'Rake'))
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Normalize a win32 path so that the slashes are all forward slashes.
|
|
49
|
+
def normalize(path)
|
|
50
|
+
path.gsub(/\\/, '/')
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|