statsmix 0.1.9 → 0.1.10
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/VERSION +1 -1
- data/lib/statsmix.rb +8 -0
- data/statsmix.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.10
|
data/lib/statsmix.rb
CHANGED
|
@@ -5,6 +5,7 @@ require 'json'
|
|
|
5
5
|
class StatsMix
|
|
6
6
|
|
|
7
7
|
BASE_URI = 'https://statsmix.com/api/v2/'
|
|
8
|
+
|
|
8
9
|
GEM_VERSION = File.exist?('../VERSION') ? File.read('../VERSION') : ""
|
|
9
10
|
|
|
10
11
|
# Track an event
|
|
@@ -42,8 +43,15 @@ class StatsMix
|
|
|
42
43
|
self.connect('stats')
|
|
43
44
|
@request_uri = @url.path + '.' + @format
|
|
44
45
|
@request = Net::HTTP::Get.new(@request_uri)
|
|
46
|
+
|
|
45
47
|
@params[:metric_id] = metric_id
|
|
46
48
|
@params.merge!(options)
|
|
49
|
+
if @params[:start_date] && @params[:start_date].is_a?(ActiveSupport::TimeWithZone)
|
|
50
|
+
@params[:start_date] = @params[:start_date].utc.strftime('%Y-%m-%d %H:%M:%S')
|
|
51
|
+
end
|
|
52
|
+
if @params[:end_date] && @params[:end_date].is_a?(ActiveSupport::TimeWithZone)
|
|
53
|
+
@params[:end_date] = @params[:end_date].utc.strftime('%Y-%m-%d %H:%M:%S')
|
|
54
|
+
end
|
|
47
55
|
return do_request
|
|
48
56
|
end
|
|
49
57
|
|
data/statsmix.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{statsmix}
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.10"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Tom Markiewicz", "Derek Scruggs"]
|
|
12
|
-
s.date = %q{2011-08-
|
|
12
|
+
s.date = %q{2011-08-29}
|
|
13
13
|
s.description = %q{A Ruby gem for the StatsMix API - http://www.statsmix.com/developers}
|
|
14
14
|
s.email = ["tmarkiewicz@gmail.com", "me@derekscruggs.com"]
|
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: statsmix
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 15
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 10
|
|
10
|
+
version: 0.1.10
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Tom Markiewicz
|
|
@@ -16,7 +16,7 @@ autorequire:
|
|
|
16
16
|
bindir: bin
|
|
17
17
|
cert_chain: []
|
|
18
18
|
|
|
19
|
-
date: 2011-08-
|
|
19
|
+
date: 2011-08-29 00:00:00 -06:00
|
|
20
20
|
default_executable:
|
|
21
21
|
dependencies:
|
|
22
22
|
- !ruby/object:Gem::Dependency
|