Introduction
Introduction Statistics Contact Development Disclaimer Help
Merge pull request #11 from shemerey/develop - reportable - Fork of reportable …
Log
Files
Refs
README
---
commit baa264091414b2ddd9642a806f22d04649388926
parent b3515762b5d6869636a8fbbf86505cd486ca663b
Author: Dieter Komendera <[email protected]>
Date: Tue, 31 Jan 2012 07:56:36 -0800
Merge pull request #11 from shemerey/develop
fixes for compatibility with 1.9.x
Diffstat:
M lib/saulabs/reportable/report_cach… | 8 ++++----
M spec/classes/cumulated_report_spec… | 2 +-
M spec/classes/grouping_spec.rb | 2 +-
M spec/classes/report_cache_spec.rb | 2 +-
M spec/classes/report_spec.rb | 2 +-
M spec/classes/reporting_period_spec… | 2 +-
M spec/db/database.yml | 5 ++---
M spec/other/report_method_spec.rb | 2 +-
M spec/other/report_tag_helper_spec.… | 2 +-
9 files changed, 13 insertions(+), 14 deletions(-)
---
diff --git a/lib/saulabs/reportable/report_cache.rb b/lib/saulabs/reportable/re…
@@ -115,13 +115,13 @@ module Saulabs
:value => value
)
end
-
+
def self.serialize_conditions(conditions)
- if conditions.is_a?(Array)
+ if conditions.is_a?(Array) && conditions.any?
conditions.join
- elsif conditions.is_a?(Hash)
+ elsif conditions.is_a?(Hash) && conditions.any?
conditions.map.sort{|x,y|x.to_s<=>y.to_s}.flatten.join
- else
+ else
conditions.to_s
end
end
diff --git a/spec/classes/cumulated_report_spec.rb b/spec/classes/cumulated_rep…
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
+require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))),'spec…
describe Saulabs::Reportable::CumulatedReport do
diff --git a/spec/classes/grouping_spec.rb b/spec/classes/grouping_spec.rb
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
+require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))),'spec…
describe Saulabs::Reportable::Grouping do
diff --git a/spec/classes/report_cache_spec.rb b/spec/classes/report_cache_spec…
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
+require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))),'spec…
describe Saulabs::Reportable::ReportCache do
diff --git a/spec/classes/report_spec.rb b/spec/classes/report_spec.rb
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
+require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))),'spec…
describe Saulabs::Reportable::Report do
diff --git a/spec/classes/reporting_period_spec.rb b/spec/classes/reporting_per…
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
+require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))),'spec…
describe Saulabs::Reportable::ReportingPeriod do
diff --git a/spec/db/database.yml b/spec/db/database.yml
@@ -1,6 +1,6 @@
sqlite3:
adapter: sqlite3
- database: spec/db/reportable.sqlite3.db
+ database: ":memory:"
mysql:
adapter: mysql
database: reportable_test
@@ -12,4 +12,4 @@ postgresql:
database: reportable_test
username: reportable
password: reportable
- host: localhost
-\ No newline at end of file
+ host: localhost
diff --git a/spec/other/report_method_spec.rb b/spec/other/report_method_spec.rb
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
+require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))),'spec…
describe Saulabs::Reportable do
diff --git a/spec/other/report_tag_helper_spec.rb b/spec/other/report_tag_helpe…
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
+require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))),'spec…
describe Saulabs::Reportable::ReportTagHelper do
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.