forest_admin_rails 1.0.0.pre.beta.29 → 1.0.0.pre.beta.31

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: fff1fa0669889826394319667ff571db196c38daf08b8efdda0dde1570999a3f
4
- data.tar.gz: a4df5f135913a10286d399dd93b6bab9e23ffcf4eb997f0951ee0ab37d3f8bb6
3
+ metadata.gz: 3c48fb16e553146dbc82c41b491fab5943947f100ded57ae4d6285e933da09b0
4
+ data.tar.gz: 4431cacb0a248419c202774ff37a6fbfe5379639618e1bbf4e415134de88a6d9
5
5
  SHA512:
6
- metadata.gz: 6ca0249c794f7046b0f4b9f52a150b971e50826b40cc33a7153bdf0ddca793a5c8074e578669766c867badb709a5a87c2ed1646d63a307c00cfd7baabf654f41
7
- data.tar.gz: d1df17e20e71788c27f790e711d5ffa5f2a02471d4e8554b0a147fa3c01fbb8e8c934dc0a8a27bbc87c7c0c29502533a799f71e58223c21cdc5954610a89e906
6
+ metadata.gz: 7f6332865cd4a8be2c8a3c7639cb7c4224803c133178c510737a8e1072577f759c8f878ae3939aa393470a059e9b48d6bc67e49b7b1f9c1fdc1aba12ab37154a
7
+ data.tar.gz: 621e36ed19192f8bcdab536b30c650494cfad76efbad760e7e4ecf23c63cab94425a6886ad47dc3ba5bcf9e04ae726a627dd96e60ab96f37192b33ce0c92ca83
data/README.md CHANGED
@@ -25,4 +25,4 @@ $ gem install forest_admin
25
25
  Contribution directions go here.
26
26
 
27
27
  ## License
28
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
28
+ The gem is available as open source under the terms of the [GPL-3.0 License](https://www.gnu.org/licenses/gpl-3.0.en.html).
@@ -17,7 +17,15 @@ module ForestAdminRails
17
17
  end
18
18
 
19
19
  def forest_response(data = {})
20
- render json: data[:content], status: data[:status] || 200
20
+ if data.dig(:content, :type) == 'File'
21
+ return send_data data[:content][:stream], filename: data[:content][:name], type: data[:content][:mime_type],
22
+ disposition: 'attachment'
23
+ end
24
+
25
+ response.headers.merge!(data[:content][:headers] || {})
26
+ data[:content].delete(:headers)
27
+
28
+ render json: data[:content], head: headers, status: data[:status] || data[:content][:status] || 200
21
29
  end
22
30
 
23
31
  def exception_handler(exception)
@@ -1,3 +1,3 @@
1
1
  module ForestAdminRails
2
- VERSION = "1.0.0-beta.29"
2
+ VERSION = "1.0.0-beta.31"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.29
4
+ version: 1.0.0.pre.beta.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-01-24 00:00:00.000000000 Z
12
+ date: 2024-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dry-configurable
@@ -78,7 +78,7 @@ files:
78
78
  - lib/tasks/forest_admin_rails_tasks.rake
79
79
  homepage: https://www.forestadmin.com
80
80
  licenses:
81
- - MIT
81
+ - GPL-3.0
82
82
  metadata:
83
83
  homepage_uri: https://www.forestadmin.com
84
84
  source_code_uri: https://github.com/ForestAdmin/rails-forest_admin