pages_core 3.6.0 → 3.6.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09440a3d279449e162f521750dd736cd1865cd1ee63809c00806e95db2a0c05a'
|
4
|
+
data.tar.gz: 1e0282864ebf0667bf0abbfdf3574b9a2fc6192b98cc7c931eadb02adc8ebcf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da9e5ecc3a26209b01fc7452210933782224a465bd76fc8349149c44225cd73d0e7e704eb232bab16db2fbbcc5bb721a7384fd9093ecd72d1b97ea27e78152f1
|
7
|
+
data.tar.gz: de1f492e63bbf8ca71fe770d02213ffb2da05f27732e5eb9b46926af2339b2709efb691b24c29c27163e16a4d53d8bd25feff6286f809cff5f0d514c4ecda6ed
|
@@ -14,7 +14,7 @@ class CreateAttachments < ActiveRecord::Migration[5.2]
|
|
14
14
|
PageFile.reset_column_information
|
15
15
|
|
16
16
|
locales = [I18n.default_locale,
|
17
|
-
PagesCore.config.locales&.keys].compact.map(&:to_sym).uniq
|
17
|
+
PagesCore.config.locales&.keys].flatten.compact.map(&:to_sym).uniq
|
18
18
|
|
19
19
|
Attachment.all.each do |a|
|
20
20
|
begin
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class FixPageFileIds < ActiveRecord::Migration[5.0]
|
2
|
+
def change
|
3
|
+
attachment_id = execute(
|
4
|
+
"SELECT MAX(attachment_id) AS max_id FROM page_files"
|
5
|
+
)[0]["max_id"]
|
6
|
+
pf_id = execute("SELECT MAX(id) AS max_id FROM page_files")[0]["max_id"]
|
7
|
+
|
8
|
+
|
9
|
+
if attachment_id && pf_id
|
10
|
+
max_id = [attachment_id, pf_id].max
|
11
|
+
|
12
|
+
execute("UPDATE page_files SET id = id + #{max_id + 1}")
|
13
|
+
execute("UPDATE page_files SET id = attachment_id")
|
14
|
+
execute("ALTER SEQUENCE page_files_id_seq RESTART WITH #{attachment_id + 1}")
|
15
|
+
|
16
|
+
PageFile.all.each { |pf| pf.touch }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -5,7 +5,8 @@ module PagesCore
|
|
5
5
|
|
6
6
|
class << self
|
7
7
|
def all_blocks
|
8
|
-
(
|
8
|
+
(config.get(:default, :blocks).keys +
|
9
|
+
all_templates.map { |t| configured_block_names(t) } +
|
9
10
|
all_templates.map { |t| enabled_block_names(t) }).flatten.compact.uniq
|
10
11
|
end
|
11
12
|
|
data/lib/pages_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pages_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Inge Jørgensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -719,6 +719,7 @@ files:
|
|
719
719
|
- db/migrate/20170716213400_remove_sessions.rb
|
720
720
|
- db/migrate/20180207134000_add_dates_to_pages.rb
|
721
721
|
- db/migrate/20190211154800_create_attachments.rb
|
722
|
+
- db/migrate/20190318115000_fix_page_file_ids.rb
|
722
723
|
- lib/pages_core.rb
|
723
724
|
- lib/pages_core/admin_menu_item.rb
|
724
725
|
- lib/pages_core/archive_finder.rb
|