clark_kent 0.9.8 → 0.9.9

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: f1f4f325e1b791ad59ac1a5fb88bc506068373c3
4
- data.tar.gz: a6a7aea21de271c4ce4f607028b134bc182a7605
3
+ metadata.gz: 891318c6af29ae0c9bdb151d429053a54576e557
4
+ data.tar.gz: b6d05cb1bf8a5e1c1c551cc27ddda83dd000f85b
5
5
  SHA512:
6
- metadata.gz: 4ed24a2720c4621898dc945579d2fc7d2bb2ecf6e10f5a85f22042a1cff060610e9dc0e62f6dfbc77ce6e04d9d823a8a8885a4968d14b4b04ece48a1cb9168ca
7
- data.tar.gz: 8e75f3efd9c1264409dc2f265c8fdabb92e3e28fe0f49a8ddc029c6446eb6a39f2413fdb58471563fc6eb3dd3a2ce2a59dfbeaed2e948aa484200aa326b3ec8d
6
+ metadata.gz: 296f80f982ccc0948cb679ce630d42474c74e007ac3b84f39239e6d94b10760dda476d3386559275efa372ec6088caed44ea6279143c39ae4c0b0b20b3074cfd
7
+ data.tar.gz: dcc55a7d3b67db0463a16ef2dfe5739a08182147b3cfaedc6abe262de8c903c12a53c9d3dab850e62ed1d9b924e1019f9f372ddce05f9929a666e5e4fdc2f937
@@ -31,13 +31,7 @@ class ClarkKent::ReportsController < ClarkKent::ApplicationController
31
31
  else
32
32
  prepare_params(params.permit!) if defined? prepare_params
33
33
  if params[:run_report].present?
34
- @these_params.each do |k,v|
35
- if @report.date_filter_names.detect{|fn|
36
- @report.filter_options_for(fn).filter_params.include? k.to_s
37
- }.present?
38
- @these_params[k] = parse_date(v)
39
- end
40
- end
34
+ parse_date_filters
41
35
  @these_params[:page] = params[:page]
42
36
  @these_params[:per] = @report.resource_class.default_per_page
43
37
  begin
@@ -54,8 +48,9 @@ class ClarkKent::ReportsController < ClarkKent::ApplicationController
54
48
 
55
49
  def download_link
56
50
  @report = ClarkKent::Report.where(id: params[:id]).first
57
- prepare_params if defined? prepare_params
51
+ prepare_params(params.permit!) if defined? prepare_params
58
52
  @report_result_name = "report-#{@report.id}-#{Time.now.to_formatted_s(:number)}"
53
+ parse_date_filters if params[:run_report].present?
59
54
  @these_params[:report_result_name] = @report_result_name
60
55
  ConeyIsland.submit(ClarkKent::Report,
61
56
  :send_report_to_s3,
@@ -128,4 +123,13 @@ class ClarkKent::ReportsController < ClarkKent::ApplicationController
128
123
  year
129
124
  end
130
125
 
126
+ def parse_date_filters
127
+ @these_params.each do |k,v|
128
+ if @report.date_filter_names.detect{|fn|
129
+ @report.filter_options_for(fn).filter_params.include? k.to_s
130
+ }.present?
131
+ @these_params[k] = parse_date(v)
132
+ end
133
+ end
134
+ end
131
135
  end
@@ -1,3 +1,3 @@
1
1
  module ClarkKent
2
- VERSION = "0.9.8"
2
+ VERSION = "0.9.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clark_kent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-08 00:00:00.000000000 Z
11
+ date: 2018-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails