22 Mar, 2016
1 commit
-
plugin-hotspot: dinamic hotspot for models callbacks With this, every model that includes Noosfero::Plugin::HotSpot will provide callbacks hotspots for plugins to answer. The current callbacks included are {after,before}_{create,destroy,save}. So if a plugin wants to do something on a comment after_save, it should define a hotspot somewhat like this: def comment_after_save_callback(comment) <code-goes-here> end Obviously, the callback provides the object in context as parameter. This will replace the problematic common practice of creating a lib/ext/my_model.rb and injecting the callbacks inside the class which bypass the enabled plugins logic. Signed-off-by: Rodrigo Souto <rodrigo@colivre.coop.br> Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com> See merge request !810
21 Mar, 2016
3 commits
-
Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com> Signed-off-by: Joenio Costa <joenio@colivre.coop.br>
-
With this, every model that includes Noosfero::Plugin::HotSpot will provide callbacks hotspots for plugins to answer. The current callbacks included are {after,before}_{create,destroy,save}. So if a plugin wants to do something on a comment after_save, it should define a hotspot somewhat like this: def comment_after_save_callback(comment) <code-goes-here> end Obviously, the callback provides the object in context as parameter. This will replace the problematic common practice of creating a lib/ext/my_model.rb and injecting the callbacks inside the class which bypass the enabled plugins logic. Signed-off-by: Rodrigo Souto <rodrigo@colivre.coop.br> Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com>
17 Mar, 2016
2 commits
16 Mar, 2016
5 commits
-
Add a help message for the user. Closes #144
-
this avoid colateral errors in others tests refers to commit: 1af11191ddb2da6ea93ea86ce7fbbb9a089feaf7
-
This reverts commit 23bd8bbc2293d5123bbcb4b416143934edf23abc. I found a way to fix the problem using `alias_method`
-
related issue: #181
15 Mar, 2016
4 commits
-
we must avoid using Date.today and DateTime.now in tests cases, they can return yesterday or tomorrow depending on the machine's time zone and ignores the configured Rails timezone reference: http://www.elabs.se/blog/36-working-with-time-zones-in-ruby-on-rails
-
it seems that a 'mock object' is false in a `if` block
-
Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com> Signed-off-by: Gustavo Jaruga <darkshades@gmail.com>
-
Decouple html creation from models into helpers This is a work started by @joenio and continued by @danielafeitosa for which I have just fixed failling tests and some minor issues created by the refactor. This MR adds just the fixes that do not involve plugins. As I've discussed with @diguliu there ill be separate MRs for plugins allowing easier review e clean merges. See merge request !803
12 Mar, 2016
1 commit
10 Mar, 2016
21 commits
-
This is one more step into decoupling HTML generation from models. All models with such method are expected to go through this refactor.
-
After creating the ArticleBlock view test at ff15413b2a8dca45d9f64e57270f294e351a0098 this test got broken. The root cause was the inclusion of ApplicationHelper for the article_block_test which led to `custom_options_article` for CMSHelper tests to fail as the BlogHelper (included by ApplicationHelper) was overriding the method. This has been fized by remove the include to ApplicationHelper and extract the necessary methods to separate helpers which led to two new methods for ArticleHelper and one new helper the ButtonsHelper.
-
After removing the content method it is now necessary to use BoxesHelper#render_block_content.
-
By removing the content method, it is now necessary to turn the test into a view one using the BoxesHelper method and properly stubbing other helpers. This was inspired by the same conversion made by commit 23cca52cdaea5cc3b46e4982f30ad3426891e2f2 on MyNetworkBlock test.
-
By removing the content method, it is now necessary to turn the test into a view one using the BoxesHelper method and properly stubbing other helpers.
-
By removing the content method, it is now necessary to turn the test into a view one using the BoxesHelper method and properly stubbing other helpers. The view required fix at the html escaping method call synthax.
-
After removing the content method it is now necessary to use BoxesHelper#render_block_content. The view required fixes as it was still supposing the old interface coupled into the model instead of receiving the model object. And it had a programming error that prevented results from getting displayed.
-
After removing the content method it is now necessary to use BoxesHelper#render_block_content.
-
After removing the content method it is now necessary to use BoxesHelper#render_block_content.
-
After removing the content method it is now necessary to use BoxesHelper#render_block_content.
-
By removing the content method, it is now necessary to turn the test into a view one using the BoxesHelper method and properly stubbing other helpers. This was inspired by the same conversion made by commit 23cca52cdaea5cc3b46e4982f30ad3426891e2f2 on MyNetworkBlock test.
-
By removing the content method, it is now necessary to turn the test into a view one. This was inspired by the same conversion made by commit 23cca52cdaea5cc3b46e4982f30ad3426891e2f2 on MyNetworkBlock test.
-
After the extraction of HTML dependencies into helpers it has been broken.
09 Mar, 2016
3 commits