thecore_print_commons 3.0.3 → 3.0.5
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 +4 -4
- data/app/models/concerns/rails_admin/printer.rb +7 -2
- data/config/initializers/add_to_db_migrate.rb +2 -0
- data/db/migrate/20160323152041_create_printers.rb +5 -5
- data/db/migrate/20160413115407_add_temperature_to_printer.rb +2 -2
- data/db/migrate/20160519093702_create_print_templates.rb +2 -2
- data/db/migrate/20160519124051_add_print_template_id_to_printer.rb +1 -1
- data/db/migrate/20160629140729_add_default_to_printer.rb +2 -2
- data/db/migrate/20160629140730_add_port_to_printer.rb +2 -2
- data/lib/thecore_print_commons/engine.rb +0 -13
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3b7503441e21a848118fe588d5cd9d814d13df3f9d1716c1ff9c5c909f93323
|
4
|
+
data.tar.gz: d36bf02ed4a6079ea9ea7c163fb8b8f9aff7dd51cc9e7882fdaf219a02dd2e73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e0caa41391da6343ea0588c4b5649ea9b37625f3be8a8d033f772414393fc52417272b4434ec1a4c746a6a91305ca032bd0a12d5610fd89a146848ae7d7e64f
|
7
|
+
data.tar.gz: af833505c5e7edbf97ce78231202849a80428b2e8c52dc47cf9d8c6c5d0264f2dccd553d8cc30f94b02a17d20d7f37696fe5fd736721e8820d111d25e31751c1
|
@@ -14,7 +14,12 @@ module RailsAdmin::Printer
|
|
14
14
|
9100
|
15
15
|
end
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
|
+
if Object.const_defined?('RailsAdminToggleable')
|
19
|
+
field :default, :toggle
|
20
|
+
else
|
21
|
+
field :default
|
22
|
+
end
|
18
23
|
|
19
24
|
show do
|
20
25
|
field :temperature
|
@@ -25,7 +30,7 @@ module RailsAdmin::Printer
|
|
25
30
|
field :temperature
|
26
31
|
field :description
|
27
32
|
end
|
28
|
-
|
33
|
+
|
29
34
|
field :is_online do
|
30
35
|
read_only true
|
31
36
|
formatted_value do # used in form views
|
@@ -1,6 +1,6 @@
|
|
1
|
-
class CreatePrinters < ActiveRecord::Migration[
|
1
|
+
class CreatePrinters < ActiveRecord::Migration[7.0]
|
2
2
|
def change
|
3
|
-
create_table :printers do |t|
|
3
|
+
create_table :printers, if_not_exists: true do |t|
|
4
4
|
t.string :name
|
5
5
|
t.text :description
|
6
6
|
t.string :ip
|
@@ -10,8 +10,8 @@ class CreatePrinters < ActiveRecord::Migration[4.2]
|
|
10
10
|
|
11
11
|
t.timestamps null: false
|
12
12
|
end
|
13
|
-
add_index :printers, :name
|
14
|
-
add_index :printers, :description
|
15
|
-
add_index :printers, :ip
|
13
|
+
add_index :printers, :name, if_not_exists: true
|
14
|
+
add_index :printers, :description, if_not_exists: true
|
15
|
+
add_index :printers, :ip, if_not_exists: true
|
16
16
|
end
|
17
17
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
class CreatePrintTemplates < ActiveRecord::Migration[
|
1
|
+
class CreatePrintTemplates < ActiveRecord::Migration[7.0]
|
2
2
|
def change
|
3
|
-
create_table :print_templates do |t|
|
3
|
+
create_table :print_templates, if_not_exists: true do |t|
|
4
4
|
t.string :name
|
5
5
|
t.text :description
|
6
6
|
t.text :template
|
@@ -1,5 +1,5 @@
|
|
1
|
-
class AddDefaultToPrinter < ActiveRecord::Migration[
|
1
|
+
class AddDefaultToPrinter < ActiveRecord::Migration[7.0]
|
2
2
|
def change
|
3
|
-
add_column :printers, :default, :boolean, default: false
|
3
|
+
add_column :printers, :default, :boolean, default: false, if_not_exists: true
|
4
4
|
end
|
5
5
|
end
|
@@ -1,17 +1,4 @@
|
|
1
1
|
module ThecorePrintCommons
|
2
2
|
class Engine < ::Rails::Engine
|
3
|
-
|
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
|
8
|
-
unless app.root.to_s.match root.to_s
|
9
|
-
# APPEND TO MAIN APP MIGRATIONS FROM THIS GEM
|
10
|
-
config.paths['db/migrate'].expanded.each do |expanded_path|
|
11
|
-
app.config.paths['db/migrate'] << expanded_path
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
3
|
end
|
17
4
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_print_commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_background_jobs
|
@@ -43,6 +43,7 @@ files:
|
|
43
43
|
- app/models/printer.rb
|
44
44
|
- app/workers/print_worker.rb
|
45
45
|
- config/initializers/abilities_thecore_print_commons_concern.rb
|
46
|
+
- config/initializers/add_to_db_migrate.rb
|
46
47
|
- config/initializers/after_initialize_for_thecore_print_commons.rb
|
47
48
|
- config/initializers/thecore_print_commons_static_links.rb
|
48
49
|
- config/locales/telnet_print.activerecord.it.yml
|