patty 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/patty/server.rb +10 -8
- data/lib/patty/version.rb +1 -1
- metadata +7 -7
data/lib/patty/server.rb
CHANGED
@@ -8,17 +8,19 @@ module Patty
|
|
8
8
|
set :public_folder, File.dirname(__FILE__) + '/server'
|
9
9
|
|
10
10
|
TIMELINE_STEPS = {
|
11
|
-
:
|
12
|
-
:
|
13
|
-
:
|
14
|
-
:
|
15
|
-
:
|
11
|
+
:second => 1.0 / 24 / 60 / 2,
|
12
|
+
:minute => 1.0 / 24 / 60,
|
13
|
+
:tminute => 1.0 / 24 / 6,
|
14
|
+
:hour => 1.0 / 24,
|
15
|
+
:day => 1.0,
|
16
|
+
:month => 25,
|
17
|
+
:year => 365
|
16
18
|
}
|
17
19
|
|
18
|
-
TIMELINE_MEASURES = [:hour, :day, :month, :year]
|
20
|
+
TIMELINE_MEASURES = [:minute, :tminute, :hour, :day, :month, :year]
|
19
21
|
|
20
22
|
def handler
|
21
|
-
Object.const_get("#{params[:report].capitalize}
|
23
|
+
Object.const_get("#{params[:report].capitalize}").new
|
22
24
|
end
|
23
25
|
|
24
26
|
def timeline
|
@@ -36,7 +38,7 @@ module Patty
|
|
36
38
|
from_datetime.step(to_datetime, TIMELINE_STEPS[step]).map do |s|
|
37
39
|
current_step = Patty::TimeSignature.from_datetime(s)
|
38
40
|
|
39
|
-
if step == :
|
41
|
+
if step == :second
|
40
42
|
current_step
|
41
43
|
else
|
42
44
|
current_step.parents[TIMELINE_MEASURES.index(step)]
|
data/lib/patty/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-04-11 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: yajl-ruby
|
16
|
-
requirement: &
|
16
|
+
requirement: &85264650 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *85264650
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: riak-client
|
27
|
-
requirement: &
|
27
|
+
requirement: &85264440 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *85264440
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sinatra
|
38
|
-
requirement: &
|
38
|
+
requirement: &85264230 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *85264230
|
47
47
|
description: Server part of Patty statistics server
|
48
48
|
email: alexander.lomakin@gmail.com
|
49
49
|
executables: []
|