pageflow-support 15.0.0.beta1 → 15.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pageflow/used_file_test_helper.rb +10 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28f755a329e07c337ed53b8bf65649db497c889dc690c0f0e8640d263955098a
|
4
|
+
data.tar.gz: bd9f1e1041d6a7aaadba1b6a18750f70c7cd40836e0eb096949fdc8b58b5879f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f25048cbd8e63ed0848a731e2c9215d602c1193b156d697f75789549f19cf44ae0bbf98a5c1960dbeed69048b281d74a68c50b7b3687d92228164a47cc9c7d00
|
7
|
+
data.tar.gz: c6bf708dfe1379507fcf093fbe877e4d85260603aa6c6387bbc8d889f0b67f5cd070a08e77921ed68220bb2d572ec830bc25acdac9616f9354d2c3a76915d1af
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module UsedFileTestHelper
|
2
|
+
# creates a file with usage in entry
|
3
|
+
# and sets the magic @entry-variable (always present in views) for file lookup
|
4
|
+
def create_used_file(model, entry: nil, **attributes)
|
5
|
+
file = create(model, attributes)
|
6
|
+
@entry = entry || Pageflow::PublishedEntry.new(create(:entry, :published))
|
7
|
+
usage = file.usages.create(revision: @entry.revision)
|
8
|
+
Pageflow::UsedFile.new(file, usage)
|
9
|
+
end
|
10
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pageflow-support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.0.0.
|
4
|
+
version: 15.0.0.beta2
|
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-
|
11
|
+
date: 2019-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pageflow
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 15.0.0.
|
19
|
+
version: 15.0.0.beta2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 15.0.0.
|
26
|
+
version: 15.0.0.beta2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mysql2
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,6 +195,7 @@ files:
|
|
195
195
|
- pageflow/render_page_test_helper.rb
|
196
196
|
- pageflow/support.rb
|
197
197
|
- pageflow/test_page_type.rb
|
198
|
+
- pageflow/used_file_test_helper.rb
|
198
199
|
homepage: https://pageflow.io
|
199
200
|
licenses: []
|
200
201
|
metadata: {}
|