Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated docs

  • Loading branch information...
commit 2529cf5559fad5d0d1b6e4401c5192dbacbafe12 1 parent 514263c
@delano delano authored
Showing with 1,197 additions and 1,181 deletions.
  1. +4 −4 classes/Rudy.html
  2. +3 −7 classes/Rudy/AWS/EC2.html
  3. +120 −120 classes/Rudy/AWS/EC2/Instances.html
  4. +40 −40 classes/Rudy/AWS/EC2/KeyPairs.html
  5. +40 −40 classes/Rudy/AWS/EC2/Keypairs.html
  6. +2 −2 classes/Rudy/CLI.html
  7. +5 −5 classes/Rudy/CLI/AWS/EC2/Snapshots.html
  8. +2 −2 classes/Rudy/CLI/AWS/S3.html
  9. +25 −25 classes/Rudy/CLI/AWS/S3/Buckets.html
  10. +10 −10 classes/Rudy/CLI/AWS/S3/Store.html
  11. +30 −30 classes/Rudy/CLI/Keypairs.html
  12. +60 −60 classes/Rudy/CLI/Machines.html
  13. +30 −30 classes/Rudy/Global.html
  14. +210 −210 classes/Rudy/Huxtable.html
  15. +5 −5 classes/Rudy/MachineGroupAlreadyRunning.html
  16. +5 −5 classes/Rudy/MachineGroupMetadataExists.html
  17. +5 −5 classes/Rudy/MachineGroupNotRunning.html
  18. +40 −40 classes/Rudy/Machines.html
  19. +1 −1  created.rid
  20. +3 −3 files/CHANGES_txt.html
  21. +1 −1  files/LICENSE_txt.html
  22. +1 −1  files/README_rdoc.html
  23. +1 −1  files/bin/rudy-ec2.html
  24. +1 −1  files/bin/rudy-s3.html
  25. +1 −1  files/bin/rudy-sdb.html
  26. +21 −1 files/bin/rudy.html
  27. +1 −1  files/lib/rudy/aws/ec2/address_rb.html
  28. +1 −1  files/lib/rudy/aws/ec2/group_rb.html
  29. +1 −1  files/lib/rudy/aws/ec2/image_rb.html
  30. +1 −1  files/lib/rudy/aws/ec2/instance_rb.html
  31. +1 −1  files/lib/rudy/aws/ec2/keypair_rb.html
  32. +1 −1  files/lib/rudy/aws/ec2/snapshot_rb.html
  33. +1 −1  files/lib/rudy/aws/ec2/volume_rb.html
  34. +1 −1  files/lib/rudy/aws/ec2/zone_rb.html
  35. +1 −1  files/lib/rudy/aws/ec2_rb.html
  36. +1 −1  files/lib/rudy/aws/s3_rb.html
  37. +1 −1  files/lib/rudy/aws/sdb/error_rb.html
  38. +1 −1  files/lib/rudy/aws/sdb_rb.html
  39. +1 −1  files/lib/rudy/aws_rb.html
  40. +1 −1  files/lib/rudy/backups_rb.html
  41. +1 −1  files/lib/rudy/cli/aws/ec2/addresses_rb.html
  42. +1 −1  files/lib/rudy/cli/aws/ec2/candy_rb.html
  43. +1 −1  files/lib/rudy/cli/aws/ec2/groups_rb.html
  44. +1 −1  files/lib/rudy/cli/aws/ec2/images_rb.html
  45. +1 −1  files/lib/rudy/cli/aws/ec2/info_rb.html
  46. +1 −1  files/lib/rudy/cli/aws/ec2/instances_rb.html
  47. +1 −1  files/lib/rudy/cli/aws/ec2/keypairs_rb.html
  48. +1 −1  files/lib/rudy/cli/aws/ec2/snapshots_rb.html
  49. +1 −1  files/lib/rudy/cli/aws/ec2/volumes_rb.html
  50. +1 −1  files/lib/rudy/cli/aws/ec2/zones_rb.html
  51. +1 −1  files/lib/rudy/cli/aws/s3/buckets_rb.html
  52. +1 −1  files/lib/rudy/cli/aws/s3/store_rb.html
  53. +1 −1  files/lib/rudy/cli/aws/sdb/domains_rb.html
  54. +1 −1  files/lib/rudy/cli/aws/sdb/objects_rb.html
  55. +1 −1  files/lib/rudy/cli/aws/sdb/select_rb.html
  56. +1 −1  files/lib/rudy/cli/backups_rb.html
  57. +1 −1  files/lib/rudy/cli/base_rb.html
  58. +1 −1  files/lib/rudy/cli/candy_rb.html
  59. +1 −1  files/lib/rudy/cli/config_rb.html
  60. +1 −1  files/lib/rudy/cli/disks_rb.html
  61. +1 −1  files/lib/rudy/cli/execbase_rb.html
  62. +1 −1  files/lib/rudy/cli/images_rb.html
  63. +1 −1  files/lib/rudy/cli/info_rb.html
  64. +1 −1  files/lib/rudy/cli/keypairs_rb.html
  65. +1 −1  files/lib/rudy/cli/machines_rb.html
  66. +1 −1  files/lib/rudy/cli/metadata_rb.html
  67. +1 −1  files/lib/rudy/cli/networks_rb.html
  68. +1 −1  files/lib/rudy/cli/routines_rb.html
  69. +1 −1  files/lib/rudy/cli_rb.html
  70. +1 −1  files/lib/rudy/config/objects_rb.html
  71. +1 −1  files/lib/rudy/config_rb.html
  72. +1 −1  files/lib/rudy/disks_rb.html
  73. +1 −1  files/lib/rudy/exceptions_rb.html
  74. +1 −1  files/lib/rudy/global_rb.html
  75. +1 −1  files/lib/rudy/guidelines_rb.html
  76. +1 −1  files/lib/rudy/huxtable_rb.html
  77. +1 −1  files/lib/rudy/machines_rb.html
  78. +1 −1  files/lib/rudy/metadata/backup_rb.html
  79. +1 −1  files/lib/rudy/metadata/disk_rb.html
  80. +1 −1  files/lib/rudy/metadata/machine_rb.html
  81. +1 −1  files/lib/rudy/metadata_rb.html
  82. +1 −1  files/lib/rudy/mixins_rb.html
  83. +1 −1  files/lib/rudy/routines/base_rb.html
  84. +1 −1  files/lib/rudy/routines/handlers/base_rb.html
  85. +1 −1  files/lib/rudy/routines/handlers/depends_rb.html
  86. +1 −1  files/lib/rudy/routines/handlers/disks_rb.html
  87. +1 −1  files/lib/rudy/routines/handlers/group_rb.html
  88. +1 −1  files/lib/rudy/routines/handlers/host_rb.html
  89. +1 −1  files/lib/rudy/routines/handlers/keypair_rb.html
  90. +1 −1  files/lib/rudy/routines/handlers/rye_rb.html
  91. +1 −1  files/lib/rudy/routines/handlers/script_rb.html
  92. +1 −1  files/lib/rudy/routines/handlers/user_rb.html
  93. +1 −1  files/lib/rudy/routines/passthrough_rb.html
  94. +1 −1  files/lib/rudy/routines/reboot_rb.html
  95. +1 −1  files/lib/rudy/routines/shutdown_rb.html
  96. +1 −1  files/lib/rudy/routines/startup_rb.html
  97. +1 −1  files/lib/rudy/routines_rb.html
  98. +1 −1  files/lib/rudy/utils_rb.html
  99. +1 −1  files/lib/rudy_rb.html
  100. +458 −458 fr_method_index.html
View
8 classes/Rudy.html
@@ -109,10 +109,10 @@ <h1 class='name'>
<a href="../files/lib/rudy/cli/info_rb.html">lib/rudy/cli/info.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/rudy/cli/machines_rb.html">lib/rudy/cli/machines.rb</a>
+ <a href="../files/lib/rudy/cli/keypairs_rb.html">lib/rudy/cli/keypairs.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/rudy/cli/keypairs_rb.html">lib/rudy/cli/keypairs.rb</a>
+ <a href="../files/lib/rudy/cli/machines_rb.html">lib/rudy/cli/machines.rb</a>
</li>
<li class='other'>
<a href="../files/lib/rudy/cli/metadata_rb.html">lib/rudy/cli/metadata.rb</a>
@@ -142,10 +142,10 @@ <h1 class='name'>
<a href="../files/lib/rudy/guidelines_rb.html">lib/rudy/guidelines.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/rudy/huxtable_rb.html">lib/rudy/huxtable.rb</a>
+ <a href="../files/lib/rudy/machines_rb.html">lib/rudy/machines.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/rudy/machines_rb.html">lib/rudy/machines.rb</a>
+ <a href="../files/lib/rudy/huxtable_rb.html">lib/rudy/huxtable.rb</a>
</li>
<li class='other'>
<a href="../files/lib/rudy/metadata/backup_rb.html">lib/rudy/metadata/backup.rb</a>
View
10 classes/Rudy/AWS/EC2.html
@@ -40,10 +40,10 @@ <h1 class='name'>
<a href="../../../files/lib/rudy/aws/ec2/image_rb.html">lib/rudy/aws/ec2/image.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/rudy/aws/ec2/instance_rb.html">lib/rudy/aws/ec2/instance.rb</a>
+ <a href="../../../files/lib/rudy/aws/ec2/keypair_rb.html">lib/rudy/aws/ec2/keypair.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/rudy/aws/ec2/keypair_rb.html">lib/rudy/aws/ec2/keypair.rb</a>
+ <a href="../../../files/lib/rudy/aws/ec2/instance_rb.html">lib/rudy/aws/ec2/instance.rb</a>
</li>
<li class='other'>
<a href="../../../files/lib/rudy/aws/ec2/snapshot_rb.html">lib/rudy/aws/ec2/snapshot.rb</a>
@@ -69,9 +69,6 @@ <h1 class='name'>
<h3>public class</h3>
<ol>
<li><a href="#M000017">connect</a></li>
- </ol>
- <h3>protected class</h3>
- <ol>
<li><a href="#M000018">execute_request</a></li>
</ol>
</div>
@@ -142,8 +139,7 @@ <h1 class='name'>
<pre id='M000017-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2.rb, line 8</span>&#x000A; 8: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">connect</span>(<span class="ruby-identifier">access_key</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">secret_key</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">region</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">logger</span>=<span class="ruby-keyword kw">nil</span>)&#x000A; 9: &#x000A;10: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">region</span>&#x000A;11: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidRegion</span>, <span class="ruby-identifier">region</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span>.<span class="ruby-identifier">valid_region?</span>(<span class="ruby-identifier">region</span>)&#x000A;12: <span class="ruby-identifier">host</span> = <span class="ruby-node">&quot;#{region}.ec2.amazonaws.com&quot;</span>&#x000A;13: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'EC2_URL'</span>]&#x000A;14: <span class="ruby-identifier">host</span> = <span class="ruby-constant">URL</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'EC2_URL'</span>]).<span class="ruby-identifier">host</span>&#x000A;15: <span class="ruby-keyword kw">end</span>&#x000A;16: &#x000A;17: <span class="ruby-identifier">host</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">DEFAULT_EC2_HOST</span>&#x000A;18: <span class="ruby-identifier">port</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">DEFAULT_EC2_PORT</span>&#x000A;19: &#x000A;20: <span class="ruby-ivar">@@ec2</span> = <span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:port</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">port</span>, <span class="ruby-identifier">:server=</span><span class="ruby-operator">&gt;</span> <span class="ruby-identifier">host</span>, <span class="ruby-identifier">:access_key_id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">access_key</span>, <span class="ruby-identifier">:secret_access_key</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">secret_key</span>)&#x000A;21: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <h2>Protected class methods</h2>
- <div class='method protected-class' id='method-M000018'>
+ <div class='method public-class' id='method-M000018'>
<a name='M000018'> </a>
<div class='synopsis'>
<span class='name'>execute_request</span>
View
240 classes/Rudy/AWS/EC2/Instances.html
120 additions, 120 deletions not shown
View
80 classes/Rudy/AWS/EC2/KeyPairs.html
@@ -41,14 +41,14 @@ <h1 class='name'>
<h2>Methods</h2>
<h3>public instance</h3>
<ol>
- <li><a href="#M000078">any?</a></li>
- <li><a href="#M000073">create</a></li>
- <li><a href="#M000074">destroy</a></li>
- <li><a href="#M000080">exists?</a></li>
- <li><a href="#M000077">from_hash</a></li>
- <li><a href="#M000079">get</a></li>
- <li><a href="#M000075">list</a></li>
- <li><a href="#M000076">list_as_hash</a></li>
+ <li><a href="#M000054">any?</a></li>
+ <li><a href="#M000049">create</a></li>
+ <li><a href="#M000050">destroy</a></li>
+ <li><a href="#M000056">exists?</a></li>
+ <li><a href="#M000053">from_hash</a></li>
+ <li><a href="#M000055">get</a></li>
+ <li><a href="#M000051">list</a></li>
+ <li><a href="#M000052">list_as_hash</a></li>
</ol>
</div>
<div id='context'>
@@ -62,108 +62,108 @@ <h1 class='name'>
<div id='section'>
<div id='methods'>
<h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000078'>
- <a name='M000078'> </a>
+ <div class='method public-instance' id='method-M000054'>
+ <a name='M000054'> </a>
<div class='synopsis'>
<span class='name'>any?</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000078-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000054-source'); return false">
[show source]
</a>
- <pre id='M000078-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 72</span>&#x000A;72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">any?</span>&#x000A;73: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list</span> <span class="ruby-operator">||</span> []&#x000A;74: <span class="ruby-operator">!</span><span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;75: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000054-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 72</span>&#x000A;72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">any?</span>&#x000A;73: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list</span> <span class="ruby-operator">||</span> []&#x000A;74: <span class="ruby-operator">!</span><span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;75: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000073'>
- <a name='M000073'> </a>
+ <div class='method public-instance' id='method-M000049'>
+ <a name='M000049'> </a>
<div class='synopsis'>
<span class='name'>create</span>
<span class='arguments'>(name)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000073-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000049-source'); return false">
[show source]
</a>
- <pre id='M000073-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 27</span>&#x000A;27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-identifier">name</span>)&#x000A;28: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No name provided&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>&#x000A;29: <span class="ruby-identifier">ret</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">create_keypair</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>)&#x000A;30: <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">ret</span>)&#x000A;31: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000049-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 27</span>&#x000A;27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-identifier">name</span>)&#x000A;28: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No name provided&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>&#x000A;29: <span class="ruby-identifier">ret</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">create_keypair</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>)&#x000A;30: <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">ret</span>)&#x000A;31: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000074'>
- <a name='M000074'> </a>
+ <div class='method public-instance' id='method-M000050'>
+ <a name='M000050'> </a>
<div class='synopsis'>
<span class='name'>destroy</span>
<span class='arguments'>(name)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000074-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000050-source'); return false">
[show source]
</a>
- <pre id='M000074-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 33</span>&#x000A;33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy</span>(<span class="ruby-identifier">name</span>)&#x000A;34: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">name</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Keypair</span>)&#x000A;35: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No name provided&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)&#x000A;36: <span class="ruby-identifier">ret</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">delete_keypair</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>)&#x000A;37: (<span class="ruby-identifier">ret</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">ret</span>[<span class="ruby-value str">'return'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'true'</span>) <span class="ruby-comment cmt"># BUG? Always returns true</span>&#x000A;38: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000050-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 33</span>&#x000A;33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy</span>(<span class="ruby-identifier">name</span>)&#x000A;34: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">name</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Keypair</span>)&#x000A;35: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No name provided&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)&#x000A;36: <span class="ruby-identifier">ret</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">delete_keypair</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>)&#x000A;37: (<span class="ruby-identifier">ret</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">ret</span>[<span class="ruby-value str">'return'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'true'</span>) <span class="ruby-comment cmt"># BUG? Always returns true</span>&#x000A;38: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000080'>
- <a name='M000080'> </a>
+ <div class='method public-instance' id='method-M000056'>
+ <a name='M000056'> </a>
<div class='synopsis'>
<span class='name'>exists?</span>
<span class='arguments'>(name)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000080-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000056-source'); return false">
[show source]
</a>
- <pre id='M000080-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 83</span>&#x000A;83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">name</span>)&#x000A;84: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>&#x000A;85: <span class="ruby-identifier">kp</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>&#x000A;86: <span class="ruby-operator">!</span><span class="ruby-identifier">kp</span>.<span class="ruby-identifier">nil?</span>&#x000A;87: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000056-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 83</span>&#x000A;83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">name</span>)&#x000A;84: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>&#x000A;85: <span class="ruby-identifier">kp</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>&#x000A;86: <span class="ruby-operator">!</span><span class="ruby-identifier">kp</span>.<span class="ruby-identifier">nil?</span>&#x000A;87: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000077'>
- <a name='M000077'> </a>
+ <div class='method public-instance' id='method-M000053'>
+ <a name='M000053'> </a>
<div class='synopsis'>
<span class='name'>from_hash</span>
<span class='arguments'>(h)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000077-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000053-source'); return false">
[show source]
</a>
- <pre id='M000077-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 59</span>&#x000A;59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">h</span>)&#x000A;60: <span class="ruby-comment cmt"># keyName: test-c5g4v3pe</span>&#x000A;61: <span class="ruby-comment cmt"># keyFingerprint: 65:d0:ce:e7:6a:b0:88:4a:9c:c7:2d:b8:33:0c:fd:3b:c8:0f:0a:3c</span>&#x000A;62: <span class="ruby-comment cmt"># keyMaterial: |-</span>&#x000A;63: <span class="ruby-comment cmt"># -----BEGIN RSA PRIVATE KEY-----</span>&#x000A;64: <span class="ruby-comment cmt"># </span>&#x000A;65: <span class="ruby-identifier">keypair</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Keypair</span>.<span class="ruby-identifier">new</span>&#x000A;66: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">fingerprint</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyFingerprint'</span>]&#x000A;67: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">name</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyName'</span>]&#x000A;68: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">private_key</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyMaterial'</span>]&#x000A;69: <span class="ruby-identifier">keypair</span>&#x000A;70: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000053-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 59</span>&#x000A;59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">h</span>)&#x000A;60: <span class="ruby-comment cmt"># keyName: test-c5g4v3pe</span>&#x000A;61: <span class="ruby-comment cmt"># keyFingerprint: 65:d0:ce:e7:6a:b0:88:4a:9c:c7:2d:b8:33:0c:fd:3b:c8:0f:0a:3c</span>&#x000A;62: <span class="ruby-comment cmt"># keyMaterial: |-</span>&#x000A;63: <span class="ruby-comment cmt"># -----BEGIN RSA PRIVATE KEY-----</span>&#x000A;64: <span class="ruby-comment cmt"># </span>&#x000A;65: <span class="ruby-identifier">keypair</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Keypair</span>.<span class="ruby-identifier">new</span>&#x000A;66: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">fingerprint</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyFingerprint'</span>]&#x000A;67: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">name</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyName'</span>]&#x000A;68: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">private_key</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyMaterial'</span>]&#x000A;69: <span class="ruby-identifier">keypair</span>&#x000A;70: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000079'>
- <a name='M000079'> </a>
+ <div class='method public-instance' id='method-M000055'>
+ <a name='M000055'> </a>
<div class='synopsis'>
<span class='name'>get</span>
<span class='arguments'>(name)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000079-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000055-source'); return false">
[show source]
</a>
- <pre id='M000079-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 77</span>&#x000A;77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)&#x000A;78: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list</span>(<span class="ruby-identifier">name</span>) <span class="ruby-operator">||</span> []&#x000A;79: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;80: <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">first</span>&#x000A;81: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000055-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 77</span>&#x000A;77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)&#x000A;78: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list</span>(<span class="ruby-identifier">name</span>) <span class="ruby-operator">||</span> []&#x000A;79: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;80: <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">first</span>&#x000A;81: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000075'>
- <a name='M000075'> </a>
+ <div class='method public-instance' id='method-M000051'>
+ <a name='M000051'> </a>
<div class='synopsis'>
<span class='name'>list</span>
<span class='arguments'>(*names)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000075-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000051-source'); return false">
[show source]
</a>
- <pre id='M000075-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 40</span>&#x000A;40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)&#x000A;41: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list_as_hash</span>(<span class="ruby-identifier">names</span>)&#x000A;42: <span class="ruby-identifier">keypairs</span> <span class="ruby-operator">&amp;&amp;=</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">values</span>&#x000A;43: <span class="ruby-identifier">keypairs</span>&#x000A;44: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000051-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 40</span>&#x000A;40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)&#x000A;41: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list_as_hash</span>(<span class="ruby-identifier">names</span>)&#x000A;42: <span class="ruby-identifier">keypairs</span> <span class="ruby-operator">&amp;&amp;=</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">values</span>&#x000A;43: <span class="ruby-identifier">keypairs</span>&#x000A;44: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000076'>
- <a name='M000076'> </a>
+ <div class='method public-instance' id='method-M000052'>
+ <a name='M000052'> </a>
<div class='synopsis'>
<span class='name'>list_as_hash</span>
<span class='arguments'>(*names)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000076-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000052-source'); return false">
[show source]
</a>
- <pre id='M000076-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 46</span>&#x000A;46: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list_as_hash</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)&#x000A;47: <span class="ruby-identifier">names</span> = <span class="ruby-identifier">names</span>.<span class="ruby-identifier">flatten</span>&#x000A;48: <span class="ruby-identifier">klist</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">describe_keypairs</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">names</span>)&#x000A;49: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">klist</span>[<span class="ruby-value str">'keySet'</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)&#x000A;50: <span class="ruby-identifier">keypairs</span> = {}&#x000A;51: <span class="ruby-identifier">klist</span>[<span class="ruby-value str">'keySet'</span>][<span class="ruby-value str">'item'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">oldkp</span><span class="ruby-operator">|</span> &#x000A;52: <span class="ruby-identifier">kp</span> = <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">oldkp</span>)&#x000A;53: <span class="ruby-identifier">keypairs</span>[<span class="ruby-identifier">kp</span>.<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">kp</span>&#x000A;54: <span class="ruby-keyword kw">end</span>&#x000A;55: <span class="ruby-identifier">keypairs</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;56: <span class="ruby-identifier">keypairs</span>&#x000A;57: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000052-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 46</span>&#x000A;46: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list_as_hash</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)&#x000A;47: <span class="ruby-identifier">names</span> = <span class="ruby-identifier">names</span>.<span class="ruby-identifier">flatten</span>&#x000A;48: <span class="ruby-identifier">klist</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">describe_keypairs</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">names</span>)&#x000A;49: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">klist</span>[<span class="ruby-value str">'keySet'</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)&#x000A;50: <span class="ruby-identifier">keypairs</span> = {}&#x000A;51: <span class="ruby-identifier">klist</span>[<span class="ruby-value str">'keySet'</span>][<span class="ruby-value str">'item'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">oldkp</span><span class="ruby-operator">|</span> &#x000A;52: <span class="ruby-identifier">kp</span> = <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">oldkp</span>)&#x000A;53: <span class="ruby-identifier">keypairs</span>[<span class="ruby-identifier">kp</span>.<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">kp</span>&#x000A;54: <span class="ruby-keyword kw">end</span>&#x000A;55: <span class="ruby-identifier">keypairs</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;56: <span class="ruby-identifier">keypairs</span>&#x000A;57: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
View
80 classes/Rudy/AWS/EC2/Keypairs.html
@@ -41,14 +41,14 @@ <h1 class='name'>
<h2>Methods</h2>
<h3>public instance</h3>
<ol>
- <li><a href="#M000078">any?</a></li>
- <li><a href="#M000073">create</a></li>
- <li><a href="#M000074">destroy</a></li>
- <li><a href="#M000080">exists?</a></li>
- <li><a href="#M000077">from_hash</a></li>
- <li><a href="#M000079">get</a></li>
- <li><a href="#M000075">list</a></li>
- <li><a href="#M000076">list_as_hash</a></li>
+ <li><a href="#M000054">any?</a></li>
+ <li><a href="#M000049">create</a></li>
+ <li><a href="#M000050">destroy</a></li>
+ <li><a href="#M000056">exists?</a></li>
+ <li><a href="#M000053">from_hash</a></li>
+ <li><a href="#M000055">get</a></li>
+ <li><a href="#M000051">list</a></li>
+ <li><a href="#M000052">list_as_hash</a></li>
</ol>
</div>
<div id='context'>
@@ -62,108 +62,108 @@ <h1 class='name'>
<div id='section'>
<div id='methods'>
<h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000078'>
- <a name='M000078'> </a>
+ <div class='method public-instance' id='method-M000054'>
+ <a name='M000054'> </a>
<div class='synopsis'>
<span class='name'>any?</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000078-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000054-source'); return false">
[show source]
</a>
- <pre id='M000078-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 72</span>&#x000A;72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">any?</span>&#x000A;73: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list</span> <span class="ruby-operator">||</span> []&#x000A;74: <span class="ruby-operator">!</span><span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;75: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000054-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 72</span>&#x000A;72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">any?</span>&#x000A;73: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list</span> <span class="ruby-operator">||</span> []&#x000A;74: <span class="ruby-operator">!</span><span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;75: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000073'>
- <a name='M000073'> </a>
+ <div class='method public-instance' id='method-M000049'>
+ <a name='M000049'> </a>
<div class='synopsis'>
<span class='name'>create</span>
<span class='arguments'>(name)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000073-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000049-source'); return false">
[show source]
</a>
- <pre id='M000073-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 27</span>&#x000A;27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-identifier">name</span>)&#x000A;28: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No name provided&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>&#x000A;29: <span class="ruby-identifier">ret</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">create_keypair</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>)&#x000A;30: <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">ret</span>)&#x000A;31: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000049-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 27</span>&#x000A;27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-identifier">name</span>)&#x000A;28: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No name provided&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>&#x000A;29: <span class="ruby-identifier">ret</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">create_keypair</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>)&#x000A;30: <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">ret</span>)&#x000A;31: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000074'>
- <a name='M000074'> </a>
+ <div class='method public-instance' id='method-M000050'>
+ <a name='M000050'> </a>
<div class='synopsis'>
<span class='name'>destroy</span>
<span class='arguments'>(name)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000074-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000050-source'); return false">
[show source]
</a>
- <pre id='M000074-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 33</span>&#x000A;33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy</span>(<span class="ruby-identifier">name</span>)&#x000A;34: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">name</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Keypair</span>)&#x000A;35: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No name provided&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)&#x000A;36: <span class="ruby-identifier">ret</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">delete_keypair</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>)&#x000A;37: (<span class="ruby-identifier">ret</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">ret</span>[<span class="ruby-value str">'return'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'true'</span>) <span class="ruby-comment cmt"># BUG? Always returns true</span>&#x000A;38: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000050-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 33</span>&#x000A;33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy</span>(<span class="ruby-identifier">name</span>)&#x000A;34: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">name</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Keypair</span>)&#x000A;35: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No name provided&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)&#x000A;36: <span class="ruby-identifier">ret</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">delete_keypair</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>)&#x000A;37: (<span class="ruby-identifier">ret</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">ret</span>[<span class="ruby-value str">'return'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'true'</span>) <span class="ruby-comment cmt"># BUG? Always returns true</span>&#x000A;38: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000080'>
- <a name='M000080'> </a>
+ <div class='method public-instance' id='method-M000056'>
+ <a name='M000056'> </a>
<div class='synopsis'>
<span class='name'>exists?</span>
<span class='arguments'>(name)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000080-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000056-source'); return false">
[show source]
</a>
- <pre id='M000080-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 83</span>&#x000A;83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">name</span>)&#x000A;84: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>&#x000A;85: <span class="ruby-identifier">kp</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>&#x000A;86: <span class="ruby-operator">!</span><span class="ruby-identifier">kp</span>.<span class="ruby-identifier">nil?</span>&#x000A;87: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000056-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 83</span>&#x000A;83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">name</span>)&#x000A;84: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>&#x000A;85: <span class="ruby-identifier">kp</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>&#x000A;86: <span class="ruby-operator">!</span><span class="ruby-identifier">kp</span>.<span class="ruby-identifier">nil?</span>&#x000A;87: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000077'>
- <a name='M000077'> </a>
+ <div class='method public-instance' id='method-M000053'>
+ <a name='M000053'> </a>
<div class='synopsis'>
<span class='name'>from_hash</span>
<span class='arguments'>(h)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000077-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000053-source'); return false">
[show source]
</a>
- <pre id='M000077-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 59</span>&#x000A;59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">h</span>)&#x000A;60: <span class="ruby-comment cmt"># keyName: test-c5g4v3pe</span>&#x000A;61: <span class="ruby-comment cmt"># keyFingerprint: 65:d0:ce:e7:6a:b0:88:4a:9c:c7:2d:b8:33:0c:fd:3b:c8:0f:0a:3c</span>&#x000A;62: <span class="ruby-comment cmt"># keyMaterial: |-</span>&#x000A;63: <span class="ruby-comment cmt"># -----BEGIN RSA PRIVATE KEY-----</span>&#x000A;64: <span class="ruby-comment cmt"># </span>&#x000A;65: <span class="ruby-identifier">keypair</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Keypair</span>.<span class="ruby-identifier">new</span>&#x000A;66: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">fingerprint</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyFingerprint'</span>]&#x000A;67: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">name</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyName'</span>]&#x000A;68: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">private_key</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyMaterial'</span>]&#x000A;69: <span class="ruby-identifier">keypair</span>&#x000A;70: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000053-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 59</span>&#x000A;59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">h</span>)&#x000A;60: <span class="ruby-comment cmt"># keyName: test-c5g4v3pe</span>&#x000A;61: <span class="ruby-comment cmt"># keyFingerprint: 65:d0:ce:e7:6a:b0:88:4a:9c:c7:2d:b8:33:0c:fd:3b:c8:0f:0a:3c</span>&#x000A;62: <span class="ruby-comment cmt"># keyMaterial: |-</span>&#x000A;63: <span class="ruby-comment cmt"># -----BEGIN RSA PRIVATE KEY-----</span>&#x000A;64: <span class="ruby-comment cmt"># </span>&#x000A;65: <span class="ruby-identifier">keypair</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Keypair</span>.<span class="ruby-identifier">new</span>&#x000A;66: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">fingerprint</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyFingerprint'</span>]&#x000A;67: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">name</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyName'</span>]&#x000A;68: <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">private_key</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'keyMaterial'</span>]&#x000A;69: <span class="ruby-identifier">keypair</span>&#x000A;70: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000079'>
- <a name='M000079'> </a>
+ <div class='method public-instance' id='method-M000055'>
+ <a name='M000055'> </a>
<div class='synopsis'>
<span class='name'>get</span>
<span class='arguments'>(name)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000079-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000055-source'); return false">
[show source]
</a>
- <pre id='M000079-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 77</span>&#x000A;77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)&#x000A;78: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list</span>(<span class="ruby-identifier">name</span>) <span class="ruby-operator">||</span> []&#x000A;79: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;80: <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">first</span>&#x000A;81: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000055-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 77</span>&#x000A;77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)&#x000A;78: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list</span>(<span class="ruby-identifier">name</span>) <span class="ruby-operator">||</span> []&#x000A;79: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;80: <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">first</span>&#x000A;81: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000075'>
- <a name='M000075'> </a>
+ <div class='method public-instance' id='method-M000051'>
+ <a name='M000051'> </a>
<div class='synopsis'>
<span class='name'>list</span>
<span class='arguments'>(*names)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000075-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000051-source'); return false">
[show source]
</a>
- <pre id='M000075-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 40</span>&#x000A;40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)&#x000A;41: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list_as_hash</span>(<span class="ruby-identifier">names</span>)&#x000A;42: <span class="ruby-identifier">keypairs</span> <span class="ruby-operator">&amp;&amp;=</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">values</span>&#x000A;43: <span class="ruby-identifier">keypairs</span>&#x000A;44: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000051-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 40</span>&#x000A;40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)&#x000A;41: <span class="ruby-identifier">keypairs</span> = <span class="ruby-identifier">list_as_hash</span>(<span class="ruby-identifier">names</span>)&#x000A;42: <span class="ruby-identifier">keypairs</span> <span class="ruby-operator">&amp;&amp;=</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">values</span>&#x000A;43: <span class="ruby-identifier">keypairs</span>&#x000A;44: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000076'>
- <a name='M000076'> </a>
+ <div class='method public-instance' id='method-M000052'>
+ <a name='M000052'> </a>
<div class='synopsis'>
<span class='name'>list_as_hash</span>
<span class='arguments'>(*names)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000076-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000052-source'); return false">
[show source]
</a>
- <pre id='M000076-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 46</span>&#x000A;46: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list_as_hash</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)&#x000A;47: <span class="ruby-identifier">names</span> = <span class="ruby-identifier">names</span>.<span class="ruby-identifier">flatten</span>&#x000A;48: <span class="ruby-identifier">klist</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">describe_keypairs</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">names</span>)&#x000A;49: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">klist</span>[<span class="ruby-value str">'keySet'</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)&#x000A;50: <span class="ruby-identifier">keypairs</span> = {}&#x000A;51: <span class="ruby-identifier">klist</span>[<span class="ruby-value str">'keySet'</span>][<span class="ruby-value str">'item'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">oldkp</span><span class="ruby-operator">|</span> &#x000A;52: <span class="ruby-identifier">kp</span> = <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">oldkp</span>)&#x000A;53: <span class="ruby-identifier">keypairs</span>[<span class="ruby-identifier">kp</span>.<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">kp</span>&#x000A;54: <span class="ruby-keyword kw">end</span>&#x000A;55: <span class="ruby-identifier">keypairs</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;56: <span class="ruby-identifier">keypairs</span>&#x000A;57: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000052-source'> <span class="ruby-comment cmt"># File lib/rudy/aws/ec2/keypair.rb, line 46</span>&#x000A;46: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list_as_hash</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)&#x000A;47: <span class="ruby-identifier">names</span> = <span class="ruby-identifier">names</span>.<span class="ruby-identifier">flatten</span>&#x000A;48: <span class="ruby-identifier">klist</span> = <span class="ruby-ivar">@@ec2</span>.<span class="ruby-identifier">describe_keypairs</span>(<span class="ruby-identifier">:key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">names</span>)&#x000A;49: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">klist</span>[<span class="ruby-value str">'keySet'</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)&#x000A;50: <span class="ruby-identifier">keypairs</span> = {}&#x000A;51: <span class="ruby-identifier">klist</span>[<span class="ruby-value str">'keySet'</span>][<span class="ruby-value str">'item'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">oldkp</span><span class="ruby-operator">|</span> &#x000A;52: <span class="ruby-identifier">kp</span> = <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">oldkp</span>)&#x000A;53: <span class="ruby-identifier">keypairs</span>[<span class="ruby-identifier">kp</span>.<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">kp</span>&#x000A;54: <span class="ruby-keyword kw">end</span>&#x000A;55: <span class="ruby-identifier">keypairs</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">keypairs</span>.<span class="ruby-identifier">empty?</span>&#x000A;56: <span class="ruby-identifier">keypairs</span>&#x000A;57: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
View
4 classes/Rudy/CLI.html
@@ -100,10 +100,10 @@
<a href="../../files/lib/rudy/cli/info_rb.html">lib/rudy/cli/info.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/rudy/cli/machines_rb.html">lib/rudy/cli/machines.rb</a>
+ <a href="../../files/lib/rudy/cli/keypairs_rb.html">lib/rudy/cli/keypairs.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/rudy/cli/keypairs_rb.html">lib/rudy/cli/keypairs.rb</a>
+ <a href="../../files/lib/rudy/cli/machines_rb.html">lib/rudy/cli/machines.rb</a>
</li>
<li class='other'>
<a href="../../files/lib/rudy/cli/metadata_rb.html">lib/rudy/cli/metadata.rb</a>
View
10 classes/Rudy/CLI/AWS/EC2/Snapshots.html
@@ -65,7 +65,7 @@ <h1 class='name'>
<a class='source-toggle' href='#' onclick="toggleCode('M000217-source'); return false">
[show source]
</a>
- <pre id='M000217-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/ec2/snapshots.rb, line 14</span>&#x000A;14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_snapshots</span>&#x000A;15: <span class="ruby-identifier">snap</span> = <span class="ruby-identifier">execute_action</span> { <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Snapshots</span>.<span class="ruby-identifier">create</span>(<span class="ruby-ivar">@volume</span>.<span class="ruby-identifier">awsid</span>) }&#x000A;16: <span class="ruby-identifier">print_stobject</span> <span class="ruby-identifier">snap</span>&#x000A;17: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000217-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/ec2/snapshots.rb, line 13</span>&#x000A;13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_snapshots</span>&#x000A;14: <span class="ruby-identifier">snap</span> = <span class="ruby-identifier">execute_action</span> { <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Snapshots</span>.<span class="ruby-identifier">create</span>(<span class="ruby-ivar">@volume</span>.<span class="ruby-identifier">awsid</span>) }&#x000A;15: <span class="ruby-identifier">print_stobject</span> <span class="ruby-identifier">snap</span>&#x000A;16: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
<div class='method public-instance' id='method-M000216'>
@@ -78,7 +78,7 @@ <h1 class='name'>
<a class='source-toggle' href='#' onclick="toggleCode('M000216-source'); return false">
[show source]
</a>
- <pre id='M000216-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/ec2/snapshots.rb, line 8</span>&#x000A; 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_snapshots_valid?</span>&#x000A; 9: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Drydock</span><span class="ruby-operator">::</span><span class="ruby-constant">ArgError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'volume ID'</span>, <span class="ruby-ivar">@alias</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">volume</span>&#x000A;10: <span class="ruby-ivar">@volume</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Volumes</span>.<span class="ruby-identifier">get</span>(<span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">volid</span>)&#x000A;11: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Volume #{@volume.awsid} does not exist&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@volume</span>&#x000A;12: <span class="ruby-keyword kw">true</span>&#x000A;13: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000216-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/ec2/snapshots.rb, line 8</span>&#x000A; 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_snapshots_valid?</span>&#x000A; 9: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Drydock</span><span class="ruby-operator">::</span><span class="ruby-constant">ArgError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'volume ID'</span>, <span class="ruby-ivar">@alias</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">volume</span>&#x000A;10: <span class="ruby-ivar">@volume</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Volumes</span>.<span class="ruby-identifier">get</span>(<span class="ruby-ivar">@option</span>.<span class="ruby-identifier">volume</span>)&#x000A;11: <span class="ruby-operator">!</span><span class="ruby-ivar">@volume</span>.<span class="ruby-identifier">nil?</span>&#x000A;12: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
<div class='method public-instance' id='method-M000219'>
@@ -91,7 +91,7 @@ <h1 class='name'>
<a class='source-toggle' href='#' onclick="toggleCode('M000219-source'); return false">
[show source]
</a>
- <pre id='M000219-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/ec2/snapshots.rb, line 25</span>&#x000A;25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy_snapshots</span>&#x000A;26: <span class="ruby-identifier">li</span> <span class="ruby-node">&quot;Destroying: #{@snap.awsid}&quot;</span>&#x000A;27: <span class="ruby-identifier">execute_check</span>(<span class="ruby-identifier">:medium</span>)&#x000A;28: <span class="ruby-identifier">execute_action</span> { <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Snapshots</span>.<span class="ruby-identifier">destroy</span>(<span class="ruby-ivar">@snap</span>.<span class="ruby-identifier">awsid</span>) }&#x000A;29: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000219-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/ec2/snapshots.rb, line 24</span>&#x000A;24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy_snapshots</span>&#x000A;25: <span class="ruby-identifier">li</span> <span class="ruby-node">&quot;Destroying: #{@snap.awsid}&quot;</span>&#x000A;26: <span class="ruby-identifier">execute_check</span>(<span class="ruby-identifier">:medium</span>)&#x000A;27: <span class="ruby-identifier">execute_action</span> { <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Snapshots</span>.<span class="ruby-identifier">destroy</span>(<span class="ruby-ivar">@snap</span>.<span class="ruby-identifier">awsid</span>) }&#x000A;28: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
<div class='method public-instance' id='method-M000218'>
@@ -104,7 +104,7 @@ <h1 class='name'>
<a class='source-toggle' href='#' onclick="toggleCode('M000218-source'); return false">
[show source]
</a>
- <pre id='M000218-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/ec2/snapshots.rb, line 19</span>&#x000A;19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy_snapshots_valid?</span>&#x000A;20: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Drydock</span><span class="ruby-operator">::</span><span class="ruby-constant">ArgError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'snapshot ID'</span>, <span class="ruby-ivar">@alias</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">snapid</span>&#x000A;21: <span class="ruby-ivar">@snap</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Snapshots</span>.<span class="ruby-identifier">get</span>(<span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">snapid</span>)&#x000A;22: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Snapshot #{@snap.awsid} does not exist&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@snap</span>&#x000A;23: <span class="ruby-keyword kw">true</span>&#x000A;24: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000218-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/ec2/snapshots.rb, line 18</span>&#x000A;18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy_snapshots_valid?</span>&#x000A;19: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Drydock</span><span class="ruby-operator">::</span><span class="ruby-constant">ArgError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'snapshot ID'</span>, <span class="ruby-ivar">@alias</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">snapid</span>&#x000A;20: <span class="ruby-ivar">@snap</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Snapshots</span>.<span class="ruby-identifier">get</span>(<span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">snapid</span>)&#x000A;21: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Snapshot #{@snap.awsid} does not exist&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@snap</span>&#x000A;22: <span class="ruby-keyword kw">true</span>&#x000A;23: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
<div class='method public-instance' id='method-M000220'>
@@ -117,7 +117,7 @@ <h1 class='name'>
<a class='source-toggle' href='#' onclick="toggleCode('M000220-source'); return false">
[show source]
</a>
- <pre id='M000220-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/ec2/snapshots.rb, line 31</span>&#x000A;31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">snapshots</span>&#x000A;32: <span class="ruby-identifier">snaps</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Snapshots</span>.<span class="ruby-identifier">list</span> <span class="ruby-operator">||</span> []&#x000A;33: <span class="ruby-identifier">print_stobjects</span> <span class="ruby-identifier">snaps</span>&#x000A;34: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000220-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/ec2/snapshots.rb, line 30</span>&#x000A;30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">snapshots</span>&#x000A;31: <span class="ruby-identifier">snaps</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Snapshots</span>.<span class="ruby-identifier">list</span> <span class="ruby-operator">||</span> []&#x000A;32: <span class="ruby-identifier">print_stobjects</span> <span class="ruby-identifier">snaps</span>&#x000A;33: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
View
4 classes/Rudy/CLI/AWS/S3.html
@@ -31,10 +31,10 @@ <h1 class='name'>
</h1>
<ol class='paths'>
<li>
- <a href="../../../../files/lib/rudy/cli/aws/s3/buckets_rb.html">lib/rudy/cli/aws/s3/buckets.rb</a>
+ <a href="../../../../files/lib/rudy/cli/aws/s3/store_rb.html">lib/rudy/cli/aws/s3/store.rb</a>
</li>
<li class='other'>
- <a href="../../../../files/lib/rudy/cli/aws/s3/store_rb.html">lib/rudy/cli/aws/s3/store.rb</a>
+ <a href="../../../../files/lib/rudy/cli/aws/s3/buckets_rb.html">lib/rudy/cli/aws/s3/buckets.rb</a>
</li>
<li class='other'>
<a href="../../../../files/lib/rudy/cli_rb.html">lib/rudy/cli.rb</a>
View
50 classes/Rudy/CLI/AWS/S3/Buckets.html
@@ -45,79 +45,79 @@ <h1 class='name'>
<h2>Methods</h2>
<h3>public instance</h3>
<ol>
- <li><a href="#M000231">buckets</a></li>
- <li><a href="#M000233">create_buckets</a></li>
- <li><a href="#M000232">create_buckets_valid?</a></li>
- <li><a href="#M000235">destroy_buckets</a></li>
- <li><a href="#M000234">destroy_buckets_valid?</a></li>
+ <li><a href="#M000233">buckets</a></li>
+ <li><a href="#M000235">create_buckets</a></li>
+ <li><a href="#M000234">create_buckets_valid?</a></li>
+ <li><a href="#M000237">destroy_buckets</a></li>
+ <li><a href="#M000236">destroy_buckets_valid?</a></li>
</ol>
</div>
<div id='section'>
<div id='methods'>
<h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000231'>
- <a name='M000231'> </a>
+ <div class='method public-instance' id='method-M000233'>
+ <a name='M000233'> </a>
<div class='synopsis'>
<span class='name'>buckets</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000231-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000233-source'); return false">
[show source]
</a>
- <pre id='M000231-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/buckets.rb, line 9</span>&#x000A; 9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">buckets</span>&#x000A;10: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No bucket name supplied&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">list</span>&#x000A;11: <span class="ruby-identifier">s3</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">S3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">accesskey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">secretkey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">region</span>)&#x000A;12: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">list</span>&#x000A;13: (<span class="ruby-identifier">s3</span>.<span class="ruby-identifier">list_buckets</span> <span class="ruby-operator">||</span> []).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span>&#x000A;14: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">name</span>&#x000A;15: <span class="ruby-keyword kw">end</span>&#x000A;16: <span class="ruby-keyword kw">else</span>&#x000A;17: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;All objects in #{@argv.name}:&quot;</span>&#x000A;18: (<span class="ruby-identifier">s3</span>.<span class="ruby-identifier">list_bucket_objects</span>(<span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span>) <span class="ruby-operator">||</span> []).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>&#x000A;19: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">o</span>&#x000A;20: <span class="ruby-keyword kw">end</span>&#x000A;21: <span class="ruby-keyword kw">end</span>&#x000A;22: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000233-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/buckets.rb, line 9</span>&#x000A; 9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">buckets</span>&#x000A;10: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No bucket name supplied&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">list</span>&#x000A;11: <span class="ruby-identifier">s3</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">S3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">accesskey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">secretkey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">region</span>)&#x000A;12: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">list</span>&#x000A;13: (<span class="ruby-identifier">s3</span>.<span class="ruby-identifier">list_buckets</span> <span class="ruby-operator">||</span> []).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span>&#x000A;14: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">name</span>&#x000A;15: <span class="ruby-keyword kw">end</span>&#x000A;16: <span class="ruby-keyword kw">else</span>&#x000A;17: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;All objects in #{@argv.name}:&quot;</span>&#x000A;18: (<span class="ruby-identifier">s3</span>.<span class="ruby-identifier">list_bucket_objects</span>(<span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span>) <span class="ruby-operator">||</span> []).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>&#x000A;19: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">o</span>&#x000A;20: <span class="ruby-keyword kw">end</span>&#x000A;21: <span class="ruby-keyword kw">end</span>&#x000A;22: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000233'>
- <a name='M000233'> </a>
+ <div class='method public-instance' id='method-M000235'>
+ <a name='M000235'> </a>
<div class='synopsis'>
<span class='name'>create_buckets</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000233-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000235-source'); return false">
[show source]
</a>
- <pre id='M000233-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/buckets.rb, line 28</span>&#x000A;28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_buckets</span>&#x000A;29: <span class="ruby-identifier">s3</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">S3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">accesskey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">secretkey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">region</span>)&#x000A;30: <span class="ruby-identifier">s3</span>.<span class="ruby-identifier">create_bucket</span>(<span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span>, <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">location</span>)&#x000A;31: <span class="ruby-identifier">buckets</span>&#x000A;32: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000235-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/buckets.rb, line 28</span>&#x000A;28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_buckets</span>&#x000A;29: <span class="ruby-identifier">s3</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">S3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">accesskey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">secretkey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">region</span>)&#x000A;30: <span class="ruby-identifier">s3</span>.<span class="ruby-identifier">create_bucket</span>(<span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span>, <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">location</span>)&#x000A;31: <span class="ruby-identifier">buckets</span>&#x000A;32: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000232'>
- <a name='M000232'> </a>
+ <div class='method public-instance' id='method-M000234'>
+ <a name='M000234'> </a>
<div class='synopsis'>
<span class='name'>create_buckets_valid?</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000232-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000234-source'); return false">
[show source]
</a>
- <pre id='M000232-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/buckets.rb, line 24</span>&#x000A;24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_buckets_valid?</span>&#x000A;25: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No bucket name supplied&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span>&#x000A;26: <span class="ruby-keyword kw">true</span>&#x000A;27: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000234-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/buckets.rb, line 24</span>&#x000A;24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_buckets_valid?</span>&#x000A;25: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No bucket name supplied&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span>&#x000A;26: <span class="ruby-keyword kw">true</span>&#x000A;27: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000235'>
- <a name='M000235'> </a>
+ <div class='method public-instance' id='method-M000237'>
+ <a name='M000237'> </a>
<div class='synopsis'>
<span class='name'>destroy_buckets</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000235-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000237-source'); return false">
[show source]
</a>
- <pre id='M000235-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/buckets.rb, line 38</span>&#x000A;38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy_buckets</span>&#x000A;39: <span class="ruby-identifier">execute_check</span>(<span class="ruby-identifier">:medium</span>)&#x000A;40: <span class="ruby-identifier">s3</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">S3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">accesskey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">secretkey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">region</span>)&#x000A;41: <span class="ruby-identifier">s3</span>.<span class="ruby-identifier">destroy_bucket</span>(<span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span>)&#x000A;42: <span class="ruby-identifier">buckets</span>&#x000A;43: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000237-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/buckets.rb, line 38</span>&#x000A;38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy_buckets</span>&#x000A;39: <span class="ruby-identifier">execute_check</span>(<span class="ruby-identifier">:medium</span>)&#x000A;40: <span class="ruby-identifier">s3</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">S3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">accesskey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">secretkey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">region</span>)&#x000A;41: <span class="ruby-identifier">s3</span>.<span class="ruby-identifier">destroy_bucket</span>(<span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span>)&#x000A;42: <span class="ruby-identifier">buckets</span>&#x000A;43: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000234'>
- <a name='M000234'> </a>
+ <div class='method public-instance' id='method-M000236'>
+ <a name='M000236'> </a>
<div class='synopsis'>
<span class='name'>destroy_buckets_valid?</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000234-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000236-source'); return false">
[show source]
</a>
- <pre id='M000234-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/buckets.rb, line 34</span>&#x000A;34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy_buckets_valid?</span>&#x000A;35: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No bucket name supplied&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span>&#x000A;36: <span class="ruby-keyword kw">true</span>&#x000A;37: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000236-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/buckets.rb, line 34</span>&#x000A;34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy_buckets_valid?</span>&#x000A;35: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No bucket name supplied&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">name</span>&#x000A;36: <span class="ruby-keyword kw">true</span>&#x000A;37: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
View
20 classes/Rudy/CLI/AWS/S3/Store.html
@@ -45,37 +45,37 @@ <h1 class='name'>
<h2>Methods</h2>
<h3>public instance</h3>
<ol>
- <li><a href="#M000237">store</a></li>
- <li><a href="#M000236">store_valid?</a></li>
+ <li><a href="#M000232">store</a></li>
+ <li><a href="#M000231">store_valid?</a></li>
</ol>
</div>
<div id='section'>
<div id='methods'>
<h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000237'>
- <a name='M000237'> </a>
+ <div class='method public-instance' id='method-M000232'>
+ <a name='M000232'> </a>
<div class='synopsis'>
<span class='name'>store</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000237-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000232-source'); return false">
[show source]
</a>
- <pre id='M000237-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/store.rb, line 13</span>&#x000A;13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store</span>&#x000A;14: <span class="ruby-identifier">s3</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">S3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">accesskey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">secretkey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">region</span>)&#x000A;15: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Success: %s&quot;</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">s3</span>.<span class="ruby-identifier">store</span>(<span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">path</span>, <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">bucket</span>)&#x000A;16: &#x000A;17: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000232-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/store.rb, line 13</span>&#x000A;13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store</span>&#x000A;14: <span class="ruby-identifier">s3</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">S3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">accesskey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">secretkey</span>, <span class="ruby-ivar">@@global</span>.<span class="ruby-identifier">region</span>)&#x000A;15: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Success: %s&quot;</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">s3</span>.<span class="ruby-identifier">store</span>(<span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">path</span>, <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">bucket</span>)&#x000A;16: &#x000A;17: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000236'>
- <a name='M000236'> </a>
+ <div class='method public-instance' id='method-M000231'>
+ <a name='M000231'> </a>
<div class='synopsis'>
<span class='name'>store_valid?</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000236-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000231-source'); return false">
[show source]
</a>
- <pre id='M000236-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/store.rb, line 8</span>&#x000A; 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_valid?</span>&#x000A; 9: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No path specified&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">path</span>&#x000A;10: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No bucket specified&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">bucket</span>&#x000A;11: <span class="ruby-keyword kw">true</span>&#x000A;12: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000231-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/aws/s3/store.rb, line 8</span>&#x000A; 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_valid?</span>&#x000A; 9: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No path specified&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@argv</span>.<span class="ruby-identifier">path</span>&#x000A;10: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No bucket specified&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@option</span>.<span class="ruby-identifier">bucket</span>&#x000A;11: <span class="ruby-keyword kw">true</span>&#x000A;12: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
View
60 classes/Rudy/CLI/Keypairs.html
@@ -45,93 +45,93 @@ <h1 class='name'>
<h2>Methods</h2>
<h3>public instance</h3>
<ol>
- <li><a href="#M000294">keypairs</a></li>
- <li><a href="#M000292">keypairs_add</a></li>
- <li><a href="#M000291">keypairs_add_valid?</a></li>
- <li><a href="#M000296">keypairs_show</a></li>
- <li><a href="#M000295">keypairs_show_valid?</a></li>
- <li><a href="#M000293">keypairs_valid?</a></li>
+ <li><a href="#M000282">keypairs</a></li>
+ <li><a href="#M000280">keypairs_add</a></li>
+ <li><a href="#M000279">keypairs_add_valid?</a></li>
+ <li><a href="#M000284">keypairs_show</a></li>
+ <li><a href="#M000283">keypairs_show_valid?</a></li>
+ <li><a href="#M000281">keypairs_valid?</a></li>
</ol>
</div>
<div id='section'>
<div id='methods'>
<h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000294'>
- <a name='M000294'> </a>
+ <div class='method public-instance' id='method-M000282'>
+ <a name='M000282'> </a>
<div class='synopsis'>
<span class='name'>keypairs</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000294-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000282-source'); return false">
[show source]
</a>
- <pre id='M000294-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 24</span>&#x000A;24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs</span>&#x000A;25: <span class="ruby-identifier">li</span> <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Keypairs</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">current_user_keypairname</span>)&#x000A;26: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000282-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 24</span>&#x000A;24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs</span>&#x000A;25: <span class="ruby-identifier">li</span> <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">AWS</span><span class="ruby-operator">::</span><span class="ruby-constant">EC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Keypairs</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">current_user_keypairname</span>)&#x000A;26: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000292'>
- <a name='M000292'> </a>
+ <div class='method public-instance' id='method-M000280'>
+ <a name='M000280'> </a>
<div class='synopsis'>
<span class='name'>keypairs_add</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000292-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000280-source'); return false">
[show source]
</a>
- <pre id='M000292-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 12</span>&#x000A;12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs_add</span> &#x000A;13: <span class="ruby-identifier">li</span> <span class="ruby-identifier">current_group_name</span>&#x000A;14: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000280-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 12</span>&#x000A;12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs_add</span> &#x000A;13: <span class="ruby-identifier">li</span> <span class="ruby-identifier">current_group_name</span>&#x000A;14: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000291'>
- <a name='M000291'> </a>
+ <div class='method public-instance' id='method-M000279'>
+ <a name='M000279'> </a>
<div class='synopsis'>
<span class='name'>keypairs_add_valid?</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000291-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000279-source'); return false">
[show source]
</a>
- <pre id='M000291-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 8</span>&#x000A; 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs_add_valid?</span>&#x000A; 9: <span class="ruby-keyword kw">true</span>&#x000A;10: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000279-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 8</span>&#x000A; 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs_add_valid?</span>&#x000A; 9: <span class="ruby-keyword kw">true</span>&#x000A;10: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000296'>
- <a name='M000296'> </a>
+ <div class='method public-instance' id='method-M000284'>
+ <a name='M000284'> </a>
<div class='synopsis'>
<span class='name'>keypairs_show</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000296-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000284-source'); return false">
[show source]
</a>
- <pre id='M000296-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 32</span>&#x000A;32: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs_show</span>&#x000A;33: <span class="ruby-identifier">content</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-ivar">@pkey</span>)&#x000A;34: <span class="ruby-identifier">rkey</span> = <span class="ruby-constant">Rye</span><span class="ruby-operator">::</span><span class="ruby-constant">Key</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">content</span>&#x000A;35: <span class="ruby-identifier">li</span> <span class="ruby-node">&quot;# #{@pkey}&quot;</span>&#x000A;36: <span class="ruby-identifier">li</span> <span class="ruby-identifier">content</span>&#x000A;37: <span class="ruby-identifier">li</span> <span class="ruby-identifier">rkey</span>.<span class="ruby-identifier">public_key</span>&#x000A;38: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000284-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 32</span>&#x000A;32: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs_show</span>&#x000A;33: <span class="ruby-identifier">content</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-ivar">@pkey</span>)&#x000A;34: <span class="ruby-identifier">rkey</span> = <span class="ruby-constant">Rye</span><span class="ruby-operator">::</span><span class="ruby-constant">Key</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">content</span>&#x000A;35: <span class="ruby-identifier">li</span> <span class="ruby-node">&quot;# #{@pkey}&quot;</span>&#x000A;36: <span class="ruby-identifier">li</span> <span class="ruby-identifier">content</span>&#x000A;37: <span class="ruby-identifier">li</span> <span class="ruby-identifier">rkey</span>.<span class="ruby-identifier">public_key</span>&#x000A;38: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000295'>
- <a name='M000295'> </a>
+ <div class='method public-instance' id='method-M000283'>
+ <a name='M000283'> </a>
<div class='synopsis'>
<span class='name'>keypairs_show_valid?</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000295-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000283-source'); return false">
[show source]
</a>
- <pre id='M000295-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 28</span>&#x000A;28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs_show_valid?</span>&#x000A;29: <span class="ruby-identifier">keypairs_valid?</span>&#x000A;30: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000283-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 28</span>&#x000A;28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs_show_valid?</span>&#x000A;29: <span class="ruby-identifier">keypairs_valid?</span>&#x000A;30: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000293'>
- <a name='M000293'> </a>
+ <div class='method public-instance' id='method-M000281'>
+ <a name='M000281'> </a>
<div class='synopsis'>
<span class='name'>keypairs_valid?</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000293-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000281-source'); return false">
[show source]
</a>
- <pre id='M000293-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 16</span>&#x000A;16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs_valid?</span>&#x000A;17: <span class="ruby-ivar">@pkey</span> = <span class="ruby-identifier">current_user_keypairpath</span>&#x000A;18: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span> <span class="ruby-ivar">@pkey</span>&#x000A;19: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;No private key file for #{current_machine_user} in #{current_group_name}&quot;</span>&#x000A;20: <span class="ruby-keyword kw">end</span>&#x000A;21: <span class="ruby-keyword kw">true</span>&#x000A;22: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000281-source'> <span class="ruby-comment cmt"># File lib/rudy/cli/keypairs.rb, line 16</span>&#x000A;16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keypairs_valid?</span>&#x000A;17: <span class="ruby-ivar">@pkey</span> = <span class="ruby-identifier">current_user_keypairpath</span>&#x000A;18: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span> <span class="ruby-ivar">@pkey</span>&#x000A;19: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;No private key file for #{current_machine_user} in #{current_group_name}&quot;</span>&#x000A;20: <span class="ruby-keyword kw">end</span>&#x000A;21: <span class="ruby-keyword kw">true</span>&#x000A;22: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
View
120 classes/Rudy/CLI/Machines.html
60 additions, 60 deletions not shown
View
60 classes/Rudy/Global.html
@@ -54,15 +54,15 @@
<h2>Methods</h2>
<h3>public class</h3>
<ol>
- <li><a href="#M000540">new</a></li>
+ <li><a href="#M000537">new</a></li>
</ol>
<h3>public instance</h3>
<ol>
- <li><a href="#M000541">apply_config</a></li>
- <li><a href="#M000544">region=</a></li>
- <li><a href="#M000545">to_s</a></li>
- <li><a href="#M000542">update</a></li>
- <li><a href="#M000543">zone=</a></li>
+ <li><a href="#M000538">apply_config</a></li>
+ <li><a href="#M000541">region=</a></li>
+ <li><a href="#M000542">to_s</a></li>
+ <li><a href="#M000539">update</a></li>
+ <li><a href="#M000540">zone=</a></li>
</ol>
</div>
<div id='section'>
@@ -80,83 +80,83 @@ <h2 class='section-bar'>Attributes</h2>
</div>
<div id='methods'>
<h2>Public class methods</h2>
- <div class='method public-class' id='method-M000540'>
- <a name='M000540'> </a>
+ <div class='method public-class' id='method-M000537'>
+ <a name='M000537'> </a>
<div class='synopsis'>
<span class='name'>new</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000540-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000537-source'); return false">
[show source]
</a>
- <pre id='M000540-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 50</span>&#x000A;50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>&#x000A;51: <span class="ruby-identifier">postprocess</span>&#x000A;52: <span class="ruby-comment cmt"># These attributes MUST have values. </span>&#x000A;53: <span class="ruby-ivar">@verbose</span> <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>&#x000A;54: <span class="ruby-ivar">@nocolor</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@nocolor</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;false&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@nocolor</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>&#x000A;55: <span class="ruby-ivar">@quiet</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">false</span>&#x000A;56: <span class="ruby-ivar">@parallel</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">false</span>&#x000A;57: <span class="ruby-ivar">@force</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">false</span>&#x000A;58: <span class="ruby-ivar">@format</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">:string</span> <span class="ruby-comment cmt"># as in, to_s</span>&#x000A;59: <span class="ruby-ivar">@print_header</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@print_header</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>&#x000A;60: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000537-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 50</span>&#x000A;50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>&#x000A;51: <span class="ruby-identifier">postprocess</span>&#x000A;52: <span class="ruby-comment cmt"># These attributes MUST have values. </span>&#x000A;53: <span class="ruby-ivar">@verbose</span> <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>&#x000A;54: <span class="ruby-ivar">@nocolor</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@nocolor</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;false&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@nocolor</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>&#x000A;55: <span class="ruby-ivar">@quiet</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">false</span>&#x000A;56: <span class="ruby-ivar">@parallel</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">false</span>&#x000A;57: <span class="ruby-ivar">@force</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">false</span>&#x000A;58: <span class="ruby-ivar">@format</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">:string</span> <span class="ruby-comment cmt"># as in, to_s</span>&#x000A;59: <span class="ruby-ivar">@print_header</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@print_header</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>&#x000A;60: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
<h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000541'>
- <a name='M000541'> </a>
+ <div class='method public-instance' id='method-M000538'>
+ <a name='M000538'> </a>
<div class='synopsis'>
<span class='name'>apply_config</span>
<span class='arguments'>(config)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000541-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000538-source'); return false">
[show source]
</a>
- <pre id='M000541-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 62</span>&#x000A;62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">apply_config</span>(<span class="ruby-identifier">config</span>)&#x000A;63: &#x000A;64: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>)&#x000A;65: <span class="ruby-identifier">clear_system_defaults</span> <span class="ruby-comment cmt"># temporarily unapply default values</span>&#x000A;66: &#x000A;67: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">defaults?</span>&#x000A;68: <span class="ruby-comment cmt"># Apply the &quot;color&quot; default before &quot;nocolor&quot; so nocolor has presedence</span>&#x000A;69: <span class="ruby-ivar">@nocolor</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">config</span>.<span class="ruby-identifier">defaults</span>.<span class="ruby-identifier">color</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">defaults</span>.<span class="ruby-identifier">color</span>.<span class="ruby-identifier">nil?</span>&#x000A;70: <span class="ruby-comment cmt"># WARNING: Don't add user to this list. The global value should return</span>&#x000A;71: <span class="ruby-comment cmt"># the value specified on the command line or nil. If it is nil, we can</span>&#x000A;72: <span class="ruby-comment cmt"># check the value from the machines config. If that is nil, we use the</span>&#x000A;73: <span class="ruby-comment cmt"># value from the defaults config. </span>&#x000A;74: <span class="ruby-comment cmt"># WARNING: Don't add bucket either or any machines configuration param </span>&#x000A;75: <span class="ruby-comment cmt"># TODO: investigate removing this apply_config method</span>&#x000A;76: <span class="ruby-node">%w[region zone environment role position bucket&#x000A;77: localhost nocolor quiet auto force parallel]</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>&#x000A;78: <span class="ruby-identifier">curval</span>, <span class="ruby-identifier">defval</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name</span>), <span class="ruby-identifier">config</span>.<span class="ruby-identifier">defaults</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name</span>)&#x000A;79: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">curval</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">defval</span>.<span class="ruby-identifier">nil?</span>&#x000A;80: <span class="ruby-comment cmt"># Don't use the accessors. These are defaults so no Region magic. </span>&#x000A;81: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{name}&quot;</span>, <span class="ruby-identifier">defval</span>) &#x000A;82: <span class="ruby-keyword kw">end</span>&#x000A;83: <span class="ruby-keyword kw">end</span>&#x000A;84: <span class="ruby-keyword kw">end</span>&#x000A;85: &#x000A;86: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">accounts?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">accounts</span>.<span class="ruby-identifier">aws</span>&#x000A;87: <span class="ruby-node">%w[accesskey secretkey accountnum cert pkey]</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>&#x000A;88: <span class="ruby-identifier">val</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">accounts</span>.<span class="ruby-identifier">aws</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name</span>)&#x000A;89: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{name}=&quot;</span>, <span class="ruby-identifier">val</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">nil?</span>&#x000A;90: <span class="ruby-keyword kw">end</span>&#x000A;91: <span class="ruby-keyword kw">end</span>&#x000A;92: <span class="ruby-identifier">postprocess</span>&#x000A;93: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000538-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 62</span>&#x000A;62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">apply_config</span>(<span class="ruby-identifier">config</span>)&#x000A;63: &#x000A;64: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>)&#x000A;65: <span class="ruby-identifier">clear_system_defaults</span> <span class="ruby-comment cmt"># temporarily unapply default values</span>&#x000A;66: &#x000A;67: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">defaults?</span>&#x000A;68: <span class="ruby-comment cmt"># Apply the &quot;color&quot; default before &quot;nocolor&quot; so nocolor has presedence</span>&#x000A;69: <span class="ruby-ivar">@nocolor</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">config</span>.<span class="ruby-identifier">defaults</span>.<span class="ruby-identifier">color</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">defaults</span>.<span class="ruby-identifier">color</span>.<span class="ruby-identifier">nil?</span>&#x000A;70: <span class="ruby-comment cmt"># WARNING: Don't add user to this list. The global value should return</span>&#x000A;71: <span class="ruby-comment cmt"># the value specified on the command line or nil. If it is nil, we can</span>&#x000A;72: <span class="ruby-comment cmt"># check the value from the machines config. If that is nil, we use the</span>&#x000A;73: <span class="ruby-comment cmt"># value from the defaults config. </span>&#x000A;74: <span class="ruby-comment cmt"># WARNING: Don't add bucket either or any machines configuration param </span>&#x000A;75: <span class="ruby-comment cmt"># TODO: investigate removing this apply_config method</span>&#x000A;76: <span class="ruby-node">%w[region zone environment role position bucket&#x000A;77: localhost nocolor quiet auto force parallel]</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>&#x000A;78: <span class="ruby-identifier">curval</span>, <span class="ruby-identifier">defval</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name</span>), <span class="ruby-identifier">config</span>.<span class="ruby-identifier">defaults</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name</span>)&#x000A;79: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">curval</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">defval</span>.<span class="ruby-identifier">nil?</span>&#x000A;80: <span class="ruby-comment cmt"># Don't use the accessors. These are defaults so no Region magic. </span>&#x000A;81: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{name}&quot;</span>, <span class="ruby-identifier">defval</span>) &#x000A;82: <span class="ruby-keyword kw">end</span>&#x000A;83: <span class="ruby-keyword kw">end</span>&#x000A;84: <span class="ruby-keyword kw">end</span>&#x000A;85: &#x000A;86: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">accounts?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">accounts</span>.<span class="ruby-identifier">aws</span>&#x000A;87: <span class="ruby-node">%w[accesskey secretkey accountnum cert pkey]</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>&#x000A;88: <span class="ruby-identifier">val</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">accounts</span>.<span class="ruby-identifier">aws</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name</span>)&#x000A;89: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{name}=&quot;</span>, <span class="ruby-identifier">val</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">nil?</span>&#x000A;90: <span class="ruby-keyword kw">end</span>&#x000A;91: <span class="ruby-keyword kw">end</span>&#x000A;92: <span class="ruby-identifier">postprocess</span>&#x000A;93: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000544'>
- <a name='M000544'> </a>
+ <div class='method public-instance' id='method-M000541'>
+ <a name='M000541'> </a>
<div class='synopsis'>
<span class='name'>region=</span>
<span class='arguments'>(r)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000544-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000541-source'); return false">
[show source]
</a>
- <pre id='M000544-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 106</span>&#x000A;106: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">region=</span>(<span class="ruby-identifier">r</span>)&#x000A;107: <span class="ruby-ivar">@region</span> = <span class="ruby-identifier">r</span>&#x000A;108: <span class="ruby-ivar">@zone</span> = <span class="ruby-node">&quot;#{@region}b&quot;</span>.<span class="ruby-identifier">to_sym</span>&#x000A;109: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000541-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 106</span>&#x000A;106: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">region=</span>(<span class="ruby-identifier">r</span>)&#x000A;107: <span class="ruby-ivar">@region</span> = <span class="ruby-identifier">r</span>&#x000A;108: <span class="ruby-ivar">@zone</span> = <span class="ruby-node">&quot;#{@region}b&quot;</span>.<span class="ruby-identifier">to_sym</span>&#x000A;109: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000545'>
- <a name='M000545'> </a>
+ <div class='method public-instance' id='method-M000542'>
+ <a name='M000542'> </a>
<div class='synopsis'>
<span class='name'>to_s</span>
<span class='arguments'>(*args)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000545-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000542-source'); return false">
[show source]
</a>
- <pre id='M000545-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 111</span>&#x000A;111: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)&#x000A;112: <span class="ruby-keyword kw">super</span>()&#x000A;113: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000542-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 111</span>&#x000A;111: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)&#x000A;112: <span class="ruby-keyword kw">super</span>()&#x000A;113: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000542'>
- <a name='M000542'> </a>
+ <div class='method public-instance' id='method-M000539'>
+ <a name='M000539'> </a>
<div class='synopsis'>
<span class='name'>update</span>
<span class='arguments'>(ghash={})</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000542-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000539-source'); return false">
[show source]
</a>
- <pre id='M000542-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 95</span>&#x000A;95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">ghash</span>={})&#x000A;96: <span class="ruby-identifier">ghash</span> = <span class="ruby-identifier">ghash</span>.<span class="ruby-identifier">marshal_dump</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ghash</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">OpenStruct</span>) &#x000A;97: <span class="ruby-identifier">ghash</span>.<span class="ruby-identifier">each_pair</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{n}=&quot;</span>, <span class="ruby-identifier">v</span>) } &#x000A;98: <span class="ruby-identifier">postprocess</span>&#x000A;99: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000539-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 95</span>&#x000A;95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">ghash</span>={})&#x000A;96: <span class="ruby-identifier">ghash</span> = <span class="ruby-identifier">ghash</span>.<span class="ruby-identifier">marshal_dump</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ghash</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">OpenStruct</span>) &#x000A;97: <span class="ruby-identifier">ghash</span>.<span class="ruby-identifier">each_pair</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{n}=&quot;</span>, <span class="ruby-identifier">v</span>) } &#x000A;98: <span class="ruby-identifier">postprocess</span>&#x000A;99: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000543'>
- <a name='M000543'> </a>
+ <div class='method public-instance' id='method-M000540'>
+ <a name='M000540'> </a>
<div class='synopsis'>
<span class='name'>zone=</span>
<span class='arguments'>(z)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000543-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000540-source'); return false">
[show source]
</a>
- <pre id='M000543-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 101</span>&#x000A;101: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">zone=</span>(<span class="ruby-identifier">z</span>)&#x000A;102: <span class="ruby-ivar">@zone</span> = <span class="ruby-identifier">z</span>&#x000A;103: <span class="ruby-ivar">@region</span> = <span class="ruby-ivar">@zone</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/[a-z]$/</span>, <span class="ruby-value str">''</span>).<span class="ruby-identifier">to_sym</span>&#x000A;104: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000540-source'> <span class="ruby-comment cmt"># File lib/rudy/global.rb, line 101</span>&#x000A;101: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">zone=</span>(<span class="ruby-identifier">z</span>)&#x000A;102: <span class="ruby-ivar">@zone</span> = <span class="ruby-identifier">z</span>&#x000A;103: <span class="ruby-ivar">@region</span> = <span class="ruby-ivar">@zone</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/[a-z]$/</span>, <span class="ruby-value str">''</span>).<span class="ruby-identifier">to_sym</span>&#x000A;104: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
View
420 classes/Rudy/Huxtable.html
210 additions, 210 deletions not shown
View
10 classes/Rudy/MachineGroupAlreadyRunning.html
@@ -45,23 +45,23 @@ <h1 class='name'>
<h2>Methods</h2>
<h3>public instance</h3>
<ol>
- <li><a href="#M000537">message</a></li>
+ <li><a href="#M000543">message</a></li>
</ol>
</div>
<div id='section'>
<div id='methods'>
<h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000537'>
- <a name='M000537'> </a>
+ <div class='method public-instance' id='method-M000543'>
+ <a name='M000543'> </a>
<div class='synopsis'>
<span class='name'>message</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000537-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000543-source'); return false">
[show source]
</a>
- <pre id='M000537-source'> <span class="ruby-comment cmt"># File lib/rudy/exceptions.rb, line 36</span>&#x000A;36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">message</span>; <span class="ruby-node">&quot;Machine group #{@obj} is already running.&quot;</span>; <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000543-source'> <span class="ruby-comment cmt"># File lib/rudy/exceptions.rb, line 36</span>&#x000A;36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">message</span>; <span class="ruby-node">&quot;Machine group #{@obj} is already running.&quot;</span>; <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
View
10 classes/Rudy/MachineGroupMetadataExists.html
@@ -45,23 +45,23 @@ <h1 class='name'>
<h2>Methods</h2>
<h3>public instance</h3>
<ol>
- <li><a href="#M000539">message</a></li>
+ <li><a href="#M000545">message</a></li>
</ol>
</div>
<div id='section'>
<div id='methods'>
<h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000539'>
- <a name='M000539'> </a>
+ <div class='method public-instance' id='method-M000545'>
+ <a name='M000545'> </a>
<div class='synopsis'>
<span class='name'>message</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000539-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000545-source'); return false">
[show source]
</a>
- <pre id='M000539-source'> <span class="ruby-comment cmt"># File lib/rudy/exceptions.rb, line 42</span>&#x000A;42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">message</span>; <span class="ruby-node">&quot;Machine group #{@obj} has existing metadata.&quot;</span>; <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000545-source'> <span class="ruby-comment cmt"># File lib/rudy/exceptions.rb, line 42</span>&#x000A;42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">message</span>; <span class="ruby-node">&quot;Machine group #{@obj} has existing metadata.&quot;</span>; <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
View
10 classes/Rudy/MachineGroupNotRunning.html
@@ -45,23 +45,23 @@ <h1 class='name'>
<h2>Methods</h2>
<h3>public instance</h3>
<ol>
- <li><a href="#M000538">message</a></li>
+ <li><a href="#M000544">message</a></li>
</ol>
</div>
<div id='section'>
<div id='methods'>
<h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000538'>
- <a name='M000538'> </a>
+ <div class='method public-instance' id='method-M000544'>
+ <a name='M000544'> </a>
<div class='synopsis'>
<span class='name'>message</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000538-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000544-source'); return false">
[show source]
</a>
- <pre id='M000538-source'> <span class="ruby-comment cmt"># File lib/rudy/exceptions.rb, line 39</span>&#x000A;39: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">message</span>; <span class="ruby-node">&quot;Machine group #{@obj} is not running.&quot;</span>; <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000544-source'> <span class="ruby-comment cmt"># File lib/rudy/exceptions.rb, line 39</span>&#x000A;39: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">message</span>; <span class="ruby-node">&quot;Machine group #{@obj} is not running.&quot;</span>; <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
View
80 classes/Rudy/Machines.html
@@ -41,17 +41,17 @@ <h1 class='name'>
<h2>Methods</h2>
<h3>public class</h3>
<ol>
- <li><a href="#M000368">list</a></li>
+ <li><a href="#M000326">list</a></li>
</ol>
<h3>public instance</h3>
<ol>
- <li><a href="#M000372">create</a></li>
- <li><a href="#M000370">exists?</a></li>
- <li><a href="#M000369">find_next_position</a></li>
- <li><a href="#M000374">from_hash</a></li>
- <li><a href="#M000367">get</a></li>
- <li><a href="#M000373">restart</a></li>
- <li><a href="#M000371">running?</a></li>
+ <li><a href="#M000330">create</a></li>
+ <li><a href="#M000328">exists?</a></li>
+ <li><a href="#M000327">find_next_position</a></li>
+ <li><a href="#M000332">from_hash</a></li>
+ <li><a href="#M000325">get</a></li>
+ <li><a href="#M000331">restart</a></li>
+ <li><a href="#M000329">running?</a></li>
</ol>
</div>
<div id='section'>
@@ -69,22 +69,22 @@ <h1 class='name'>
</div>
<div id='methods'>
<h2>Public class methods</h2>
- <div class='method public-class' id='method-M000368'>
- <a name='M000368'> </a>
+ <div class='method public-class' id='method-M000326'>
+ <a name='M000326'> </a>
<div class='synopsis'>
<span class='name'>list</span>
<span class='arguments'>(*args, &amp;blk)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000368-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000326-source'); return false">
[show source]
</a>
- <pre id='M000368-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 19</span>&#x000A;19: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">list</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)&#x000A;20: <span class="ruby-identifier">machs</span> = <span class="ruby-keyword kw">super</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>) <span class="ruby-operator">||</span> []&#x000A;21: <span class="ruby-identifier">manual</span> = [<span class="ruby-identifier">fetch_machine_param</span>(<span class="ruby-identifier">:hostname</span>)].<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">compact</span>&#x000A;22: <span class="ruby-identifier">manual</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>) }&#x000A;23: <span class="ruby-identifier">machs</span>.<span class="ruby-identifier">push</span> <span class="ruby-operator">*</span><span class="ruby-identifier">manual</span>&#x000A;24: <span class="ruby-identifier">machs</span>&#x000A;25: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000326-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 19</span>&#x000A;19: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">list</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)&#x000A;20: <span class="ruby-identifier">machs</span> = <span class="ruby-keyword kw">super</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>) <span class="ruby-operator">||</span> []&#x000A;21: <span class="ruby-identifier">manual</span> = [<span class="ruby-identifier">fetch_machine_param</span>(<span class="ruby-identifier">:hostname</span>)].<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">compact</span>&#x000A;22: <span class="ruby-identifier">manual</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>) }&#x000A;23: <span class="ruby-identifier">machs</span>.<span class="ruby-identifier">push</span> <span class="ruby-operator">*</span><span class="ruby-identifier">manual</span>&#x000A;24: <span class="ruby-identifier">machs</span>&#x000A;25: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
<h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000372'>
- <a name='M000372'> </a>
+ <div class='method public-instance' id='method-M000330'>
+ <a name='M000330'> </a>
<div class='synopsis'>
<span class='name'>create</span>
<span class='arguments'>(size=nil)</span>
@@ -96,14 +96,14 @@ <h1 class='name'>
</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000372-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000330-source'); return false">
[show source]
</a>
- <pre id='M000372-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 48</span>&#x000A;48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-identifier">size</span>=<span class="ruby-keyword kw">nil</span>)&#x000A;49: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Huxtable</span>.<span class="ruby-identifier">global</span>.<span class="ruby-identifier">position</span>.<span class="ruby-identifier">nil?</span>&#x000A;50: <span class="ruby-identifier">size</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">current_machine_count</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">||</span> <span class="ruby-value">1</span>&#x000A;51: <span class="ruby-identifier">group</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">size</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>&#x000A;52: <span class="ruby-identifier">m</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Machine</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">i</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)&#x000A;53: <span class="ruby-identifier">m</span>.<span class="ruby-identifier">create</span>&#x000A;54: <span class="ruby-identifier">li</span> <span class="ruby-node">&quot;Created: #{m.to_s}&quot;</span>&#x000A;55: <span class="ruby-identifier">m</span>&#x000A;56: <span class="ruby-keyword kw">end</span>&#x000A;57: <span class="ruby-keyword kw">else</span>&#x000A;58: <span class="ruby-identifier">m</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Machine</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Huxtable</span>.<span class="ruby-identifier">global</span>.<span class="ruby-identifier">position</span>)&#x000A;59: <span class="ruby-identifier">m</span>.<span class="ruby-identifier">create</span>&#x000A;60: <span class="ruby-identifier">li</span> <span class="ruby-node">&quot;Created: #{m.to_s}&quot;</span>&#x000A;61: <span class="ruby-identifier">group</span> = [<span class="ruby-identifier">m</span>]&#x000A;62: <span class="ruby-keyword kw">end</span>&#x000A;63: <span class="ruby-identifier">group</span>&#x000A;64: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000330-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 48</span>&#x000A;48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-identifier">size</span>=<span class="ruby-keyword kw">nil</span>)&#x000A;49: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Huxtable</span>.<span class="ruby-identifier">global</span>.<span class="ruby-identifier">position</span>.<span class="ruby-identifier">nil?</span>&#x000A;50: <span class="ruby-identifier">size</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">current_machine_count</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">||</span> <span class="ruby-value">1</span>&#x000A;51: <span class="ruby-identifier">group</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">size</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>&#x000A;52: <span class="ruby-identifier">m</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Machine</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">i</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)&#x000A;53: <span class="ruby-identifier">m</span>.<span class="ruby-identifier">create</span>&#x000A;54: <span class="ruby-identifier">li</span> <span class="ruby-node">&quot;Created: #{m.to_s}&quot;</span>&#x000A;55: <span class="ruby-identifier">m</span>&#x000A;56: <span class="ruby-keyword kw">end</span>&#x000A;57: <span class="ruby-keyword kw">else</span>&#x000A;58: <span class="ruby-identifier">m</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Machine</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Huxtable</span>.<span class="ruby-identifier">global</span>.<span class="ruby-identifier">position</span>)&#x000A;59: <span class="ruby-identifier">m</span>.<span class="ruby-identifier">create</span>&#x000A;60: <span class="ruby-identifier">li</span> <span class="ruby-node">&quot;Created: #{m.to_s}&quot;</span>&#x000A;61: <span class="ruby-identifier">group</span> = [<span class="ruby-identifier">m</span>]&#x000A;62: <span class="ruby-keyword kw">end</span>&#x000A;63: <span class="ruby-identifier">group</span>&#x000A;64: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000370'>
- <a name='M000370'> </a>
+ <div class='method public-instance' id='method-M000328'>
+ <a name='M000328'> </a>
<div class='synopsis'>
<span class='name'>exists?</span>
<span class='arguments'>(pos=nil)</span>
@@ -114,66 +114,66 @@ <h1 class='name'>
</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000370-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000328-source'); return false">
[show source]
</a>
- <pre id='M000370-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 34</span>&#x000A;34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">pos</span>=<span class="ruby-keyword kw">nil</span>)&#x000A;35: <span class="ruby-identifier">machines</span> = <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">list</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">pos</span>)&#x000A;36: <span class="ruby-operator">!</span><span class="ruby-identifier">machines</span>.<span class="ruby-identifier">nil?</span>&#x000A;37: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000328-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 34</span>&#x000A;34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">pos</span>=<span class="ruby-keyword kw">nil</span>)&#x000A;35: <span class="ruby-identifier">machines</span> = <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">list</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">pos</span>)&#x000A;36: <span class="ruby-operator">!</span><span class="ruby-identifier">machines</span>.<span class="ruby-identifier">nil?</span>&#x000A;37: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000369'>
- <a name='M000369'> </a>
+ <div class='method public-instance' id='method-M000327'>
+ <a name='M000327'> </a>
<div class='synopsis'>
<span class='name'>find_next_position</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000369-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000327-source'); return false">
[show source]
</a>
- <pre id='M000369-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 26</span>&#x000A;26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_next_position</span>&#x000A;27: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;reimplement by looking at position values&quot;</span>&#x000A;28: <span class="ruby-identifier">list</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Machines</span>.<span class="ruby-identifier">list</span>({}, [<span class="ruby-identifier">:position</span>]) <span class="ruby-operator">||</span> []&#x000A;29: <span class="ruby-identifier">pos</span> = <span class="ruby-identifier">list</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>&#x000A;30: <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">rjust</span>(<span class="ruby-value">2</span>, <span class="ruby-value str">'0'</span>)&#x000A;31: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000327-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 26</span>&#x000A;26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_next_position</span>&#x000A;27: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;reimplement by looking at position values&quot;</span>&#x000A;28: <span class="ruby-identifier">list</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Machines</span>.<span class="ruby-identifier">list</span>({}, [<span class="ruby-identifier">:position</span>]) <span class="ruby-operator">||</span> []&#x000A;29: <span class="ruby-identifier">pos</span> = <span class="ruby-identifier">list</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>&#x000A;30: <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">rjust</span>(<span class="ruby-value">2</span>, <span class="ruby-value str">'0'</span>)&#x000A;31: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000374'>
- <a name='M000374'> </a>
+ <div class='method public-instance' id='method-M000332'>
+ <a name='M000332'> </a>
<div class='synopsis'>
<span class='name'>from_hash</span>
<span class='arguments'>(h)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000374-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000332-source'); return false">
[show source]
</a>
- <pre id='M000374-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 75</span>&#x000A;75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">h</span>)&#x000A;76: <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Machine</span>.<span class="ruby-identifier">from_hash</span> <span class="ruby-identifier">h</span>&#x000A;77: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000332-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 75</span>&#x000A;75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">h</span>)&#x000A;76: <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Machine</span>.<span class="ruby-identifier">from_hash</span> <span class="ruby-identifier">h</span>&#x000A;77: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000367'>
- <a name='M000367'> </a>
+ <div class='method public-instance' id='method-M000325'>
+ <a name='M000325'> </a>
<div class='synopsis'>
<span class='name'>get</span>
<span class='arguments'>(position)</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000367-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000325-source'); return false">
[show source]
</a>
- <pre id='M000367-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 12</span>&#x000A;12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">position</span>)&#x000A;13: <span class="ruby-identifier">tmp</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Machine</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">position</span>&#x000A;14: <span class="ruby-identifier">record</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Metadata</span>.<span class="ruby-identifier">get</span> <span class="ruby-identifier">tmp</span>.<span class="ruby-identifier">name</span>&#x000A;15: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)&#x000A;16: <span class="ruby-identifier">tmp</span>.<span class="ruby-identifier">from_hash</span> <span class="ruby-identifier">record</span>&#x000A;17: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000325-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 12</span>&#x000A;12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">position</span>)&#x000A;13: <span class="ruby-identifier">tmp</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Machine</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">position</span>&#x000A;14: <span class="ruby-identifier">record</span> = <span class="ruby-constant">Rudy</span><span class="ruby-operator">::</span><span class="ruby-constant">Metadata</span>.<span class="ruby-identifier">get</span> <span class="ruby-identifier">tmp</span>.<span class="ruby-identifier">name</span>&#x000A;15: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)&#x000A;16: <span class="ruby-identifier">tmp</span>.<span class="ruby-identifier">from_hash</span> <span class="ruby-identifier">record</span>&#x000A;17: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000373'>
- <a name='M000373'> </a>
+ <div class='method public-instance' id='method-M000331'>
+ <a name='M000331'> </a>
<div class='synopsis'>
<span class='name'>restart</span>
<span class='arguments'>()</span>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000373-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('M000331-source'); return false">
[show source]
</a>
- <pre id='M000373-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 66</span>&#x000A;66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restart</span>&#x000A;67: <span class="ruby-identifier">group</span> = <span class="ruby-identifier">list</span> &#x000A;68: <span class="ruby-identifier">raise</span> <span class="ruby-constant">MachineGroupNotRunning</span>, <span class="ruby-identifier">current_machine_group</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">group</span>.<span class="ruby-identifier">nil?</span>&#x000A;69: <span class="ruby-identifier">group</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">inst</span><span class="ruby-operator">|</span>&#x000A;70: <span class="ruby-identifier">inst</span>.<span class="ruby-identifier">restart</span>&#x000A;71: <span class="ruby-keyword kw">end</span>&#x000A;72: <span class="ruby-identifier">group</span>&#x000A;73: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='M000331-source'> <span class="ruby-comment cmt"># File lib/rudy/machines.rb, line 66</span>&#x000A;66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restart</span>&#x000A;67: <span class="ruby-identifier">group</span> = <span class="ruby-identifier">list</span> &#x000A;68: <span class="ruby-identifier">raise</span> <span class="ruby-constant">MachineGroupNotRunning</span>, <span class="ruby-identifier">current_machine_group</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">group</span>.<span class="ruby-identifier">nil?</span>&#x000A;69: <span class="ruby-identifier">group</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">inst</span><span class="ruby-operator">|</span>&#x000A;70: <span class="ruby-identifier">inst</span>.<span class="ruby-identifier">restart</span>&#x000A;71: <span class="ruby-keyword kw">end</span>&#x000A;72: <span class="ruby-identifier">group</span>&#x000A;73: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000371'>
- <a name='M000371'> </