metrify 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,8 +15,8 @@ class InvalidMetric < ActiveRecord::Base
15
15
 
16
16
  class << self
17
17
  def element_a_count(start_date, end_date)
18
- return 204 if (start_date == (DATE_1-1) && end_date == DATE_1)
19
- return 23 if (start_date == (DATE_1-7) && end_date == DATE_1)
18
+ return 204 if (start_date == (DATE_1-1.day) && end_date == DATE_1)
19
+ return 23 if (start_date == (DATE_1-7.days) && end_date == DATE_1)
20
20
  5
21
21
  end
22
22
 
@@ -61,7 +61,7 @@ end
61
61
  describe "Metrify" do
62
62
 
63
63
  before(:each) do
64
-
64
+
65
65
  @site_stat = Metric.new
66
66
  end
67
67
 
@@ -74,7 +74,6 @@ describe "Metrify" do
74
74
  # lambda{@site_stat.historical_values(DATE_1, 1, :day)}.should raise_error(Metrify::MetrifyInclusionError)
75
75
  # end
76
76
 
77
- # TODO?
78
77
  it "should present a stat default display name when not specified in config" do
79
78
  @site_stat.element_c_count_name.should eql "Element C Count"
80
79
  end
@@ -119,19 +118,4 @@ describe "Metrify" do
119
118
  @site_stat.stat_names(filters).to_set.should eql Set.new ['element_a_count', 'element_b_count', 'element_c_count', 'element_1_count', 'element_2_count', 'element_3_count', 'element_4_count']
120
119
  end
121
120
 
122
-
123
- it "should return an object with stats for a designated date and range" do
124
-
125
- #@site_stat.find_stats_for(DATE_1, RANGE_1)
126
- #@site_stat.
127
- # def find_stats_for(end_date, days)
128
- # s = lookup(end_date, days)
129
- # s ||= generate(end_date, days)
130
- # end
131
- end
132
-
133
- # it "should return the evaluation of the class method for a stat value method" do
134
- # @site_stat.element_a_count.should eql 293
135
- # end
136
-
137
121
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metrify
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stephen Abrams
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-27 00:00:00 -04:00
18
+ date: 2010-11-11 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -49,6 +49,7 @@ files:
49
49
  - app/helpers/metrify_helper.rb
50
50
  - app/views/metrify/_chart.html.erb
51
51
  - app/views/metrify/_graph.html.erb
52
+ - app/views/metrify/_time_links.erb
52
53
  - lib/metrify.rb
53
54
  - spec/database.yml
54
55
  - spec/debug.log