forest_admin_rails 1.0.0.pre.beta.46 → 1.0.0.pre.beta.48

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: d4ee344821fe2af7186c5d18b1a7ab549ff04ae9a04f6db9189bc8345323603b
4
- data.tar.gz: 2f8161ee52c197b15a682c63662162602c3c5995c6342a3daa231b3181fb5302
3
+ metadata.gz: 7cd8ef4c3bf64c07d76874bd52c19b12ac52532a16e67978b6fc0053bb746cf2
4
+ data.tar.gz: bdd776d4677a04f1d634fc51d787c180c34ef5e568b0bacb8ff9b0f2ee05fff4
5
5
  SHA512:
6
- metadata.gz: 2c9d3b56548934619019e192486b0f8ca7fb9facb16810075bf57395b7bece1cbfe97d12d0306e6af88855849f287f12739389a26e5d1f2d2f4a841faa6a4658
7
- data.tar.gz: 48e506d506ace9fb049d5bfc6a4cd8b3fffdca57577b13ed810f073db1ddd467b38b3e0fbaf171b98d8211c6c252de670341ec6fba81c82299db35164db48bfd
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.46"
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.46
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-15 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).