old_sql 1.30.0 → 1.31.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -140,6 +140,7 @@ module OldSql
|
|
140
140
|
def _reports
|
141
141
|
template = File.read("#{Rails.root}/config/old_sql/reports.yml")
|
142
142
|
@reports = YAML.load(Erubis::Eruby.new(template).result)
|
143
|
+
@reports = {} if @reports.nil? || @reports == false
|
143
144
|
end
|
144
145
|
|
145
146
|
def load_base_processor
|
@@ -183,7 +184,6 @@ module OldSql
|
|
183
184
|
|
184
185
|
def query_fields
|
185
186
|
fields = load_base_processor.fields(@reports[@report_name],@start_date,@end_date,query_vars(@report_name),@query,@db)
|
186
|
-
logger.info "FIELDS #{fields}"
|
187
187
|
fields
|
188
188
|
end
|
189
189
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="report-form-input">
|
5
5
|
<select name="report" id="report"
|
6
6
|
onchange="report_selected()">
|
7
|
-
<option></option>
|
7
|
+
<option></option>
|
8
8
|
<% @reports.each do |report, data| %>
|
9
9
|
<option value="<%= data['name'] %>" report_sql="<%= data['report_sql'] %>"
|
10
10
|
desc="<%= data['description'] %>" name="<%=report%>"
|
@@ -6,17 +6,14 @@ module OldSql
|
|
6
6
|
desc "Old SQL Install"
|
7
7
|
|
8
8
|
def check_for_devise
|
9
|
-
puts "Old SQL works with devise
|
9
|
+
puts "Old SQL works with devise. Checking for a current installation of devise!\n"
|
10
10
|
|
11
11
|
if defined?(Devise)
|
12
12
|
check_for_devise_models
|
13
13
|
else
|
14
|
-
puts "Please put gem 'devise'
|
14
|
+
puts "Please put gem 'devise' into your Gemfile"
|
15
15
|
end
|
16
16
|
|
17
|
-
puts "Please put gem 'cancan' into your Gemfile" unless defined?(Cancan)
|
18
|
-
puts "Please put gem 'sanitize' into your Gemfile" unless defined?(Sanitize)
|
19
|
-
|
20
17
|
puts "Also you need a new migration. We'll generate it for you now."
|
21
18
|
invoke 'old_sql:install_migrations'
|
22
19
|
end
|
@@ -15,6 +15,7 @@ module OldSql
|
|
15
15
|
ROUND_PRECISION = OldSql.rounding_precision
|
16
16
|
|
17
17
|
def execute_query(report_config, start_date, end_date, query_vars = nil, sql_query = nil, db_class = nil)
|
18
|
+
Rails.logger.info "debug 1"
|
18
19
|
execute(report_config, start_date, end_date, query_vars, sql_query, db_class)
|
19
20
|
|
20
21
|
return nil if @rec.nil?
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: old_sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.
|
5
|
+
version: 1.31.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Eddie Gonzales
|
@@ -198,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
198
|
requirements:
|
199
199
|
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
hash: -
|
201
|
+
hash: -2031933056678451368
|
202
202
|
segments:
|
203
203
|
- 0
|
204
204
|
version: "0"
|