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 CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8b519150dba476754b4e30a19676846a6c85aab3
4
- data.tar.gz: 8c3f0aa9e1a3dac4cef1ba1533537cb876dbd4d8
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MTY2NWYwMTg2NWZmYmE3MGRiNjMwNGI0YzI0ZjZmOTMwNmM4NTFhOA==
5
+ data.tar.gz: !binary |-
6
+ ZTk2OWE1YjFmMzc2MjJiYzZlMjUzMGI4YWQ2OTU1YTNmMTFiMDkwOQ==
5
7
  SHA512:
6
- metadata.gz: 22bbe9a44d4120adfed3f8b91ab9316e5b0e36d00c85caeaaca708846eca9f00f5e6f47999e7839d453715aaba9383c6674715bb2e7532e5c9ed7239dc314e3e
7
- data.tar.gz: ef1ee5078ed06d5e649e5bc72c6c9075a9fcfe88a72eaad2ceba43df5f9baebed1c3522f8261b24d1e9789b803818e8d99052f9df908dc3f69493f4426032647
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.0
3
+ - 2.2.3
4
4
  before_install: gem install bundler -v 1.10.6
5
5
  env:
6
6
  global:
7
- secure: nFiSRLqyRVSIfB4HBUdT7NtBN8sTb25SpFa9HUQUv9A9y89RC28fxVV0ZadgWmkBqiqgYGvdhrTOphamCab+k3jSJoTYCQ3kWf7KqCAG0rzz/KtHlMeRwmMJxBEREpe+pmLNoTKg3ezCil9msK0Ru9//A7tiz24CPbb9dSdHBFds+LT0sldcP/s5EDkuX1k+XuW1vzZIBni3uYtjJGmKSvJnpD6ycC9kbahpGvZjpvV3C1KRGFdLE7tFmzgoNRADJPXVAFUXA7hv9KkEXLGfVL81RHTQIJPl6sgCGujaT7JkizyLXQd11Kv19QZABzVtMpQjihO3V3Ye5iZ0bE2P4OHsI+h85MpPI5KlqF5e/MzgepHL1bYjeRdp8ZNuf7wO9rkWpgSo5eKz1UR4SKfrilG5PHjvOTT3ICAXKOODrp0ughe3GQpn3G+sZrBhkpXMSqN9AuQtE+5jEWRVvcKfm/yzlxtQc+542OBG9Dqy/+KTW6Ea6NoYv5fFY4+uAP0/5MLLpJm5XUbWSSLNBhdEKvvTo5ADCczjVfhgIN9fNo8uDQ0EwrfkiiQnTxOzLijdgmAoYpFUnQDs0ulf2HL8wW1bZiXwimcBXttLkyFfiEXI0lwmTP3p6zG7guC1yvSJ5i2AXmGoijaN8FFijZTqsL0r0L1wUzUbCZ+aEvc787U=
7
+ - secure: Gdx71duOJjyOa/ejO5FXP6n66Fb7dC4Rzwc/tUAB3rbF9YNsN/uWzW9tr1yjRkk4WAPP3mxR4hmRkStkgABhDMU4Q/NVcJ64klVf6JUeYYwheUz/gpfkn4wQdo2Q9O8KVPZ/WocIMWCMk+l2FnusIljxdx6Fu0yitQUJGrry3VX1liU5xKcBlpZZsb2gcy77+ikXwT3y32uZEWZe+ThfHBryNXTdqxkpMSLfgU+y0j6KCTmH8ce402UBbNXtqj56O2StRzuKf/N5XHqO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Be0lZoPKJdZEKwUtSrwMTja68PRXNDdT2UupbVj1o3ft+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 if fools}
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 aggs
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 aggs
5
+ def local_aggregations
6
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: {
20
- weight: {
21
- avg: {
22
- field: 'value'
23
- }
24
- }
7
+ weight: {
8
+ avg: {
9
+ field: 'value'
25
10
  }
26
11
  }
27
12
  }
@@ -1,3 +1,3 @@
1
1
  module Blocktrain
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.4'
3
3
  end
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.2
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-10-29 00:00:00.000000000 Z
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 if fools
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
- - ".gitignore"
176
- - ".rspec"
177
- - ".travis.yml"
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: []