Sam
89ad2b5900
DEV: Rails 5.2 upgrade and global gem upgrade
...
This updates tests to use latest rails 5 practice
and updates ALL dependencies that could be updated
Performance testing shows that performance has not regressed
if anything it is marginally faster now.
2018-06-07 14:21:33 +10:00
Guo Xiang Tan
7fc8a36529
DEV: Take 2 Queue jobs in tests by default.
...
On my machine this cuts the time taken to run our test suite
from ~11mins to ~9mins.
2018-05-31 16:23:23 +08:00
Guo Xiang Tan
56e9ff6853
Revert "DEV: Queue jobs in tests by default."
...
Too risky for now
This reverts commit be28154d3b
.
2018-05-31 15:34:46 +08:00
Guo Xiang Tan
be28154d3b
DEV: Queue jobs in tests by default.
2018-05-31 14:45:47 +08:00
Neil Lalonde
e26a14dc29
FIX: error when flagging to notify moderators because message title is too long
2018-05-29 12:21:47 -04:00
Guo Xiang Tan
467d91347a
Missing specs for Group
, Tag
, Category
and Flag
web hooks.
2018-05-21 17:29:58 +08:00
Robin Ward
ac60a84329
FEATURE: New site setting min_flags_staff_visibility
...
When set higher than 1, flags won't show up for staff in the admin
section unless the minimum threshold of flags on a post is reached.
2018-05-07 16:05:13 -04:00
Arpit Jalan
a16b616861
FEATURE: webhook for flag events
2018-04-13 07:47:58 +05:30
Gerhard Schlager
56ca87bb01
Improve spec
2018-04-05 17:27:32 +02:00
Gerhard Schlager
cd6a99a027
FEATURE: Send a different PM when a post has been hidden more than once
2018-04-05 14:03:21 +02:00
Robin Ward
b39fbf7187
A staff member can hide another staff's member's post by flagging
2018-03-20 09:38:23 -04:00
Guo Xiang Tan
902c5d11cf
FIX: Don't allow other flag actions after notify_moderator
has happened.
...
https://meta.discourse.org/t/receiving-sorry-an-error-has-occurred-during-flagging-step-of-discobot-tutorial/77233/5
2018-02-28 11:27:56 +08:00
Gerhard Schlager
5ca5817902
FIX: Only likes should change the given daily likes
2018-02-26 22:27:18 +01:00
Robin Ward
cee3337357
Don't allow users to auto-hide staff posts
2018-02-09 19:53:58 -05:00
Guo Xiang Tan
30ddc1f222
Don't swallow errors when failing to create message for post action.
2017-12-19 10:58:26 +08:00
Sam
dd70ef3abf
Revert "Revert "PERF: improve speed of rate limiter""
...
This reverts commit 2373d85239
.
2017-12-04 21:23:11 +11:00
Sam
2373d85239
Revert "PERF: improve speed of rate limiter"
...
This reverts commit a9bcdd7f27
.
2017-12-04 21:19:28 +11:00
Sam
a9bcdd7f27
PERF: improve speed of rate limiter
...
Also
- adds a global rate limiter option
- cleans up usage in tests
- fixes freeze_time so it handles clock_gettime
2017-12-04 18:17:30 +11:00
Neil Lalonde
4452d67a23
Revert "FIX: TL0 users' messages to moderators were not being posted when flagging private messages"
2017-10-23 18:17:53 -04:00
Robin Ward
838568cbc3
Refactor flag types for more customization
2017-10-19 13:55:23 -04:00
Neil Lalonde
b124e5f19f
FIX: TL0 users' messages to moderators were not being posted when flagging private messages
2017-10-13 11:55:49 -04:00
Guo Xiang Tan
77d4c4d8dc
Fix all the errors to get our tests green on Rails 5.1.
2017-09-25 13:48:58 +08:00
Guo Xiang Tan
90d7dd1f05
FIX: Ensure that post action moderation post uses the site's default locale.
...
https://meta.discourse.org/t/a-post-in-looking-for-someone-to-customize-discourse-to-create-a-forum-site-requires-staff-attention/67468/5?u=tgxworld
2017-08-09 18:20:20 +09:00
Guo Xiang Tan
5012d46cbd
Add rubocop to our build. ( #5004 )
2017-07-28 10:20:09 +09:00
Sam Saffron
045a2abcec
FEATURE: remove the timecop gem
...
We should only have one way of mocking time, misuse of timecop
was causing build stability issues
2017-07-24 12:11:10 -04:00
Guo Xiang Tan
13f3de4bf6
Nuke all SiteSetting.stubs
from our codebase.
2017-07-07 15:09:14 +09:00
Neil Lalonde
55b61e9bea
rename topic_status_update to topic_timer
2017-05-11 18:27:53 -04:00
Robin Ward
96c59c5b82
FIX: Don't notify or return flags on system users
2017-05-08 13:13:35 -04:00
Sam
aec73d4003
correct the spec again
2017-04-20 17:41:35 -04:00
Sam
47b99e0922
group is now default watched
2017-04-20 17:38:46 -04:00
Guo Xiang Tan
ed577fbff8
FEATURE: Pause a topic instead of permanently closing when flag threshold is reached.
2017-03-31 14:35:05 +08:00
Sam
c531f4ded5
remove rails-observers
...
Rails yanked out observers many many years ago, instead the functionality
was yanked out to a gem that is very lightly maintained.
For example: if we want to upgrade to rails 5 there is no published gem
Internally the usage of observers had quite a few problem.
The series of refactors renamed a bunch of classes to give us more clarity
and removed some magic.
2016-12-22 16:46:53 +11:00
Sam
c04d4171ff
FIX: whisper no longer experimental
...
- Regular users are not notified of whispers
- Regular users no longer have "stuck" topics in unread
- Additional tracking for staff highest post number
- Remove a bunch of unused columns in topics table
2016-12-02 17:03:31 +11:00
Guo Xiang Tan
cb5be1fe8f
Upgrade rspec to 3.4.0.
2016-05-30 11:38:38 +08:00
Robin Ward
5d4ee2ca1d
FEATURE: Warn a user when they have few likes remaining
2016-03-18 11:30:29 -04:00
Robin Ward
1fba835d4f
FIX: Use a logging table for daily likes given. Use it for badges.
2016-03-18 11:18:54 -04:00
Sam
3e018c2588
FIX: rate limit do/undo on post actions
2016-03-06 09:51:30 +11:00
Sam Saffron
a764cc3a42
FEATURE: by default users track a group (as opposed to watch)
...
FEATURE: a rollup counting number of messages in the group inbox to tracking users
2016-01-27 21:38:33 +11:00
Neil Lalonde
007326d3bd
FIX: hidden posts that are edited by the author and unhidden could not be flagged by the same users again
2015-12-29 16:59:36 -05:00
Andy Waite
3e50313fdc
Prepare for separation of RSpec helper files
...
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`
`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).
For more information:
https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files
In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.
This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.
At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Guo Xiang Tan
600e42c2ba
FIX: Race condition when wrapping PostCreator#create
in a transaction.
2015-10-15 14:42:40 +08:00
Sam
51d82fc25d
PERF: Active Record #pluck is twice faster
...
PERF: SqlBuilder bypasses AR converters and uses PG directly
2015-05-13 16:46:17 +10:00
Arthur Neves
b8cbe51026
Convert specs to RSpec 2.99.2 syntax with Transpec
...
This conversion is done by Transpec 3.1.0 with the following command:
transpec
* 424 conversions
from: obj.should
to: expect(obj).to
* 325 conversions
from: == expected
to: eq(expected)
* 38 conversions
from: obj.should_not
to: expect(obj).not_to
* 15 conversions
from: =~ /pattern/
to: match(/pattern/)
* 9 conversions
from: it { should ... }
to: it { is_expected.to ... }
* 5 conversions
from: lambda { }.should_not
to: expect { }.not_to
* 4 conversions
from: lambda { }.should
to: expect { }.to
* 2 conversions
from: -> { }.should
to: expect { }.to
* 2 conversions
from: -> { }.should_not
to: expect { }.not_to
* 1 conversion
from: === expected
to: be === expected
* 1 conversion
from: =~ [1, 2]
to: match_array([1, 2])
For more details: https://github.com/yujinakayama/transpec#supported-conversions
2015-04-25 11:18:35 -04:00
Sam
4387e05162
PERF: speed up query
2015-04-16 17:29:37 +10:00
Sam
a5b25ad2af
FEATURE: scale up likes per day as users increase trust level
...
tl2 = 1.5 times the likes
tl3 = 2 times the likes
tl4 = 3 times the likes
configurable via tl[234]_additional_likes_per_day_multiplier site setting
2015-04-16 09:44:30 +10:00
Régis Hanol
eec1921ba9
FIX: notifications inconsistencies + never notify system user
2015-04-01 11:55:59 +02:00
Sam
cfa511e35d
FIX: correctly mute likers
...
FEATURE: disallow all muting of staff
2015-03-26 12:08:04 +11:00
Régis Hanol
df7c38dd51
FIX: don't add an automated message when *a* moderator already replied (as opposed to *the* moderator)
2015-03-16 12:02:34 +01:00
Régis Hanol
afd2417945
FEATURE: new 'auto_respond_to_flag_actions' site setting
2015-03-11 19:29:09 +01:00
Régis Hanol
c8631a7a8b
FIX: auto-message shouldn't generate notifications
2015-03-11 19:07:17 +01:00