tabs 0.6.2 → 0.6.3
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.
- data/README.md +7 -7
- data/lib/tabs/version.rb +1 -1
- data/tabs.gemspec +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -9,7 +9,7 @@ averages, and min/max, and task based stats sliceable by the minute, hour, day,
|
|
9
9
|
|
10
10
|
Add this line to your application's Gemfile:
|
11
11
|
|
12
|
-
gem 'tabs', '~> 0.6.
|
12
|
+
gem 'tabs', '~> 0.6.3'
|
13
13
|
|
14
14
|
And then execute:
|
15
15
|
|
@@ -21,10 +21,10 @@ Or install it yourself as:
|
|
21
21
|
|
22
22
|
## Breaking Changes in v0.6.0
|
23
23
|
|
24
|
-
Please note that when the library version went from
|
24
|
+
Please note that when the library version went from v0.5.6 to v0.6.0 some of
|
25
25
|
the key patterns used to store metrics in Redis were changed. If you upgrade
|
26
|
-
an app to
|
27
|
-
Please
|
26
|
+
an app to v0.6.0 the previous set of data will not be picked up by tabs.
|
27
|
+
Please use v0.6.x on new applications only. However, the 'Task' metric
|
28
28
|
type will only be available in v0.6.0 and above.
|
29
29
|
|
30
30
|
## Usage
|
@@ -51,7 +51,7 @@ Tabs.increment_counter("website-visits")
|
|
51
51
|
To retrieve the counts for a given time period just call `Tabs#get_stats` with the name of the metric, a range of times defining the period for which you want stats, and the resolution at which the data should be aggregated.
|
52
52
|
|
53
53
|
```ruby
|
54
|
-
Tabs.get_stats("website-visits",
|
54
|
+
Tabs.get_stats("website-visits", 10.days.ago..Time.now, :hour)
|
55
55
|
```
|
56
56
|
|
57
57
|
This will return stats for the last 10 days by hour as an array of hashes in which the keys are an instance of `Time` and the value is the count for that time.
|
@@ -94,7 +94,7 @@ Tabs.create_metric("new-user-age", "value")
|
|
94
94
|
Retrieving the stats for a value metric is just like retrieving a counter metric.
|
95
95
|
|
96
96
|
```ruby
|
97
|
-
Tabs.get_stats("new-user-age",
|
97
|
+
Tabs.get_stats("new-user-age", 6.months.ago..Time.now, :month)
|
98
98
|
```
|
99
99
|
|
100
100
|
This will return a familiar value, but with an expanded set of values.
|
@@ -130,7 +130,7 @@ Tabs.complete_task("mobile-to-purchase", "2g4hj17787s")
|
|
130
130
|
Retrieving stats for a task metric is just like the other types:
|
131
131
|
|
132
132
|
```ruby
|
133
|
-
Tabs.get_stats("mobile-to-purchase",
|
133
|
+
Tabs.get_stats("mobile-to-purchase", 6.hours.ago..Time.now, :minute)
|
134
134
|
```
|
135
135
|
|
136
136
|
This will return a hash like this:
|
data/lib/tabs/version.rb
CHANGED
data/tabs.gemspec
CHANGED
@@ -25,7 +25,7 @@ Existing data cannot be read because of changes to the redis key patterns.
|
|
25
25
|
Please continue to use version 0.5.6 if you need to access existing metric data."
|
26
26
|
TXT
|
27
27
|
|
28
|
-
gem.add_dependency "activesupport", ">= 3.2
|
28
|
+
gem.add_dependency "activesupport", ">= 3.2"
|
29
29
|
gem.add_dependency "json", "~> 1.7.7"
|
30
30
|
gem.add_dependency "redis", "~> 3.0.2"
|
31
31
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tabs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.2
|
21
|
+
version: '3.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.2
|
29
|
+
version: '3.2'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: json
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|