forest_admin_rails 1.0.0.pre.beta.47 → 1.0.0.pre.beta.48

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: 9098b82f74fcdf551b0036f545660a761cd87cadef7f25e9a449de1a34a425f2
4
- data.tar.gz: 39d641d336baa783b3b0d50ce25f11d64c93f07ccd0fc188d2f49e82ce878cd5
3
+ metadata.gz: 7cd8ef4c3bf64c07d76874bd52c19b12ac52532a16e67978b6fc0053bb746cf2
4
+ data.tar.gz: bdd776d4677a04f1d634fc51d787c180c34ef5e568b0bacb8ff9b0f2ee05fff4
5
5
  SHA512:
6
- metadata.gz: 9932e6634074a8fc67bcbe398f44ef880816c65c5b1dfdd4af924e7fce1527fd81ada5e0c82eaa4b03d73fc0e5fe7e3e2df2eb5307cc2fb7fb96c6399020526e
7
- data.tar.gz: ec208cc7ae039185234ad226f4584de6685ea58be880e925e5e71fef98cd65d6abfa93a157c271842e6acbf09f1a2cc394535125d69410d62f1b198744f3e70a
6
+ metadata.gz: 8e438d102cea49a4df22eb7906f201ad784ec67cf34351ca4ee99428ef1a399974462c5a92f61a11d300c1960333d8be0771a73cca7e8438bb28543084f90b06
7
+ data.tar.gz: f181f852157cb356981809319bd97aeaa6604cb8952a15800606782ef5a08183936a5b8da19ec96068232857cc25208bcac0976386a91c871aae08d59325ae07
@@ -25,7 +25,10 @@ module ForestAdminRails
25
25
  response.headers.merge!(data[:content][:headers] || {})
26
26
  data[:content].delete(:headers)
27
27
 
28
- render json: data[:content], head: headers, status: data[:status] || data[:content][:status] || 200
28
+ respond_to do |format|
29
+ format.json { render json: data[:content], status: data[:status] || data[:content][:status] || 200 }
30
+ format.csv { render plain: data[:content][:export], status: 200, filename: data[:filename] }
31
+ end
29
32
  end
30
33
 
31
34
  def exception_handler(exception)
data/config/routes.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  ForestAdminRails::Engine.routes.draw do
2
2
  Rails.error.handle(ForestAdminDatasourceToolkit::Exceptions::ForestException) do
3
3
  ForestAdminAgent::Http::Router.routes.each do |name, agent_route|
4
- match agent_route[:uri], to: 'forest#index', via: agent_route[:method], as: name, route_alias: name
4
+ match agent_route[:uri], defaults: { format: agent_route[:format] }, to: 'forest#index',
5
+ via: agent_route[:method], as: name, route_alias: name
5
6
  end
6
7
  end
7
8
  end
@@ -1,3 +1,3 @@
1
1
  module ForestAdminRails
2
- VERSION = "1.0.0-beta.47"
2
+ VERSION = "1.0.0-beta.48"
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.47
4
+ version: 1.0.0.pre.beta.48
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-05-22 00:00:00.000000000 Z
12
+ date: 2024-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dry-configurable
@@ -64,7 +64,6 @@ extensions: []
64
64
  extra_rdoc_files: []
65
65
  files:
66
66
  - LICENSE
67
- - README.md
68
67
  - Rakefile
69
68
  - app/controllers/forest_admin_rails/forest_controller.rb
70
69
  - app/helpers/forest_admin_rails/application_helper.rb
@@ -82,8 +81,8 @@ licenses:
82
81
  - GPL-3.0
83
82
  metadata:
84
83
  homepage_uri: https://www.forestadmin.com
85
- source_code_uri: https://github.com/ForestAdmin/rails-forest_admin
86
- changelog_uri: https://github.com/ForestAdmin/rails-forest_admin/CHANGELOG.md
84
+ source_code_uri: https://github.com/ForestAdmin/agent-ruby
85
+ changelog_uri: https://github.com/ForestAdmin/agent-ruby/blob/main/CHANGELOG.md
87
86
  rubygems_mfa_required: 'false'
88
87
  post_install_message:
89
88
  rdoc_options: []
data/README.md DELETED
@@ -1,28 +0,0 @@
1
- # ForestAdmin
2
- Short description and motivation.
3
-
4
- ## Usage
5
- How to use my plugin.
6
-
7
- ## Installation
8
- Add this line to your application's Gemfile:
9
-
10
- ```ruby
11
- gem "forest_admin"
12
- ```
13
-
14
- And then execute:
15
- ```bash
16
- $ bundle
17
- ```
18
-
19
- Or install it yourself as:
20
- ```bash
21
- $ gem install forest_admin
22
- ```
23
-
24
- ## Contributing
25
- Contribution directions go here.
26
-
27
- ## License
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).