Module: AsProject
- Defined in:
- lib/fcshs.rb,
lib/asclass.rb,
lib/project.rb,
lib/asproject.rb,
lib/tasks/fcsh.rb,
lib/path_finder.rb,
lib/tasks/mtasc.rb,
lib/tasks/mxmlc.rb,
lib/tasks/hamtasc.rb,
lib/tasks/swfmill.rb,
lib/asproject_base.rb,
lib/tasks/env_task.rb,
lib/asproject_utils.rb,
lib/eclipse_project.rb,
lib/tasks/flash_log.rb,
lib/asclass_arguments.rb,
lib/asproject/version.rb,
lib/template_resolver.rb,
lib/tasks/flash_player.rb,
lib/asproject_arguments.rb,
lib/tasks/swfmill_input.rb,
lib/test_suite_generator.rb,
lib/tasks/remote_file_task.rb,
lib/tasks/flash_player_trust.rb,
lib/tasks/remote_file_loader.rb,
lib/tasks/remote_library_task.rb
Defined Under Namespace
Modules: VERSION
Classes: AbstractRemoteFileTask, AsClass, AsClassArguments, AsClassProject, AsProject, AsProjectBase, AsProjectResolver, BuildError, CompileCommand, CygwinRemoteFileTask, CygwinUser, EclipseProject, EnvTask, EnvTaskError, FCSH, FCSHProcess, FCSHS, FlashLog, FlashPlayer, FlashPlayerError, FlashPlayerTrust, HAMTASC, HAMTASCError, Logger, MTASC, MTASCError, MXMLC, OSXRemoteFileTask, OSXUser, PathFinder, Project, ProjectArguments, ProjectError, RemoteFileLoader, RemoteFileTask, RemoteLibraryTask, SWFMill, SWFMillError, SWFMillInput, SWFMillInputError, TemplateResolver, TestSuite, TestSuiteGenerator, ThreadMock, UnixRemoteFileTask, UsageError, User, VistaUser, WinRemoteFileTask, WinUser
Constant Summary
collapse
- @@COPY_IGNORE_FILES =
['.', '..', '.svn', '.DS_Store', 'CVS', '.cvs' 'Thumbs.db', '.crap_file', '.Trashes', 'Desktop DB', 'Desktop DF']
Class Method Summary
collapse
Class Method Details
.asproject_tmpdir ⇒ Object
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/asproject_utils.rb', line 46
def AsProject::asproject_tmpdir
tmp = nil
for dir in [ENV['TMPDIR'], ENV['TMP'], ENV['TEMP'],
ENV['USERPROFILE'], '/tmp']
if dir and File.directory?(dir) and File.writable?(dir)
tmp = dir
break
end
end
if(tmp.nil?)
raise ProjectError.new('AsProject was unable to find a valid temporary directory on this computer.')
end
start = Dir.pwd
Dir.chdir(tmp)
tmp = Dir.pwd
Dir.chdir(start)
return tmp
end
|
.unique_tmpdir(application = 'RubyApplication') ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/asproject_utils.rb', line 24
def AsProject::unique_tmpdir(application='RubyApplication')
rand_max = RAND_CHARS.size
uniqueish_name = ''
24.times{ uniqueish_name << RAND_CHARS[rand(rand_max)] }
tmp = AsProject.asproject_tmpdir
app_tmp = File.join(tmp, application)
if(!File.exists?(app_tmp))
Dir.mkdir(app_tmp)
end
tmp = File.expand_path(File.join(app_tmp, uniqueish_name))
if(File.exists?(tmp) && is_retry)
raise ProjectError.new('AsProject.unique_tmpdir attempted to create a new dir over an existing dir')
end
Dir.mkdir(tmp)
return tmp
end
|
.windowize_cygwin_path2(name) ⇒ Object
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/asproject_utils.rb', line 13
def AsProject::windowize_cygwin_path2(name)
expr = /\/cygdrive\/([a-z]|[A-Z])/
matched = name.match(expr)
if(matched)
prefix = matched.captures[0].upcase + ':'
name.gsub!(expr, prefix)
end
name = name.split('/').join('\\')
return name
end
|