coverage/index.html in vagrant-windows-1.2.0 vs coverage/index.html in vagrant-windows-1.2.1

- old
+ new

@@ -12,31 +12,31 @@ <body> <div id="loading"> <img src="./assets/0.7.1/loading.gif" alt="loading"/> </div> <div id="wrapper" style="display:none;"> - <div class="timestamp">Generated <abbr class="timeago" title="2013-09-12T10:23:40-07:00">2013-09-12T10:23:40-07:00</abbr></div> + <div class="timestamp">Generated <abbr class="timeago" title="2013-09-16T08:37:43-07:00">2013-09-16T08:37:43-07:00</abbr></div> <ul class="group_tabs"></ul> <div id="content"> <div class="file_list_container" id="AllFiles"> <h2> <span class="group_name">All Files</span> - (<span class="covered_percent"><span class="red">65.11%</span></span> + (<span class="covered_percent"><span class="red">68.62%</span></span> covered at <span class="covered_strength"> <span class="green"> - 1.08 + 1.14 </span> </span> hits/line) </h2> <a name="AllFiles"></a> <div> - <b>21</b> files in total. - <b>599</b> relevant lines. - <span class="green"><b>390</b> lines covered</span> and - <span class="red"><b>209</b> lines missed </span> + <b>23</b> files in total. + <b>650</b> relevant lines. + <span class="green"><b>446</b> lines covered</span> and + <span class="red"><b>204</b> lines missed </span> </div> <table class="file_list"> <thead> <tr> <th>File</th> @@ -49,211 +49,231 @@ </tr> </thead> <tbody> <tr> - <td class="strong"><a href="#a476942a694fa4d68baad76d2450545e773933ba" class="src_link" title="lib/vagrant-windows.rb">lib/vagrant-windows.rb</a></td> - <td class="green strong">90.91 %</td> + <td class="strong"><a href="#a339881f7104a1cf05fd48bd4ccc36f8b0bb43e2" class="src_link" title="lib/vagrant-windows.rb">lib/vagrant-windows.rb</a></td> + <td class="green strong">100.0 %</td> <td>24</td> <td>11</td> - <td>10</td> - <td>1</td> - <td>1.5</td> + <td>11</td> + <td>0</td> + <td>2.1</td> </tr> <tr> - <td class="strong"><a href="#5d7526908af0d6c645ccc8a7a19d78c0a68893aa" class="src_link" title="lib/vagrant-windows/communication/guestnetwork.rb">lib/vagrant-windows/communication/guestnetwork.rb</a></td> + <td class="strong"><a href="#dec1987bc6b58f2134e55c26a9e0d4f67a0e5a04" class="src_link" title="lib/vagrant-windows/communication/guestnetwork.rb">lib/vagrant-windows/communication/guestnetwork.rb</a></td> <td class="yellow strong">81.67 %</td> <td>133</td> <td>60</td> <td>49</td> <td>11</td> <td>1.5</td> </tr> <tr> - <td class="strong"><a href="#6853af0f3fcb79d5d9402dda69b323fb36373669" class="src_link" title="lib/vagrant-windows/communication/winrmcommunicator.rb">lib/vagrant-windows/communication/winrmcommunicator.rb</a></td> + <td class="strong"><a href="#9c5c265071fce540a59ec662bb558312c6c54c4b" class="src_link" title="lib/vagrant-windows/communication/winrmcommunicator.rb">lib/vagrant-windows/communication/winrmcommunicator.rb</a></td> <td class="red strong">60.71 %</td> <td>120</td> <td>56</td> <td>34</td> <td>22</td> <td>0.7</td> </tr> <tr> - <td class="strong"><a href="#51cf512e4142cdf0c3017d4396a5fa7cef6346b2" class="src_link" title="lib/vagrant-windows/communication/winrmfinder.rb">lib/vagrant-windows/communication/winrmfinder.rb</a></td> + <td class="strong"><a href="#46df79007581e23184efb74db86daf5c58254ec5" class="src_link" title="lib/vagrant-windows/communication/winrmfinder.rb">lib/vagrant-windows/communication/winrmfinder.rb</a></td> <td class="red strong">52.17 %</td> <td>45</td> <td>23</td> <td>12</td> <td>11</td> <td>0.5</td> </tr> <tr> - <td class="strong"><a href="#e7b2d0f426703032a9311dd534dc68d3ee0b874b" class="src_link" title="lib/vagrant-windows/communication/winrmshell.rb">lib/vagrant-windows/communication/winrmshell.rb</a></td> + <td class="strong"><a href="#206e71d4215a183bebef0dee5b2d9ce2fe77aea6" class="src_link" title="lib/vagrant-windows/communication/winrmshell.rb">lib/vagrant-windows/communication/winrmshell.rb</a></td> <td class="yellow strong">86.3 %</td> <td>141</td> <td>73</td> <td>63</td> <td>10</td> - <td>2.7</td> + <td>2.8</td> </tr> <tr> - <td class="strong"><a href="#7de5a8deeddfe0f4466be0ec0bad9e83602e52a7" class="src_link" title="lib/vagrant-windows/config/windows.rb">lib/vagrant-windows/config/windows.rb</a></td> + <td class="strong"><a href="#ec6c148e559f5558fb277fea15c45c85fa409d28" class="src_link" title="lib/vagrant-windows/config/windows.rb">lib/vagrant-windows/config/windows.rb</a></td> <td class="red strong">76.19 %</td> <td>35</td> <td>21</td> <td>16</td> <td>5</td> <td>1.6</td> </tr> <tr> - <td class="strong"><a href="#940c2744f22c7ffbfa7a4d23079e56bf391bc904" class="src_link" title="lib/vagrant-windows/config/winrm.rb">lib/vagrant-windows/config/winrm.rb</a></td> + <td class="strong"><a href="#a372cc3d4ed5fc1cc5c873176518bf601233f6f1" class="src_link" title="lib/vagrant-windows/config/winrm.rb">lib/vagrant-windows/config/winrm.rb</a></td> <td class="red strong">75.68 %</td> <td>51</td> <td>37</td> <td>28</td> <td>9</td> <td>5.7</td> </tr> <tr> - <td class="strong"><a href="#f4d338e8e36907fcd0d9292444944ef38598a421" class="src_link" title="lib/vagrant-windows/errors.rb">lib/vagrant-windows/errors.rb</a></td> + <td class="strong"><a href="#2d43162323a6643b71b6db31fa0a711c9acdfe90" class="src_link" title="lib/vagrant-windows/errors.rb">lib/vagrant-windows/errors.rb</a></td> <td class="green strong">100.0 %</td> <td>27</td> <td>13</td> <td>13</td> <td>0</td> <td>1.0</td> </tr> <tr> - <td class="strong"><a href="#838497bdd8f92cbee10853c8c4f558744a4d5226" class="src_link" title="lib/vagrant-windows/helper.rb">lib/vagrant-windows/helper.rb</a></td> + <td class="strong"><a href="#dd6ee175f702a7a0054d282fa8aa85f07f721c7a" class="src_link" title="lib/vagrant-windows/guest/cap/mount_shared_folder.rb">lib/vagrant-windows/guest/cap/mount_shared_folder.rb</a></td> <td class="green strong">100.0 %</td> - <td>19</td> - <td>10</td> - <td>10</td> + <td>31</td> + <td>15</td> + <td>15</td> <td>0</td> - <td>1.7</td> + <td>1.3</td> </tr> <tr> - <td class="strong"><a href="#50f21f20470d5a408fd1edf9fec464552e871c21" class="src_link" title="lib/vagrant-windows/monkey_patches/lib/vagrant/machine.rb">lib/vagrant-windows/monkey_patches/lib/vagrant/machine.rb</a></td> + <td class="strong"><a href="#54eeb382b101f2c6d7d6a73b691b4d03621b9f54" class="src_link" title="lib/vagrant-windows/helper.rb">lib/vagrant-windows/helper.rb</a></td> + <td class="green strong">100.0 %</td> + <td>33</td> + <td>12</td> + <td>12</td> + <td>0</td> + <td>1.9</td> + </tr> + + <tr> + <td class="strong"><a href="#1ec97590bc444a2aa68922561c688c654fd3dfff" class="src_link" title="lib/vagrant-windows/monkey_patches/lib/vagrant/machine.rb">lib/vagrant-windows/monkey_patches/lib/vagrant/machine.rb</a></td> <td class="red strong">47.06 %</td> <td>32</td> <td>17</td> <td>8</td> <td>9</td> <td>0.5</td> </tr> <tr> - <td class="strong"><a href="#ce987875143f83a18ef1694e363f502fed702cb9" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/action/share_folders.rb">lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/action/share_folders.rb</a></td> + <td class="strong"><a href="#05f727386c6347aa90be0abe6cb5d483a565e595" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/action/share_folders.rb">lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/action/share_folders.rb</a></td> <td class="red strong">47.37 %</td> <td>44</td> <td>19</td> <td>9</td> <td>10</td> <td>0.5</td> </tr> <tr> - <td class="strong"><a href="#ceebffd2ba26a63eda9c0a9c7fff401b3e6eee4a" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/driver/version_4_2.rb">lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/driver/version_4_2.rb</a></td> + <td class="strong"><a href="#a7a7b03ba7fc579593993b73a9bb01ce33d86be7" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/driver/version_4_2.rb">lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/driver/version_4_2.rb</a></td> <td class="red strong">38.46 %</td> <td>20</td> <td>13</td> <td>5</td> <td>8</td> <td>0.4</td> </tr> <tr> - <td class="strong"><a href="#b6654d9a44a39c7c96ce4bfd13ac3c27028bbbe7" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/provisioners/chef/provisioner/chef_client.rb">lib/vagrant-windows/monkey_patches/plugins/provisioners/chef/provisioner/chef_client.rb</a></td> + <td class="strong"><a href="#e1b92de90fc47d11d6a8abfe1c2bc99e17880b8b" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/provisioners/chef/provisioner/chef_client.rb">lib/vagrant-windows/monkey_patches/plugins/provisioners/chef/provisioner/chef_client.rb</a></td> <td class="green strong">100.0 %</td> <td>1</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> </tr> <tr> - <td class="strong"><a href="#ad8b7fb6cc0f212fab289e86d1663f4c6599c1d8" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/provisioners/chef/provisioner/chef_solo.rb">lib/vagrant-windows/monkey_patches/plugins/provisioners/chef/provisioner/chef_solo.rb</a></td> + <td class="strong"><a href="#445364063a8c3e2a428ea7fe4036b1ec8a3a1277" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/provisioners/chef/provisioner/chef_solo.rb">lib/vagrant-windows/monkey_patches/plugins/provisioners/chef/provisioner/chef_solo.rb</a></td> <td class="red strong">32.56 %</td> <td>106</td> <td>43</td> <td>14</td> <td>29</td> <td>0.3</td> </tr> <tr> - <td class="strong"><a href="#2c62b1f1e4faf9a286cebf613854c6def67ef876" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet.rb">lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet.rb</a></td> + <td class="strong"><a href="#9387455ce27f9821d2f4388bcb52524681914003" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet.rb">lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet.rb</a></td> <td class="red strong">25.0 %</td> <td>101</td> <td>48</td> <td>12</td> <td>36</td> <td>0.3</td> </tr> <tr> - <td class="strong"><a href="#b3cc3374c16aefd1c902da07d13413b49fb8ff45" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet_server.rb">lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet_server.rb</a></td> + <td class="strong"><a href="#6093af51a0c7e6f795cd8cd2111d8d673bde18c3" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet_server.rb">lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet_server.rb</a></td> <td class="green strong">100.0 %</td> <td>1</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> </tr> <tr> - <td class="strong"><a href="#eb020c7cbc376fe3cd26de14bcb3e5c44b19575d" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/provisioners/shell/provisioner.rb">lib/vagrant-windows/monkey_patches/plugins/provisioners/shell/provisioner.rb</a></td> + <td class="strong"><a href="#8dd805604e0326933cecd09151f4d1dac947b74c" class="src_link" title="lib/vagrant-windows/monkey_patches/plugins/provisioners/shell/provisioner.rb">lib/vagrant-windows/monkey_patches/plugins/provisioners/shell/provisioner.rb</a></td> <td class="red strong">32.43 %</td> <td>89</td> <td>37</td> <td>12</td> <td>25</td> <td>0.3</td> </tr> <tr> - <td class="strong"><a href="#9cd1797d85f5e8cbad59678e472935d67655c950" class="src_link" title="lib/vagrant-windows/plugin.rb">lib/vagrant-windows/plugin.rb</a></td> - <td class="red strong">63.33 %</td> + <td class="strong"><a href="#ee8701360a03270a2ab0f3354046766cf5f92da8" class="src_link" title="lib/vagrant-windows/plugin.rb">lib/vagrant-windows/plugin.rb</a></td> + <td class="red strong">70.0 %</td> <td>129</td> <td>60</td> - <td>38</td> - <td>22</td> - <td>0.6</td> + <td>42</td> + <td>18</td> + <td>0.8</td> </tr> <tr> - <td class="strong"><a href="#25b2b95e2df6402e291b8250513522212fe2a14b" class="src_link" title="spec/vagrant-windows/guestnetwork_spec.rb">spec/vagrant-windows/guestnetwork_spec.rb</a></td> + <td class="strong"><a href="#fc65074c6619984f8557ec48c3c84dbc08554a83" class="src_link" title="spec/vagrant-windows/guestnetwork_spec.rb">spec/vagrant-windows/guestnetwork_spec.rb</a></td> <td class="green strong">100.0 %</td> - <td>47</td> - <td>27</td> - <td>27</td> + <td>62</td> + <td>33</td> + <td>33</td> <td>0</td> - <td>1.0</td> + <td>1.1</td> </tr> <tr> - <td class="strong"><a href="#ea04d500983cfcba55fe7651387ec729e1eae680" class="src_link" title="spec/vagrant-windows/helper_spec.rb">spec/vagrant-windows/helper_spec.rb</a></td> + <td class="strong"><a href="#13b6aec4445d4eeafa03e964d1e1486037abd7a4" class="src_link" title="spec/vagrant-windows/helper_spec.rb">spec/vagrant-windows/helper_spec.rb</a></td> <td class="green strong">100.0 %</td> - <td>38</td> - <td>18</td> - <td>18</td> + <td>57</td> + <td>29</td> + <td>29</td> <td>0</td> <td>1.0</td> </tr> <tr> - <td class="strong"><a href="#f8e7b813e0e0b6046a839d891c92700aaccfb5dc" class="src_link" title="spec/vagrant-windows/winrmcommunicator_spec.rb">spec/vagrant-windows/winrmcommunicator_spec.rb</a></td> + <td class="strong"><a href="#95c59faf2db79996a63e1d2688128ac8dab33b79" class="src_link" title="spec/vagrant-windows/mount_shared_folder_spec.rb">spec/vagrant-windows/mount_shared_folder_spec.rb</a></td> + <td class="green strong">100.0 %</td> + <td>34</td> + <td>17</td> + <td>17</td> + <td>0</td> + <td>1.1</td> + </tr> + + <tr> + <td class="strong"><a href="#844842835a3c9ba296ba1e91954dcd0979df99b4" class="src_link" title="spec/vagrant-windows/winrmcommunicator_spec.rb">spec/vagrant-windows/winrmcommunicator_spec.rb</a></td> <td class="green strong">92.31 %</td> <td>26</td> <td>13</td> <td>12</td> <td>1</td> @@ -274,18 +294,18 @@ using RSpec </div> <div class="source_files"> - <div class="source_table" id="a476942a694fa4d68baad76d2450545e773933ba"> + <div class="source_table" id="a339881f7104a1cf05fd48bd4ccc36f8b0bb43e2"> <div class="header"> <h3>lib/vagrant-windows.rb</h3> - <h4><span class="green">90.91 %</span> covered</h4> + <h4><span class="green">100.0 %</span> covered</h4> <div> <b>11</b> relevant lines. - <span class="green"><b>10</b> lines covered</span> and - <span class="red"><b>1</b> lines missed.</span> + <span class="green"><b>11</b> lines covered</span> and + <span class="red"><b>0</b> lines missed.</span> </div> </div> <pre> <ol> @@ -318,12 +338,12 @@ <span class="hits">1</span> <code class="ruby"> def self.vagrant_windows_root</code> </li> - <li class="covered" data-hits="4" data-linenumber="6"> - <span class="hits">4</span> + <li class="covered" data-hits="6" data-linenumber="6"> + <span class="hits">6</span> <code class="ruby"> @vagrant_windows_root ||= Pathname.new(File.expand_path(&quot;../../&quot;, __FILE__))</code> </li> <li class="never" data-hits="" data-linenumber="7"> @@ -366,13 +386,13 @@ <span class="hits">1</span> <code class="ruby"> def self.load_script_template(script_file_name, options)</code> </li> - <li class="missed" data-hits="0" data-linenumber="14"> + <li class="covered" data-hits="2" data-linenumber="14"> + <span class="hits">2</span> - <code class="ruby"> Vagrant::Util::TemplateRenderer.render(expand_script_path(script_file_name), options)</code> </li> <li class="never" data-hits="" data-linenumber="15"> @@ -390,12 +410,12 @@ <span class="hits">1</span> <code class="ruby"> def self.expand_script_path(script_file_name)</code> </li> - <li class="covered" data-hits="3" data-linenumber="18"> - <span class="hits">3</span> + <li class="covered" data-hits="5" data-linenumber="18"> + <span class="hits">5</span> <code class="ruby"> File.expand_path(&quot;lib/vagrant-windows/scripts/#{script_file_name}&quot;, VagrantWindows.vagrant_windows_root)</code> </li> <li class="never" data-hits="" data-linenumber="19"> @@ -436,11 +456,11 @@ </ol> </pre> </div> - <div class="source_table" id="5d7526908af0d6c645ccc8a7a19d78c0a68893aa"> + <div class="source_table" id="dec1987bc6b58f2134e55c26a9e0d4f67a0e5a04"> <div class="header"> <h3>lib/vagrant-windows/communication/guestnetwork.rb</h3> <h4><span class="yellow">81.67 %</span> covered</h4> <div> <b>60</b> relevant lines. @@ -453,29 +473,29 @@ <ol> <li class="covered" data-hits="1" data-linenumber="1"> <span class="hits">1</span> - <code class="ruby">require &#39;log4r&#39;</code> + <code class="ruby">require 'log4r'</code> </li> <li class="covered" data-hits="1" data-linenumber="2"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;../../vagrant-windows&#39;</code> + <code class="ruby">require_relative '../../vagrant-windows'</code> </li> <li class="covered" data-hits="1" data-linenumber="3"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;../communication/winrmshell&#39;</code> + <code class="ruby">require_relative '../communication/winrmshell'</code> </li> <li class="covered" data-hits="1" data-linenumber="4"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;../errors&#39;</code> + <code class="ruby">require_relative '../errors'</code> </li> <li class="never" data-hits="" data-linenumber="5"> @@ -519,17 +539,17 @@ </li> <li class="covered" data-hits="1" data-linenumber="12"> <span class="hits">1</span> - <code class="ruby"> PS_GET_WSMAN_VER = &#39;((test-wsman).productversion.split(&quot; &quot;) | select -last 1).split(&quot;\.&quot;)[0]&#39;</code> + <code class="ruby"> PS_GET_WSMAN_VER = '((test-wsman).productversion.split(&quot; &quot;) | select -last 1).split(&quot;\.&quot;)[0]'</code> </li> <li class="covered" data-hits="1" data-linenumber="13"> <span class="hits">1</span> - <code class="ruby"> WQL_NET_ADAPTERS_V2 = &#39;SELECT * FROM Win32_NetworkAdapter WHERE MACAddress IS NOT NULL&#39;</code> + <code class="ruby"> WQL_NET_ADAPTERS_V2 = 'SELECT * FROM Win32_NetworkAdapter WHERE MACAddress IS NOT NULL'</code> </li> <li class="never" data-hits="" data-linenumber="14"> @@ -735,11 +755,11 @@ </li> <li class="never" data-hits="" data-linenumber="48"> - <code class="ruby"> # @param [String] The unique name of the NIC, such as &#39;Local Area Connection&#39;.</code> + <code class="ruby"> # @param [String] The unique name of the NIC, such as 'Local Area Connection'.</code> </li> <li class="covered" data-hits="1" data-linenumber="49"> <span class="hits">1</span> @@ -807,11 +827,11 @@ </li> <li class="never" data-hits="" data-linenumber="60"> - <code class="ruby"> # @param [String] The unique name of the NIC, such as &#39;Local Area Connection&#39;.</code> + <code class="ruby"> # @param [String] The unique name of the NIC, such as 'Local Area Connection'.</code> </li> <li class="never" data-hits="" data-linenumber="61"> @@ -867,11 +887,11 @@ </li> <li class="never" data-hits="" data-linenumber="70"> - <code class="ruby"> # Sets all networks on the guest to &#39;Work Network&#39; mode. This is</code> + <code class="ruby"> # Sets all networks on the guest to 'Work Network' mode. This is</code> </li> <li class="never" data-hits="" data-linenumber="71"> @@ -891,11 +911,11 @@ </li> <li class="covered" data-hits="1" data-linenumber="74"> <span class="hits">1</span> - <code class="ruby"> @logger.info(&quot;Setting all networks to &#39;Work Network&#39;&quot;)</code> + <code class="ruby"> @logger.info(&quot;Setting all networks to 'Work Network'&quot;)</code> </li> <li class="covered" data-hits="1" data-linenumber="75"> <span class="hits">1</span> @@ -975,11 +995,11 @@ </li> <li class="covered" data-hits="3" data-linenumber="88"> <span class="hits">3</span> - <code class="ruby"> version = &#39;&#39;</code> + <code class="ruby"> version = ''</code> </li> <li class="covered" data-hits="3" data-linenumber="89"> <span class="hits">3</span> @@ -1161,11 +1181,11 @@ </li> <li class="missed" data-hits="0" data-linenumber="119"> - <code class="ruby"> output = &#39;&#39;</code> + <code class="ruby"> output = ''</code> </li> <li class="missed" data-hits="0" data-linenumber="120"> @@ -1252,11 +1272,11 @@ </ol> </pre> </div> - <div class="source_table" id="6853af0f3fcb79d5d9402dda69b323fb36373669"> + <div class="source_table" id="9c5c265071fce540a59ec662bb558312c6c54c4b"> <div class="header"> <h3>lib/vagrant-windows/communication/winrmcommunicator.rb</h3> <h4><span class="red">60.71 %</span> covered</h4> <div> <b>56</b> relevant lines. @@ -1269,35 +1289,35 @@ <ol> <li class="covered" data-hits="1" data-linenumber="1"> <span class="hits">1</span> - <code class="ruby">require &#39;timeout&#39;</code> + <code class="ruby">require 'timeout'</code> </li> <li class="covered" data-hits="1" data-linenumber="2"> <span class="hits">1</span> - <code class="ruby">require &#39;log4r&#39;</code> + <code class="ruby">require 'log4r'</code> </li> <li class="covered" data-hits="1" data-linenumber="3"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;../errors&#39;</code> + <code class="ruby">require_relative '../errors'</code> </li> <li class="covered" data-hits="1" data-linenumber="4"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;winrmshell&#39;</code> + <code class="ruby">require_relative 'winrmshell'</code> </li> <li class="covered" data-hits="1" data-linenumber="5"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;winrmfinder&#39;</code> + <code class="ruby">require_relative 'winrmfinder'</code> </li> <li class="never" data-hits="" data-linenumber="6"> @@ -1497,11 +1517,11 @@ </li> <li class="never" data-hits="" data-linenumber="39"> - <code class="ruby"> # wrong expectedly in the `connect`, which means we didn&#39;t connect.</code> + <code class="ruby"> # wrong expectedly in the `connect`, which means we didn't connect.</code> </li> <li class="missed" data-hits="0" data-linenumber="40"> @@ -1599,11 +1619,11 @@ </li> <li class="missed" data-hits="0" data-linenumber="56"> - <code class="ruby"> return false unless (command =~ /^uname|^cat \/etc|^cat \/proc|grep &#39;Fedora/).nil?</code> + <code class="ruby"> return false unless (command =~ /^uname|^cat \/etc|^cat \/proc|grep 'Fedora/).nil?</code> </li> <li class="missed" data-hits="0" data-linenumber="57"> @@ -1683,11 +1703,11 @@ </li> <li class="missed" data-hits="0" data-linenumber="70"> - <code class="ruby"> Base64.encode64(IO.binread(from)).gsub(&quot;\n&quot;,&#39;&#39;).chars.to_a.each_slice(8000-file_name.size) do |chunk|</code> + <code class="ruby"> Base64.encode64(IO.binread(from)).gsub(&quot;\n&quot;,'').chars.to_a.each_slice(8000-file_name.size) do |chunk|</code> </li> <li class="missed" data-hits="0" data-linenumber="71"> @@ -1990,11 +2010,11 @@ </ol> </pre> </div> - <div class="source_table" id="51cf512e4142cdf0c3017d4396a5fa7cef6346b2"> + <div class="source_table" id="46df79007581e23184efb74db86daf5c58254ec5"> <div class="header"> <h3>lib/vagrant-windows/communication/winrmfinder.rb</h3> <h4><span class="red">52.17 %</span> covered</h4> <div> <b>23</b> relevant lines. @@ -2007,17 +2027,17 @@ <ol> <li class="covered" data-hits="1" data-linenumber="1"> <span class="hits">1</span> - <code class="ruby">require &#39;log4r&#39;</code> + <code class="ruby">require 'log4r'</code> </li> <li class="covered" data-hits="1" data-linenumber="2"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;../errors&#39;</code> + <code class="ruby">require_relative '../errors'</code> </li> <li class="never" data-hits="" data-linenumber="3"> @@ -2211,11 +2231,11 @@ </li> <li class="never" data-hits="" data-linenumber="35"> - <code class="ruby"> # VMWare provider doesn&#39;t support read_forwarded_ports</code> + <code class="ruby"> # VMWare provider doesn't support read_forwarded_ports</code> </li> <li class="missed" data-hits="0" data-linenumber="36"> @@ -2278,11 +2298,11 @@ </ol> </pre> </div> - <div class="source_table" id="e7b2d0f426703032a9311dd534dc68d3ee0b874b"> + <div class="source_table" id="206e71d4215a183bebef0dee5b2d9ce2fe77aea6"> <div class="header"> <h3>lib/vagrant-windows/communication/winrmshell.rb</h3> <h4><span class="yellow">86.3 %</span> covered</h4> <div> <b>73</b> relevant lines. @@ -2295,35 +2315,35 @@ <ol> <li class="covered" data-hits="1" data-linenumber="1"> <span class="hits">1</span> - <code class="ruby">require &#39;timeout&#39;</code> + <code class="ruby">require 'timeout'</code> </li> <li class="covered" data-hits="1" data-linenumber="2"> <span class="hits">1</span> - <code class="ruby">require &#39;log4r&#39;</code> + <code class="ruby">require 'log4r'</code> </li> <li class="covered" data-hits="1" data-linenumber="3"> <span class="hits">1</span> - <code class="ruby">require &#39;winrm&#39;</code> + <code class="ruby">require 'winrm'</code> </li> <li class="covered" data-hits="1" data-linenumber="4"> <span class="hits">1</span> - <code class="ruby">require &#39;vagrant/util/retryable&#39;</code> + <code class="ruby">require 'vagrant/util/retryable'</code> </li> <li class="covered" data-hits="1" data-linenumber="5"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;../errors&#39;</code> + <code class="ruby">require_relative '../errors'</code> </li> <li class="never" data-hits="" data-linenumber="6"> @@ -2373,11 +2393,11 @@ </li> <li class="never" data-hits="" data-linenumber="14"> - <code class="ruby"> # errors that are generally fixed from a retry and don&#39;t</code> + <code class="ruby"> # errors that are generally fixed from a retry and don't</code> </li> <li class="never" data-hits="" data-linenumber="15"> @@ -2580,12 +2600,12 @@ <span class="hits">1</span> <code class="ruby"> def powershell(command, &amp;block)</code> </li> - <li class="covered" data-hits="10" data-linenumber="49"> - <span class="hits">10</span> + <li class="covered" data-hits="11" data-linenumber="49"> + <span class="hits">11</span> <code class="ruby"> execute_shell(command, :powershell, &amp;block)</code> </li> <li class="never" data-hits="" data-linenumber="50"> @@ -2664,24 +2684,24 @@ <span class="hits">1</span> <code class="ruby"> def execute_shell(command, shell=:powershell, &amp;block)</code> </li> - <li class="covered" data-hits="10" data-linenumber="63"> - <span class="hits">10</span> + <li class="covered" data-hits="11" data-linenumber="63"> + <span class="hits">11</span> <code class="ruby"> retryable(:tries =&gt; @max_tries, :on =&gt; @@exceptions_to_retry_on, :sleep =&gt; 10) do</code> </li> - <li class="covered" data-hits="10" data-linenumber="64"> - <span class="hits">10</span> + <li class="covered" data-hits="11" data-linenumber="64"> + <span class="hits">11</span> <code class="ruby"> @logger.debug(&quot;#{shell} executing:\n#{command}&quot;)</code> </li> - <li class="covered" data-hits="10" data-linenumber="65"> - <span class="hits">10</span> + <li class="covered" data-hits="11" data-linenumber="65"> + <span class="hits">11</span> <code class="ruby"> if shell.eql? :cmd</code> </li> <li class="missed" data-hits="0" data-linenumber="66"> @@ -2712,24 +2732,24 @@ <code class="ruby"> elsif shell.eql? :powershell</code> </li> - <li class="covered" data-hits="10" data-linenumber="71"> - <span class="hits">10</span> + <li class="covered" data-hits="11" data-linenumber="71"> + <span class="hits">11</span> <code class="ruby"> output = session.powershell(command) do |out, err|</code> </li> - <li class="covered" data-hits="14" data-linenumber="72"> - <span class="hits">14</span> + <li class="covered" data-hits="16" data-linenumber="72"> + <span class="hits">16</span> <code class="ruby"> block.call(:stdout, out) if block_given? &amp;&amp; out</code> </li> - <li class="covered" data-hits="14" data-linenumber="73"> - <span class="hits">14</span> + <li class="covered" data-hits="16" data-linenumber="73"> + <span class="hits">16</span> <code class="ruby"> block.call(:stderr, err) if block_given? &amp;&amp; err</code> </li> <li class="never" data-hits="" data-linenumber="74"> @@ -2754,18 +2774,18 @@ <code class="ruby"> end</code> </li> - <li class="covered" data-hits="10" data-linenumber="78"> - <span class="hits">10</span> + <li class="covered" data-hits="11" data-linenumber="78"> + <span class="hits">11</span> <code class="ruby"> @logger.debug(&quot;Exit status: #{output[:exitcode].inspect}&quot;)</code> </li> - <li class="covered" data-hits="10" data-linenumber="79"> - <span class="hits">10</span> + <li class="covered" data-hits="11" data-linenumber="79"> + <span class="hits">11</span> <code class="ruby"> return output</code> </li> <li class="never" data-hits="" data-linenumber="80"> @@ -2997,11 +3017,11 @@ </li> <li class="covered" data-hits="2" data-linenumber="118"> <span class="hits">2</span> - <code class="ruby"> client.toggle_nori_type_casting(:off) #we don&#39;t want coersion of types</code> + <code class="ruby"> client.toggle_nori_type_casting(:off) #we don't want coersion of types</code> </li> <li class="covered" data-hits="2" data-linenumber="119"> <span class="hits">2</span> @@ -3024,12 +3044,12 @@ <span class="hits">1</span> <code class="ruby"> def session</code> </li> - <li class="covered" data-hits="13" data-linenumber="123"> - <span class="hits">13</span> + <li class="covered" data-hits="14" data-linenumber="123"> + <span class="hits">14</span> <code class="ruby"> @session ||= new_session</code> </li> <li class="never" data-hits="" data-linenumber="124"> @@ -3142,11 +3162,11 @@ </ol> </pre> </div> - <div class="source_table" id="7de5a8deeddfe0f4466be0ec0bad9e83602e52a7"> + <div class="source_table" id="ec6c148e559f5558fb277fea15c45c85fa409d28"> <div class="header"> <h3>lib/vagrant-windows/config/windows.rb</h3> <h4><span class="red">76.19 %</span> covered</h4> <div> <b>21</b> relevant lines. @@ -3370,11 +3390,11 @@ </ol> </pre> </div> - <div class="source_table" id="940c2744f22c7ffbfa7a4d23079e56bf391bc904"> + <div class="source_table" id="a372cc3d4ed5fc1cc5c873176518bf601233f6f1"> <div class="header"> <h3>lib/vagrant-windows/config/winrm.rb</h3> <h4><span class="red">75.68 %</span> covered</h4> <div> <b>37</b> relevant lines. @@ -3694,11 +3714,11 @@ </ol> </pre> </div> - <div class="source_table" id="f4d338e8e36907fcd0d9292444944ef38598a421"> + <div class="source_table" id="2d43162323a6643b71b6db31fa0a711c9acdfe90"> <div class="header"> <h3>lib/vagrant-windows/errors.rb</h3> <h4><span class="green">100.0 %</span> covered</h4> <div> <b>13</b> relevant lines. @@ -3711,11 +3731,11 @@ <ol> <li class="covered" data-hits="1" data-linenumber="1"> <span class="hits">1</span> - <code class="ruby">require &#39;vagrant/errors&#39;</code> + <code class="ruby">require 'vagrant/errors'</code> </li> <li class="never" data-hits="" data-linenumber="2"> @@ -3874,17 +3894,221 @@ </ol> </pre> </div> - <div class="source_table" id="838497bdd8f92cbee10853c8c4f558744a4d5226"> + <div class="source_table" id="dd6ee175f702a7a0054d282fa8aa85f07f721c7a"> <div class="header"> + <h3>lib/vagrant-windows/guest/cap/mount_shared_folder.rb</h3> + <h4><span class="green">100.0 %</span> covered</h4> + <div> + <b>15</b> relevant lines. + <span class="green"><b>15</b> lines covered</span> and + <span class="red"><b>0</b> lines missed.</span> + </div> + </div> + + <pre> + <ol> + + <li class="covered" data-hits="1" data-linenumber="1"> + <span class="hits">1</span> + + <code class="ruby">require_relative '../../helper'</code> + </li> + + <li class="never" data-hits="" data-linenumber="2"> + + + <code class="ruby"></code> + </li> + + <li class="covered" data-hits="1" data-linenumber="3"> + <span class="hits">1</span> + + <code class="ruby">module VagrantWindows</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="4"> + <span class="hits">1</span> + + <code class="ruby"> module Guest</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="5"> + <span class="hits">1</span> + + <code class="ruby"> module Cap</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="6"> + <span class="hits">1</span> + + <code class="ruby"> class MountSharedFolder</code> + </li> + + <li class="never" data-hits="" data-linenumber="7"> + + + <code class="ruby"> </code> + </li> + + <li class="covered" data-hits="1" data-linenumber="8"> + <span class="hits">1</span> + + <code class="ruby"> def self.mount_virtualbox_shared_folder(machine, name, guestpath, options)</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="9"> + <span class="hits">1</span> + + <code class="ruby"> mount_shared_folder(machine, name, guestpath, &quot;\\\\vboxsrv\\&quot;)</code> + </li> + + <li class="never" data-hits="" data-linenumber="10"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="11"> + + + <code class="ruby"> </code> + </li> + + <li class="covered" data-hits="1" data-linenumber="12"> + <span class="hits">1</span> + + <code class="ruby"> def self.mount_vmware_shared_folder(machine, name, guestpath, options)</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="13"> + <span class="hits">1</span> + + <code class="ruby"> mount_shared_folder(machine, name, guestpath, &quot;\\\\vmware-host\\Shared Folders\\&quot;)</code> + </li> + + <li class="never" data-hits="" data-linenumber="14"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="15"> + + + <code class="ruby"> </code> + </li> + + <li class="covered" data-hits="1" data-linenumber="16"> + <span class="hits">1</span> + + <code class="ruby"> protected</code> + </li> + + <li class="never" data-hits="" data-linenumber="17"> + + + <code class="ruby"> </code> + </li> + + <li class="covered" data-hits="1" data-linenumber="18"> + <span class="hits">1</span> + + <code class="ruby"> def self.mount_shared_folder(machine, name, guestpath, vm_provider_unc_base)</code> + </li> + + <li class="covered" data-hits="2" data-linenumber="19"> + <span class="hits">2</span> + + <code class="ruby"> share_name = VagrantWindows::Helper.win_friendly_share_id(name)</code> + </li> + + <li class="covered" data-hits="2" data-linenumber="20"> + <span class="hits">2</span> + + <code class="ruby"> options = {</code> + </li> + + <li class="never" data-hits="" data-linenumber="21"> + + + <code class="ruby"> :mount_point =&gt; guestpath,</code> + </li> + + <li class="never" data-hits="" data-linenumber="22"> + + + <code class="ruby"> :share_name =&gt; share_name,</code> + </li> + + <li class="never" data-hits="" data-linenumber="23"> + + + <code class="ruby"> :vm_provider_unc_path =&gt; vm_provider_unc_base + share_name}</code> + </li> + + <li class="covered" data-hits="2" data-linenumber="24"> + <span class="hits">2</span> + + <code class="ruby"> mount_script = VagrantWindows.load_script_template(&quot;mount_volume.ps1&quot;, :options =&gt; options)</code> + </li> + + <li class="covered" data-hits="2" data-linenumber="25"> + <span class="hits">2</span> + + <code class="ruby"> machine.communicate.execute(mount_script, {:shell =&gt; :powershell})</code> + </li> + + <li class="never" data-hits="" data-linenumber="26"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="27"> + + + <code class="ruby"> </code> + </li> + + <li class="never" data-hits="" data-linenumber="28"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="29"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="30"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="31"> + + + <code class="ruby">end</code> + </li> + + </ol> + </pre> +</div> + + <div class="source_table" id="54eeb382b101f2c6d7d6a73b691b4d03621b9f54"> + <div class="header"> <h3>lib/vagrant-windows/helper.rb</h3> <h4><span class="green">100.0 %</span> covered</h4> <div> - <b>10</b> relevant lines. - <span class="green"><b>10</b> lines covered</span> and + <b>12</b> relevant lines. + <span class="green"><b>12</b> lines covered</span> and <span class="red"><b>0</b> lines missed.</span> </div> </div> <pre> @@ -3912,105 +4136,189 @@ <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="5"> + <li class="never" data-hits="" data-linenumber="5"> + + + <code class="ruby"> # Makes a path Windows guest friendly.</code> + </li> + + <li class="never" data-hits="" data-linenumber="6"> + + + <code class="ruby"> # Turns '/vagrant' into 'c:\vagrant'</code> + </li> + + <li class="never" data-hits="" data-linenumber="7"> + + + <code class="ruby"> #</code> + </li> + + <li class="never" data-hits="" data-linenumber="8"> + + + <code class="ruby"> # @return [String]</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="9"> <span class="hits">1</span> <code class="ruby"> def win_friendly_path(path)</code> </li> - <li class="covered" data-hits="3" data-linenumber="6"> + <li class="covered" data-hits="3" data-linenumber="10"> <span class="hits">3</span> <code class="ruby"> if path</code> </li> - <li class="covered" data-hits="2" data-linenumber="7"> + <li class="covered" data-hits="2" data-linenumber="11"> <span class="hits">2</span> - <code class="ruby"> new_path = path.gsub(&#39;/&#39;, &#39;\\&#39;)</code> + <code class="ruby"> new_path = path.gsub('/', '\\')</code> </li> - <li class="covered" data-hits="2" data-linenumber="8"> + <li class="covered" data-hits="2" data-linenumber="12"> <span class="hits">2</span> <code class="ruby"> new_path = &quot;c:#{new_path}&quot; if new_path =~ /^\\/</code> </li> - <li class="never" data-hits="" data-linenumber="9"> + <li class="never" data-hits="" data-linenumber="13"> <code class="ruby"> end</code> </li> - <li class="covered" data-hits="3" data-linenumber="10"> + <li class="covered" data-hits="3" data-linenumber="14"> <span class="hits">3</span> <code class="ruby"> new_path</code> </li> - <li class="never" data-hits="" data-linenumber="11"> + <li class="never" data-hits="" data-linenumber="15"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="12"> + <li class="never" data-hits="" data-linenumber="16"> <code class="ruby"></code> </li> - <li class="never" data-hits="" data-linenumber="13"> + <li class="never" data-hits="" data-linenumber="17"> - <code class="ruby"> # turns &#39;/vagrant&#39; into &#39;vagrant&#39; or turns &#39;&#39;/a/b/c/d/e&#39; into &#39;a_b_c_d_e&#39;</code> + <code class="ruby"> # Makes Vagrant share names Windows guest friendly.</code> </li> - <li class="covered" data-hits="1" data-linenumber="14"> + <li class="never" data-hits="" data-linenumber="18"> + + + <code class="ruby"> # Turns '/vagrant' into 'vagrant' or turns ''/a/b/c/d/e' into 'a_b_c_d_e'</code> + </li> + + <li class="never" data-hits="" data-linenumber="19"> + + + <code class="ruby"> #</code> + </li> + + <li class="never" data-hits="" data-linenumber="20"> + + + <code class="ruby"> # @return [String]</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="21"> <span class="hits">1</span> <code class="ruby"> def win_friendly_share_id(shared_folder_name)</code> </li> - <li class="covered" data-hits="2" data-linenumber="15"> - <span class="hits">2</span> + <li class="covered" data-hits="4" data-linenumber="22"> + <span class="hits">4</span> - <code class="ruby"> return shared_folder_name.gsub(/[\/\/]/,&#39;_&#39;).sub(/^_/, &#39;&#39;)</code> + <code class="ruby"> return shared_folder_name.gsub(/[\/\/]/,'_').sub(/^_/, '')</code> </li> - <li class="never" data-hits="" data-linenumber="16"> + <li class="never" data-hits="" data-linenumber="23"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="17"> + <li class="never" data-hits="" data-linenumber="24"> <code class="ruby"> </code> </li> - <li class="never" data-hits="" data-linenumber="18"> + <li class="never" data-hits="" data-linenumber="25"> + <code class="ruby"> # Checks to see if the specified machine is using VMWare Fusion or Workstation.</code> + </li> + + <li class="never" data-hits="" data-linenumber="26"> + + + <code class="ruby"> #</code> + </li> + + <li class="never" data-hits="" data-linenumber="27"> + + + <code class="ruby"> # @return [Boolean]</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="28"> + <span class="hits">1</span> + + <code class="ruby"> def is_vmware(machine)</code> + </li> + + <li class="covered" data-hits="3" data-linenumber="29"> + <span class="hits">3</span> + + <code class="ruby"> machine.provider_name.to_s().start_with?('vmware')</code> + </li> + + <li class="never" data-hits="" data-linenumber="30"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="31"> + + + <code class="ruby"> </code> + </li> + + <li class="never" data-hits="" data-linenumber="32"> + + <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="19"> + <li class="never" data-hits="" data-linenumber="33"> <code class="ruby">end</code> </li> </ol> </pre> </div> - <div class="source_table" id="50f21f20470d5a408fd1edf9fec464552e871c21"> + <div class="source_table" id="1ec97590bc444a2aa68922561c688c654fd3dfff"> <div class="header"> <h3>lib/vagrant-windows/monkey_patches/lib/vagrant/machine.rb</h3> <h4><span class="red">47.06 %</span> covered</h4> <div> <b>17</b> relevant lines. @@ -4023,17 +4331,17 @@ <ol> <li class="covered" data-hits="1" data-linenumber="1"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;../../../helper&#39;</code> + <code class="ruby">require_relative '../../../helper'</code> </li> <li class="covered" data-hits="1" data-linenumber="2"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;../../../communication/winrmcommunicator&#39;</code> + <code class="ruby">require_relative '../../../communication/winrmcommunicator'</code> </li> <li class="never" data-hits="" data-linenumber="3"> @@ -4216,11 +4524,11 @@ </ol> </pre> </div> - <div class="source_table" id="ce987875143f83a18ef1694e363f502fed702cb9"> + <div class="source_table" id="05f727386c6347aa90be0abe6cb5d483a565e595"> <div class="header"> <h3>lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/action/share_folders.rb</h3> <h4><span class="red">47.37 %</span> covered</h4> <div> <b>19</b> relevant lines. @@ -4239,11 +4547,11 @@ </li> <li class="covered" data-hits="1" data-linenumber="2"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;../../../../../helper&#39;</code> + <code class="ruby">require_relative '../../../../../helper'</code> </li> <li class="never" data-hits="" data-linenumber="3"> @@ -4317,11 +4625,11 @@ </li> <li class="never" data-hits="" data-linenumber="15"> - <code class="ruby"> # don&#39;t change the shared folder name for linux guests. We don&#39;t want the shared folder name of linux guests to be different</code> + <code class="ruby"> # don't change the shared folder name for linux guests. We don't want the shared folder name of linux guests to be different</code> </li> <li class="never" data-hits="" data-linenumber="16"> @@ -4383,11 +4691,11 @@ </li> <li class="missed" data-hits="0" data-linenumber="26"> - <code class="ruby"> folder_name = win_friendly_share_id(id.gsub(/[\/\/]/,&#39;_&#39;).sub(/^_/, &#39;&#39;))</code> + <code class="ruby"> folder_name = win_friendly_share_id(id.gsub(/[\/\/]/,'_').sub(/^_/, ''))</code> </li> <li class="never" data-hits="" data-linenumber="27"> @@ -4498,11 +4806,11 @@ </ol> </pre> </div> - <div class="source_table" id="ceebffd2ba26a63eda9c0a9c7fff401b3e6eee4a"> + <div class="source_table" id="a7a7b03ba7fc579593993b73a9bb01ce33d86be7"> <div class="header"> <h3>lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/driver/version_4_2.rb</h3> <h4><span class="red">38.46 %</span> covered</h4> <div> <b>13</b> relevant lines. @@ -4636,11 +4944,11 @@ </ol> </pre> </div> - <div class="source_table" id="b6654d9a44a39c7c96ce4bfd13ac3c27028bbbe7"> + <div class="source_table" id="e1b92de90fc47d11d6a8abfe1c2bc99e17880b8b"> <div class="header"> <h3>lib/vagrant-windows/monkey_patches/plugins/provisioners/chef/provisioner/chef_client.rb</h3> <h4><span class="green">100.0 %</span> covered</h4> <div> <b>0</b> relevant lines. @@ -4660,11 +4968,11 @@ </ol> </pre> </div> - <div class="source_table" id="ad8b7fb6cc0f212fab289e86d1663f4c6599c1d8"> + <div class="source_table" id="445364063a8c3e2a428ea7fe4036b1ec8a3a1277"> <div class="header"> <h3>lib/vagrant-windows/monkey_patches/plugins/provisioners/chef/provisioner/chef_solo.rb</h3> <h4><span class="red">32.56 %</span> covered</h4> <div> <b>43</b> relevant lines. @@ -4677,11 +4985,11 @@ <ol> <li class="covered" data-hits="1" data-linenumber="1"> <span class="hits">1</span> - <code class="ruby">require &#39;tempfile&#39;</code> + <code class="ruby">require 'tempfile'</code> </li> <li class="covered" data-hits="1" data-linenumber="2"> <span class="hits">1</span> @@ -4689,11 +4997,11 @@ </li> <li class="covered" data-hits="1" data-linenumber="3"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;../../../../../helper&#39;</code> + <code class="ruby">require_relative '../../../../../helper'</code> </li> <li class="never" data-hits="" data-linenumber="4"> @@ -5121,17 +5429,17 @@ </li> <li class="missed" data-hits="0" data-linenumber="75"> - <code class="ruby"> chef_solo_path = win_friendly_path(File.join(@config.provisioning_path, &#39;solo.rb&#39;))</code> + <code class="ruby"> chef_solo_path = win_friendly_path(File.join(@config.provisioning_path, 'solo.rb'))</code> </li> <li class="missed" data-hits="0" data-linenumber="76"> - <code class="ruby"> chef_dna_path = win_friendly_path(File.join(@config.provisioning_path, &#39;dna.json&#39;))</code> + <code class="ruby"> chef_dna_path = win_friendly_path(File.join(@config.provisioning_path, 'dna.json'))</code> </li> <li class="never" data-hits="" data-linenumber="77"> @@ -5314,11 +5622,11 @@ </ol> </pre> </div> - <div class="source_table" id="2c62b1f1e4faf9a286cebf613854c6def67ef876"> + <div class="source_table" id="9387455ce27f9821d2f4388bcb52524681914003"> <div class="header"> <h3>lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet.rb</h3> <h4><span class="red">25.0 %</span> covered</h4> <div> <b>48</b> relevant lines. @@ -5493,11 +5801,11 @@ </li> <li class="missed" data-hits="0" data-linenumber="28"> - <code class="ruby"> options &lt;&lt; &quot;--modulepath &#39;#{module_paths.join(&#39;;&#39;)}&#39;&quot;</code> + <code class="ruby"> options &lt;&lt; &quot;--modulepath '#{module_paths.join(';')}'&quot;</code> </li> <li class="never" data-hits="" data-linenumber="29"> @@ -5559,11 +5867,11 @@ </li> <li class="missed" data-hits="0" data-linenumber="39"> - <code class="ruby"> facts &lt;&lt; &quot;$env:FACTER_#{key}=&#39;#{value}&#39;;&quot;</code> + <code class="ruby"> facts &lt;&lt; &quot;$env:FACTER_#{key}='#{value}';&quot;</code> </li> <li class="never" data-hits="" data-linenumber="40"> @@ -5673,11 +5981,11 @@ </li> <li class="never" data-hits="" data-linenumber="58"> - <code class="ruby"> # Calculate the paths we&#39;re going to use based on the environment</code> + <code class="ruby"> # Calculate the paths we're going to use based on the environment</code> </li> <li class="missed" data-hits="0" data-linenumber="59"> @@ -5938,11 +6246,11 @@ </ol> </pre> </div> - <div class="source_table" id="b3cc3374c16aefd1c902da07d13413b49fb8ff45"> + <div class="source_table" id="6093af51a0c7e6f795cd8cd2111d8d673bde18c3"> <div class="header"> <h3>lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet_server.rb</h3> <h4><span class="green">100.0 %</span> covered</h4> <div> <b>0</b> relevant lines. @@ -5962,11 +6270,11 @@ </ol> </pre> </div> - <div class="source_table" id="eb020c7cbc376fe3cd26de14bcb3e5c44b19575d"> + <div class="source_table" id="8dd805604e0326933cecd09151f4d1dac947b74c"> <div class="header"> <h3>lib/vagrant-windows/monkey_patches/plugins/provisioners/shell/provisioner.rb</h3> <h4><span class="red">32.43 %</span> covered</h4> <div> <b>37</b> relevant lines. @@ -5985,11 +6293,11 @@ </li> <li class="covered" data-hits="1" data-linenumber="2"> <span class="hits">1</span> - <code class="ruby">require_relative &#39;../../../../helper&#39;</code> + <code class="ruby">require_relative '../../../../helper'</code> </li> <li class="never" data-hits="" data-linenumber="3"> @@ -6387,11 +6695,11 @@ </li> <li class="missed" data-hits="0" data-linenumber="69"> - <code class="ruby"> file = Tempfile.new([&#39;vagrant-powershell&#39;, &#39;.ps1&#39;])</code> + <code class="ruby"> file = Tempfile.new(['vagrant-powershell', '.ps1'])</code> </li> <li class="never" data-hits="" data-linenumber="70"> @@ -6514,18 +6822,18 @@ </ol> </pre> </div> - <div class="source_table" id="9cd1797d85f5e8cbad59678e472935d67655c950"> + <div class="source_table" id="ee8701360a03270a2ab0f3354046766cf5f92da8"> <div class="header"> <h3>lib/vagrant-windows/plugin.rb</h3> - <h4><span class="red">63.33 %</span> covered</h4> + <h4><span class="red">70.0 %</span> covered</h4> <div> <b>60</b> relevant lines. - <span class="green"><b>38</b> lines covered</span> and - <span class="red"><b>22</b> lines missed.</span> + <span class="green"><b>42</b> lines covered</span> and + <span class="red"><b>18</b> lines missed.</span> </div> </div> <pre> <ol> @@ -6756,13 +7064,13 @@ <span class="hits">1</span> <code class="ruby"> name &quot;Windows guest&quot;</code> </li> - <li class="covered" data-hits="1" data-linenumber="39"> - <span class="hits">1</span> + <li class="never" data-hits="" data-linenumber="39"> + <code class="ruby"> description &lt;&lt;-DESC</code> </li> <li class="never" data-hits="" data-linenumber="40"> @@ -6774,13 +7082,13 @@ <code class="ruby"> Windows machines as guests.</code> </li> - <li class="never" data-hits="" data-linenumber="42"> + <li class="covered" data-hits="1" data-linenumber="42"> + <span class="hits">1</span> - <code class="ruby"> DESC</code> </li> <li class="never" data-hits="" data-linenumber="43"> @@ -6999,17 +7307,17 @@ </li> <li class="missed" data-hits="0" data-linenumber="79"> - <code class="ruby"> require_relative &quot;guest/cap/mount_virtualbox_shared_folder&quot;</code> + <code class="ruby"> require_relative &quot;guest/cap/mount_shared_folder&quot;</code> </li> <li class="missed" data-hits="0" data-linenumber="80"> - <code class="ruby"> VagrantWindows::Guest::Cap::MountVirtualBoxSharedFolder</code> + <code class="ruby"> VagrantWindows::Guest::Cap::MountSharedFolder</code> </li> <li class="never" data-hits="" data-linenumber="81"> @@ -7029,17 +7337,17 @@ </li> <li class="missed" data-hits="0" data-linenumber="84"> - <code class="ruby"> require_relative &quot;guest/cap/mount_vmware_shared_folder&quot;</code> + <code class="ruby"> require_relative &quot;guest/cap/mount_shared_folder&quot;</code> </li> <li class="missed" data-hits="0" data-linenumber="85"> - <code class="ruby"> VagrantWindows::Guest::Cap::MountVMwareSharedFolder</code> + <code class="ruby"> VagrantWindows::Guest::Cap::MountSharedFolder</code> </li> <li class="never" data-hits="" data-linenumber="86"> @@ -7110,36 +7418,36 @@ <span class="hits">1</span> <code class="ruby"> def self.setup_logging</code> </li> - <li class="covered" data-hits="1" data-linenumber="98"> - <span class="hits">1</span> + <li class="covered" data-hits="2" data-linenumber="98"> + <span class="hits">2</span> <code class="ruby"> require &quot;log4r&quot;</code> </li> <li class="never" data-hits="" data-linenumber="99"> <code class="ruby"></code> </li> - <li class="covered" data-hits="1" data-linenumber="100"> - <span class="hits">1</span> + <li class="covered" data-hits="2" data-linenumber="100"> + <span class="hits">2</span> <code class="ruby"> level = nil</code> </li> - <li class="covered" data-hits="1" data-linenumber="101"> - <span class="hits">1</span> + <li class="covered" data-hits="2" data-linenumber="101"> + <span class="hits">2</span> <code class="ruby"> begin</code> </li> - <li class="covered" data-hits="1" data-linenumber="102"> - <span class="hits">1</span> + <li class="covered" data-hits="2" data-linenumber="102"> + <span class="hits">2</span> <code class="ruby"> level = Log4r.const_get(ENV[&quot;VAGRANT_LOG&quot;].upcase)</code> </li> <li class="never" data-hits="" data-linenumber="103"> @@ -7149,11 +7457,11 @@ </li> <li class="never" data-hits="" data-linenumber="104"> - <code class="ruby"> # This means that the logging constant wasn&#39;t found,</code> + <code class="ruby"> # This means that the logging constant wasn't found,</code> </li> <li class="never" data-hits="" data-linenumber="105"> @@ -7191,21 +7499,21 @@ </li> <li class="never" data-hits="" data-linenumber="111"> - <code class="ruby"> # above error checking doesn&#39;t catch it. This will check to make</code> + <code class="ruby"> # above error checking doesn't catch it. This will check to make</code> </li> <li class="never" data-hits="" data-linenumber="112"> <code class="ruby"> # sure that the log level is an integer, as Log4r requires.</code> </li> - <li class="covered" data-hits="1" data-linenumber="113"> - <span class="hits">1</span> + <li class="covered" data-hits="2" data-linenumber="113"> + <span class="hits">2</span> <code class="ruby"> level = nil if !level.is_a?(Integer)</code> </li> <li class="never" data-hits="" data-linenumber="114"> @@ -7224,37 +7532,37 @@ <code class="ruby"> # logs as long as we have a valid level.</code> </li> - <li class="covered" data-hits="1" data-linenumber="117"> - <span class="hits">1</span> + <li class="covered" data-hits="2" data-linenumber="117"> + <span class="hits">2</span> <code class="ruby"> if level</code> </li> - <li class="missed" data-hits="0" data-linenumber="118"> + <li class="covered" data-hits="1" data-linenumber="118"> + <span class="hits">1</span> - <code class="ruby"> logger = Log4r::Logger.new(&quot;vagrant_windows&quot;)</code> </li> - <li class="missed" data-hits="0" data-linenumber="119"> + <li class="covered" data-hits="1" data-linenumber="119"> + <span class="hits">1</span> - <code class="ruby"> logger.outputters = Log4r::Outputter.stderr</code> </li> - <li class="missed" data-hits="0" data-linenumber="120"> + <li class="covered" data-hits="1" data-linenumber="120"> + <span class="hits">1</span> - <code class="ruby"> logger.level = level</code> </li> - <li class="missed" data-hits="0" data-linenumber="121"> + <li class="covered" data-hits="1" data-linenumber="121"> + <span class="hits">1</span> - <code class="ruby"> logger = nil</code> </li> <li class="never" data-hits="" data-linenumber="122"> @@ -7306,28 +7614,28 @@ </ol> </pre> </div> - <div class="source_table" id="25b2b95e2df6402e291b8250513522212fe2a14b"> + <div class="source_table" id="fc65074c6619984f8557ec48c3c84dbc08554a83"> <div class="header"> <h3>spec/vagrant-windows/guestnetwork_spec.rb</h3> <h4><span class="green">100.0 %</span> covered</h4> <div> - <b>27</b> relevant lines. - <span class="green"><b>27</b> lines covered</span> and + <b>33</b> relevant lines. + <span class="green"><b>33</b> lines covered</span> and <span class="red"><b>0</b> lines missed.</span> </div> </div> <pre> <ol> <li class="covered" data-hits="1" data-linenumber="1"> <span class="hits">1</span> - <code class="ruby">require &#39;spec_helper&#39;</code> + <code class="ruby">require 'spec_helper'</code> </li> <li class="never" data-hits="" data-linenumber="2"> @@ -7350,514 +7658,940 @@ <span class="hits">1</span> <code class="ruby"> before(:all) do</code> </li> - <li class="never" data-hits="" data-linenumber="6"> + <li class="covered" data-hits="1" data-linenumber="6"> + <span class="hits">1</span> + <code class="ruby"> ENV[&quot;VAGRANT_LOG&quot;] = 'DEBUG'</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="7"> + <span class="hits">1</span> + <code class="ruby"> VagrantWindows::Plugin.setup_logging()</code> + </li> + + <li class="never" data-hits="" data-linenumber="8"> + + + <code class="ruby"> </code> + </li> + + <li class="never" data-hits="" data-linenumber="9"> + + <code class="ruby"> # This test requires you already have a running Windows Server 2008 R2 Vagrant VM</code> </li> - <li class="never" data-hits="" data-linenumber="7"> + <li class="never" data-hits="" data-linenumber="10"> <code class="ruby"> # Not ideal, but you have to start somewhere</code> </li> - <li class="covered" data-hits="1" data-linenumber="8"> + <li class="covered" data-hits="1" data-linenumber="11"> <span class="hits">1</span> <code class="ruby"> @shell = VagrantWindows::Communication::WinRMShell.new(&quot;localhost&quot;, &quot;vagrant&quot;, &quot;vagrant&quot;)</code> </li> - <li class="covered" data-hits="1" data-linenumber="9"> + <li class="covered" data-hits="1" data-linenumber="12"> <span class="hits">1</span> <code class="ruby"> @guestnetwork = VagrantWindows::Communication::GuestNetwork.new(@shell)</code> </li> - <li class="never" data-hits="" data-linenumber="10"> + <li class="never" data-hits="" data-linenumber="13"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="11"> + <li class="never" data-hits="" data-linenumber="14"> <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="12"> + <li class="covered" data-hits="1" data-linenumber="15"> <span class="hits">1</span> <code class="ruby"> describe &quot;wsman_version&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="13"> + <li class="covered" data-hits="1" data-linenumber="16"> <span class="hits">1</span> <code class="ruby"> it &quot;network_adapters&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="14"> + <li class="covered" data-hits="1" data-linenumber="17"> <span class="hits">1</span> <code class="ruby"> nics = @guestnetwork.network_adapters()</code> </li> - <li class="never" data-hits="" data-linenumber="15"> + <li class="never" data-hits="" data-linenumber="18"> <code class="ruby"> #puts nics.pretty_inspect()</code> </li> - <li class="never" data-hits="" data-linenumber="16"> + <li class="never" data-hits="" data-linenumber="19"> <code class="ruby"></code> </li> - <li class="covered" data-hits="1" data-linenumber="17"> + <li class="covered" data-hits="1" data-linenumber="20"> <span class="hits">1</span> <code class="ruby"> expect(nics.count).to be &gt;= 1</code> </li> - <li class="covered" data-hits="1" data-linenumber="18"> + <li class="covered" data-hits="1" data-linenumber="21"> <span class="hits">1</span> <code class="ruby"> nic = nics[0]</code> </li> - <li class="never" data-hits="" data-linenumber="19"> + <li class="never" data-hits="" data-linenumber="22"> <code class="ruby"></code> </li> - <li class="covered" data-hits="1" data-linenumber="20"> + <li class="covered" data-hits="1" data-linenumber="23"> <span class="hits">1</span> <code class="ruby"> expect(nic.has_key?(:mac_address)).to be_true</code> </li> - <li class="covered" data-hits="1" data-linenumber="21"> + <li class="covered" data-hits="1" data-linenumber="24"> <span class="hits">1</span> <code class="ruby"> expect(nic.has_key?(:net_connection_id)).to be_true</code> </li> - <li class="covered" data-hits="1" data-linenumber="22"> + <li class="covered" data-hits="1" data-linenumber="25"> <span class="hits">1</span> <code class="ruby"> expect(nic.has_key?(:interface_index)).to be_true</code> </li> - <li class="covered" data-hits="1" data-linenumber="23"> + <li class="covered" data-hits="1" data-linenumber="26"> <span class="hits">1</span> <code class="ruby"> expect(nic.has_key?(:index)).to be_true</code> </li> - <li class="never" data-hits="" data-linenumber="24"> + <li class="never" data-hits="" data-linenumber="27"> <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="25"> + <li class="covered" data-hits="1" data-linenumber="28"> <span class="hits">1</span> <code class="ruby"> expect(nic[:mac_address]).to match(/^([0-9A-F]{2}[:]){5}([0-9A-F]{2})$/)</code> </li> - <li class="covered" data-hits="1" data-linenumber="26"> + <li class="covered" data-hits="1" data-linenumber="29"> <span class="hits">1</span> <code class="ruby"> Integer(nic[:interface_index])</code> </li> - <li class="covered" data-hits="1" data-linenumber="27"> + <li class="covered" data-hits="1" data-linenumber="30"> <span class="hits">1</span> <code class="ruby"> Integer(nic[:index])</code> </li> - <li class="never" data-hits="" data-linenumber="28"> + <li class="never" data-hits="" data-linenumber="31"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="29"> + <li class="never" data-hits="" data-linenumber="32"> <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="30"> + <li class="covered" data-hits="1" data-linenumber="33"> <span class="hits">1</span> <code class="ruby"> it &quot;should configure DHCP for adapter&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="31"> + <li class="covered" data-hits="1" data-linenumber="34"> <span class="hits">1</span> <code class="ruby"> nics = @guestnetwork.network_adapters()</code> </li> - <li class="covered" data-hits="1" data-linenumber="32"> + <li class="covered" data-hits="1" data-linenumber="35"> <span class="hits">1</span> <code class="ruby"> @guestnetwork.configure_dhcp_interface(nics[0][:index], nics[0][:net_connection_id])</code> </li> - <li class="covered" data-hits="1" data-linenumber="33"> + <li class="covered" data-hits="1" data-linenumber="36"> <span class="hits">1</span> <code class="ruby"> expect(@guestnetwork.is_dhcp_enabled(nics[0][:index])).to be_true</code> </li> - <li class="never" data-hits="" data-linenumber="34"> + <li class="never" data-hits="" data-linenumber="37"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="35"> + <li class="never" data-hits="" data-linenumber="38"> <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="36"> + <li class="covered" data-hits="1" data-linenumber="39"> <span class="hits">1</span> <code class="ruby"> it &quot;should configure static IP for adapter&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="37"> + <li class="covered" data-hits="1" data-linenumber="40"> <span class="hits">1</span> <code class="ruby"> nics = @guestnetwork.network_adapters()</code> </li> - <li class="covered" data-hits="1" data-linenumber="38"> + <li class="covered" data-hits="1" data-linenumber="41"> <span class="hits">1</span> - <code class="ruby"> @guestnetwork.configure_static_interface(nics[1][:index], nics[1][:net_connection_id], &quot;192.168.0.100&quot;, &quot;255.255.255.0&quot;)</code> + <code class="ruby"> @guestnetwork.configure_static_interface(</code> </li> - <li class="covered" data-hits="1" data-linenumber="39"> + <li class="never" data-hits="" data-linenumber="42"> + + + <code class="ruby"> nics[1][:index],</code> + </li> + + <li class="never" data-hits="" data-linenumber="43"> + + + <code class="ruby"> nics[1][:net_connection_id],</code> + </li> + + <li class="never" data-hits="" data-linenumber="44"> + + + <code class="ruby"> &quot;192.168.0.121&quot;,</code> + </li> + + <li class="never" data-hits="" data-linenumber="45"> + + + <code class="ruby"> &quot;255.255.255.0&quot;)</code> + </li> + + <li class="never" data-hits="" data-linenumber="46"> + + + <code class="ruby"> </code> + </li> + + <li class="covered" data-hits="1" data-linenumber="47"> <span class="hits">1</span> <code class="ruby"> expect(@guestnetwork.is_dhcp_enabled(nics[1][:index])).to be_false</code> </li> - <li class="never" data-hits="" data-linenumber="40"> + <li class="never" data-hits="" data-linenumber="48"> + <code class="ruby"> </code> + </li> + + <li class="never" data-hits="" data-linenumber="49"> + + + <code class="ruby"> # ensure the right IP was set by looking through all the output of ipconfig</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="50"> + <span class="hits">1</span> + + <code class="ruby"> ipconfig_out = ''</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="51"> + <span class="hits">1</span> + + <code class="ruby"> @shell.powershell('ipconfig /all') do |_, line|</code> + </li> + + <li class="covered" data-hits="3" data-linenumber="52"> + <span class="hits">3</span> + + <code class="ruby"> ipconfig_out = ipconfig_out + &quot;#{line}&quot;</code> + </li> + + <li class="never" data-hits="" data-linenumber="53"> + + + <code class="ruby"> end</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="54"> + <span class="hits">1</span> + + <code class="ruby"> expect(ipconfig_out).to include('192.168.0.121')</code> + </li> + + <li class="never" data-hits="" data-linenumber="55"> + + <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="41"> + <li class="never" data-hits="" data-linenumber="56"> <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="42"> + <li class="covered" data-hits="1" data-linenumber="57"> <span class="hits">1</span> <code class="ruby"> it &quot;should configure all networks to work mode&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="43"> + <li class="covered" data-hits="1" data-linenumber="58"> <span class="hits">1</span> <code class="ruby"> @guestnetwork.set_all_networks_to_work()</code> </li> - <li class="never" data-hits="" data-linenumber="44"> + <li class="never" data-hits="" data-linenumber="59"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="45"> + <li class="never" data-hits="" data-linenumber="60"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="46"> + <li class="never" data-hits="" data-linenumber="61"> <code class="ruby"></code> </li> - <li class="never" data-hits="" data-linenumber="47"> + <li class="never" data-hits="" data-linenumber="62"> <code class="ruby">end</code> </li> </ol> </pre> </div> - <div class="source_table" id="ea04d500983cfcba55fe7651387ec729e1eae680"> + <div class="source_table" id="13b6aec4445d4eeafa03e964d1e1486037abd7a4"> <div class="header"> <h3>spec/vagrant-windows/helper_spec.rb</h3> <h4><span class="green">100.0 %</span> covered</h4> <div> - <b>18</b> relevant lines. - <span class="green"><b>18</b> lines covered</span> and + <b>29</b> relevant lines. + <span class="green"><b>29</b> lines covered</span> and <span class="red"><b>0</b> lines missed.</span> </div> </div> <pre> <ol> <li class="covered" data-hits="1" data-linenumber="1"> <span class="hits">1</span> - <code class="ruby">require &#39;spec_helper&#39;</code> + <code class="ruby">require 'spec_helper'</code> </li> - <li class="never" data-hits="" data-linenumber="2"> + <li class="covered" data-hits="1" data-linenumber="2"> + <span class="hits">1</span> + <code class="ruby">require 'mocha/api'</code> + </li> + + <li class="never" data-hits="" data-linenumber="3"> + <code class="ruby"></code> </li> - <li class="covered" data-hits="1" data-linenumber="3"> + <li class="covered" data-hits="1" data-linenumber="4"> <span class="hits">1</span> <code class="ruby">describe VagrantWindows::Helper , :unit =&gt; true do</code> </li> - <li class="never" data-hits="" data-linenumber="4"> + <li class="never" data-hits="" data-linenumber="5"> <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="5"> + <li class="covered" data-hits="1" data-linenumber="6"> <span class="hits">1</span> <code class="ruby"> class DummyHelper</code> </li> - <li class="covered" data-hits="1" data-linenumber="6"> + <li class="covered" data-hits="1" data-linenumber="7"> <span class="hits">1</span> <code class="ruby"> include VagrantWindows::Helper</code> </li> - <li class="never" data-hits="" data-linenumber="7"> + <li class="never" data-hits="" data-linenumber="8"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="8"> + <li class="never" data-hits="" data-linenumber="9"> <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="9"> + <li class="covered" data-hits="1" data-linenumber="10"> <span class="hits">1</span> <code class="ruby"> before(:all) do</code> </li> - <li class="covered" data-hits="1" data-linenumber="10"> + <li class="covered" data-hits="1" data-linenumber="11"> <span class="hits">1</span> <code class="ruby"> @dummy = DummyHelper.new</code> </li> - <li class="never" data-hits="" data-linenumber="11"> + <li class="never" data-hits="" data-linenumber="12"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="12"> + <li class="never" data-hits="" data-linenumber="13"> <code class="ruby"></code> </li> - <li class="covered" data-hits="1" data-linenumber="13"> + <li class="covered" data-hits="1" data-linenumber="14"> <span class="hits">1</span> <code class="ruby"> describe &quot;win_friendly_path&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="14"> + <li class="covered" data-hits="1" data-linenumber="15"> <span class="hits">1</span> <code class="ruby"> it &quot;should replace slashes with backslashes&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="15"> + <li class="covered" data-hits="1" data-linenumber="16"> <span class="hits">1</span> - <code class="ruby"> @dummy.win_friendly_path(&#39;c:/tmp/dir&#39;).should eq(&#39;c:\\tmp\\dir&#39;)</code> + <code class="ruby"> @dummy.win_friendly_path('c:/tmp/dir').should eq('c:\\tmp\\dir')</code> </li> - <li class="never" data-hits="" data-linenumber="16"> + <li class="never" data-hits="" data-linenumber="17"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="17"> + <li class="never" data-hits="" data-linenumber="18"> <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="18"> + <li class="covered" data-hits="1" data-linenumber="19"> <span class="hits">1</span> <code class="ruby"> it &quot;should prepend c: drive if not drive specified&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="19"> + <li class="covered" data-hits="1" data-linenumber="20"> <span class="hits">1</span> - <code class="ruby"> @dummy.win_friendly_path(&#39;/tmp/dir&#39;).should eq(&#39;c:\\tmp\\dir&#39;)</code> + <code class="ruby"> @dummy.win_friendly_path('/tmp/dir').should eq('c:\\tmp\\dir')</code> </li> - <li class="never" data-hits="" data-linenumber="20"> + <li class="never" data-hits="" data-linenumber="21"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="21"> + <li class="never" data-hits="" data-linenumber="22"> <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="22"> + <li class="covered" data-hits="1" data-linenumber="23"> <span class="hits">1</span> <code class="ruby"> it &quot;should return nil if no path specified&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="23"> + <li class="covered" data-hits="1" data-linenumber="24"> <span class="hits">1</span> <code class="ruby"> @dummy.win_friendly_path(nil).should be_nil</code> </li> - <li class="never" data-hits="" data-linenumber="24"> + <li class="never" data-hits="" data-linenumber="25"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="25"> + <li class="never" data-hits="" data-linenumber="26"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="26"> + <li class="never" data-hits="" data-linenumber="27"> <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="27"> + <li class="covered" data-hits="1" data-linenumber="28"> <span class="hits">1</span> <code class="ruby"> describe &quot;win_friendly_share_id&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="28"> + <li class="covered" data-hits="1" data-linenumber="29"> <span class="hits">1</span> <code class="ruby"> it &quot;should use share id if present&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="29"> + <li class="covered" data-hits="1" data-linenumber="30"> <span class="hits">1</span> - <code class="ruby"> @dummy.win_friendly_share_id(&#39;sharename&#39;).should eq(&#39;sharename&#39;)</code> + <code class="ruby"> @dummy.win_friendly_share_id('sharename').should eq('sharename')</code> </li> - <li class="never" data-hits="" data-linenumber="30"> + <li class="never" data-hits="" data-linenumber="31"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="31"> + <li class="never" data-hits="" data-linenumber="32"> <code class="ruby"> </code> </li> - <li class="covered" data-hits="1" data-linenumber="32"> + <li class="covered" data-hits="1" data-linenumber="33"> <span class="hits">1</span> <code class="ruby"> it &quot;should use last folder name in guest_path&quot; do</code> </li> - <li class="covered" data-hits="1" data-linenumber="33"> + <li class="covered" data-hits="1" data-linenumber="34"> <span class="hits">1</span> - <code class="ruby"> @dummy.win_friendly_share_id(&#39;/tmp/folder/sharename&#39;).should eq(&#39;tmp_folder_sharename&#39;)</code> + <code class="ruby"> @dummy.win_friendly_share_id('/tmp/folder/sharename').should eq('tmp_folder_sharename')</code> </li> - <li class="never" data-hits="" data-linenumber="34"> + <li class="never" data-hits="" data-linenumber="35"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="35"> + <li class="never" data-hits="" data-linenumber="36"> <code class="ruby"></code> </li> - <li class="never" data-hits="" data-linenumber="36"> + <li class="never" data-hits="" data-linenumber="37"> <code class="ruby"> end</code> </li> - <li class="never" data-hits="" data-linenumber="37"> + <li class="never" data-hits="" data-linenumber="38"> + <code class="ruby"> </code> + </li> + + <li class="covered" data-hits="1" data-linenumber="39"> + <span class="hits">1</span> + + <code class="ruby"> describe &quot;is_vmware&quot; do</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="40"> + <span class="hits">1</span> + + <code class="ruby"> it &quot;should be true for vmware_fusion&quot; do</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="41"> + <span class="hits">1</span> + + <code class="ruby"> machine = stub(:provider_name =&gt; :vmware_fusion)</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="42"> + <span class="hits">1</span> + + <code class="ruby"> expect(@dummy.is_vmware(machine)).to be_true</code> + </li> + + <li class="never" data-hits="" data-linenumber="43"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="44"> + + + <code class="ruby"> </code> + </li> + + <li class="covered" data-hits="1" data-linenumber="45"> + <span class="hits">1</span> + + <code class="ruby"> it &quot;should be true for vmware_workstation&quot; do</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="46"> + <span class="hits">1</span> + + <code class="ruby"> machine = stub(:provider_name =&gt; :vmware_workstation)</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="47"> + <span class="hits">1</span> + + <code class="ruby"> expect(@dummy.is_vmware(machine)).to be_true</code> + </li> + + <li class="never" data-hits="" data-linenumber="48"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="49"> + + + <code class="ruby"> </code> + </li> + + <li class="covered" data-hits="1" data-linenumber="50"> + <span class="hits">1</span> + + <code class="ruby"> it &quot;should be false for virtual_box&quot; do</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="51"> + <span class="hits">1</span> + + <code class="ruby"> machine = stub(:provider_name =&gt; :virtual_box)</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="52"> + <span class="hits">1</span> + + <code class="ruby"> expect(@dummy.is_vmware(machine)).to be_false</code> + </li> + + <li class="never" data-hits="" data-linenumber="53"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="54"> + + <code class="ruby"></code> </li> - <li class="never" data-hits="" data-linenumber="38"> + <li class="never" data-hits="" data-linenumber="55"> + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="56"> + + + <code class="ruby"></code> + </li> + + <li class="never" data-hits="" data-linenumber="57"> + + <code class="ruby">end</code> </li> </ol> </pre> </div> - <div class="source_table" id="f8e7b813e0e0b6046a839d891c92700aaccfb5dc"> + <div class="source_table" id="95c59faf2db79996a63e1d2688128ac8dab33b79"> <div class="header"> + <h3>spec/vagrant-windows/mount_shared_folder_spec.rb</h3> + <h4><span class="green">100.0 %</span> covered</h4> + <div> + <b>17</b> relevant lines. + <span class="green"><b>17</b> lines covered</span> and + <span class="red"><b>0</b> lines missed.</span> + </div> + </div> + + <pre> + <ol> + + <li class="covered" data-hits="1" data-linenumber="1"> + <span class="hits">1</span> + + <code class="ruby">require 'spec_helper'</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="2"> + <span class="hits">1</span> + + <code class="ruby">require 'mocha/api'</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="3"> + <span class="hits">1</span> + + <code class="ruby">require 'vagrant-windows/guest/cap/mount_shared_folder'</code> + </li> + + <li class="never" data-hits="" data-linenumber="4"> + + + <code class="ruby"></code> + </li> + + <li class="covered" data-hits="1" data-linenumber="5"> + <span class="hits">1</span> + + <code class="ruby">describe VagrantWindows::Guest::Cap::MountSharedFolder, :unit =&gt; true do</code> + </li> + + <li class="never" data-hits="" data-linenumber="6"> + + + <code class="ruby"> </code> + </li> + + <li class="covered" data-hits="1" data-linenumber="7"> + <span class="hits">1</span> + + <code class="ruby"> before(:each) do</code> + </li> + + <li class="covered" data-hits="2" data-linenumber="8"> + <span class="hits">2</span> + + <code class="ruby"> @communicator = mock()</code> + </li> + + <li class="covered" data-hits="2" data-linenumber="9"> + <span class="hits">2</span> + + <code class="ruby"> @machine = stub(:communicate =&gt; @communicator)</code> + </li> + + <li class="never" data-hits="" data-linenumber="10"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="11"> + + + <code class="ruby"></code> + </li> + + <li class="covered" data-hits="1" data-linenumber="12"> + <span class="hits">1</span> + + <code class="ruby"> describe &quot;mount_virtualbox_shared_folder&quot; do</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="13"> + <span class="hits">1</span> + + <code class="ruby"> it &quot;should run script with vbox paths&quot; do</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="14"> + <span class="hits">1</span> + + <code class="ruby"> @communicator.expects(:execute).with do |script, options|</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="15"> + <span class="hits">1</span> + + <code class="ruby"> expect(script).to include(&quot;$VmProviderUncPath = \&quot;\\\\vboxsrv\\vagrant\&quot;&quot;)</code> + </li> + + <li class="never" data-hits="" data-linenumber="16"> + + + <code class="ruby"> end </code> + </li> + + <li class="never" data-hits="" data-linenumber="17"> + + + <code class="ruby"></code> + </li> + + <li class="covered" data-hits="1" data-linenumber="18"> + <span class="hits">1</span> + + <code class="ruby"> VagrantWindows::Guest::Cap::MountSharedFolder.mount_virtualbox_shared_folder(</code> + </li> + + <li class="never" data-hits="" data-linenumber="19"> + + + <code class="ruby"> @machine, &quot;vagrant&quot;, &quot;/tmp/vagrant&quot;, {})</code> + </li> + + <li class="never" data-hits="" data-linenumber="20"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="21"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="22"> + + + <code class="ruby"> </code> + </li> + + <li class="covered" data-hits="1" data-linenumber="23"> + <span class="hits">1</span> + + <code class="ruby"> describe &quot;mount_vmware_shared_folder&quot; do</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="24"> + <span class="hits">1</span> + + <code class="ruby"> it &quot;should run script with vmware paths&quot; do</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="25"> + <span class="hits">1</span> + + <code class="ruby"> @communicator.expects(:execute).with do |script, options|</code> + </li> + + <li class="covered" data-hits="1" data-linenumber="26"> + <span class="hits">1</span> + + <code class="ruby"> expect(script).to include(&quot;$VmProviderUncPath = \&quot;\\\\vmware-host\\Shared Folders\\vagrant\&quot;&quot;)</code> + </li> + + <li class="never" data-hits="" data-linenumber="27"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="28"> + + + <code class="ruby"> </code> + </li> + + <li class="covered" data-hits="1" data-linenumber="29"> + <span class="hits">1</span> + + <code class="ruby"> VagrantWindows::Guest::Cap::MountSharedFolder.mount_vmware_shared_folder(</code> + </li> + + <li class="never" data-hits="" data-linenumber="30"> + + + <code class="ruby"> @machine, &quot;vagrant&quot;, &quot;/tmp/vagrant&quot;, {})</code> + </li> + + <li class="never" data-hits="" data-linenumber="31"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="32"> + + + <code class="ruby"> end</code> + </li> + + <li class="never" data-hits="" data-linenumber="33"> + + + <code class="ruby"> </code> + </li> + + <li class="never" data-hits="" data-linenumber="34"> + + + <code class="ruby">end</code> + </li> + + </ol> + </pre> +</div> + + <div class="source_table" id="844842835a3c9ba296ba1e91954dcd0979df99b4"> + <div class="header"> <h3>spec/vagrant-windows/winrmcommunicator_spec.rb</h3> <h4><span class="green">92.31 %</span> covered</h4> <div> <b>13</b> relevant lines. <span class="green"><b>12</b> lines covered</span> and @@ -7869,10 +8603,10 @@ <ol> <li class="covered" data-hits="1" data-linenumber="1"> <span class="hits">1</span> - <code class="ruby">require &#39;spec_helper&#39;</code> + <code class="ruby">require 'spec_helper'</code> </li> <li class="never" data-hits="" data-linenumber="2">