pageflow 15.0.0.beta4 → 15.0.0.rc1
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 +4 -4
- data/CHANGELOG.md +12 -0
- data/app/models/concerns/pageflow/reusable_file.rb +4 -0
- data/lib/pageflow/engine.rb +1 -0
- data/lib/pageflow/revision_component.rb +34 -1
- data/lib/pageflow/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2328aa20c05ac19c8b9d217322207e33a0751f9e65fb45f7c62b68259f6dcfee
|
4
|
+
data.tar.gz: b92268ef8ac71fe3bca26300f37f62e8e564b08fa0154319bf4889e1753f564a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40293af4ee3184592998a3b11a2a95425d054307303ea8fcbd372b08c81091b90db79ede4028113a68e6a2808b3fb02cf397ba8c0e49b79d79da35bc69e4cb43
|
7
|
+
data.tar.gz: 62b1563f80f888654a930f041bf239d71ba238ae6524b0e1a14fef0713173beec369456c978d8a51f115f77a4645bd17e7a1a433e518e443fa0aa23bf407fede
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
### Version 15.0.0.rc1
|
4
|
+
|
5
|
+
2019-10-28
|
6
|
+
|
7
|
+
[Compare changes](https://github.com/codevise/pageflow/compare/14-x-stable...v15.0.0.rc1)
|
8
|
+
|
9
|
+
- Prevent perma_id clashes for concurrently created revision components
|
10
|
+
([#1225](https://github.com/codevise/pageflow/pull/1225))
|
11
|
+
- Ensure caching of generated stylesheet is invaliated when files are
|
12
|
+
added.
|
13
|
+
([#1224](https://github.com/codevise/pageflow/pull/1224))
|
14
|
+
|
3
15
|
### Version 15.0.0.beta4
|
4
16
|
|
5
17
|
2019-10-24
|
@@ -13,6 +13,10 @@ module Pageflow
|
|
13
13
|
has_many :using_accounts, :through => :using_entries, :source => :account
|
14
14
|
|
15
15
|
validate :parent_allows_type_for_nesting, :parent_belongs_to_same_entry
|
16
|
+
|
17
|
+
after_save do
|
18
|
+
usages.each(&:touch) if ready?
|
19
|
+
end
|
16
20
|
end
|
17
21
|
|
18
22
|
def parent_allows_type_for_nesting
|
data/lib/pageflow/engine.rb
CHANGED
@@ -7,8 +7,12 @@ module Pageflow
|
|
7
7
|
module RevisionComponent
|
8
8
|
extend ActiveSupport::Concern
|
9
9
|
|
10
|
+
ADVISORY_LOCK_TIMEOUT_SECONDS = 5
|
11
|
+
|
12
|
+
class PermaIdGenerationAdvisoryLockTimeout < StandardError; end
|
13
|
+
|
10
14
|
included do
|
11
|
-
belongs_to :revision, class_name: 'Pageflow::Revision'
|
15
|
+
belongs_to :revision, class_name: 'Pageflow::Revision', touch: true
|
12
16
|
before_save :ensure_perma_id
|
13
17
|
end
|
14
18
|
|
@@ -22,6 +26,35 @@ module Pageflow
|
|
22
26
|
self.perma_id ||= (self.class.maximum(:perma_id) || 0) + 1
|
23
27
|
end
|
24
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
|
38
|
+
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
|
+
|
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
|
+
|
25
58
|
module ClassMethods
|
26
59
|
def all_for_revision(revision)
|
27
60
|
where(revision_id: revision.id)
|
data/lib/pageflow/version.rb
CHANGED
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.
|
4
|
+
version: 15.0.0.rc1
|
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-
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '6.1'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: with_advisory_lock
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '4.6'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '4.6'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: zencoder
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|