denny/ShinyCMS-ruby

View on GitHub

Showing 658 of 659 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class Admin::NewsPostsController < ApplicationController
include ShinyCMS::AdminAreaControllerBase
 
include ShinyCMS::Admin::WithPosts
 
 
plugins/ShinyBlog/app/controllers/shiny_blog/admin/blog_posts_controller.rb on lines 11..108

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class Admin::BlogPostsController < ApplicationController
include ShinyCMS::AdminAreaControllerBase
 
include ShinyCMS::Admin::WithPosts
 
 
plugins/ShinyNews/app/controllers/shiny_news/admin/news_posts_controller.rb on lines 11..108

Similar blocks of code found in 2 locations. Consider refactoring.
Open

scope format: false do
yyyy_mm = { year: %r{\d\d\d\d}, month: %r{\d\d} }
yyyy = { year: %r{\d\d\d\d} }
 
# Main site
Severity: Major
Found in plugins/ShinyNews/config/routes.rb and 1 other location - About 1 hr to fix
plugins/ShinyBlog/config/routes.rb on lines 10..26

Similar blocks of code found in 2 locations. Consider refactoring.
Open

scope format: false do
yyyy_mm = { year: %r{\d\d\d\d}, month: %r{\d\d} }
yyyy = { year: %r{\d\d\d\d} }
 
# Main site
Severity: Major
Found in plugins/ShinyBlog/config/routes.rb and 1 other location - About 1 hr to fix
plugins/ShinyNews/config/routes.rb on lines 10..26

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class BlogController < ApplicationController
include ShinyCMS::MainSiteControllerBase
 
before_action :check_feature_flags
 
 
plugins/ShinyNews/app/controllers/shiny_news/news_controller.rb on lines 11..44

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class NewsController < ApplicationController
include ShinyCMS::MainSiteControllerBase
 
before_action :check_feature_flags
 
 
plugins/ShinyBlog/app/controllers/shiny_blog/blog_controller.rb on lines 11..44

Similar blocks of code found in 3 locations. Consider refactoring.
Open

class Admin::Templates::ElementsController < ApplicationController
include ShinyCMS::AdminAreaControllerBase
 
def create
authorize template
plugins/ShinyNewsletters/app/controllers/shiny_newsletters/admin/editions/elements_controller.rb on lines 11..45
plugins/ShinyNewsletters/app/controllers/shiny_newsletters/admin/templates/elements_controller.rb on lines 11..45

Similar blocks of code found in 3 locations. Consider refactoring.
Open

class Admin::Templates::ElementsController < ApplicationController
include ShinyCMS::AdminAreaControllerBase
 
def create
authorize template
plugins/ShinyNewsletters/app/controllers/shiny_newsletters/admin/editions/elements_controller.rb on lines 11..45
plugins/ShinyPages/app/controllers/shiny_pages/admin/templates/elements_controller.rb on lines 11..45

Similar blocks of code found in 3 locations. Consider refactoring.
Open

class Admin::Editions::ElementsController < ApplicationController
include ShinyCMS::AdminAreaControllerBase
 
def create
authorize edition
plugins/ShinyNewsletters/app/controllers/shiny_newsletters/admin/templates/elements_controller.rb on lines 11..45
plugins/ShinyPages/app/controllers/shiny_pages/admin/templates/elements_controller.rb on lines 11..45

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if ShinyCMS.plugins.loaded? :ShinyLists
sql = <<~SQL.squish
select date( subscribed_at ) as subscribed_on,
l.internal_name as list_name,
count(*) as subscription_count
Severity: Major
Found in plugins/ShinyCMS/db/seeds/blazer.rb and 1 other location - About 1 hr to fix
plugins/ShinyCMS/db/seeds/blazer.rb on lines 183..218

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if ShinyCMS.plugins.loaded? :ShinyAccess
sql = <<~SQL.squish
select date( began_at ) as began_on,
g.internal_name as group_name,
count(*) as memberships_begun
Severity: Major
Found in plugins/ShinyCMS/db/seeds/blazer.rb and 1 other location - About 1 hr to fix
plugins/ShinyCMS/db/seeds/blazer.rb on lines 222..257

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class Template < ApplicationRecord
include ShinyCMS::MJMLTemplate
 
include ShinyCMS::HasReadableName
include ShinyCMS::SoftDelete
plugins/ShinyPages/app/models/shiny_pages/template.rb on lines 11..40

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class Template < ApplicationRecord
include ShinyCMS::HTMLTemplate
 
include ShinyCMS::HasReadableName
include ShinyCMS::SoftDelete
Severity: Major
Found in plugins/ShinyPages/app/models/shiny_pages/template.rb and 1 other location - About 1 hr to fix
plugins/ShinyNewsletters/app/models/shiny_newsletters/template.rb on lines 11..40

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class Post < ApplicationRecord
include ShinyCMS::Post
 
include ShinyCMS::ProvidesDemoSiteData
include ShinyCMS::ProvidesSitemapData
Severity: Major
Found in plugins/ShinyBlog/app/models/shiny_blog/post.rb and 1 other location - About 1 hr to fix
plugins/ShinyNews/app/models/shiny_news/post.rb on lines 11..31

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class Post < ApplicationRecord
include ShinyCMS::Post
 
include ShinyCMS::ProvidesDemoSiteData
include ShinyCMS::ProvidesSitemapData
Severity: Major
Found in plugins/ShinyNews/app/models/shiny_news/post.rb and 1 other location - About 1 hr to fix
plugins/ShinyBlog/app/models/shiny_blog/post.rb on lines 11..31

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class Engine < ::Rails::Engine
isolate_namespace ShinySearch
 
config.paths.add 'app/public/models/concerns', eager_load: true
 
 
Severity: Minor
Found in plugins/ShinySearch/lib/shiny_search/engine.rb and 1 other location - About 1 hr to fix
plugins/ShinyPages/lib/shiny_pages/engine.rb on lines 11..25

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class Engine < ::Rails::Engine
isolate_namespace ShinyPages
 
config.paths.add 'app/public/lib', eager_load: true
 
 
Severity: Minor
Found in plugins/ShinyPages/lib/shiny_pages/engine.rb and 1 other location - About 1 hr to fix
plugins/ShinySearch/lib/shiny_search/engine.rb on lines 11..25

Similar blocks of code found in 7 locations. Consider refactoring.
Open

class TemplatePolicy
attr_reader :this_user, :record
 
def initialize( this_user, record )
@this_user = this_user
Severity: Major
Found in plugins/ShinyPages/app/policies/shiny_pages/template_policy.rb and 6 other locations - About 50 mins to fix
plugins/ShinyAccess/app/policies/shiny_access/group_policy.rb on lines 11..45
plugins/ShinyBlog/app/policies/shiny_blog/post_policy.rb on lines 11..45
plugins/ShinyForms/app/policies/shiny_forms/form_policy.rb on lines 11..45
plugins/ShinyLists/app/policies/shiny_lists/list_policy.rb on lines 11..45
plugins/ShinyNews/app/policies/shiny_news/post_policy.rb on lines 11..45
plugins/ShinyNewsletters/app/policies/shiny_newsletters/template_policy.rb on lines 11..45

Similar blocks of code found in 7 locations. Consider refactoring.
Open

class TemplatePolicy
attr_reader :this_user, :record
 
def initialize( this_user, record )
@this_user = this_user
plugins/ShinyAccess/app/policies/shiny_access/group_policy.rb on lines 11..45
plugins/ShinyBlog/app/policies/shiny_blog/post_policy.rb on lines 11..45
plugins/ShinyForms/app/policies/shiny_forms/form_policy.rb on lines 11..45
plugins/ShinyLists/app/policies/shiny_lists/list_policy.rb on lines 11..45
plugins/ShinyNews/app/policies/shiny_news/post_policy.rb on lines 11..45
plugins/ShinyPages/app/policies/shiny_pages/template_policy.rb on lines 11..45

Similar blocks of code found in 7 locations. Consider refactoring.
Open

class PostPolicy
attr_reader :this_user, :record
 
def initialize( this_user, record )
@this_user = this_user
Severity: Major
Found in plugins/ShinyNews/app/policies/shiny_news/post_policy.rb and 6 other locations - About 50 mins to fix
plugins/ShinyAccess/app/policies/shiny_access/group_policy.rb on lines 11..45
plugins/ShinyBlog/app/policies/shiny_blog/post_policy.rb on lines 11..45
plugins/ShinyForms/app/policies/shiny_forms/form_policy.rb on lines 11..45
plugins/ShinyLists/app/policies/shiny_lists/list_policy.rb on lines 11..45
plugins/ShinyNewsletters/app/policies/shiny_newsletters/template_policy.rb on lines 11..45
plugins/ShinyPages/app/policies/shiny_pages/template_policy.rb on lines 11..45
Severity
Category
Status
Source
Language