Remove activeadmin

This commit is contained in:
HisShadow 2023-03-07 19:10:27 +03:00
parent 9abaaf9d91
commit 54588b1527
4 changed files with 6 additions and 162 deletions

View File

@ -2,7 +2,7 @@ source 'https://rubygems.org'
gem 'rails' gem 'rails'
gem 'activeadmin', github: 'activeadmin' # gem 'activeadmin', git:'https://github.com/activeadmin/activeadmin.git'
gem 'pg' gem 'pg'
gem 'schema_plus' gem 'schema_plus'
######## ########

View File

@ -1,22 +1,3 @@
GIT
remote: git://github.com/activeadmin/activeadmin.git
revision: 575bc8eeefa9c50a85899058f5d5e42ff461f747
specs:
activeadmin (1.0.0)
arbre (>= 1.1.1)
bourbon
coffee-rails
formtastic (~> 3.1)
formtastic_i18n
inherited_resources (~> 1.7)
jquery-rails
jquery-ui-rails
kaminari (>= 0.15, < 2.0)
railties (>= 4.2, < 5.2)
ransack (~> 1.3)
sass-rails
sprockets (< 4.1)
GIT GIT
remote: https://github.com/DuratarskeyK/kiqit.git remote: https://github.com/DuratarskeyK/kiqit.git
revision: 845f72a90ab8e20b1871b753219d0333733bbe2f revision: 845f72a90ab8e20b1871b753219d0333733bbe2f
@ -85,8 +66,6 @@ GEM
railties (>= 4.2, < 6) railties (>= 4.2, < 6)
sprockets (>= 3.0, < 5) sprockets (>= 3.0, < 5)
tilt tilt
arbre (1.1.1)
activesupport (>= 3.0.0)
arel (6.0.4) arel (6.0.4)
attr_encrypted (3.0.3) attr_encrypted (3.0.3)
encryptor (~> 3.0.0) encryptor (~> 3.0.0)
@ -97,9 +76,6 @@ GEM
rack (>= 0.9.0) rack (>= 0.9.0)
binding_of_caller (0.7.2) binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
bourbon (4.3.4)
sass (~> 3.4)
thor (~> 0.19)
builder (3.2.4) builder (3.2.4)
callsite (0.0.11) callsite (0.0.11)
chunky_png (1.3.8) chunky_png (1.3.8)
@ -154,9 +130,6 @@ GEM
faraday-http-cache (2.0.0) faraday-http-cache (2.0.0)
faraday (~> 0.8) faraday (~> 0.8)
ffi (1.10.0) ffi (1.10.0)
formtastic (3.1.5)
actionpack (>= 3.2.13)
formtastic_i18n (0.6.0)
friendly_id (5.2.1) friendly_id (5.2.1)
activerecord (>= 4.0.0) activerecord (>= 4.0.0)
git-version-bump (0.15.1) git-version-bump (0.15.1)
@ -172,9 +145,6 @@ GEM
haml (>= 4.0.6, < 6.0) haml (>= 4.0.6, < 6.0)
html2haml (>= 1.0.1) html2haml (>= 1.0.1)
railties (>= 4.0.1) railties (>= 4.0.1)
has_scope (0.7.1)
actionpack (>= 4.1, < 5.2)
activesupport (>= 4.1, < 5.2)
hashdiff (0.3.4) hashdiff (0.3.4)
hashie (4.1.0) hashie (4.1.0)
hirb (0.7.3) hirb (0.7.3)
@ -187,38 +157,15 @@ GEM
domain_name (~> 0.5) domain_name (~> 0.5)
i18n (0.9.5) i18n (0.9.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
inherited_resources (1.7.2)
actionpack (>= 3.2, < 5.2.x)
has_scope (~> 0.6)
railties (>= 3.2, < 5.2.x)
responders
its-it (1.3.0) its-it (1.3.0)
jbuilder (2.7.0) jbuilder (2.7.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
multi_json (>= 1.2) multi_json (>= 1.2)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
js-routes (1.3.3) js-routes (1.3.3)
railties (>= 3.2) railties (>= 3.2)
sprockets-rails sprockets-rails
json (2.3.0) json (2.3.0)
jwt (1.5.6) jwt (1.5.6)
kaminari (1.2.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.1)
kaminari-activerecord (= 1.2.1)
kaminari-core (= 1.2.1)
kaminari-actionview (1.2.1)
actionview
kaminari-core (= 1.2.1)
kaminari-activerecord (1.2.1)
activerecord
kaminari-core (= 1.2.1)
kaminari-core (1.2.1)
key_struct (0.4.2) key_struct (0.4.2)
localeapp (2.1.1) localeapp (2.1.1)
gli gli
@ -302,8 +249,6 @@ GEM
mimemagic (~> 0.3.0) mimemagic (~> 0.3.0)
terrapin (~> 0.6.0) terrapin (~> 0.6.0)
pg (0.21.0) pg (0.21.0)
polyamorous (1.3.1)
activerecord (>= 3.0)
public_suffix (4.0.6) public_suffix (4.0.6)
puma (5.6.2) puma (5.6.2)
nio4r (~> 2.0) nio4r (~> 2.0)
@ -352,12 +297,6 @@ GEM
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rake (13.0.1) rake (13.0.1)
ransack (1.8.3)
actionpack (>= 3.0)
activerecord (>= 3.0)
activesupport (>= 3.0)
i18n
polyamorous (~> 1.3)
rb-fsevent (0.9.8) rb-fsevent (0.9.8)
rb-inotify (0.9.10) rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2) ffi (>= 0.5.0, < 2)
@ -588,7 +527,6 @@ PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
activeadmin!
angular-i18n angular-i18n
angular-rails-templates angular-rails-templates
attr_encrypted attr_encrypted

View File

@ -1,94 +0,0 @@
ActiveAdmin.setup do |config|
# == Site Title
#
# Set the title that is displayed on the main layout
# for each of the active admin pages.
#
config.site_title = "ABF"
config.site_title_link = "/"
# == Default Namespace
#
# Set the default namespace each administration resource
# will be added to.
#
# eg:
# config.default_namespace = :hello_world
#
# This will create resources in the HelloWorld module and
# will namespace routes to /hello_world/*
#
# To set no namespace by default, use:
# config.default_namespace = false
config.default_namespace = :admin
# == User Authentication
#
# Active Admin will automatically call an authentication
# method in a before filter of all controller actions to
# ensure that there is a currently logged in admin user.
#
# This setting changes the method which Active Admin calls
# within the controller.
config.authentication_method = :authenticate_user!
# == Current User
#
# Active Admin will associate actions with the current
# user performing them.
#
# This setting changes the method which Active Admin calls
# to return the currently logged in user.
config.current_user_method = :current_user
# == Admin Comments
#
# Admin comments allow you to add comments to any model for admin use
#
# Admin comments are enabled by default in the default
# namespace only. You can turn them on in a namesapce
# by adding them to the comments array.
#
# config.allow_comments_in = [:admin]
config.comments = false
# == Controller Filters
#
# You can add before, after and around filters to all of your
# Active Admin resources from here.
#
# config.before_filter :do_something_awesome
config.before_filter :check_admin_role
# == Register Stylesheets & Javascripts
#
# We recommend using the built in Active Admin layout and loading
# up your own stylesheets / javascripts to customize the look
# and feel.
#
# To load a stylesheet:
# config.register_stylesheet 'my_stylesheet.css'
#
# To load a javascript file:
# config.register_javascript 'my_javascript.js'
config.logout_link_path = :destroy_user_session_path
config.logout_link_method = :delete
end
# Block admin access to non-admin-users.
ActiveAdmin::BaseController.class_eval do
skip_after_action :verify_authorized
# include ActionController::Caching::Sweeping
protected
def check_admin_role
raise ActiveRecord::RecordNotFound unless current_user.admin?
end
end

View File

@ -6,11 +6,11 @@ Rails.application.routes.draw do
# ActiveAdmin routes. # ActiveAdmin routes.
ActiveAdmin.routes(self) ActiveAdmin.routes(self)
namespace :admin do # namespace :admin do
constraints Rosa::Constraints::AdminAccess do # constraints Rosa::Constraints::AdminAccess do
mount Sidekiq::Web => 'sidekiq' # mount Sidekiq::Web => 'sidekiq'
end # end
end # end
match '/robots.txt' => 'sitemap#robots', via: [:get, :post, :head], as: :robots match '/robots.txt' => 'sitemap#robots', via: [:get, :post, :head], as: :robots