pageflow-support 15.3.0 → 15.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pageflow/dummy/app.rb +3 -1
- data/pageflow/dummy/exit_on_failure_patch.rb +25 -0
- data/pageflow/support/config/paperclip.rb +12 -4
- 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: ff6e2a042c492b5d356ab03b25507bee3ef47042a3b22f6509b1634cd2363302
|
4
|
+
data.tar.gz: 1e50597d286d416c70c0b5b2cf2e79b7fc2a060dc06d46139324d56ab7d1924b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 973979be6e1ca5dfb259083919c52494b4f59d711367bba48cfed2926744aabc8b978d5a8b91a8a2e61dda446eef8699866122edf01dcc7e284c7f221fe23dd9
|
7
|
+
data.tar.gz: 3a109fa870dc91d1267fb8e88c0887def41b5b7336043d82ab2b31a96bde1ad34279c427c01dff37989d8f72cdfcf5e3d992235225b308f6c993dc40cf565df2
|
data/pageflow/dummy/app.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'pageflow/version'
|
2
|
+
require 'pageflow/dummy/exit_on_failure_patch'
|
2
3
|
|
3
4
|
module Pageflow
|
4
5
|
module Dummy
|
@@ -10,7 +11,8 @@ module Pageflow
|
|
10
11
|
puts("Dummy directory #{directory} exists.")
|
11
12
|
else
|
12
13
|
system("bundle exec rails new #{directory} " \
|
13
|
-
"--template #{template_path} #{rails_new_options}")
|
14
|
+
"--template #{template_path} #{rails_new_options}") ||
|
15
|
+
raise('Error generating dummy app.')
|
14
16
|
end
|
15
17
|
|
16
18
|
require(File.join(ENV['RAILS_ROOT'], 'config', 'environment'))
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
# Thor exits with 0, when an error occurs. This behavior is deprecated
|
4
|
+
# in 1.0 [1], but has not yet changed. As a result the dummy app
|
5
|
+
# generation is not aborted and tests fail due to confusing follow up
|
6
|
+
# errors. Rails provides an `abort_on_failure` option for `rake` and
|
7
|
+
# `generate` actions [2], but it needs to be added to each such
|
8
|
+
# action. In particular, generating the dummy app invokes other
|
9
|
+
# generators, which we do not have control over.
|
10
|
+
#
|
11
|
+
# To work around this problem, we override the default behavior for
|
12
|
+
# all generators and make them fail loudly.
|
13
|
+
#
|
14
|
+
# [1] https://github.com/erikhuda/thor/blob/master/CHANGELOG.md#100
|
15
|
+
# [2] https://github.com/rails/rails/pull/34420/
|
16
|
+
|
17
|
+
module Rails
|
18
|
+
module Generators
|
19
|
+
class Base
|
20
|
+
def self.exit_on_failure?
|
21
|
+
true
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,13 +1,21 @@
|
|
1
1
|
RSpec.configure do |config|
|
2
|
-
config.before(:
|
2
|
+
config.before(:all) do
|
3
3
|
Dir.glob(Rails.root.join('public', 'system', 's3', '*')).each do |f|
|
4
4
|
FileUtils.rm_r(f)
|
5
5
|
end
|
6
6
|
end
|
7
7
|
|
8
|
-
config.
|
9
|
-
|
10
|
-
|
8
|
+
config.after(:each, unstub_paperclip: true) do
|
9
|
+
Dir.glob(Rails.root.join('public', 'system', 's3', '*')).each do |f|
|
10
|
+
FileUtils.rm_r(f)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
config.before(:each) do |example|
|
15
|
+
unless example.metadata[:unstub_paperclip] || example.metadata[:js]
|
16
|
+
allow_any_instance_of(Paperclip::Attachment).to receive(:post_process)
|
17
|
+
allow(Paperclip).to receive(:run).and_return('100x100')
|
18
|
+
end
|
11
19
|
end
|
12
20
|
end
|
13
21
|
|
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.
|
4
|
+
version: 15.4.0
|
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:
|
11
|
+
date: 2021-01-08 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.
|
19
|
+
version: 15.4.0
|
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.
|
26
|
+
version: 15.4.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mysql2
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -201,6 +201,7 @@ files:
|
|
201
201
|
- pageflow/dummy.rb
|
202
202
|
- pageflow/dummy/app.rb
|
203
203
|
- pageflow/dummy/config/pageflow.rb
|
204
|
+
- pageflow/dummy/exit_on_failure_patch.rb
|
204
205
|
- pageflow/dummy/rails_template.rb
|
205
206
|
- pageflow/dummy/templates/add_custom_fields.rb
|
206
207
|
- pageflow/dummy/templates/create_test_multi_attachment_file.rb
|