[Git][noosfero/noosfero][master] 2 commits: Remove HTML generation from community_block plugin

Rodrigo Souto gitlab at mg.gitlab.com
Tue Mar 29 16:21:12 BRT 2016


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
c02b7bca by Rafael Reggiani Manzo at 2016-03-29T14:14:11-03:00
Remove HTML generation from community_block plugin

It now relies on BoxesHelper logic and thus the method got removed. As
it was the only subject of unit tests, The unit tests for this class
have been removed (most of the logic is tested through functional
tests).

- - - - -
81971fd5 by Rodrigo Souto at 2016-03-29T19:20:39+00:00
Merge branch 'refactor_communities_block_plugin_html_generation' into 'master'

Remove HTML generation from community_block plugin

It now relies on BoxesHelper logic and thus the method got removed. As
it was the only subject of unit tests, The unit tests for this class
have been removed (most of the logic is tested through functional
tests).

It's dangerous to go alone. Have this travis build just in case: https://travis-ci.org/rafamanzo/noosfero/builds/118601061

See merge request !826
- - - - -


3 changed files:

- plugins/community_block/lib/community_block.rb
- − plugins/community_block/test/unit/commmunity_block_test.rb
- plugins/community_block/views/community_block.html.erb → plugins/community_block/views/blocks/community.html.erb


Changes:

=====================================
plugins/community_block/lib/community_block.rb
=====================================
--- a/plugins/community_block/lib/community_block.rb
+++ b/plugins/community_block/lib/community_block.rb
@@ -7,13 +7,4 @@ class CommunityBlock < Block
   def help
     _("Help for Community Description Block.")
   end
-
-  def content(arg={})
-    block = self
-
-    proc do
-      render :file => 'community_block', :locals => { :block => block }
-    end
-  end
-
 end


=====================================
plugins/community_block/test/unit/commmunity_block_test.rb deleted
=====================================
--- a/plugins/community_block/test/unit/commmunity_block_test.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require_relative '../test_helper'
-
-class CommunityBlockTest < ActiveSupport::TestCase
-
-  should "display community block" do
-    block = CommunityBlock.new
-    self.expects(:render).with(:file => 'community_block', :locals => { :block => block })
-    instance_eval(& block.content)
-  end
-
-end


=====================================
plugins/community_block/views/community_block.html.erb → plugins/community_block/views/blocks/community.html.erb
=====================================
--- a/plugins/community_block/views/community_block.html.erb
+++ b/plugins/community_block/views/blocks/community.html.erb



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/cae1f9c64c28f511fefa79c5fbb26b51b8fb743b...81971fd5e11cbe933efbf2ce48c6e1668047a36b
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160329/2bbfd93b/attachment-0001.html>


More information about the Noosfero-dev mailing list