kanaui 2.1.0 → 2.1.1

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
  SHA1:
3
- metadata.gz: c634cb242e7d9aef0a4bb937451a57c3f10f0c90
4
- data.tar.gz: '08e4e1e1419a230305488420fa8f2f8b69de57a4'
3
+ metadata.gz: b97ea14f934efc662bd48c78371bb3bbaf57a347
4
+ data.tar.gz: e3b86efa67ff817e61cd181654d92fa1ba1fad3d
5
5
  SHA512:
6
- metadata.gz: 4e4bd12458f02a2beeddd6b111e89460245bcc24c8d65be1debd3b261eb88dc55ce6a139e7e550e5110c59cc8d63b287805ec47d74ad803849560b97e55a2eb2
7
- data.tar.gz: a3d7284429507ddc4b465613407b30ccd3ed118f31b834a7db4846ff1a7b9b416e89f9526e5c2f38a4ee4ed28651f3b3d9d6fe4aa8121a9d2534b18cfe1ae68e
6
+ metadata.gz: 9bf5d0c1847d69ca090ea670cd9731ecaeac658bac5b5a2fd2cf7dea1a463a9fa138a5c32ffd8db01f5a69a3d50efedf1a492b4c9705cfe6bf13ab1e2831654f
7
+ data.tar.gz: 62cd8b7055b53dce95b8abfe0f309a7d4cd84cb9ed18da9bb700341c38191b743b80ae852feb2821954e2aae26675fbefec4192a72d41371de01e90e4f982774
@@ -67,7 +67,18 @@ module Kanaui
67
67
  else
68
68
  reports = raw_reports
69
69
  end
70
- render json: reports
70
+ respond_to do |fmt|
71
+ fmt.csv do
72
+ filename = params[:name]
73
+ unless params[:start_date].blank?
74
+ filename += "_#{params[:start_date]}"
75
+ filename += "-#{params[:end_date]}" unless params[:end_date].blank?
76
+ end
77
+ filename += '.csv'
78
+ send_data(raw_reports, filename: filename)
79
+ end
80
+ fmt.all { render json: reports }
81
+ end
71
82
  end
72
83
 
73
84
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kanaui
4
- VERSION = '2.1.0'
4
+ VERSION = '2.1.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanaui
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-24 00:00:00.000000000 Z
11
+ date: 2021-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: d3_rails
@@ -362,47 +362,47 @@ signing_key:
362
362
  specification_version: 4
363
363
  summary: Kill Bill Analytics UI mountable engine
364
364
  test_files:
365
- - test/test_helper.rb
366
- - test/integration/navigation_test.rb
367
- - test/fixtures/kanaui/dashboards.yml
368
- - test/dummy/script/rails
369
- - test/dummy/config.ru
365
+ - test/unit/helpers/kanaui/tests_helper_test.rb
366
+ - test/functional/kanaui/tests_controller_test.rb
367
+ - test/kanaui_test.rb
368
+ - test/dummy/bin/setup
369
+ - test/dummy/bin/rails
370
370
  - test/dummy/bin/yarn
371
371
  - test/dummy/bin/update
372
- - test/dummy/bin/rake
373
- - test/dummy/bin/setup
374
372
  - test/dummy/bin/bundle
375
- - test/dummy/bin/rails
373
+ - test/dummy/bin/rake
374
+ - test/dummy/README.rdoc
376
375
  - test/dummy/config/routes.rb
377
- - test/dummy/config/boot.rb
378
- - test/dummy/config/initializers/mime_types.rb
379
- - test/dummy/config/initializers/application_controller_renderer.rb
380
- - test/dummy/config/initializers/killbill_client.rb
381
- - test/dummy/config/initializers/assets.rb
382
- - test/dummy/config/initializers/session_store.rb
383
- - test/dummy/config/initializers/wrap_parameters.rb
376
+ - test/dummy/config/environment.rb
377
+ - test/dummy/config/locales/en.yml
378
+ - test/dummy/config/application.rb
379
+ - test/dummy/config/secrets.yml
384
380
  - test/dummy/config/initializers/secret_token.rb
381
+ - test/dummy/config/initializers/wrap_parameters.rb
385
382
  - test/dummy/config/initializers/filter_parameter_logging.rb
386
- - test/dummy/config/initializers/cookies_serializer.rb
383
+ - test/dummy/config/initializers/mime_types.rb
384
+ - test/dummy/config/initializers/inflections.rb
385
+ - test/dummy/config/initializers/session_store.rb
387
386
  - test/dummy/config/initializers/new_framework_defaults_5_1.rb
387
+ - test/dummy/config/initializers/assets.rb
388
388
  - test/dummy/config/initializers/backtrace_silencers.rb
389
- - test/dummy/config/initializers/inflections.rb
390
- - test/dummy/config/locales/en.yml
391
- - test/dummy/config/secrets.yml
392
- - test/dummy/config/environment.rb
393
- - test/dummy/config/environments/production.rb
389
+ - test/dummy/config/initializers/killbill_client.rb
390
+ - test/dummy/config/initializers/cookies_serializer.rb
391
+ - test/dummy/config/initializers/application_controller_renderer.rb
394
392
  - test/dummy/config/environments/development.rb
393
+ - test/dummy/config/environments/production.rb
395
394
  - test/dummy/config/environments/test.rb
396
- - test/dummy/config/application.rb
397
- - test/dummy/README.rdoc
398
- - test/dummy/Rakefile
399
- - test/dummy/public/favicon.ico
400
- - test/dummy/public/404.html
401
- - test/dummy/public/422.html
402
- - test/dummy/public/500.html
395
+ - test/dummy/config/boot.rb
403
396
  - test/dummy/app/controllers/application_controller.rb
404
- - test/dummy/app/helpers/application_helper.rb
405
397
  - test/dummy/app/assets/config/manifest.js
406
- - test/kanaui_test.rb
407
- - test/functional/kanaui/tests_controller_test.rb
408
- - test/unit/helpers/kanaui/tests_helper_test.rb
398
+ - test/dummy/app/helpers/application_helper.rb
399
+ - test/dummy/script/rails
400
+ - test/dummy/config.ru
401
+ - test/dummy/public/favicon.ico
402
+ - test/dummy/public/500.html
403
+ - test/dummy/public/422.html
404
+ - test/dummy/public/404.html
405
+ - test/dummy/Rakefile
406
+ - test/integration/navigation_test.rb
407
+ - test/test_helper.rb
408
+ - test/fixtures/kanaui/dashboards.yml