blocktrain 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.ruby-version +1 -0
- data/.travis.yml +8 -2
- data/README.md +4 -1
- data/blocktrain.gemspec +1 -1
- data/lib/blocktrain/aggregation.rb +18 -0
- data/lib/blocktrain/aggregations/car_weight_aggregation.rb +1 -20
- data/lib/blocktrain/aggregations/train_weight_aggregation.rb +4 -19
- data/lib/blocktrain/version.rb +1 -1
- metadata +31 -30
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MTY2NWYwMTg2NWZmYmE3MGRiNjMwNGI0YzI0ZjZmOTMwNmM4NTFhOA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZTk2OWE1YjFmMzc2MjJiYzZlMjUzMGI4YWQ2OTU1YTNmMTFiMDkwOQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NjQ0Nzk4NGY3NjMyYTljYjFiOWJkZWI2ZDhiZDVkNDBiZGM1YjMzODgxZTgy
|
10
|
+
YjczZGM0ZTk4NDhlY2FhMWU1YWUxNjNjNjZkYmEyZDU2OTg3MGE1NDgwODk3
|
11
|
+
MTkxY2RiMjU1ZTE3NWI5NTY2ZGFlYjdlMmIwMjhiOTA5NjFhMTQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MmZiYjNkZTY2NGY3MzdlODg3OTJlNGYwN2MwYjczZWUyOWVkY2Q3ZDBjZGYz
|
14
|
+
YWNlZGJkNzIxNTE4OWE1MTQ4YWQyZGE2ZTFkOTYxYjY2YjZjZTE0NGMwZTRl
|
15
|
+
MGJjZTdhMDlhN2RjNDBkNzNjMzUyYzNhZGQxNzZkNzcwMTUzMTk=
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.3
|
data/.travis.yml
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.2.
|
3
|
+
- 2.2.3
|
4
4
|
before_install: gem install bundler -v 1.10.6
|
5
5
|
env:
|
6
6
|
global:
|
7
|
-
|
7
|
+
- secure: Gdx71duOJjyOa/ejO5FXP6n66Fb7dC4Rzwc/tUAB3rbF9YNsN/uWzW9tr1yjRkk4WAPP3mxR4hmRkStkgABhDMU4Q/NVcJ64klVf6JUeYYwheUz/gpfkn4wQdo2Q9O8KVPZ/WocIMWCMk+l2FnusIljxdx6Fu0yitQUJGrry3VX1liU5xKcBlpZZsb2gcy77+ikXwT3y32uZEWZe+ThfHBryNXTdqxkpMSLfgU+y0j6KCTmH8ce402UBbNXtqj56O2StRzuKf/N5XHqOMJ45iZkG39V1AVL63HbLfE8vg/KrzlWX9pf60EXZUAG2il4NSRFqdGTv2aV/PoxHzKgZzwuL6eoco3vopqauYmczHAzVDCWD8rTBABGBQk5O9nN55WXKl2C+/H7LwSLBkgCAEE2UkUcUSe12DZ9eSzilQXCpAs7owoxeBXLbAGIB5jBYoIdpbOL0KJel+4zGdjvfIgT2tUD4jd/NwoZIPl4Wy8cGbrMhbPCqJ0dr9uvmGS74z6YCaa6fmKlZTgpsyAM2JAbhvRT2tBh964RdIQdTVpE8ug+arGCbfjTRBxAMlA26qSyP5fpkQLGHDuVtsx39qr6PVEjWUjqHMHZcHsS743RbTkgO9aXEtPsM2/HWotHy+G2QtSqi5k7cudBFldr8dDJFObOY9vWifTR9j5rIpt4=
|
8
|
+
deploy:
|
9
|
+
provider: rubygems
|
10
|
+
api_key:
|
11
|
+
secure: gBZsD83ZjJdu6s3pGZGNPvJmVHpiRwQQe+Fpc6U43PZJC537aAzvquaNmj/4AMuWUE1dgqSKwJsYBJR2DZ5DE0h24nxBpLyn3AJXPzCeXpLcPm4HQO7sGSzmLSn7TsrOlCyN6bdZAPtWZ8YFlv8J1ND6tZulr2IcA20nc+dHUF803Qybcz5t+T6Yq+2lJ4EH5eg773HBa63heqRLMKJto+V+Gd2/sye0SrA8tS/4lDyxrBw/edZDLNqFn54MM3lr90fg+AkOrMqGgRcqAIs0yZgFuPGWUYMoIzmLr4fQt30yhHkGgcABt1u5D804rKuHvhnY88AhDpC3NuOenhtB1sZSLzk6NFrR3AFTU9xdgyLY8c/hobm1SM5uPaZpBaYAdHdloyrsr/JNZuvVF0kKpAQ68wJOKQ70Iy2ttsdxxbAE5065t/8LjcNSWpXyTFxOCBbNt0mhcgq/NBuyyiHEaFgxR8HqbgryAMJ8/Uds1JGloZseRiy4iDVX8yTJzfWVp/7TjLXKzFl01xsRTUSt2FiaVJaibyT73kqom7qzNqJUj1sQKPIt0EW+laOsmCk08nuFZQDG9Di2QFy5ipy4MSuxzfDZCEkuNMcoNKzJ0rNQJfDVkBBe0lZoPKJdZEKwUtSrwMTja68PRXNDdT2UupbVj1o3ft+1z1BB3GIJkQo=
|
12
|
+
on:
|
13
|
+
tags: true
|
data/README.md
CHANGED
@@ -4,6 +4,9 @@
|
|
4
4
|
[![Code Climate](http://img.shields.io/codeclimate/github/theodi/blocktrain.svg?style=flat-square)](https://codeclimate.com/github/theodi/blocktrain)
|
5
5
|
[![Gem Version](http://img.shields.io/gem/v/blocktrain.svg?style=flat-square)](https://rubygems.org/gems/blocktrain)
|
6
6
|
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://theodi.mit-license.org)
|
7
|
-
[![Badges](http://img.shields.io/:badges-7/7-ff6799.svg?style=flat-square)](https://github.com/badges/badgerbadgerbadger)
|
8
7
|
|
9
8
|
# Blocktrain
|
9
|
+
|
10
|
+
[![Train](https://farm1.staticflickr.com/41/76607175_d76b553995_z.jpg)](https://www.flickr.com/photos/tomloudon/76607175/)
|
11
|
+
|
12
|
+
(Photo by [Tomosaurus](https://www.flickr.com/photos/tomloudon/))
|
data/blocktrain.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['ops@theodi.org']
|
11
11
|
|
12
12
|
spec.summary = %q{Train train train}
|
13
|
-
spec.description = %q{Train
|
13
|
+
spec.description = %q{Train of fools}
|
14
14
|
spec.homepage = 'http://github.org/theodi/blocktrain'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
@@ -54,6 +54,24 @@ module Blocktrain
|
|
54
54
|
}
|
55
55
|
end
|
56
56
|
|
57
|
+
def aggs
|
58
|
+
{
|
59
|
+
weight_chart: {
|
60
|
+
date_histogram: {
|
61
|
+
field: 'timeStamp',
|
62
|
+
interval: @interval,
|
63
|
+
time_zone: '+01:00',
|
64
|
+
min_doc_count: 1,
|
65
|
+
extended_bounds: {
|
66
|
+
min: @from,
|
67
|
+
max: @to
|
68
|
+
}
|
69
|
+
},
|
70
|
+
aggregations: local_aggregations
|
71
|
+
}
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
57
75
|
def body
|
58
76
|
{
|
59
77
|
query: query,
|
@@ -2,26 +2,7 @@ module Blocktrain
|
|
2
2
|
module Aggregations
|
3
3
|
class CarWeightAggregation < Aggregation
|
4
4
|
|
5
|
-
def
|
6
|
-
{
|
7
|
-
weight_chart: {
|
8
|
-
date_histogram: {
|
9
|
-
field: 'timeStamp',
|
10
|
-
interval: @interval,
|
11
|
-
pre_zone: '+01:00',
|
12
|
-
pre_zone_adjust_large_interval: true,
|
13
|
-
min_doc_count: 1,
|
14
|
-
extended_bounds: {
|
15
|
-
min: @from,
|
16
|
-
max: @to
|
17
|
-
}
|
18
|
-
},
|
19
|
-
aggregations: car_weight_aggs
|
20
|
-
}
|
21
|
-
}
|
22
|
-
end
|
23
|
-
|
24
|
-
def car_weight_aggs
|
5
|
+
def local_aggregations
|
25
6
|
{
|
26
7
|
weight: {
|
27
8
|
terms: { field: 'memoryAddress' },
|
@@ -2,26 +2,11 @@ module Blocktrain
|
|
2
2
|
module Aggregations
|
3
3
|
class TrainWeightAggregation < Aggregation
|
4
4
|
|
5
|
-
def
|
5
|
+
def local_aggregations
|
6
6
|
{
|
7
|
-
|
8
|
-
|
9
|
-
field: '
|
10
|
-
interval: @interval,
|
11
|
-
pre_zone: '+01:00',
|
12
|
-
pre_zone_adjust_large_interval: true,
|
13
|
-
min_doc_count: 1,
|
14
|
-
extended_bounds: {
|
15
|
-
min: @from,
|
16
|
-
max: @to
|
17
|
-
}
|
18
|
-
},
|
19
|
-
aggregations: {
|
20
|
-
weight: {
|
21
|
-
avg: {
|
22
|
-
field: 'value'
|
23
|
-
}
|
24
|
-
}
|
7
|
+
weight: {
|
8
|
+
avg: {
|
9
|
+
field: 'value'
|
25
10
|
}
|
26
11
|
}
|
27
12
|
}
|
data/lib/blocktrain/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blocktrain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
@@ -9,172 +9,173 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-11-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dotenv
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ~>
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '2.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '2.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: curb
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ~>
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0.8'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ~>
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0.8'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: bundler
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ~>
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '1.10'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ~>
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '1.10'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rake
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ~>
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '10.0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '10.0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rspec
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ~>
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '3.3'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ~>
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '3.3'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: rspec-pride
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ~>
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '3.1'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- -
|
95
|
+
- - ~>
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '3.1'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: guard-rspec
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - ~>
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '4.6'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- -
|
109
|
+
- - ~>
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '4.6'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: vcr
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - ~>
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '2.9'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- -
|
123
|
+
- - ~>
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '2.9'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: webmock
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- -
|
130
|
+
- - ~>
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '1.21'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ~>
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '1.21'
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: coveralls
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- -
|
144
|
+
- - ~>
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0.8'
|
147
147
|
type: :development
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- -
|
151
|
+
- - ~>
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: '0.8'
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: terminal-notifier-guard
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- -
|
158
|
+
- - ~>
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '1.6'
|
161
161
|
type: :development
|
162
162
|
prerelease: false
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
|
-
- -
|
165
|
+
- - ~>
|
166
166
|
- !ruby/object:Gem::Version
|
167
167
|
version: '1.6'
|
168
|
-
description: Train
|
168
|
+
description: Train of fools
|
169
169
|
email:
|
170
170
|
- ops@theodi.org
|
171
171
|
executables: []
|
172
172
|
extensions: []
|
173
173
|
extra_rdoc_files: []
|
174
174
|
files:
|
175
|
-
-
|
176
|
-
-
|
177
|
-
-
|
175
|
+
- .gitignore
|
176
|
+
- .rspec
|
177
|
+
- .ruby-version
|
178
|
+
- .travis.yml
|
178
179
|
- Gemfile
|
179
180
|
- Guardfile
|
180
181
|
- LICENSE.md
|
@@ -202,12 +203,12 @@ require_paths:
|
|
202
203
|
- lib
|
203
204
|
required_ruby_version: !ruby/object:Gem::Requirement
|
204
205
|
requirements:
|
205
|
-
- -
|
206
|
+
- - ! '>='
|
206
207
|
- !ruby/object:Gem::Version
|
207
208
|
version: '0'
|
208
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
210
|
requirements:
|
210
|
-
- -
|
211
|
+
- - ! '>='
|
211
212
|
- !ruby/object:Gem::Version
|
212
213
|
version: '0'
|
213
214
|
requirements: []
|