pg_rails 7.5.6 → 7.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pg_engine/app/controllers/admin/user_accounts_controller.rb +2 -0
- data/pg_engine/app/controllers/pg_engine/base_public_controller.rb +2 -0
- data/pg_engine/app/views/admin/accounts/show.html.slim +2 -0
- data/pg_engine/config/routes.rb +3 -1
- data/pg_engine/lib/pg_engine/engine.rb +8 -0
- data/pg_engine/spec/requests/active_storage_spec.rb +16 -0
- data/pg_rails/lib/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d700901741523887ccac3c92bc1e266a4ec57f1cf2794865aa2c1bc4a30a5ae2
|
4
|
+
data.tar.gz: e8e55331eb22f7168d483ce8e1eec5965b23cec8f8421bfbe4ff58e870d874af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63ea0b3be1e39bcdc8436269b539945000b11e6f40f03e69eb3f5e897bf1ba1ca45a5a054d13c0e3f37c5fd5eb878d91b092b31174a796012b5a8b87ccd0e625
|
7
|
+
data.tar.gz: c6808a080fe3a4dc2769bf35ac29662f4875229d323c31f793481c3460b44d41a8984010f328a4a380d842f2aa3e5ddbeaed9853ce5013b4913cf53516dc848d
|
data/pg_engine/config/routes.rb
CHANGED
@@ -19,6 +19,14 @@ module PgEngine
|
|
19
19
|
Dir.glob("#{overrides}/**/*.rb").each do |override|
|
20
20
|
load override
|
21
21
|
end
|
22
|
+
|
23
|
+
ActiveStorage::BaseController.class_eval do
|
24
|
+
around_action :set_without_tenant
|
25
|
+
|
26
|
+
def set_without_tenant(&)
|
27
|
+
ActsAsTenant.without_tenant(&)
|
28
|
+
end
|
29
|
+
end
|
22
30
|
end
|
23
31
|
|
24
32
|
initializer 'pg_engine.set_exceptions_app' do
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
describe 'representations controller' do
|
4
|
+
let(:file) { File.open("#{PgEngine::Engine.root}/spec/fixtures/test.pdf") }
|
5
|
+
|
6
|
+
it do
|
7
|
+
categoria = create :categoria_de_cosa
|
8
|
+
categoria.file.attach(io: file, filename: 'test.pdf')
|
9
|
+
path = polymorphic_url(categoria.file.preview(:thumb), only_path: true)
|
10
|
+
expect(path).to start_with '/rails/active_storage/representations/redirect/'
|
11
|
+
get path
|
12
|
+
ActiveStorage::Current.url_options = { host: 'www.example.com' }
|
13
|
+
expect(response).to have_http_status(:redirect)
|
14
|
+
expect(response.headers['location']).to include '/rails/active_storage/disk/'
|
15
|
+
end
|
16
|
+
end
|
data/pg_rails/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.5.
|
4
|
+
version: 7.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -875,6 +875,7 @@ files:
|
|
875
875
|
- pg_engine/spec/models/user_spec.rb
|
876
876
|
- pg_engine/spec/overrides/audited_audit_spec.rb
|
877
877
|
- pg_engine/spec/pg_engine/pdf_preview_generator_spec.rb
|
878
|
+
- pg_engine/spec/requests/active_storage_spec.rb
|
878
879
|
- pg_engine/spec/requests/admin/eventos_spec.rb
|
879
880
|
- pg_engine/spec/requests/base_controller_requests_spec.rb
|
880
881
|
- pg_engine/spec/requests/current_attributes_spec.rb
|