thecore_print_commons 0.1.16 → 2.0.4

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: 72dad4cd8421cac97cfae64fbb718cc18552f125afa333e984da246000c2a2da
4
- data.tar.gz: d5592d65d6188fd170c5358dd9f6e0c174770f2f56ca5e880315eeb05c3e5cfd
3
+ metadata.gz: 20490e2bec2c6919724f04c00661c14d12f204586d72ac01d9bd7f3c45530cc0
4
+ data.tar.gz: 1d7557c8e12cd17654946c8c349f2a4599f19ace38d24aff12bb0b96b5bfab89
5
5
  SHA512:
6
- metadata.gz: 9f59172e9ce0c63fb51d65e96d08547661d6de4a7343fb89a4ab43e9a3e810f90cbf57d7ec8ff04c1bbe4cbb548a68e4b1d65a6ab54cfdf333d680e8132c5d7b
7
- data.tar.gz: 46d79c6d158de82b8c94c0d9758f86b839aab75995ffa012aff327f90c6eb60e38ce5bb55f38910a7a75a5863eefe8bbc055f6cd566f6c49c24db9999db49b5b
6
+ metadata.gz: 27956ae172465597f1d504728d57ca1fcfbc993e20baec5eccd47c174934fea7fba9aae3218cc4c693e99075c5ba5fdc7a28b04fb47cbcdd9dfa0a259a34df5d
7
+ data.tar.gz: c0018f9793689d4ca15539869c3701afd7773d0f333fa6fda133cc86c80b1305dc7cbc3e7537a9fbf2076e776f5dd0d503e91df2276779e0af82ed6581c618c0
@@ -1,10 +1,7 @@
1
-
2
- require 'active_support/concern'
3
-
4
- module ThecorePrintCommonAbilitiesConcern
5
- extend ActiveSupport::Concern
6
- included do
7
- def thecore_print_commons_abilities user
1
+ module Abilities
2
+ class ThecorePrintCommon
3
+ include CanCan::Ability
4
+ def initialize user
8
5
  if user
9
6
  # if the user is logged in, it can do certain tasks regardless his role
10
7
  if user.admin?
@@ -19,5 +16,5 @@ module ThecorePrintCommonAbilitiesConcern
19
16
  end
20
17
  end
21
18
 
22
- # include the extension
23
- TheCoreAbilities.send(:include, ThecorePrintCommonAbilitiesConcern)
19
+ # # include the extension
20
+ # TheCoreAbilities.send(:include, ThecorePrintCommonAbilitiesConcern)
data/db/seeds.rb ADDED
@@ -0,0 +1,2 @@
1
+ puts "Loading ThecorePrintCommons seeds"
2
+ Settings.ns(:printer_commons).cups_server = 'localhost'
@@ -1,9 +1,7 @@
1
- require "thecore_print_commons/engine"
2
- require 'thecore'
3
1
  require 'thecore_background_jobs'
4
2
  require 'cupsffi'
3
+ require "thecore_print_commons/engine"
5
4
 
6
- require 'thecore'
7
5
  module ThecorePrintCommons
8
6
  # Your code goes here...
9
7
  end
@@ -2,6 +2,9 @@ module ThecorePrintCommons
2
2
  class Engine < ::Rails::Engine
3
3
 
4
4
  initializer 'thecore_print_commons.add_to_migrations' do |app|
5
+ # Adds the list of Thecore Engines, so to manage seeds loading, i.e.:
6
+ # Thecore::Base.thecore_engines.each { |engine| engine.load_seed }
7
+ Thecore::Base.thecore_engines << self.class
5
8
  unless app.root.to_s.match root.to_s
6
9
  # APPEND TO MAIN APP MIGRATIONS FROM THIS GEM
7
10
  config.paths['db/migrate'].expanded.each do |expanded_path|
@@ -1,3 +1,3 @@
1
1
  module ThecorePrintCommons
2
- VERSION = '0.1.16'.freeze
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_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 2.0.4
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: 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_background_jobs
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: '1.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: '1.1'
26
+ version: '2.0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: cupsffi
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -75,7 +61,7 @@ files:
75
61
  - db/migrate/20160323152041_create_printers.rb
76
62
  - db/migrate/20160413115407_add_temperature_to_printer.rb
77
63
  - db/migrate/20160629140729_add_default_to_printer.rb
78
- - db/migrate/20181106141858_add_remote_server_setting.rb
64
+ - db/seeds.rb
79
65
  - lib/tasks/thecore_print_commons_tasks.rake
80
66
  - lib/thecore_print_commons.rb
81
67
  - lib/thecore_print_commons/engine.rb
@@ -99,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
85
  - !ruby/object:Gem::Version
100
86
  version: '0'
101
87
  requirements: []
102
- rubygems_version: 3.0.1
88
+ rubygems_version: 3.0.3
103
89
  signing_key:
104
90
  specification_version: 4
105
91
  summary: Thecorized thecore_print_commons
@@ -1,6 +0,0 @@
1
- class AddRemoteServerSetting < ActiveRecord::Migration[5.2]
2
- def up
3
- Settings.ns(:printer_commons).cups_server = 'localhost'
4
- end
5
- end
6
-