From 530b09d4c232f8b9dcadb0e334b0da7ad1772193 Mon Sep 17 00:00:00 2001 From: Scott Sorensen Date: Thu, 5 Oct 2017 14:22:17 -0600 Subject: [PATCH 1/6] Bug fix for ruby 2.3.1 --- Gemfile | 2 +- HISTORY.md | 6 +++++- README.md | 1 + lib/saulabs/reportable/report_cache.rb | 2 +- reportable.gemspec | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index c4344ab..ffe8bec 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source "http://rubygems.org" -gem 'rails', '~> 4.1.0' +gem 'rails', '~> 5.0.1' gem 'protected_attributes' gem 'sqlite3' diff --git a/HISTORY.md b/HISTORY.md index 356e3cb..1acb820 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +v1.5.0 +------ +* Upgrade to ruby 2.3.1 + v1.4.2 ------ * Revert "Make ResultSet enumerable" @@ -6,7 +10,7 @@ v1.4.0 ------ * rename model_name to model_class_name for rails 4.2 compatibility - + to update, you must generate and run the migration bundle exec rails generate reportable_model_name_migration diff --git a/README.md b/README.md index 4bbc386..80ba821 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Reportable Reportable allows for the easy creation of reports based on `ActiveRecord` models. +octanner fork to support ruby 2.3.1 Usage ----- diff --git a/lib/saulabs/reportable/report_cache.rb b/lib/saulabs/reportable/report_cache.rb index 36bb5fc..012382f 100644 --- a/lib/saulabs/reportable/report_cache.rb +++ b/lib/saulabs/reportable/report_cache.rb @@ -86,7 +86,7 @@ def self.process(report, options, &block) def self.prepare_result(new_data, cached_data, report, options) new_data = new_data.to_a.map { |data| [ReportingPeriod.from_db_string(options[:grouping], data[0]), data[1]] } - cached_data.to_a.map! { |cached| [ReportingPeriod.new(options[:grouping], cached.reporting_period), cached.value] } + cached_data = cached_data.to_a.map { |cached| [ReportingPeriod.new(options[:grouping], cached.reporting_period), cached.value] } current_reporting_period = ReportingPeriod.new(options[:grouping]) reporting_period = get_first_reporting_period(options) result = [] diff --git a/reportable.gemspec b/reportable.gemspec index 07bff09..b3e0593 100644 --- a/reportable.gemspec +++ b/reportable.gemspec @@ -14,7 +14,7 @@ pkg_files += Dir['spec/**/*.{rb,yml,opts}'] Gem::Specification.new do |s| s.name = %q{reportable} - s.version = '1.4.2' + s.version = '1.5.0' s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to?(:required_rubygems_version=) s.authors = ['Marco Otte-Witte', 'Martin Kavalar'] From 3b60bb4471e8fbf055409f16540c42d05d71ea01 Mon Sep 17 00:00:00 2001 From: Scott Sorensen Date: Thu, 5 Oct 2017 14:27:19 -0600 Subject: [PATCH 2/6] change text to bold --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 80ba821..611fc8b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Reportable Reportable allows for the easy creation of reports based on `ActiveRecord` models. -octanner fork to support ruby 2.3.1 +**O.C.Tanner fork to support ruby 2.3.1** Usage ----- From 26345bebc01600fe803e515e6d4217c78748905d Mon Sep 17 00:00:00 2001 From: Scott Sorensen Date: Thu, 5 Oct 2017 15:23:14 -0600 Subject: [PATCH 3/6] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 611fc8b..a1f004b 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ Reportable Reportable allows for the easy creation of reports based on `ActiveRecord` models. -**O.C.Tanner fork to support ruby 2.3.1** - Usage ----- From c8dd77d8f1d0244bd88bc40a5d987a5ede0e37d7 Mon Sep 17 00:00:00 2001 From: Scott Sorensen Date: Fri, 6 Oct 2017 08:49:24 -0600 Subject: [PATCH 4/6] revert rails dependency back to 4.1.0 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index ffe8bec..c4344ab 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source "http://rubygems.org" -gem 'rails', '~> 5.0.1' +gem 'rails', '~> 4.1.0' gem 'protected_attributes' gem 'sqlite3' From c713be4b15702c58b01b24f0637689457bc16717 Mon Sep 17 00:00:00 2001 From: Scott Sorensen Date: Fri, 6 Oct 2017 08:50:11 -0600 Subject: [PATCH 5/6] Revert comments in readme (version isn't updating) --- HISTORY.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 1acb820..e33b2a9 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,7 +1,3 @@ -v1.5.0 ------- -* Upgrade to ruby 2.3.1 - v1.4.2 ------ * Revert "Make ResultSet enumerable" @@ -55,4 +51,4 @@ v1.0.1 v1.0.0 ------ -* Initial release of the new Reportable gem (formerly known as the ReportsAsSparkline plugin) \ No newline at end of file +* Initial release of the new Reportable gem (formerly known as the ReportsAsSparkline plugin) From e32ac3e8d2a48d75cfdef150cab5e4af143086fd Mon Sep 17 00:00:00 2001 From: Scott Sorensen Date: Fri, 6 Oct 2017 08:50:51 -0600 Subject: [PATCH 6/6] Reverting version back to 1.4.2 --- reportable.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reportable.gemspec b/reportable.gemspec index b3e0593..07bff09 100644 --- a/reportable.gemspec +++ b/reportable.gemspec @@ -14,7 +14,7 @@ pkg_files += Dir['spec/**/*.{rb,yml,opts}'] Gem::Specification.new do |s| s.name = %q{reportable} - s.version = '1.5.0' + s.version = '1.4.2' s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to?(:required_rubygems_version=) s.authors = ['Marco Otte-Witte', 'Martin Kavalar']