forest_admin_rails 1.0.0.pre.beta.29 → 1.0.0.pre.beta.30

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: d7c66b5faa3f932f6ec8d9953b02a7911691628792bf93c66a915d7bb2671a3c
4
+ data.tar.gz: ce858db5053d5de4d40423ebedebbe293abb199687ab69de0efc9422b0ec9bb6
5
5
  SHA512:
6
- metadata.gz: 6ca0249c794f7046b0f4b9f52a150b971e50826b40cc33a7153bdf0ddca793a5c8074e578669766c867badb709a5a87c2ed1646d63a307c00cfd7baabf654f41
7
- data.tar.gz: d1df17e20e71788c27f790e711d5ffa5f2a02471d4e8554b0a147fa3c01fbb8e8c934dc0a8a27bbc87c7c0c29502533a799f71e58223c21cdc5954610a89e906
6
+ metadata.gz: da74b575e55867cf2c340c68c1d7f4265a34fb13b028b501d548e924da5d0c70af171d96c1a9e377efe4305fd46abbf1e2edcef82ead19b7ca2fd97f836f38f9
7
+ data.tar.gz: 660b05301465c7f108a7a81ee72b4745fedbb436f73db7905693caf8e3c807bc1a03a119ce2279b8ce72b8cc3ff7314875d3a1e8dcac6e8dbc50f94685770597
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.30"
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.30
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-13 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