Introduction
Introduction Statistics Contact Development Disclaimer Help
minor fixes - reportable - Fork of reportable required by WarVox, from hdm/repo…
Log
Files
Refs
README
---
commit 5fdb546b7974b9d166ff4e19bea82e7f3194287c
parent 2779f214514f20de3c3d995f230e3155bd69740b
Author: Marco Otte-Witte <[email protected]>
Date: Wed, 24 Feb 2010 21:51:39 +0100
minor fixes
Diffstat:
M Rakefile | 15 +++------------
M lib/saulabs/reportable.rb | 2 +-
M lib/saulabs/reportable/grouping.rb | 4 ++--
M lib/saulabs/reportable/report.rb | 2 +-
M lib/saulabs/reportable/report_cach… | 4 ++--
M lib/saulabs/reportable/reporting_p… | 20 ++++++++++----------
M lib/saulabs/reportable/sparkline_t… | 2 +-
7 files changed, 20 insertions(+), 29 deletions(-)
---
diff --git a/Rakefile b/Rakefile
@@ -5,20 +5,11 @@ require 'spec/rake/spectask'
desc 'Default: run specs.'
task :default => :spec
-desc 'Run the specs on the CI server.'
-Spec::Rake::SpecTask.new(:ci) do |t|
- t.spec_opts << '--format=specdoc'
- t.spec_files = FileList['spec/**/*_spec.rb']
-end
-
desc 'Run the specs'
Spec::Rake::SpecTask.new(:spec) do |t|
- t.spec_opts << '--color'
- t.spec_opts << '--format=html:doc/spec.html'
- t.spec_opts << '--format=specdoc'
- t.rcov = true
- t.rcov_opts << '--exclude "gems/*,spec/*,init.rb"'
- t.rcov_dir = 'doc/coverage'
+ t.rcov_opts << '--exclude "gems/*,spec/*,init.rb"'
+ t.rcov = true
+ t.rcov_dir = 'doc/coverage'
t.spec_files = FileList['spec/**/*_spec.rb']
end
diff --git a/lib/saulabs/reportable.rb b/lib/saulabs/reportable.rb
@@ -2,7 +2,7 @@ module Saulabs
module Reportable
- # Includes the {Saulabs::Reportable.reportable} method into +base+.
+ # Extends the {Saulabs::Reportable::ClassMethods#reportable} method into +…
#
def self.included(base)
base.extend ClassMethods
diff --git a/lib/saulabs/reportable/grouping.rb b/lib/saulabs/reportable/groupi…
@@ -18,7 +18,7 @@ module Saulabs
# Gets the identifier of the grouping.
#
- # @returns [Symbol]
+ # @return [Symbol]
# the identifier of the grouping.
#
def identifier
@@ -30,7 +30,7 @@ module Saulabs
# @param [String] db_string
# the DB string to get the date parts from
#
- # @returns [Array<Fixnum>]
+ # @return [Array<Fixnum>]
# array of numbers that represent the values of the date
#
def date_parts_from_db_string(db_string)
diff --git a/lib/saulabs/reportable/report.rb b/lib/saulabs/reportable/report.rb
@@ -90,7 +90,7 @@ module Saulabs
# @option options [DateTime, Boolean] :end_date (false)
# when specified, the report will only include data for the +:limit+ r…
#
- # @returns [Array<Array<DateTime, Float>>]
+ # @return [Array<Array<DateTime, Float>>]
# the result of the report as pairs of {DateTime}s and {Float}s
#
def run(options = {})
diff --git a/lib/saulabs/reportable/report_cache.rb b/lib/saulabs/reportable/re…
@@ -2,7 +2,7 @@ module Saulabs
module Reportable
- # The +ReportCache+ class is a regular {ActiveRecord} model and represents…
+ # The +ReportCache+ class is a regular +ActiveRecord+ model and represents…
# +ReportCache+ instances are identified by the combination of +model_name…
#
class ReportCache < ActiveRecord::Base
@@ -51,7 +51,7 @@ module Saulabs
# @option options [DateTime, Boolean] :end_date (false)
# when specified, the report will only include data for the +:limit+ r…
#
- # @returns [Array<Array<DateTime, Float>>]
+ # @return [Array<Array<DateTime, Float>>]
# the result of the report as pairs of {DateTime}s and {Float}s
#
def self.process(report, options, &block)
diff --git a/lib/saulabs/reportable/reporting_period.rb b/lib/saulabs/reportabl…
@@ -6,7 +6,7 @@ module Saulabs
#
class ReportingPeriod
- # The actual {DateTime} the reporting period represents
+ # The actual +DateTime the reporting period represents
#
attr_reader :date_time
@@ -19,7 +19,7 @@ module Saulabs
# @param [Saulabs::Reportable::Grouping] grouping
# the grouping the generate the reporting period for
# @param [DateTime] date_time
- # the {DateTime} to generate the reporting period for
+ # the +DateTime+ to generate the reporting period for
#
def initialize(grouping, date_time = nil)
@grouping = grouping
@@ -31,7 +31,7 @@ module Saulabs
# @param [Fixnum] offset
# the offset to get the reporting period for
#
- # @returns [Saulabs::Reportable::ReportingPeriod]
+ # @return [Saulabs::Reportable::ReportingPeriod]
# the reporting period relative by offset to the current one
#
# @example Getting the reporting period one week later
@@ -52,7 +52,7 @@ module Saulabs
# @param [DateTime] end_date
# the end date to get the first reporting period for (the first report…
#
- # @returns [Saulabs::Reportable::ReportingPeriod]
+ # @return [Saulabs::Reportable::ReportingPeriod]
# the first reporting period for the grouping, limit and optionally en…
#
def self.first(grouping, limit, end_date = nil)
@@ -66,7 +66,7 @@ module Saulabs
# @param [String] db_string
# the DB string to parse and get the reporting period for
#
- # @returns [Saulabs::Reportable::ReportingPeriod]
+ # @return [Saulabs::Reportable::ReportingPeriod]
# the reporting period for the {Saulabs::Reportable::Grouping} as pars…
#
def self.from_db_string(grouping, db_string)
@@ -86,7 +86,7 @@ module Saulabs
# Gets the next reporting period.
#
- # @returns [Saulabs::Reportable::ReportingPeriod]
+ # @return [Saulabs::Reportable::ReportingPeriod]
# the reporting period after the current one
#
def next
@@ -95,7 +95,7 @@ module Saulabs
# Gets the previous reporting period.
#
- # @returns [Saulabs::Reportable::ReportingPeriod]
+ # @return [Saulabs::Reportable::ReportingPeriod]
# the reporting period before the current one
#
def previous
@@ -107,7 +107,7 @@ module Saulabs
# @param [Saulabs::Reportable::ReportingPeriod] other
# the reporting period to check for whether it is equal to the current…
#
- # @returns [Boolean]
+ # @return [Boolean]
# true if +other+ is equal to the current reporting period, false othe…
#
def ==(other)
@@ -125,7 +125,7 @@ module Saulabs
# @param [Saulabs::Reportable::ReportingPeriod] other
# the reporting period to check for whether it is smaller to the curre…
#
- # @returns [Boolean]
+ # @return [Boolean]
# true if +other+ is smaller to the current reporting period, false ot…
#
def <(other)
@@ -141,7 +141,7 @@ module Saulabs
# Gets the latest point in time that is included the reporting period. T…
# for grouping hour would be that hour and 59 minutes and 59 seconds.
#
- # @returns [DateTime]
+ # @return [DateTime]
# the latest point in time that is included in the reporting period
#
def last_date_time
diff --git a/lib/saulabs/reportable/sparkline_tag_helper.rb b/lib/saulabs/repor…
@@ -26,7 +26,7 @@ module Saulabs
# @option options [String] :title ('')
# the title attribute for the generated image
#
- # @returns [String]
+ # @return [String]
# an image tag showing a sparkline for the passed +data+
#
# @example Rendering a sparkline tag for report data
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.