Skip to content

Commit

Permalink
Merge branch 'main' of github.com:denny/ShinyCMS-ruby into main
Browse files Browse the repository at this point in the history
  • Loading branch information
denny committed Dec 3, 2020
2 parents c141162 + 3612d0f commit b74dc54
Show file tree
Hide file tree
Showing 30 changed files with 153 additions and 105 deletions.
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
PATH
remote: plugins/ShinyAccess
specs:
shiny_access (20.11)
shiny_access (20.12)
pg (>= 0.18, < 2.0)
rails (~> 6.0.3, >= 6.0.3.4)

PATH
remote: plugins/ShinyBlog
specs:
shiny_blog (20.11)
shiny_blog (20.12)
acts-as-taggable-on
acts_as_paranoid
ckeditor
Expand All @@ -20,7 +20,7 @@ PATH
PATH
remote: plugins/ShinyForms
specs:
shiny_forms (20.11)
shiny_forms (20.12)
acts_as_paranoid
kaminari
pg (>= 0.18, < 2.0)
Expand All @@ -30,7 +30,7 @@ PATH
PATH
remote: plugins/ShinyInserts
specs:
shiny_inserts (20.11)
shiny_inserts (20.12)
acts_as_paranoid
ckeditor
kaminari
Expand All @@ -41,7 +41,7 @@ PATH
PATH
remote: plugins/ShinyLists
specs:
shiny_lists (20.11)
shiny_lists (20.12)
acts_as_paranoid
kaminari
pg (>= 0.18, < 2.0)
Expand All @@ -51,7 +51,7 @@ PATH
PATH
remote: plugins/ShinyNews
specs:
shiny_news (20.11)
shiny_news (20.12)
acts-as-taggable-on
acts_as_paranoid
ckeditor
Expand All @@ -63,14 +63,14 @@ PATH
PATH
remote: plugins/ShinyNewsletters
specs:
shiny_newsletters (20.11)
shiny_newsletters (20.12)
pg (>= 0.18, < 2.0)
rails (~> 6.0.3, >= 6.0.3.4)

PATH
remote: plugins/ShinyPages
specs:
shiny_pages (20.11)
shiny_pages (20.12)
acts_as_paranoid
ckeditor
kaminari
Expand All @@ -81,14 +81,14 @@ PATH
PATH
remote: plugins/ShinyProfiles
specs:
shiny_profiles (20.11)
shiny_profiles (20.12)
pg (>= 0.18, < 2.0)
rails (~> 6.0.3, >= 6.0.3.4)

PATH
remote: plugins/ShinySearch
specs:
shiny_search (20.11)
shiny_search (20.12)
algoliasearch-rails
pg (>= 0.18, < 2.0)
pg_search
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ ShinyCMS requires Rails 6 (which in turn requires Ruby 2.5 or later), and genera

It has been tested on most Ruby versions from 2.5.8 onwards, and every release of Rails 6 so far.

(Recent test results for [Ruby 2.5.8, 2.6.6, and 2.7.2](https://travis-ci.com/github/denny/ShinyCMS-ruby/builds/190156596))
(Recent test results for [Ruby 2.5.8, 2.6.6, and 2.7.2](https://travis-ci.com/github/denny/ShinyCMS-ruby/builds/205841352))


## Contributing
Expand Down
1 change: 0 additions & 1 deletion app/controllers/admin/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def search
def username_search
authorize User

# users = User.where( 'username ilike ?', "%#{params[ :term ]}%" ).pluck( :id, :username )
users = User.where( 'username ilike ?', "%#{params[ :term ]}%" ).pluck( :username )

render json: users
Expand Down
4 changes: 2 additions & 2 deletions app/models/concerns/shiny_post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ def posted_year
end

def next_post
self.class.where( 'posted_at > ?', posted_at ).order( posted_at: :asc ).first
self.class.published.where( 'posted_at > ?', posted_at ).order( posted_at: :asc ).first
end

def prev_post
self.class.where( 'posted_at < ?', posted_at ).order( posted_at: :desc ).first
self.class.published.where( 'posted_at < ?', posted_at ).order( posted_at: :desc ).first
end

alias_method :previous_post, :prev_post
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
# ShinyCMS is free software; you can redistribute it and/or modify it under the terms of the GPL (version 2 or later)

# ShinyCMS version number ('Ubuntu style', YY.MM)
VERSION = '20.11'
VERSION = '20.12'
12 changes: 0 additions & 12 deletions db/migrate/20201121073328_create_rollups.rb

This file was deleted.

9 changes: 0 additions & 9 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,6 @@
t.index ["searchable_type", "searchable_id"], name: "index_pg_search_documents_on_searchable_type_and_searchable_id"
end

create_table "rollups", force: :cascade do |t|
t.string "name", null: false
t.string "interval", null: false
t.datetime "time", null: false
t.jsonb "dimensions", default: {}, null: false
t.float "value"
t.index ["name", "interval", "time", "dimensions"], name: "index_rollups_on_name_and_interval_and_time_and_dimensions", unique: true
end

create_table "sessions", force: :cascade do |t|
t.string "session_id", null: false
t.text "data"
Expand Down
2 changes: 1 addition & 1 deletion db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
end

# Load default dashboard data for Blazer
require_relative 'seeds/blazer' unless ENV['DISABLE_BLAZER'].presence == 'true'
require_relative 'seeds/blazer' unless ENV['DISABLE_BLAZER'].presence&.downcase == 'true'

# If there are currently no super-admin users, show the command to create one
demo = ( Rake.application.top_level_tasks.first == 'shiny:demo:load' )
Expand Down
113 changes: 111 additions & 2 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,117 @@
This file contains information about changes (particularly breaking changes) between releases - with the most recent release first.


### 2020-12-03 20.12 December 2020: The 'ShinyAccess and ActiveStorage' Edition

* GitHub tag: https://github.com/denny/ShinyCMS-ruby/releases/tag/v20.12

* Plugin versions:
* All plugin versions bumped to 20.12 - they've all had commits since 20.11 release

* BREAKING CHANGES
* User profile data moved from users table into shiny_profiles_* tables
* Migration only handles table structure - DATA MIGRATION IS NOT HANDLED
* (When people are using the CMS in production, I'll write data migrations) :)
* Feature Flag name changes:
* recaptcha_for_registration -> recaptcha_for_registrations
* profile_pages -> user_profiles
* ShinyLists unsubscribe route changed from PUT to DELETE

* Fixes since 20.11
* Fatal errors that could prevent the CMS from starting at all:
* ShinyPlugin checks whether plugins exist before attempting to load them
* ShinyPlugin de-duplicates SHINYCMS_PLUGINS before attempting to load them all
* Security issues:
* Admin area:
* Authorisation check when accessing /admin/stats (Blazer)
* Main site:
* Don't add new comments (or show reply links & forms) if discussion is locked
* Errors that only broke a specific page or feature-set:
* Get rid of double '.../search/search' in admin area search forms
* Displaying user profile pic from ActiveStorage works in local disk mode too
* Wasted database space:
* When dropping a comment flagged as 'blatant spam' by Akismet...
* Don't create CommentAuthor and EmailRecipient records!
* Lurkers (hadn't broken anything yet, but not the intended behaviour):
* 'Page with all element types' factory was adding each type twice

* Added since 20.11
* Gems:
* Bugsnag gem
* Monitoring and bug triage service
* Cloudflare gem
* Puts real IP address in request.ip, instead of Cloudflare proxy address
* Plugins:
* ShinyAccess
* New plugin - adds basic ACL features for main site
* Admin pages to add/remove Access Groups, and members of those groups
* Main site helper to check access group membership, can be used to selectively show/hide content in any template
* ShinyProfiles:
* As part of separation from user accounts:
* Main site page for users to edit their profile data
* Admin area features for managing user profiles
* ShinyNewsletters:
* New rake task, to enqueue scheduled sends when they pass their send_at
* Main app:
* JSON endpoint to search usernames (used by ShinyAccess)
* Support libs (helpers, concerns, etc):
* ShinyTemplate / ShinyElement
* Use ActiveStorage for image elements
* Rake tasks:
* `shiny:sessions:clean` for removing short (probably bot) session data
* Utility scripts:
* New dotenv wrapper scripts for dev environment (to pick up .env.*):
* `tools/shiny-bundle-install` wraps `bundle install`
* Only matters if you don't want all of the plugins
* `tools/shiny-sidekiq-dev` wraps `sidekiq`
* Only matters if you want to override default value of any ENV var mentioned in config/sidekiq.yml
* Config:
* Explicit config for HTML sanitizer - used when displaying blog posts etc
* (full submitted HTML is stored, but output is heavily filtered)
* Added a number of 'basic necessity' tags and attributes to the allow-list that weren't allowed through by default (e.g. img tag, class attribute)
* More explicit config options to enable web stats and email open/click tracking
* Documentation:
* Moved content from docs/Developers/index.md to create docs/Contributing.md
* (GitHub looks for the latter and automatically shares it with PR creators)
* 'How to' guide for setting up a new site
* Basic information about some supported/tested cloud hosting services
* Stub doc for new ShinyAccess feature/plugin
* Separate doc for rake tasks for developers (just shiny:demo:dump currently)
* Notes on user personas (tl,dr: 'user' will probably (primarily) describe a different sub-group of CMS users to different types of developer)

* Changed since 20.11
* Plugins:
* ShinyProfiles:
* Finish separating user profile data from user account data
* ShinyBlog:
* Change main site paging to use 'newer'/'older' links instead of full pager
* Support libs (helpers, concerns, etc):
* Move implementation of feature_flag_enabled? method from helper to model
* Admin menu sections default to closed instead of open
* Refactored plugin generator to make it more rubocop-compliant
* Extracted lots of little blocks of functionality into their own methods
* Moved a large chunk of the overall functionality into a new PluginBuilder file
* Data:
* Default data now includes a basic dashboard and charts for Blazer
* Demo site data now includes the ActiveStorage tables
* Themes:
* Assets and JavaScript files for themes are now kept in vendor/ not app/
* Tests:
* Mocked Akismet gem .open and .check methods
* No longer need a network connection for the tests to run
* Tests aren't using up credits on my Akismet test account
* Documentation:
* Plugins: added details of 'special' integration views and helpers
* Themes: updated paths for assets etc
* ShinyNewsletters: added details of rake task for scheduled sends
* Rake tasks: expand on purpose of each task
* Updates to TODO/in-progress/done docs

* Removed since 20.11
* User profile details removed from user account model (User.pm) and related code
* (Now handled by ShinyProfiles plugin instead)


### 2020-11-09 20.11 November 2020: The 'tricky second album' release

* GitHub tag: https://github.com/denny/ShinyCMS-ruby/releases/tag/v20.11
Expand All @@ -22,8 +133,6 @@ This file contains information about changes (particularly breaking changes) bet
* Added Setting.get_int method to get integer values from setting strings
* Added Setting.true? method to get boolean results from 'true'/'false' setting strings
* Started moving config that isn't secrets/credentials from ENV vars to Setting model
* Deprecated ENV vars:
* TODO!!
* Supporting code (Helpers, Concerns, etc):
* Added helper methods to abstract anywhere a main site view called a model
* Renamed Plugin model to ShinyPlugin
Expand Down
43 changes: 0 additions & 43 deletions lib/tasks/rollups.rake

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/ShinyAccess/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
shiny_access (20.11)
shiny_access (20.12)
pg (>= 0.18, < 2.0)
rails (~> 6.0.3, >= 6.0.3.4)

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 = '20.11'
VERSION = '20.12'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinyBlog/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
shiny_blog (20.10)
shiny_blog (20.12)
acts-as-taggable-on
acts_as_paranoid
ckeditor
Expand Down
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 = '20.11'
VERSION = '20.12'
public_constant :VERSION
end
2 changes: 1 addition & 1 deletion plugins/ShinyForms/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
shiny_forms (20.10)
shiny_forms (20.12)
acts_as_paranoid
kaminari
pg (>= 0.18, < 2.0)
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 = '20.11'
VERSION = '20.12'
public_constant :VERSION
end
Loading

0 comments on commit b74dc54

Please sign in to comment.