Commit Graph

39 Commits

Author SHA1 Message Date
Guo Xiang Tan
8cf0f51eb2 UX: Display site settings shortcut for poll and discourse-nginx-performance-report.
https://meta.discourse.org/t/improving-admin-plugins/84585/29?u=tgxworld
2018-05-08 10:34:32 +08:00
Joffrey JAFFEUX
45f657336e
FEATURE: adds support for loading existing core asset in pretty text 2018-04-10 08:37:16 +02:00
Gerhard Schlager
eb52c5469e FEATURE: Allow plugins to register a new locale 2018-01-25 14:57:41 +01:00
Jeff Wong
b094894c94 Feature: Add service worker registration method to plugin API 2017-11-28 14:01:41 +08:00
Sam
813e21d0e8 FIX: current user serializer consistently returns {} for custom_fields
Resolves: #5210
2017-11-15 11:55:37 +11:00
Robin Ward
9a76559345 FIX: Remove unused test 2017-07-28 11:59:12 -04:00
Guo Xiang Tan
5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Robin Ward
adb73180f7 FEATURE: Let plugins register themes easily 2017-01-13 11:50:52 -05:00
Guo Xiang Tan
3909f342f6 FEATURE: Allow options to be set when adding model callbacks. 2016-11-21 10:20:31 +08:00
Sam
f4c754b389 FEATURE: split JavaScript application bundle, so plugins live in own file
This adds plugin.js and plugin_third_party.js files
2016-11-15 11:43:13 +11:00
Guo Xiang Tan
49c27d9a88 FEATURE: Add interface in Plugin::Instance to register a seedfu fixture. 2016-10-25 14:57:31 +08:00
Guo Xiang Tan
31d900f7e7 Fix build. 2016-09-05 17:03:41 +08:00
Guo Xiang Tan
aa1f306894 Properly clean up plugin event in specs.. 2016-09-05 16:10:03 +08:00
Guo Xiang Tan
ec90655c41 FIX: Clean up specs properly. 2016-09-05 15:48:59 +08:00
Guo Xiang Tan
aa9decf6fd Remove DiscourseEvent.clear. 2016-09-05 15:17:49 +08:00
Robin Ward
a546395397 REFACTOR: Migrate markdown functionality in ES6 2016-07-11 12:57:05 -04:00
Guo Xiang Tan
cb5be1fe8f
Upgrade rspec to 3.4.0. 2016-05-30 11:38:38 +08: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
Robin Ward
de42c627c5 Allow plugins to specify a minimum requires version 2015-04-27 13:07:12 -04:00
Robin Ward
7dea65122e Support a url field in plugin metadata 2015-02-06 18:08:57 -05:00
Robin Ward
3b68214210 FIX: Clean up after adding events. Fixes random test failures. 2015-02-04 17:33:18 -05:00
Robin Ward
25daca8f23 Helpers for plugins to support enabling/disabling 2015-02-04 16:23:56 -05:00
Luciano Sousa
0fd98b56d8 few components with rspec3 syntax 2015-01-09 13:34:37 -03:00
Robin Ward
663cd93c6d Move register_asset into PluginRegistry -- the logic works better
there.
2014-12-09 14:20:53 -05:00
Régis Hanol
de76b512c1 fix most deprecations in the specs (still some left) 2014-09-25 17:44:48 +02:00
Sam
d13d4fc158 correct state leak 2014-06-11 12:00:02 +10:00
Sam
62abb873df FEATURE: support serializing user custom fields by plugins 2014-06-11 11:57:22 +10:00
Neil Lalonde
3e16ac62c3 Add register_color_scheme for plugins 2014-06-03 12:37:29 -04:00
Benjamin Kampmann
64918c35f5 Improved Plugins SCSS management
- Moves the import of plugins for both mobile and desktop from common after discourse loading, allowing plugins to overwrite
 - Make desktop-option behave like the mobile-option: SCSS/CSS marked with that option will only be loaded for desktop from now on and ignored in mobile
 - Add variables-keyword, allowing plugins to ship and overwrite variables before they get imported by discourse (great for theming)
2014-04-25 18:25:45 +02:00
Sam
de9aa49b52 BUGFIX: default should register CSS for both mobile and desktop
If you want desktop only use :desktop option
2014-04-10 16:30:22 +10:00
Benjamin Kampmann
d22df7731d Allow plugins to ship custom styles only for mobile
- adds another :mobile-flag to register_assets
- adds test for plugin registering of assets
- load plugins when on desktop and plugins_mobile when on mobile
2014-04-07 16:33:35 +02:00
Sam
eff20fdda7 fix bust spec 2014-04-02 16:22:12 +11:00
Régis Hanol
fcd85b8a72 allow plugins to be symlinked 2013-10-21 19:59:28 +02:00
Sam
b0465c517e (experimental) added framework for filtering all sorts of internals in discourse and consuming by plugins 2013-10-10 18:45:40 +11:00
Robin Ward
60abde2253 FIX: Broken spec 2013-09-19 18:40:46 -07:00
Sam
bb3725cfca correct spec 2013-08-26 14:39:34 +10:00
Sam
818bf1355d PluginStore for plugin specific bits of storage
Amended plugin interfaces so they work with the vk sample
2013-08-26 12:59:17 +10:00
Sam
213ce33af2 Fixed all broken specs
Moved middleware config into authenticators
2013-08-26 12:59:17 +10:00
Sam
075002a6d5 refactoring the plugin interfaces to allow for better extensible 2013-08-26 12:59:17 +10:00