pulitzer 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/interactions/pulitzer/update_post_type_content_elements.rb +12 -7
- data/lib/pulitzer/exceptions.rb +3 -2
- data/lib/pulitzer/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +1728 -0
- data/spec/interactions/update_post_type_content_elements_spec.rb +32 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29b37bdeadc5d4a64fc567a5bc83d37c648c6166
|
4
|
+
data.tar.gz: 9123f6a96b2f9ef7ee83353de634fe151bfd49dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c8e88a793d435457e437e6097fa2ff9a86e0a60739ea7073fa1c06b3ed5c5e14338c81b82215357c1157682e8c3c0651c53d6e84c622ccb601100b5661fbcfc
|
7
|
+
data.tar.gz: 625f4f249b09016f29c470e4f65e680a91baf5fa9dbfe14c1a22465983bfaf63520f277bea51e42efa71e5d19a48f730c85c4d7481242e3b570def3d24f5e8b8
|
@@ -9,13 +9,18 @@ class Pulitzer::UpdatePostTypeContentElements
|
|
9
9
|
|
10
10
|
def call
|
11
11
|
post_type.posts.each do |post|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
12
|
+
begin
|
13
|
+
preview_version = post.get_preview_version!
|
14
|
+
post.preview_version.content_elements.where(label: old_label).each do |content_element|
|
15
|
+
content_element.update(label: ptcet.label,
|
16
|
+
height: ptcet.height,
|
17
|
+
width: ptcet.width,
|
18
|
+
text_editor: ptcet.text_editor,
|
19
|
+
content_element_type: ptcet.content_element_type,
|
20
|
+
post_type_content_element_type: ptcet)
|
21
|
+
end
|
22
|
+
rescue Pulitzer::VersionAccessError
|
23
|
+
# if there is no preview version, skip this one.
|
19
24
|
end
|
20
25
|
end
|
21
26
|
post_type.partials.each do |partial|
|
data/lib/pulitzer/exceptions.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
module Pulitzer
|
2
|
-
class
|
3
|
-
class
|
2
|
+
class VersionAccessError < RuntimeError; end
|
3
|
+
class VersionProcessingError < VersionAccessError; end
|
4
|
+
class VersionMissingError < VersionAccessError; end
|
4
5
|
end
|
data/lib/pulitzer/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|