Refactor: Topic#invite_by_email

Extract Topic#email_already_existas_for? and Topic#grant_permission_to_user
Fix failing spec due to missing variable in extracted method
Refactor: Topic#invite_by_email

Extract Topic#email_already_existas_for? and Topic#grant_permission_to_user
Fix failing spec due to missing variable in extracted method
Merge branch 'refactor-topic-invite-by-email' of github.com:cored/discourse into refactor-topic-invite-by-email
Merge pull request #31 from cdman/development

Merged with updates from upstream
adds unit tests for Discourse.View
Refactored Topic#limit_topics_per_day to reduce code climate complexity

Extracted  1) #apply_per_day_rate_limit_for, method as generic
RateLimiter , 2) #limit_first_day_topics_per_day as a separate method,
3) Added User#added_a_day_ago?, 4) Fixed private methods indentation.
unit tests for Discourse.ContainerView
removes unused return statement from Discourse.ContainerView.attachViewWithArgs
Update client.zh_CN.yml
Merge pull request #1530 from velesin/view_tests

adds unit tests for Discourse.View
Merge pull request #1532 from velesin/container_view_tests

unit tests for Discourse.ContainerView
Merge pull request #1531 from railsaholic/topics_model_refactoring

Refactored Topic#limit_topics_per_day to improve Code Climate Complexity
Merge pull request #1535 from ofgeek/patch-1

Update client.zh_CN.yml
Merge pull request #1533 from velesin/remove_return_from_attach_view_with_args

removes unused return statement from ContainerView.attachViewWithArgs
Merge pull request #1495 from cored/refactor-topic-invite-by-email

Refactor: Topic model
Collapse user details when not viewing index view
Never show preview pane in composer on mobile.
4% speedup on our test suite
Discourse.Computed tests refactoring