pageflow-support 15.0.0.beta3 → 15.0.0.beta4

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: 39ac32782bfcee2bc72db29ee0b1af15ce91bb6b13cf5f5454fdbcd7396a70ea
4
- data.tar.gz: 2467696934a558f8b83ce5711215793307455b10bbd5917782b63641d26144d7
3
+ metadata.gz: 1418f0b331c557d2cec32e0405247b92723a95fed43b4e8ead8bb9b3a3b7c90c
4
+ data.tar.gz: 47f4404a97bc3b63907a8f4b3740ab904ed3deafdc97034f801e31b61f1c85f8
5
5
  SHA512:
6
- metadata.gz: 77e0bdd68deec024d75254c6b9fc6b38619c881cf6c96500976b544386959099241fb34f8cbc3d41d1ec2f2cb01e11ee41f6c70705287cd5f6ce3d7616631e97
7
- data.tar.gz: ef34dfd1fe6b6deb45b4c2b2f25269b9b30eafc1909ae8cd292e2570dd94f5527b036a1cec0440456af0b3bfc9561ff1fe41bcd239193cdf5c77a37571c91db6
6
+ metadata.gz: 0d7d6a1115b76b4a501dfa81dc19d448d7578d5ac8a66bd3e537e508cd7b7e49e83376165ff0eaa7851490eda0b0048ffc47db3c3521e723db646a9612e02d6c
7
+ data.tar.gz: 994d6ead99b7656ab664b63b505fb44e339074070db3dd7f0a500775b12679d8030214797f3bc96bd463a163d2afeda3e7bc57bc6fb6e2286dede3994d78a36a
@@ -6,7 +6,11 @@ module Pageflow
6
6
  module Lint
7
7
  # @api private
8
8
  module FileType
9
- def self.lint(name, create_file_type:, create_file:)
9
+ def self.lint(name,
10
+ create_file_type:,
11
+ create_file:,
12
+ create_prerequisite_file_types: -> { [] },
13
+ get_prerequisite_files: ->(_file) { [] })
10
14
  GlobalConfigApiTestHelper.setup
11
15
 
12
16
  RSpec.describe "file type #{name}", type: :helper do
@@ -14,10 +18,15 @@ module Pageflow
14
18
 
15
19
  let(:file, &create_file)
16
20
 
21
+ let(:prerequisite_file_types, &create_prerequisite_file_types)
22
+
17
23
  before do
18
24
  pageflow_configure do |config|
19
25
  page_type = TestPageType.new(name: 'test',
20
- file_types: [file_type])
26
+ file_types: [
27
+ *prerequisite_file_types,
28
+ file_type
29
+ ])
21
30
  config.page_types.clear
22
31
  config.page_types.register(page_type)
23
32
  end
@@ -58,6 +67,10 @@ module Pageflow
58
67
  create(:file_usage, file: file, revision: exported_entry.draft)
59
68
  user = create(:user, :manager, on: create(:account))
60
69
 
70
+ get_prerequisite_files.call(file).each do |prerequisite_file|
71
+ create(:file_usage, file: prerequisite_file, revision: exported_entry.draft)
72
+ end
73
+
61
74
  Dir.mktmpdir do |dir|
62
75
  archive_file_path = File.join(dir, 'export.zip')
63
76
  EntryExportImport.export(exported_entry, archive_file_path)
data/pageflow/lint.rb CHANGED
@@ -16,6 +16,12 @@ module Pageflow
16
16
  # @param create_file_type [#call] Proc creating the file type to test
17
17
  # @param create_file [#call] Proc creating a fixture file of the
18
18
  # file type
19
+ # @param create_prerequisite_file_types [#call] Proc returning
20
+ # array of additional file types to register.
21
+ # @param get_prerequisite_files [#call] Proc that takes the file
22
+ # returned by create_file and returns an array of files that
23
+ # shall be included in the exported revision during
24
+ # export/import test.
19
25
  #
20
26
  # @example
21
27
  #
data/pageflow/support.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'factory_bot'
2
+ require 'sassc-rails'
2
3
 
3
4
  require 'pageflow/dummy'
4
5
  require 'pageflow/dom'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.0.0.beta3
4
+ version: 15.0.0.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 15.0.0.beta3
19
+ version: 15.0.0.beta4
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.beta3
26
+ version: 15.0.0.beta4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mysql2
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '1.5'
167
+ - !ruby/object:Gem::Dependency
168
+ name: sassc-rails
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '1.0'
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '1.0'
167
181
  description:
168
182
  email:
169
183
  - info@codevise.de