Skip to content

Commit af40bbe

Browse files
authored
Merge pull request #696 from denny/docs/rake-tasks
Add documentation file for rake tasks. Move Contributing doc to where GitHub expects it to be.
2 parents 074db50 + 18ed773 commit af40bbe

File tree

7 files changed

+73
-16
lines changed

7 files changed

+73
-16
lines changed

config/routes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def sidekiq_web_enabled?
163163

164164
########################################################################################################
165165
# This route explicitly intercepts any request starting with /admin that wasn't otherwise handled
166-
match '/admin/*path', to: 'admin#not_found', as: :admin_404, via: %i[ get post put patch delete ]
166+
match '/admin/*path', to: 'admin#not_found', as: :admin_not_found, via: %i[ get post put patch delete ]
167167

168168
########################################################################################################
169169
# This catch-all route matches anything and everything not already matched by a route defined before it.

docs/Developers/Contributing.md renamed to docs/Contributing.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,13 @@
44

55
If you're interested in contributing to ShinyCMS ... let me start by saying "Thank you!" :)
66

7-
Here are some things to read that you might find useful:
7+
If you already know what feature or fix you want to work on, then it's the usual process; fork the repo, do your thing, submit a PR when you have your new code working. Please make sure it has full test coverage.
88

9-
* [Project goals](ProjectGoals.md)
9+
If you're generally interested in getting involved, but don't have a specific task in mind, here are some things to read that you might find useful:
1010

11-
* Project progress:
12-
* [Done](done.md)
13-
* [In progress](in-progress.md)
14-
* [Still to do](TODO.md)
11+
* [Project goals](Developers/ProjectGoals.md)
1512

16-
* Instructions for [creating a new plugin](Plugins.md) (and related useful info)
17-
18-
* Tools and tips for [working on mailers](Mailers.md) (features that send email)
19-
20-
* Tools and rules for [testing](Testing.md) (this project has 100% test coverage)
13+
* [Developer documentation](Developers/index.md)
2114

2215

2316
### Are you new to coding?
@@ -31,7 +24,7 @@ When I first started contributing to open source projects, I received a lot of i
3124

3225
## Code of Conduct
3326

34-
This project has a [Code of Conduct](../code-of-conduct.md), which is intended
27+
This project has a [Code of Conduct](code-of-conduct.md), which is intended
3528
to make using ShinyCMS, or contributing to it, a harassment-free experience for
3629
everybody involved - regardless of who they are and what they do or don't know.
3730

docs/Developers/TODO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@
131131

132132
* Invites: https://github.com/scambra/devise_invitable#readme
133133

134+
* Image galleries / multimedia galleries / etc
135+
134136
* Can I merge EmailRecipient, CommentAuthor, and VotableIP into a single Visitor model?
135137
* Think carefully about privacy implications of linking previous actions to current visitor
136138

docs/Developers/demo-data.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ShinyCMS Developer Documentation
2+
3+
## Demo site data
4+
5+
The demo site data can be dumped and loaded using the rake tasks:
6+
7+
`rails shiny:demo:dump` - this will dump the current contents of the database into `db/demo_data.rb` (only from models that include ShinyDemoDataProvider)
8+
9+
`rails shiny:demo:load` - and reply 'Y' to the 'Are you sure?' question - this will wipe your database!

docs/Developers/index.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# ShinyCMS Developer Documentation
2+
3+
## Goals and Progress
4+
5+
This is as close as we get to a roadmap, for now :)
6+
7+
* [Project goals](ProjectGoals.md)
8+
9+
* Project progress:
10+
* [Done](done.md)
11+
* [In progress](in-progress.md)
12+
* [Still to do](TODO.md)
13+
14+
15+
## Useful Links
16+
17+
* [GitHub issues](https://github.com/denny/ShinyCMS-ruby/issues)
18+
19+
20+
## Technical Guides
21+
22+
* Instructions for [creating a new plugin](Plugins.md) (and related useful info)
23+
24+
* Tools and tips for [working on mailers](Mailers.md) (features that send email)
25+
26+
* Tools and rules for [testing](Testing.md) (this project has 100% test coverage)
27+
28+
29+
## Code of Conduct
30+
31+
This project has a [Code of Conduct](../code-of-conduct.md), which is intended
32+
to make using ShinyCMS, or contributing to it, a harassment-free experience for
33+
everybody involved - regardless of who they are and what they do or don't know.
34+
35+
Please read and follow the code of conduct - thank you.

docs/rake-tasks.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ShinyCMS Documentation
2+
3+
## Rake tasks
4+
5+
ShinyCMS and its plugins include a number of rake tasks.
6+
7+
The bulk of these are the 'install migrations' and 'load db seeds' tasks for each plugin; in the case that a plugin lacks one or both of these tasks, it will be because the nature of the plugin means that it doesn't store data in the database (e.g. ShinySearch) and/or it doesn't have any settings or feature flags (so far I don't think this is actually true of any plugin).
8+
9+
Aside from those db loading tasks, here's what's left:
10+
```
11+
rails shiny:admin:create # create a new super-admin user (all capabilities enabled)
12+
rails shiny:demo:load # reset database, create admin user, and load demo site data
13+
rails shiny:demo:dump # dump current database content into db/demo_data.rb
14+
rails shiny:feature:off[name] # toggle a feature flag off
15+
rails shiny:feature:on[name] # toggle a feature flag on
16+
rails shiny:features:list # list feature flags and status
17+
rails shiny_newsletters:scheduled:send # check for and start any scheduled sends that are due
18+
```

plugins/ShinyNewsletters/lib/tasks/shiny_newsletters_sends.rake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ require 'dotenv/tasks'
1818
# These two tasks can be run in either order.
1919

2020
namespace :shiny_newsletters do
21-
namespace :sends do
21+
namespace :scheduled do
2222
# :nocov:
23-
desc 'ShinyCMS: add Newsletter send jobs to queue, if due'
24-
task queue_if_due: %i[ environment dotenv ] do
23+
desc 'ShinyCMS: check for and start any scheduled sends that are due'
24+
task send: %i[ environment dotenv ] do
2525
ShinyNewsletters::Send.due_to_send.collect( &:start_sending )
2626
end
2727
# :nocov:

0 commit comments

Comments
 (0)