4 # relative path , contents(nil means directory)
5 ["iota" , "This is the file 'iota'.\n" ],
7 ["A/mu" , "This is the file 'mu'.\n" ],
9 ["A/B/lambda" , "This is the file 'lambda'.\n" ],
11 ["A/B/E/alpha" , "This is the file 'alpha'.\n" ],
12 ["A/B/E/beta" , "This is the file 'beta'.\n" ],
16 ["A/D/gamma" , "This is the file 'gamma'.\n" ],
18 ["A/D/G/pi" , "This is the file 'pi'.\n" ],
19 ["A/D/G/rho" , "This is the file 'rho'.\n" ],
20 ["A/D/G/tau" , "This is the file 'tau'.\n" ],
22 ["A/D/H/chi" , "This is the file 'chi'.\n" ],
23 ["A/D/H/psi" , "This is the file 'psi'.\n" ],
24 ["A/D/H/omega" , "This is the file 'omega'.\n" ]
27 TREE.each do |path, contents|
28 const_set(path.split("/").last.upcase, path)
31 def initialize(tmp_path, wc_path, repos_uri)
34 @repos_uri = repos_uri
38 TREE.each do |path, contents|
39 entry = File.expand_path(File.join(@tmp_path, path))
41 File.open(entry, 'w') {|f| f.print(contents)}
43 FileUtils.mkdir(entry)
47 context.import(@tmp_path, @repos_uri)
48 context.update(@wc_path)
52 File.join(@wc_path, resolve(greek))
56 "#{@repos_uri}/#{resolve(greek)}"
60 self.class.const_get(greek.to_s.upcase)