druid-tools 0.4.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.rubocop.yml +41 -0
  4. data/.rubocop_todo.yml +372 -0
  5. data/.travis.yml +12 -2
  6. data/README.md +36 -16
  7. data/Rakefile +4 -1
  8. data/VERSION +1 -1
  9. data/druid-tools.gemspec +4 -1
  10. data/lib/druid_tools/druid.rb +19 -6
  11. data/spec/druid_spec.rb +470 -0
  12. data/spec/spec_helper.rb +9 -0
  13. metadata +49 -36
  14. data/doc/classes/DruidTools.html +0 -132
  15. data/doc/classes/DruidTools/DifferentContentExistsError.html +0 -111
  16. data/doc/classes/DruidTools/Druid.html +0 -352
  17. data/doc/classes/DruidTools/Druid.src/M000001.html +0 -18
  18. data/doc/classes/DruidTools/Druid.src/M000002.html +0 -18
  19. data/doc/classes/DruidTools/Druid.src/M000003.html +0 -18
  20. data/doc/classes/DruidTools/Druid.src/M000004.html +0 -24
  21. data/doc/classes/DruidTools/Druid.src/M000005.html +0 -18
  22. data/doc/classes/DruidTools/Druid.src/M000006.html +0 -18
  23. data/doc/classes/DruidTools/Druid.src/M000007.html +0 -20
  24. data/doc/classes/DruidTools/Druid.src/M000008.html +0 -25
  25. data/doc/classes/DruidTools/Druid.src/M000009.html +0 -20
  26. data/doc/classes/DruidTools/Druid.src/M000010.html +0 -27
  27. data/doc/classes/DruidTools/Druid.src/M000011.html +0 -24
  28. data/doc/classes/DruidTools/Druid.src/M000012.html +0 -29
  29. data/doc/classes/DruidTools/InvalidDruidError.html +0 -111
  30. data/doc/classes/DruidTools/SameContentExistsError.html +0 -111
  31. data/doc/created.rid +0 -1
  32. data/doc/files/lib/druid-tools_rb.html +0 -108
  33. data/doc/files/lib/druid_tools/druid_rb.html +0 -108
  34. data/doc/files/lib/druid_tools/exceptions_rb.html +0 -101
  35. data/doc/files/lib/druid_tools/version_rb.html +0 -101
  36. data/doc/files/lib/druid_tools_rb.html +0 -110
  37. data/doc/files/spec/druid_tools_spec_rb.html +0 -115
  38. data/doc/files/spec/spec_helper_rb.html +0 -114
  39. data/doc/fr_class_index.html +0 -28
  40. data/doc/fr_file_index.html +0 -30
  41. data/doc/fr_method_index.html +0 -38
  42. data/doc/index.html +0 -24
  43. data/doc/rdoc-style.css +0 -208
  44. data/spec/druid_tools_spec.rb +0 -426
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>pattern (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 11</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pattern</span>
15
- <span class="ruby-node">/\A(?:#{self.prefix}:)?([a-z]{2})(\d{3})([a-z]{2})(\d{4})\z/</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>glob (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 16</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">glob</span>
15
- <span class="ruby-node">&quot;{#{self.prefix}:,}[a-z][a-z][0-9][0-9][0-9][a-z][a-z][0-9][0-9][0-9][0-9]&quot;</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>valid? (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 22</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid?</span>(<span class="ruby-identifier">druid</span>)
15
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">druid</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">pattern</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>new (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 44</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">druid</span>, <span class="ruby-identifier">base</span>=<span class="ruby-value str">'.'</span>)
15
- <span class="ruby-identifier">druid</span> = <span class="ruby-identifier">druid</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">druid</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">String</span>
16
- <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">valid?</span>(<span class="ruby-identifier">druid</span>)
17
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;Invalid DRUID: '#{druid}'&quot;</span>
18
- <span class="ruby-keyword kw">end</span>
19
- <span class="ruby-identifier">druid</span> = [<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">prefix</span>,<span class="ruby-identifier">druid</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">':'</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">druid</span> <span class="ruby-operator">=~</span> <span class="ruby-node">/^#{self.class.prefix}:/</span>
20
- <span class="ruby-ivar">@base</span> = <span class="ruby-identifier">base</span>
21
- <span class="ruby-ivar">@druid</span> = <span class="ruby-identifier">druid</span>
22
- <span class="ruby-keyword kw">end</span></pre>
23
- </body>
24
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>id (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 54</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">id</span>
15
- <span class="ruby-ivar">@druid</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">pattern</span>).<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">''</span>)
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>tree (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 58</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tree</span>
15
- <span class="ruby-ivar">@druid</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">pattern</span>).<span class="ruby-identifier">flatten</span> <span class="ruby-operator">+</span> [<span class="ruby-identifier">id</span>]
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>path (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 62</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path</span>(<span class="ruby-identifier">extra</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">create</span>=<span class="ruby-keyword kw">false</span>)
15
- <span class="ruby-identifier">result</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-operator">*</span>([<span class="ruby-identifier">base</span>,<span class="ruby-identifier">tree</span>,<span class="ruby-identifier">extra</span>].<span class="ruby-identifier">compact</span>))
16
- <span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">extra</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">create</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">result</span>)
17
- <span class="ruby-identifier">result</span>
18
- <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,25 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>mkdir (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 68</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">extra</span>=<span class="ruby-keyword kw">nil</span>)
15
- <span class="ruby-identifier">new_path</span> = <span class="ruby-identifier">path</span>(<span class="ruby-identifier">extra</span>)
16
- <span class="ruby-keyword kw">if</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">symlink?</span> <span class="ruby-identifier">new_path</span>)
17
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">DruidTools</span><span class="ruby-operator">::</span><span class="ruby-constant">DifferentContentExistsError</span>, <span class="ruby-node">&quot;Unable to create directory, link already exists: #{new_path}&quot;</span>
18
- <span class="ruby-keyword kw">end</span>
19
- <span class="ruby-keyword kw">if</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span> <span class="ruby-identifier">new_path</span>)
20
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">DruidTools</span><span class="ruby-operator">::</span><span class="ruby-constant">SameContentExistsError</span>, <span class="ruby-node">&quot;The directory already exists: #{new_path}&quot;</span>
21
- <span class="ruby-keyword kw">end</span>
22
- <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">new_path</span>)
23
- <span class="ruby-keyword kw">end</span></pre>
24
- </body>
25
- </html>
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>find (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 79</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">path</span>)
15
- <span class="ruby-identifier">possibles</span> = [<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">path</span>(<span class="ruby-identifier">type</span>.<span class="ruby-identifier">to_s</span>),<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">path</span>,<span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">'..'</span>,<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">path</span>)]
16
- <span class="ruby-identifier">loc</span> = <span class="ruby-identifier">possibles</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">p</span>,<span class="ruby-identifier">path</span>)) }
17
- <span class="ruby-identifier">loc</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">loc</span>,<span class="ruby-identifier">path</span>)
18
- <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,27 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>find_filelist_parent (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 89</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_filelist_parent</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">filelist</span>)
15
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;File list not specified&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filelist</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">filelist</span>.<span class="ruby-identifier">empty?</span>
16
- <span class="ruby-identifier">filelist</span> = [<span class="ruby-identifier">filelist</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">filelist</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
17
- <span class="ruby-identifier">search_dir</span> = <span class="ruby-constant">Pathname</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">path</span>(<span class="ruby-identifier">type</span>))
18
- <span class="ruby-identifier">directories</span> = [<span class="ruby-identifier">search_dir</span>, <span class="ruby-identifier">search_dir</span>.<span class="ruby-identifier">parent</span>, <span class="ruby-identifier">search_dir</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">parent</span>]
19
- <span class="ruby-identifier">found_dir</span> = <span class="ruby-identifier">directories</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">pathname</span><span class="ruby-operator">|</span> <span class="ruby-identifier">pathname</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">filelist</span>[<span class="ruby-value">0</span>]).<span class="ruby-identifier">exist?</span> }
20
- <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;#{type} dir not found for '#{filelist[0]}' when searching '#{search_dir}'&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">found_dir</span>.<span class="ruby-identifier">nil?</span>
21
- <span class="ruby-identifier">filelist</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
22
- <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;File '#{filename}' not found in #{type} dir s'#{found_dir}'&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">found_dir</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">filename</span>).<span class="ruby-identifier">exist?</span>
23
- <span class="ruby-keyword kw">end</span>
24
- <span class="ruby-identifier">found_dir</span>
25
- <span class="ruby-keyword kw">end</span></pre>
26
- </body>
27
- </html>
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>mkdir_with_final_link (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 102</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mkdir_with_final_link</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">extra</span>=<span class="ruby-keyword kw">nil</span>)
15
- <span class="ruby-identifier">new_path</span> = <span class="ruby-identifier">path</span>(<span class="ruby-identifier">extra</span>)
16
- <span class="ruby-keyword kw">if</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">new_path</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">symlink?</span>(<span class="ruby-identifier">new_path</span>))
17
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">DruidTools</span><span class="ruby-operator">::</span><span class="ruby-constant">DifferentContentExistsError</span>, <span class="ruby-node">&quot;Unable to create link, directory already exists: #{new_path}&quot;</span>
18
- <span class="ruby-keyword kw">end</span>
19
- <span class="ruby-identifier">real_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">'..'</span>,<span class="ruby-identifier">new_path</span>)
20
- <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">real_path</span>)
21
- <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">ln_s</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">new_path</span>, <span class="ruby-identifier">:force=</span><span class="ruby-operator">&gt;</span><span class="ruby-keyword kw">true</span>)
22
- <span class="ruby-keyword kw">end</span></pre>
23
- </body>
24
- </html>
@@ -1,29 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>rmdir (DruidTools::Druid)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/druid_tools/druid.rb, line 112</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rmdir</span>(<span class="ruby-identifier">extra</span>=<span class="ruby-keyword kw">nil</span>)
15
- <span class="ruby-identifier">parts</span> = <span class="ruby-identifier">tree</span>
16
- <span class="ruby-identifier">parts</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">extra</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">extra</span>.<span class="ruby-identifier">nil?</span>
17
- <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
18
- <span class="ruby-identifier">dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">base</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">parts</span>)
19
- <span class="ruby-keyword kw">begin</span>
20
- <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">dir</span>,<span class="ruby-value str">'.DS_Store'</span>), <span class="ruby-identifier">:force</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>)
21
- <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rmdir</span>(<span class="ruby-identifier">dir</span>)
22
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOTEMPTY</span>
23
- <span class="ruby-keyword kw">break</span>
24
- <span class="ruby-keyword kw">end</span>
25
- <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">pop</span>
26
- <span class="ruby-keyword kw">end</span>
27
- <span class="ruby-keyword kw">end</span></pre>
28
- </body>
29
- </html>
@@ -1,111 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: DruidTools::InvalidDruidError</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">DruidTools::InvalidDruidError</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/druid_tools/exceptions_rb.html">
59
- lib/druid_tools/exceptions.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Exception
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
-
82
-
83
- </div>
84
-
85
-
86
- </div>
87
-
88
-
89
- <!-- if includes -->
90
-
91
- <div id="section">
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <!-- if method_list -->
101
-
102
-
103
- </div>
104
-
105
-
106
- <div id="validator-badges">
107
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
- </div>
109
-
110
- </body>
111
- </html>
@@ -1,111 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: DruidTools::SameContentExistsError</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">DruidTools::SameContentExistsError</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/druid_tools/exceptions_rb.html">
59
- lib/druid_tools/exceptions.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Exception
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
-
82
-
83
- </div>
84
-
85
-
86
- </div>
87
-
88
-
89
- <!-- if includes -->
90
-
91
- <div id="section">
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <!-- if method_list -->
101
-
102
-
103
- </div>
104
-
105
-
106
- <div id="validator-badges">
107
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
- </div>
109
-
110
- </body>
111
- </html>