dscf-banking 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb3d7fb4e0cee09c487b773f62c5fd87ac8a70f36a6ab19fd35478a11caf5b89
4
- data.tar.gz: 2abfdc7273bde34ed021ac7111d42bb16c7ad796874d3007dd941b10c76a1aa0
3
+ metadata.gz: af9cf7825df29b9ee3c8fd34d588ff6794d01da578a6d1edab25ed0d3f95109b
4
+ data.tar.gz: 7e60e0b55cc74d933bfee965d7ba30e59058962a99ed739c59476cf112765c2a
5
5
  SHA512:
6
- metadata.gz: 24266cf3117b88ad84bd18067fe015025f14680d782b8d1f46b0e9b1af5683844474d49e6e4a3bd06e3b19033ff210d52a810e605ad85a4351ad0eea09ece1d9
7
- data.tar.gz: 5dcf5ed06d580fdf6166298d0bb63a656e21aaee29e5be1fbc10dbf51f035d094208fa215b99b511d5739acb859e38ed95b510f399ee91aa0ba0cb6fdb97f40b
6
+ metadata.gz: 8789c6b6649f347c0afa7a52e2b486578d9c9b823c9267891d835d70055bb08a5123cc52d35a6f8a291fa00c214d284ec1d1da81d2c6451a1c4bc310dcf0d452
7
+ data.tar.gz: f05eaba3272cd1a0383cc5f1dc81bb2cf9b5a1fde77f73b548d742ecbfd837c168e89b8d9f8f96ae7be604cc2cae1715934bed6521e4e31f53824fef3612fa08
@@ -4,9 +4,15 @@ module Dscf::Banking
4
4
 
5
5
  def file_urls
6
6
  return [] unless object.files.attached?
7
-
8
- object.files.map do |file|
9
- Rails.application.routes.url_helpers.rails_blob_path(file, only_path: true)
7
+
8
+ if Rails.env.production?
9
+ ActiveStorage::Current.set(url_options: { host: "dscf.bitscollege.edu.et", protocol: "https" }) do
10
+ object.files.map(&:url)
11
+ end
12
+ else
13
+ ActiveStorage::Current.set(url_options: { host: "localhost:3000", protocol: "http" }) do
14
+ object.files.map(&:url)
15
+ end
10
16
  end
11
17
  rescue StandardError
12
18
  []
@@ -1,5 +1,5 @@
1
1
  module Dscf
2
2
  module Banking
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dscf-banking
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eyosiyas Mekbib
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-10-16 00:00:00.000000000 Z
10
+ date: 2025-10-17 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails