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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de6555270cd6239a75c06c40e04d1a16dbe43663fa923a6b234d9476516a907d
4
- data.tar.gz: b9cffcd80616c9972a69d38b134279b536c2821551f9bff3917f3aa70545b6fc
3
+ metadata.gz: 28f755a329e07c337ed53b8bf65649db497c889dc690c0f0e8640d263955098a
4
+ data.tar.gz: bd9f1e1041d6a7aaadba1b6a18750f70c7cd40836e0eb096949fdc8b58b5879f
5
5
  SHA512:
6
- metadata.gz: af816034014dbab71afa5bcf020f47ce0568ea6fd911b3d8cb2fb5ce86aaeaa4ff4d27f397b9e0d520d49148606b846ae9af2821f466666896c861a53fb9fa5b
7
- data.tar.gz: 98297ed76132bb2ea9915a4e9d5d0ba0bfd2bc6b82b192ef63e42646471b9df421044675c1273ed048106056cf810b5da237b1040caca72b832ad5e64b51e314
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.beta1
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-07-31 00:00:00.000000000 Z
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.beta1
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.beta1
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: {}