thecore_print_with_template 0.1.1 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f5425a69882e40d77258e551ee30cebe70248c64
4
- data.tar.gz: 8a7909f77bf1b5a8f81ac2d87616d9c38428eb48
2
+ SHA256:
3
+ metadata.gz: 80b2c0ba815906ae32667dfc31b1bcbab19b1f5ca313bf8a88584ba4ae1c8799
4
+ data.tar.gz: 700b55270c544ab7b872e33755c1a0bbf6ac8a8ab57c589925497846c512348a
5
5
  SHA512:
6
- metadata.gz: 70aa597f3c8705bfa8c5616d6dda299884a63153ae6e30a5ea6baa2e4f410411e8d9660fc1662e35c70184cce3ce72228d6c0a6e3cdc8008aaf503fcdcf00e88
7
- data.tar.gz: 453ba8d4bbdde8020e4054ad9567492cfdd18192af709a4302217b7b8b50a5b795ffeaf20af226d6771289b375a69deb23d368df6a191ab12fb4ea15fc566360
6
+ metadata.gz: 2231e2d09bc5204d88b1bc5db7e4e31a4f16dc58e1e40a0d9bbaee8343a3cd2e0e98f5858be0f669fcb1c1c5891f3907437f37855be3961f56d424527912afa5
7
+ data.tar.gz: 037bee3f664b5fe708470ce302ec8551155b8d338ded2586da3b6c37b11519de124524ddd9d82221d88f611b3de02de66084ea29c7331263425dbee10b8a47f1
@@ -28,24 +28,22 @@ class PrintTemplate < ApplicationRecord
28
28
  # pivot
29
29
  # end
30
30
 
31
- RailsAdmin.config do |config|
32
- config.model 'PrintTemplate' do
33
- navigation_label I18n.t("admin.settings.label")
34
- navigation_icon 'fa fa-file-text'
35
- parent Printer
31
+ rails_admin do
32
+ navigation_label I18n.t("admin.settings.label")
33
+ navigation_icon 'fa fa-file-text'
34
+ parent Printer
36
35
 
37
- field :name
38
- field :description
36
+ field :name
37
+ field :description
39
38
 
40
- edit do
41
- field :template
42
- field :translation_matrix
43
- end
39
+ edit do
40
+ field :template
41
+ field :translation_matrix
42
+ end
44
43
 
45
- show do
46
- field :template
47
- field :translation_matrix
48
- end
44
+ show do
45
+ field :template
46
+ field :translation_matrix
49
47
  end
50
48
  end
51
49
  end
@@ -1,23 +1,20 @@
1
-
2
- require 'active_support/concern'
3
-
4
- module ThecorePrintWithTemplateAbilitiesConcern
5
- extend ActiveSupport::Concern
6
- included do
7
- def thecore_print_with_template_abilities user
8
- if user
9
- # if the user is logged in, it can do certain tasks regardless his role
10
- if user.admin?
11
- # if the user is an admin, it can do a lot of things, usually
12
- end
13
-
14
- if user.has_role? :role
15
- # a specific role, brings specific powers
16
- end
1
+ module Abilities
2
+ class ThecorePrintWithTemplatesCommon
3
+ include CanCan::Ability
4
+ def initialize user
5
+ if user
6
+ # if the user is logged in, it can do certain tasks regardless his role
7
+ if user.admin?
8
+ # if the user is an admin, it can do a lot of things, usually
9
+ end
10
+
11
+ if user.has_role? :role
12
+ # a specific role, brings specific powers
13
+ end
14
+ end
17
15
  end
18
16
  end
19
- end
20
17
  end
21
18
 
22
19
  # include the extension
23
- TheCoreAbilities.send(:include, ThecorePrintWithTemplateAbilitiesConcern)
20
+ # TheCoreAbilities.send(:include, ThecorePrintWithTemplateAbilitiesConcern)
@@ -1,7 +1,6 @@
1
+ require 'thecore_print_commons'
1
2
  require "thecore_print_with_template/engine"
2
3
 
3
- require 'thecore'
4
- require 'thecore_print_commons'
5
4
  module ThecorePrintWithTemplate
6
5
  # Your code goes here...
7
6
  end
@@ -2,7 +2,7 @@ module ThecorePrintWithTemplate
2
2
  class Engine < ::Rails::Engine
3
3
 
4
4
  initializer 'thecore_print_with_template.add_to_migrations' do |app|
5
- unless app.root.to_s == root.to_s
5
+ unless app.root.to_s.match root.to_s
6
6
  # APPEND TO MAIN APP MIGRATIONS FROM THIS GEM
7
7
  config.paths['db/migrate'].expanded.each do |expanded_path|
8
8
  app.config.paths['db/migrate'] << expanded_path
@@ -1,3 +1,3 @@
1
1
  module ThecorePrintWithTemplate
2
- VERSION = '0.1.1'
2
+ VERSION = "#{`git describe --tags $(git rev-list --tags --max-count=1)`.chomp}"
3
3
  end
metadata CHANGED
@@ -1,43 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_print_with_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-22 00:00:00.000000000 Z
11
+ date: 2021-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: thecore
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.4'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.4'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: thecore_print_commons
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: '0.1'
19
+ version: '2.0'
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: '0.1'
26
+ version: '2.0'
41
27
  description: Thecorized thecore_print_with_template full description.
42
28
  email:
43
29
  - gabriele.tassoni@gmail.com
@@ -81,8 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
67
  - !ruby/object:Gem::Version
82
68
  version: '0'
83
69
  requirements: []
84
- rubyforge_project:
85
- rubygems_version: 2.6.14
70
+ rubygems_version: 3.0.3
86
71
  signing_key:
87
72
  specification_version: 4
88
73
  summary: Thecorized thecore_print_with_template