pageflow 15.0.0.rc1 → 15.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2328aa20c05ac19c8b9d217322207e33a0751f9e65fb45f7c62b68259f6dcfee
4
- data.tar.gz: b92268ef8ac71fe3bca26300f37f62e8e564b08fa0154319bf4889e1753f564a
3
+ metadata.gz: f05fa676c8be9632e20359a7285033181a6735ca53aa89f93fdbe233fbc0ede2
4
+ data.tar.gz: b3ebfdd01b595a904f5b0e53ac211d69d4fa5d81ea34f518bd12e11f6076b3df
5
5
  SHA512:
6
- metadata.gz: 40293af4ee3184592998a3b11a2a95425d054307303ea8fcbd372b08c81091b90db79ede4028113a68e6a2808b3fb02cf397ba8c0e49b79d79da35bc69e4cb43
7
- data.tar.gz: 62b1563f80f888654a930f041bf239d71ba238ae6524b0e1a14fef0713173beec369456c978d8a51f115f77a4645bd17e7a1a433e518e443fa0aa23bf407fede
6
+ metadata.gz: 013af6a873ca83977d0e6a4a1be59467d213ba15b747b77e0a74cfc4bed8195a920bde202bf3175f1d51f3a617f01f857fe4b8eef11ef62c8b4a99ddfb9a60db
7
+ data.tar.gz: 2a86d385c5edf76330454590ee701fa9027525b69930e4dea16d8d97f0485c75b68d0ef8417813245b5e63c5589894311fd68f9d488f229af6edd204675409d5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
+ ### Version 15.0.0.rc2
4
+
5
+ 2019-10-31
6
+
7
+ [Compare changes](https://github.com/codevise/pageflow/compare/v15.0.0.rc1...v15.0.0.rc2)
8
+
9
+ - Tweak import/export zip options
10
+ ([#1234](https://github.com/codevise/pageflow/pull/1234))
11
+ - Prevent further cases of perma id clashes
12
+ ([#1233](https://github.com/codevise/pageflow/pull/1233))
13
+ - Add active class color styling for mobile share panel
14
+ ([#1232](https://github.com/codevise/pageflow/pull/1232))
15
+
3
16
  ### Version 15.0.0.rc1
4
17
 
5
18
  2019-10-28
@@ -100,5 +100,13 @@ $mobile-navigation-pictogram-visibility: $standard-page-pictogram-visibility !de
100
100
  svg {
101
101
  fill: $mobile-navigation-share-link-color;
102
102
  }
103
+
104
+ &.active {
105
+ color: $main-color;
106
+
107
+ svg {
108
+ fill: $main-color;
109
+ }
110
+ }
103
111
  }
104
112
  }
@@ -47,7 +47,8 @@ module Pageflow
47
47
  f.entry = entry
48
48
  end
49
49
 
50
- usage = @draft.file_usages.create(file: file, configuration: attributes[:configuration])
50
+ usage = @draft.file_usages.create_with_lock!(file: file,
51
+ configuration: attributes[:configuration])
51
52
  UsedFile.new(file, usage)
52
53
  end
53
54
 
@@ -5,6 +5,9 @@ module Pageflow
5
5
  # Read and write files from and to zip archives
6
6
  class ZipArchive
7
7
  def initialize(file_name)
8
+ Zip.force_entry_names_encoding = 'UTF-8'
9
+ Zip.write_zip64_support = true
10
+
8
11
  @file = Zip::File.open(file_name, Zip::File::CREATE)
9
12
  end
10
13
 
@@ -26,36 +26,16 @@ module Pageflow
26
26
  self.perma_id ||= (self.class.maximum(:perma_id) || 0) + 1
27
27
  end
28
28
 
29
- def save(*)
30
- with_advisory_lock_for_perma_id_generation! do
31
- super
32
- end
33
- end
34
-
35
- def save!(*)
36
- with_advisory_lock_for_perma_id_generation! do
37
- super
29
+ module ClassMethods
30
+ # Recommended way to create revision components. Uses an
31
+ # advisory lock to ensure concurrently created records are not
32
+ # assigned the same perma id.
33
+ def create_with_lock!(attributes, &block)
34
+ with_advisory_lock_for_perma_id_generation! do
35
+ create!(attributes, &block)
36
+ end
38
37
  end
39
- end
40
-
41
- private
42
-
43
- def with_advisory_lock_for_perma_id_generation!(&block)
44
- return yield if perma_id.present?
45
-
46
- r = with_advisory_lock_result_for_perma_id_generation(&block)
47
- raise(PermaIdGenerationAdvisoryLockTimeout) unless r.lock_was_acquired?
48
-
49
- r.result
50
- end
51
38
 
52
- def with_advisory_lock_result_for_perma_id_generation(&block)
53
- self.class.with_advisory_lock_result("#{self.class.table_name}_perma_id",
54
- timeout_seconds: ADVISORY_LOCK_TIMEOUT_SECONDS,
55
- &block)
56
- end
57
-
58
- module ClassMethods
59
39
  def all_for_revision(revision)
60
40
  where(revision_id: revision.id)
61
41
  end
@@ -67,6 +47,21 @@ module Pageflow
67
47
  find_by_revision_id_and_perma_id(revision.id, perma_id)
68
48
  end.compact
69
49
  end
50
+
51
+ private
52
+
53
+ def with_advisory_lock_for_perma_id_generation!(&block)
54
+ r = with_advisory_lock_result_for_perma_id_generation(&block)
55
+ raise(PermaIdGenerationAdvisoryLockTimeout) unless r.lock_was_acquired?
56
+
57
+ r.result
58
+ end
59
+
60
+ def with_advisory_lock_result_for_perma_id_generation(&block)
61
+ with_advisory_lock_result("#{table_name}_perma_id",
62
+ timeout_seconds: ADVISORY_LOCK_TIMEOUT_SECONDS,
63
+ &block)
64
+ end
70
65
  end
71
66
  end
72
67
  end
@@ -1,3 +1,3 @@
1
1
  module Pageflow
2
- VERSION = '15.0.0.rc1'.freeze
2
+ VERSION = '15.0.0.rc2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.0.0.rc1
4
+ version: 15.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-28 00:00:00.000000000 Z
11
+ date: 2019-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails