lib/site/body-dependencies.rhtml in continuous4r-0.0.2 vs lib/site/body-dependencies.rhtml in continuous4r-0.0.3

- old
+ new

@@ -29,23 +29,32 @@ </th> </tr> </thead> <tbody> <% i = 0 - project.gems.each('gem') do |gem| - i = i + 1 - gem_raw_details = `gem query -d|grep #{gem['name']}` - gem_details = gem_raw_details.split(/$/) - gem_comment = gem_details[1] if gem_details.length > 1 - gem_comment ||= '' + begin + project.gems.each('gem') do |gem| + i = i + 1 + gem_raw_details = Utils.run_command("gem query -d").select{ |l| l =~ Regexp.new(gem['name'])} + gem_details = gem_raw_details.split(/$/) + gem_comment = gem_details[1] if gem_details.length > 1 + gem_comment ||= '' %> <tr class="<% if i % 2 == 0 %>a<% else %>b<% end %>"> <td><%= gem['name'] %></td> <td>gem</td> <td><%= gem['version'] %></td> <td><%= gem_comment %></td> </tr> - <% end %> + <% end + rescue + %> + <tr class="a"> + <td colspan="4">No gems declared for this project.</td> + </tr> + <% + end + %> </tbody> </table> </div> </div> </div>