Skip to content

Commit

Permalink
Merge pull request #1113 from denny/release/21.05
Browse files Browse the repository at this point in the history
Release 21.05
  • Loading branch information
denny authored May 7, 2021
2 parents a4704a6 + db8b9a8 commit 5254594
Show file tree
Hide file tree
Showing 25 changed files with 330 additions and 205 deletions.
330 changes: 165 additions & 165 deletions Gemfile.lock

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,14 @@ ShinyCMS requires Rails 6.1 and Ruby 2.7 or later. The project generally uses th

## Contributing

See [contributing to ShinyCMS](docs/Contributing.md).
Everyone is encouraged to help improve this project! Here are a few ways you can help:
* Report issues
* Improve the documentation
* Fix bugs and submit pull requests
* Suggest new features
* Add new features :)

See [contributing to ShinyCMS](docs/Contributing.md) for more information.


## Code of Conduct
Expand Down
10 changes: 5 additions & 5 deletions app/controllers/blazer/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
#
# ShinyCMS is free software; you can redistribute it and/or modify it under the terms of the GPL (version 2 or later)

# THIS CONTROLLER INHERITS FROM ONE IN THE SHINYCMS ADMIN AREA!
# (to make it possible to embed Blazer into the ShinyCMS admin UI)

# Inheriting from or using this controller for any additional purpose is
# probably a bad idea, for security reasons and for separation of concerns.
# NOTE: THIS CONTROLLER INHERITS FROM ONE IN THE SHINYCMS ADMIN AREA
#
# Inheriting from or otherwise using this controller for any additional purpose
# is probably a bad idea, for security reasons and for separation of concerns.

module Blazer
# Used to embed Blazer into the ShinyCMS admin UI
class ApplicationController < ShinyCMS::Admin::Tools::BlazerBaseController; end
end
4 changes: 2 additions & 2 deletions config/initializers/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# This version number is specifically for the ShinyHostApp

# Each ShinyCMS plugin has its own version number
# The core plugin is currently at version 21.04
# The core plugin is currently at version 21.05

module ShinyHostApp
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end
4 changes: 2 additions & 2 deletions docs/Developers/Notes/import-from-perl-shinycms.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ShinyCMS: copying data from Perl version to Ruby version
# ShinyCMS Developer Notes

Incoherent notes follow...
## Copying data from Perl version to Ruby version

## General

Expand Down
52 changes: 52 additions & 0 deletions docs/Developers/Notes/kloc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# ShinyCMS Developer Notes

## LOC stats

### 2021-05-04

Total : 1188 files, 35943 codes, 7392 comments, 11717 blanks, all 55052 lines

Languages
+------------------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+------------------+------------+------------+------------+------------+------------+
| Ruby | 687 | 19,800 | 5,802 | 7,155 | 32,757 |
| erb | 249 | 4,993 | 21 | 920 | 5,934 |
| SCSS | 25 | 3,879 | 517 | 1,119 | 5,515 |
| Markdown | 78 | 3,101 | 12 | 1,357 | 4,470 |
| YAML | 48 | 1,941 | 684 | 487 | 3,112 |
| CSS | 11 | 807 | 87 | 89 | 983 |
| JavaScript | 21 | 543 | 164 | 275 | 982 |
+------------------+------------+------------+------------+------------+------------+

Directories
+-------------------------------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+-------------------------------+------------+------------+------------+------------+------------+
| . | 1,188 | 35,943 | 7,392 | 11,717 | 55,052 |
| app | 15 | 85 | 101 | 63 | 249 |
| config | 30 | 391 | 524 | 260 | 1,175 |
| db | 77 | 1,730 | 131 | 321 | 2,182 |
| docs | 66 | 2,847 | 0 | 1,175 | 4,022 |
| lib | 60 | 1,428 | 167 | 445 | 2,040 |
| spec | 4 | 34 | 26 | 22 | 82 |
| themes | 32 | 3,656 | 206 | 991 | 4,853 |
| themes/coming_soon | 5 | 849 | 24 | 93 | 966 |
| themes/halcyonic | 20 | 2,370 | 64 | 661 | 3,095 |
| themes/javascript | 7 | 437 | 118 | 237 | 792 |
| themes/javascript/coming_soon | 1 | 73 | 27 | 40 | 140 |
| themes/javascript/halcyonic | 6 | 364 | 91 | 197 | 652 |
| plugins | 886 | 25,067 | 6,094 | 8,250 | 39,411 |
| plugins/ShinyAccess | 38 | 960 | 245 | 347 | 1,552 |
| plugins/ShinyBlog | 56 | 1,158 | 230 | 377 | 1,765 |
| plugins/ShinyCMS | 402 | 13,005 | 3,402 | 4,224 | 20,631 |
| plugins/ShinyForms | 40 | 958 | 230 | 326 | 1,514 |
| plugins/ShinyInserts | 32 | 535 | 194 | 189 | 918 |
| plugins/ShinyLists | 44 | 1,247 | 264 | 412 | 1,923 |
| plugins/ShinyNews | 56 | 1,135 | 224 | 366 | 1,725 |
| plugins/ShinyNewsletters | 74 | 2,361 | 402 | 727 | 3,490 |
| plugins/ShinyPages | 63 | 2,307 | 387 | 680 | 3,374 |
| plugins/ShinyProfiles | 34 | 748 | 203 | 278 | 1,229 |
| plugins/ShinySEO | 18 | 222 | 142 | 128 | 492 |
| plugins/ShinySearch | 29 | 431 | 171 | 196 | 798 |
+-------------------------------+------------+------------+------------+------------+------------+
22 changes: 11 additions & 11 deletions docs/Developers/Notes/mailing-list-notes.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# ShinyCMS: dev notes
# ShinyCMS Developer Notes

## Mailing Lists ( / Discussion Groups / Forums )

### (Warning! MASSIVE creature feep occurring here!)

Things which aren't optional:
Things which aren't optional:
* Double opt-in subscriptions are a basic human right ;)
* Instantly-effective unsubscribe links and headers in all list emails
* Settings with privacy implications should default to the more private setting

General thoughts:
General thoughts:
* UUIDs for anything that doesn't have slugs - do not expose sequential IDs!
* Good time to switch the whole system to UUIDs under the hood?
* Having read around on this, not convinced it's a good idea
* HashIDs instead? https://github.com/jcypret/hashid-rails

Lists / Groups:
Lists / Groups:
* Enabled (emails will be delivered): yes/no
* List details page
* Useful info: description, owner/admins, etc
Expand All @@ -25,11 +25,11 @@ Lists / Groups:
* Publicised (listed on hub page of some sort): yes/no
* Open for subscriptions: yes/no / see 'List subscriptions' below

List categories:
List categories:
* e.g. Announcements/Promo/Discussion/etc
* Partly for display purposes, partly for potential ACL stuff (see 'Admins')

List subscriptions:
List subscriptions:
* Can ask to subscribe: anybody / registered website users / nobody
* Subscriptions require approval: yes/no
* Subscriptions can be approved by: any subscriber / established subscribers
Expand All @@ -42,27 +42,27 @@ List subscriptions:
(if they're leaving, they're leaving - making it harder for them is pointless)
* List is notified of subscriptions and unsubscriptions: yes/no

List archives:
List archives:
* Web view of previous posts to a list
* Provides 'view this email in your browser' functionality
* Viewable by: anybody / subscribers / admins / nobody
* Subscribers can see posts from before they subscribed: yes/no

List posts:
List posts:
* Can post to list: any subscriber / subscribers over X duration / subscribers
over N previous posts / admins only
* Reply-to munging (trollolol): yes/no
* Show email of sender: yes/partial/obfuscated/no
* Show name of sender: yes/no

Moderation:
Moderation:
* Posts to list require approval if they are from: anybody / unregistered
users / new subscribers (<N posts / <X duration) / non-admins
* Posts to list can be approved by: anybody (except the original poster) /
established subscribers / the collective vote of >N or >N% subscribers /
registered users / admins only

Tracking (for marketing?) and Engagement (list quality/sender reputation):
Tracking (for marketing?) and Engagement (list quality/sender reputation):
* Opens are tracked: yes/no
* Is it possible to filter out 'opens' by spam-scanning software (etc) that
downloads images (including our tracking pixels)? Look at user-agents maybe?
Expand All @@ -89,7 +89,7 @@ Tracking (for marketing?) and Engagement (list quality/sender reputation):
(This is a near-fractal timesink of potential granularity and configurability -
it will definitely need its own ACL system/subsystem eventually.)

e.g.
e.g.
* A list/group can have: owner(s?) / admins / moderators
* owners can create/remove admins
* admins can delete list?
Expand Down
9 changes: 4 additions & 5 deletions docs/Developers/Notes/menu-icons.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# ShinyCMS: admin-area menu icons
# ShinyCMS Developer Notes

All of the icons I've used in the admin-area sidebar menu (and a few other
places in the admin area) are part of the free icon set from CoreUI. If you're
adding a new feature (or want to change the icon for an existing one) you can
look here to see what's available: https://coreui.io/icons/free
## Admin area menu icons

All of the icons I've used in the admin-area sidebar menu (and a few other places in the admin area) are part of the free icon set from CoreUI. If you're adding a new feature (or want to change the icon for an existing one) you can look here to see what's available: https://coreui.io/icons/free
4 changes: 3 additions & 1 deletion docs/Developers/Notes/needs-indexing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Ruby console snippet to find database tables that need indexes...
# ShinyCMS Developer Notes

Ruby console snippet to find database tables that need indexes...

```ruby
c = ActiveRecord::Base.connection
Expand Down
20 changes: 20 additions & 0 deletions docs/Developers/Notes/plugin-sizes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# ShinyCMS developer notes

## Plugin sizes

### 2021-05-04
Disk LOC*
ShinyCMS 2.7M 13,005
ShinyNewsletters 516K 2,361
ShinyPages 464K 2,307
ShinyBlog 448K 1,158
ShinyNewsletters 448K 2,361
ShinyLists 392K 1,247
ShinyForms 364K 958
ShinyAccess 344K 960
ShinyProfiles 300K 748
ShinyInserts 296K 535
ShinySearch 288K 431
ShinySEO 176K 222

* LOC is counting code only - not comments or blank lines
2 changes: 1 addition & 1 deletion docs/Developers/Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To test a single plugin, run `rspec plugins/Shiny{Thing}` from the project's roo

### How often should I run the tests?

At minimum, you should run rubocop and the test suite, and fix any issues they find, before submitting a pull request. I recommend running them much more often than that :) They're particularly useful (and reassuring) when refactoring.
At minimum, you should run rubocop and the test suite, and fix any issues they find, before submitting a pull request. I recommend running them much more often than that :) They're particularly useful (and reassuring) when refactoring - as discussed by Bob Martin: '[Fearless Competence](https://www.youtube.com/watch?v=Qjywrq2gM8o#t=31m48s)'.

#### How do I get git to do this for me? :)

Expand Down
44 changes: 44 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,50 @@

This file contains information about changes (particularly breaking changes) between releases - with the most recent release first.

### 2021-05-07 21.05 May 2021: The 'Component With A View' release

GitHub tag: https://github.com/denny/ShinyCMS-ruby/releases/tag/v21.05

* Security updates:
* Rails and related Action* gems had a cluster of CVE fixes this month

* Added:
* [View Components][1] - used to rewrite the admin menu [PR #1096][2]
* [mutant][3]- a mutation testing gem
* config/initializers/shinycms.rb - allows the host app to configure:
* The user model for ShinyCMS to use
* The list model for ShinyNewsletters to use
* .flayignore - causing a [dramatic improvement][4] in Ruby Critic scores
* Blazer::ApplicationController in the host app, for Blazer to inherit from
* Sentry gem and initializer

* Updated:
* Split main site DiscussionsController, creating CommentsController too
* Accessibility fixes for the Halcyonic theme [PR #1088][5] [PR #1091][6] [PR #1112][7]
* Accessibly-hidden labels for form inputs
* Text contrast ratios throughout
* Editable image alt attributes added to index template
* Changes to demo site data to go with this
* The host app's ApplicationController is now free of confusing Blazer gank
* Lots of gem version bumps, besides the aforementioned rails ones
* Rubocop updates required some minor changes to code and config

* Removed:
* Several packwerk todo files got removed by the configurable user model change
* MainController in the host app, now that ApplicationController is usable
* All the admin menu partials that got replaced by view components

Relatively quiet month, especially compared to the last few! I'm in the process of quitting one job and finding the next, so that's taken a lot of my time and energy. I'm happy with the first pass at adding view components though, expect more of those next month.

[1] https://github.com/github/view_component#readme
[2] https://github.com/denny/ShinyCMS-ruby/pull/1096
[3] https://github.com/mbj/mutant#readme
[4] https://shinycms.org/blog/2021/04/cheat-codes
[5] https://github.com/denny/ShinyCMS-ruby/pull/1088
[6] https://github.com/denny/ShinyCMS-ruby/pull/1091
[7] https://github.com/denny/ShinyCMS-ruby/pull/1112


### 2021-04-08 21.04 April 2021: The 'Respecting Boundaries' release

* GitHub tag: https://github.com/denny/ShinyCMS-ruby/releases/tag/v21.04
Expand Down
1 change: 1 addition & 0 deletions lib/generators/shiny/plugin/plugin_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

module Shiny
module Generators
# ShinyCMS plugin generator
class PluginGenerator < PluginGeneratorBase # :nodoc:
alias plugin_path app_path

Expand Down
2 changes: 1 addition & 1 deletion plugins/ShinyAccess/lib/shiny_access/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

# Version number ('Ubuntu style'; year and month)
module ShinyAccess
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinyBlog/lib/shiny_blog/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

# Version number ('Ubuntu style', YY.MM) - ShinyBlog plugin for ShinyCMS
module ShinyBlog
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinyCMS/lib/shinycms/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# ShinyCMS version number ('Ubuntu style', YY.MM)
module ShinyCMS
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION

# Use the start of the git commit SHA as a release identifier
Expand Down
2 changes: 1 addition & 1 deletion plugins/ShinyForms/lib/shiny_forms/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

# Version number ('Ubuntu style', YY.MM) - ShinyForms plugin for ShinyCMS
module ShinyForms
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinyInserts/lib/shiny_inserts/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

# Version number ('Ubuntu style', YY.MM) - ShinyInserts plugin for ShinyCMS
module ShinyInserts
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinyLists/lib/shiny_lists/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

# Version number ('Ubuntu style', YY.MM) - ShinyLists plugin for ShinyCMS
module ShinyLists
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinyNews/lib/shiny_news/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

# Version number ('Ubuntu style', YY.MM) - ShinyNews plugin for ShinyCMS
module ShinyNews
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinyNewsletters/lib/shiny_newsletters/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

# Version number ('Ubuntu style'; year and month)
module ShinyNewsletters
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinyPages/lib/shiny_pages/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

# Version number ('Ubuntu style', YY.MM) - ShinyPages plugin for ShinyCMS
module ShinyPages
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinyProfiles/lib/shiny_profiles/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

# Version number ('Ubuntu style', YY.MM) - ShinyProfiles plugin for ShinyCMS
module ShinyProfiles
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinySEO/lib/shiny_seo/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

# Version number ('Ubuntu style'; year and month)
module ShinySEO
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinySearch/lib/shiny_search/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

# Version number ('Ubuntu style', YY.MM) - ShinySearch plugin for ShinyCMS
module ShinySearch
VERSION = '21.04'
VERSION = '21.05'
public_constant :VERSION
end

0 comments on commit 5254594

Please sign in to comment.