thecore_settings 1.1.14 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a96e5d7a1b36eeb6da6a295aecca0c3dba22f2b24c67fb61ecad1c60bc593012
4
- data.tar.gz: 2220bc09c4a34fa88fb1fcf441b9f288a661baca4771e485d6fa12b2d6145e10
3
+ metadata.gz: 90fda2b9c0193f1b2086d7580f308eac4a2c1b9f8d31d30ba029411fa3582b5f
4
+ data.tar.gz: fbc286d75b259d365a2a51aedab15ca71d56d53e7fd80b1c060eca667ff82540
5
5
  SHA512:
6
- metadata.gz: 488b88f46e62c56d61c1de2a94d036e6b20c50c9b981e06c8c8b8f3d2f83faa2e1b731acbe6257f48aaffc8d4c79d00078e204ce68c5471a30597383049e9829
7
- data.tar.gz: a35afa1b206061c9a1347e567cd2d0bfc6d25a958c3351f11e787cd2ae08814a626556f992d762b57b1f9c9db37f6774903c47f6033891902dffeda5cee3dfae
6
+ metadata.gz: c8689529d0ce5c31c778f41e7c495cca8536137615d4a882655c740c93e1e85e04686550779ac313bbf9f20f9c20c35e63066fb53875cd0e102c4c5170c5c13d
7
+ data.tar.gz: bedfbe26eadcf21c395d51d192bb89584b056146125c219f31ebe745ba5d15b9ee3ada7f0bea0845c65441f99e2823625eadc53ba83ac10ec4852dd4842d2a74
@@ -1,5 +1,3 @@
1
- require 'rails_admin_settings'
2
-
3
1
  module RailsAdminSettings
4
2
  module RailsAdminExtensionConfig
5
3
  def self.included(base)
@@ -0,0 +1,22 @@
1
+ require 'active_support/concern'
2
+
3
+ module TheCoreSettingsAbilitiesConcern
4
+ extend ActiveSupport::Concern
5
+ included do
6
+ def thecore_settings_abilities user
7
+ # Rails.logger.debug "Cannot Create"
8
+ cannot :create, RailsAdminSettings::Setting
9
+ # Rails.logger.debug "Cannot Delete"
10
+ cannot :destroy, RailsAdminSettings::Setting
11
+ cannot :show, RailsAdminSettings::Setting
12
+
13
+ # cannot :manage, [RailsAdminSettings::Setting]
14
+ # cannot :dashboard, [RailsAdminSettings::Setting]
15
+ # # Pay attention to this errorTypeError (can't convert Class to Array (Class#to_ary gives String)):
16
+ # can [:index, :update], [RailsAdminSettings::Setting] if user && user.admin?
17
+ end
18
+ end
19
+ end
20
+
21
+ # include the extension
22
+ TheCoreAbilities.send(:include, TheCoreSettingsAbilitiesConcern)
@@ -1,9 +1,9 @@
1
1
  Rails.application.configure do
2
2
  config.after_initialize do
3
3
  # Auto inizializza questa gemma
4
- require 'rails_admin_settings'
5
- require 'thecore_settings'
6
- require 'rails_admin_requirements'
7
- require 'thecore_settings_abilities'
4
+ # require 'rails_admin_settings'
5
+ # require 'thecore_settings'
6
+ # require 'rails_admin_requirements'
7
+ # require 'thecore_settings_abilities'
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module ThecoreSettings
2
- VERSION = '1.1.14'.freeze
2
+ VERSION = '1.1.15'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.14
4
+ version: 1.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-30 00:00:00.000000000 Z
11
+ date: 2020-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore
@@ -147,17 +147,17 @@ files:
147
147
  - Rakefile
148
148
  - app/assets/config/thecore_settings_manifest.js
149
149
  - app/assets/stylesheets/rich/editor.css
150
+ - config/initializers/rails_admin_requirements.rb
151
+ - config/initializers/thecore_settings_abilities.rb
150
152
  - config/initializers/thecore_settings_post_init.rb
151
153
  - config/locales/thecore_settings.it.yml
152
154
  - config/routes.rb
153
155
  - db/migrate/20161227101954_create_rails_admin_settings.rb
154
156
  - db/migrate/20161227101956_add_app_name.rb
155
- - lib/rails_admin_requirements.rb
156
157
  - lib/tasks/thecore_settings_tasks.rake
157
158
  - lib/thecore_settings.rb
158
159
  - lib/thecore_settings/engine.rb
159
160
  - lib/thecore_settings/version.rb
160
- - lib/thecore_settings_abilities.rb
161
161
  homepage: https://taris.it
162
162
  licenses:
163
163
  - MIT
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  - !ruby/object:Gem::Version
178
178
  version: '0'
179
179
  requirements: []
180
- rubygems_version: 3.0.1
180
+ rubygems_version: 3.0.6
181
181
  signing_key:
182
182
  specification_version: 4
183
183
  summary: Adds settings section.
@@ -1,22 +0,0 @@
1
- require 'active_support/concern'
2
-
3
- require 'rails_admin_settings'
4
-
5
- module TheCoreSettingsAbilitiesConcern
6
- extend ActiveSupport::Concern
7
- included do
8
- def thecore_settings_abilities user
9
- cannot :manage, [RailsAdminSettings::Setting]
10
- cannot :dashboard, [RailsAdminSettings::Setting]
11
- # Pay attention to this errorTypeError (can't convert Class to Array (Class#to_ary gives String)):
12
- if user && user.admin?
13
- can [:index, :update], [RailsAdminSettings::Setting]
14
- cannot [:show, :destroy, :create], [RailsAdminSettings::Setting]
15
- end
16
-
17
- end
18
- end
19
- end
20
-
21
- # include the extension
22
- TheCoreAbilities.send(:include, TheCoreSettingsAbilitiesConcern)