influxer 0.2.4 → 0.3.1
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +12 -0
- data/.travis.yml +1 -17
- data/Changelog.md +7 -0
- data/Gemfile +7 -0
- data/README.md +6 -20
- data/Rakefile +4 -0
- data/gemfiles/rails42.gemfile +4 -1
- data/influxer.gemspec +6 -6
- data/lib/influxer/client.rb +4 -44
- data/lib/influxer/config.rb +23 -14
- data/lib/influxer/engine.rb +0 -1
- data/lib/influxer/metrics/metrics.rb +40 -7
- data/lib/influxer/metrics/relation/calculations.rb +13 -7
- data/lib/influxer/metrics/relation/time_query.rb +14 -8
- data/lib/influxer/metrics/relation/where_clause.rb +62 -0
- data/lib/influxer/metrics/relation.rb +67 -76
- data/lib/influxer/metrics/scoping.rb +4 -4
- data/lib/influxer/model.rb +4 -0
- data/lib/influxer/rails/client.rb +47 -0
- data/lib/influxer/version.rb +1 -1
- data/lib/influxer.rb +4 -2
- data/spec/cases/points_spec.rb +34 -0
- data/spec/client_spec.rb +21 -24
- data/spec/fixtures/empty_result.json +21 -0
- data/spec/fixtures/single_series.json +29 -0
- data/spec/metrics/metrics_spec.rb +139 -113
- data/spec/metrics/relation_spec.rb +160 -105
- data/spec/metrics/scoping_spec.rb +11 -17
- data/spec/model/user_spec.rb +44 -0
- data/spec/spec_helper.rb +38 -8
- data/spec/support/metrics/action_metrics.rb +3 -0
- data/spec/support/metrics/custom_metrics.rb +4 -0
- data/spec/support/{dummy_metrics.rb → metrics/dummy_metrics.rb} +2 -1
- data/spec/support/metrics/user_metrics.rb +4 -0
- data/spec/support/metrics/visits_metrics.rb +4 -0
- data/spec/support/shared_contexts/shared_query.rb +16 -0
- data/spec/support/user.rb +14 -0
- metadata +42 -71
- data/gemfiles/rails40.gemfile +0 -7
- data/gemfiles/rails41.gemfile +0 -7
- data/lib/influxer/metrics/fanout.rb +0 -65
- data/lib/influxer/metrics/relation/fanout_query.rb +0 -49
- data/lib/tasks/influxer_tasks.rake +0 -4
- data/spec/config_spec.rb +0 -17
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +0 -13
- data/spec/dummy/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy/app/controllers/application_controller.rb +0 -5
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/metrics/testo_metrics.rb +0 -3
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/testo.rb +0 -6
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/config/application.rb +0 -23
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -37
- data/spec/dummy/config/environments/production.rb +0 -83
- data/spec/dummy/config/environments/test.rb +0 -38
- data/spec/dummy/config/influxdb.yml +0 -5
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/routes.rb +0 -56
- data/spec/dummy/config/secrets.yml +0 -25
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/migrate/20140730133818_add_testos.rb +0 -11
- data/spec/dummy/db/migrate/20140731162044_add_column_to_testos.rb +0 -5
- data/spec/dummy/db/schema.rb +0 -22
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/public/404.html +0 -67
- data/spec/dummy/public/422.html +0 -67
- data/spec/dummy/public/500.html +0 -66
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/fixtures/fanout_series.json +0 -23
- data/spec/metrics/fanout_spec.rb +0 -61
- data/spec/model/testo_spec.rb +0 -27
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: influxer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vlad Dem
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activemodel
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.2.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.2.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: anyway_config
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.3.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.3.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: timecop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.3.8
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '10.1'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '10.1'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: sqlite3
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,19 +109,19 @@ dependencies:
|
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: activerecord
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
117
|
+
version: '4.0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
124
|
+
version: '4.0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: pry-byebug
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,19 +151,19 @@ dependencies:
|
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: 3.1.0
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
154
|
+
name: webmock
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
157
|
- - "~>"
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
159
|
+
version: 1.21.0
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
164
|
- - "~>"
|
151
165
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
166
|
+
version: 1.21.0
|
153
167
|
description: InfluxDB the Rails way
|
154
168
|
email:
|
155
169
|
- dementiev.vm@gmail.com
|
@@ -166,82 +180,39 @@ files:
|
|
166
180
|
- MIT-LICENSE
|
167
181
|
- README.md
|
168
182
|
- Rakefile
|
169
|
-
- gemfiles/rails40.gemfile
|
170
|
-
- gemfiles/rails41.gemfile
|
171
183
|
- gemfiles/rails42.gemfile
|
172
184
|
- influxer.gemspec
|
173
185
|
- lib/influxer.rb
|
174
186
|
- lib/influxer/client.rb
|
175
187
|
- lib/influxer/config.rb
|
176
188
|
- lib/influxer/engine.rb
|
177
|
-
- lib/influxer/metrics/fanout.rb
|
178
189
|
- lib/influxer/metrics/metrics.rb
|
179
190
|
- lib/influxer/metrics/relation.rb
|
180
191
|
- lib/influxer/metrics/relation/calculations.rb
|
181
|
-
- lib/influxer/metrics/relation/fanout_query.rb
|
182
192
|
- lib/influxer/metrics/relation/time_query.rb
|
193
|
+
- lib/influxer/metrics/relation/where_clause.rb
|
183
194
|
- lib/influxer/metrics/scoping.rb
|
184
195
|
- lib/influxer/metrics/scoping/default.rb
|
185
196
|
- lib/influxer/metrics/scoping/named.rb
|
186
197
|
- lib/influxer/model.rb
|
198
|
+
- lib/influxer/rails/client.rb
|
187
199
|
- lib/influxer/version.rb
|
188
|
-
-
|
200
|
+
- spec/cases/points_spec.rb
|
189
201
|
- spec/client_spec.rb
|
190
|
-
- spec/
|
191
|
-
- spec/
|
192
|
-
- spec/dummy/Rakefile
|
193
|
-
- spec/dummy/app/assets/images/.keep
|
194
|
-
- spec/dummy/app/assets/javascripts/application.js
|
195
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
196
|
-
- spec/dummy/app/controllers/application_controller.rb
|
197
|
-
- spec/dummy/app/controllers/concerns/.keep
|
198
|
-
- spec/dummy/app/helpers/application_helper.rb
|
199
|
-
- spec/dummy/app/mailers/.keep
|
200
|
-
- spec/dummy/app/metrics/testo_metrics.rb
|
201
|
-
- spec/dummy/app/models/.keep
|
202
|
-
- spec/dummy/app/models/concerns/.keep
|
203
|
-
- spec/dummy/app/models/testo.rb
|
204
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
205
|
-
- spec/dummy/bin/bundle
|
206
|
-
- spec/dummy/bin/rails
|
207
|
-
- spec/dummy/bin/rake
|
208
|
-
- spec/dummy/config.ru
|
209
|
-
- spec/dummy/config/application.rb
|
210
|
-
- spec/dummy/config/boot.rb
|
211
|
-
- spec/dummy/config/database.yml
|
212
|
-
- spec/dummy/config/environment.rb
|
213
|
-
- spec/dummy/config/environments/development.rb
|
214
|
-
- spec/dummy/config/environments/production.rb
|
215
|
-
- spec/dummy/config/environments/test.rb
|
216
|
-
- spec/dummy/config/influxdb.yml
|
217
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
218
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
219
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
220
|
-
- spec/dummy/config/initializers/inflections.rb
|
221
|
-
- spec/dummy/config/initializers/mime_types.rb
|
222
|
-
- spec/dummy/config/initializers/session_store.rb
|
223
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
224
|
-
- spec/dummy/config/locales/en.yml
|
225
|
-
- spec/dummy/config/routes.rb
|
226
|
-
- spec/dummy/config/secrets.yml
|
227
|
-
- spec/dummy/db/migrate/20140730133818_add_testos.rb
|
228
|
-
- spec/dummy/db/migrate/20140731162044_add_column_to_testos.rb
|
229
|
-
- spec/dummy/db/schema.rb
|
230
|
-
- spec/dummy/db/test.sqlite3
|
231
|
-
- spec/dummy/lib/assets/.keep
|
232
|
-
- spec/dummy/log/.keep
|
233
|
-
- spec/dummy/public/404.html
|
234
|
-
- spec/dummy/public/422.html
|
235
|
-
- spec/dummy/public/500.html
|
236
|
-
- spec/dummy/public/favicon.ico
|
237
|
-
- spec/fixtures/fanout_series.json
|
238
|
-
- spec/metrics/fanout_spec.rb
|
202
|
+
- spec/fixtures/empty_result.json
|
203
|
+
- spec/fixtures/single_series.json
|
239
204
|
- spec/metrics/metrics_spec.rb
|
240
205
|
- spec/metrics/relation_spec.rb
|
241
206
|
- spec/metrics/scoping_spec.rb
|
242
|
-
- spec/model/
|
207
|
+
- spec/model/user_spec.rb
|
243
208
|
- spec/spec_helper.rb
|
244
|
-
- spec/support/
|
209
|
+
- spec/support/metrics/action_metrics.rb
|
210
|
+
- spec/support/metrics/custom_metrics.rb
|
211
|
+
- spec/support/metrics/dummy_metrics.rb
|
212
|
+
- spec/support/metrics/user_metrics.rb
|
213
|
+
- spec/support/metrics/visits_metrics.rb
|
214
|
+
- spec/support/shared_contexts/shared_query.rb
|
215
|
+
- spec/support/user.rb
|
245
216
|
homepage: http://github.com/palkan/influxer
|
246
217
|
licenses:
|
247
218
|
- MIT
|
data/gemfiles/rails40.gemfile
DELETED
data/gemfiles/rails41.gemfile
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
module Influxer
|
2
|
-
module Fanout # :nodoc: all
|
3
|
-
extend ActiveSupport::Concern
|
4
|
-
|
5
|
-
included do
|
6
|
-
class_attribute :fanouts, :fanouts_by_name, :fanout_options
|
7
|
-
self.fanouts = []
|
8
|
-
self.fanouts_by_name = {} # to use within `fanout?`
|
9
|
-
self.fanout_options = { delimeter: "_" }
|
10
|
-
end
|
11
|
-
|
12
|
-
module ClassMethods
|
13
|
-
# Define fanouts for metrics as array of keys.
|
14
|
-
# Order of keys is important.
|
15
|
-
# Fanout delimeter can be set with 'delimiter' option (defaults to '_').
|
16
|
-
#
|
17
|
-
# class MyMetrics < Influxer::Metrics
|
18
|
-
# set_series "my_points"
|
19
|
-
# fanout :account_id, :user_id
|
20
|
-
# end
|
21
|
-
#
|
22
|
-
# MyMetrics.where(user_id: 1).where(account_id: 10)
|
23
|
-
# # select * from my_points_account_id_10_user_id_1
|
24
|
-
#
|
25
|
-
# class MyMetrics < Influxer::Metrics
|
26
|
-
# set_series "my_points"
|
27
|
-
# fanout :account_id, :user_id, delimiter: "."
|
28
|
-
# end
|
29
|
-
#
|
30
|
-
# MyMetrics.where(user_id: 1).where(account_id: 10).where("req_time > 1000")
|
31
|
-
# # select * from my_points.account_id.10.user_id.1 where req_time > 1000
|
32
|
-
|
33
|
-
def fanout(*args, **hargs)
|
34
|
-
self.fanout_options = fanout_options.merge hargs
|
35
|
-
|
36
|
-
names = args.map(&:to_s)
|
37
|
-
|
38
|
-
self.fanouts = (fanouts + names).uniq
|
39
|
-
|
40
|
-
names_hash = {}
|
41
|
-
names.each do |name|
|
42
|
-
names_hash[name] = 1
|
43
|
-
end
|
44
|
-
|
45
|
-
self.fanouts_by_name = fanouts_by_name.merge names_hash
|
46
|
-
end
|
47
|
-
|
48
|
-
def fanout?(key)
|
49
|
-
fanouts_by_name.key?(key.to_s)
|
50
|
-
end
|
51
|
-
|
52
|
-
def fanout_rxp
|
53
|
-
return @fanout_rxp unless @fanout_rxp.nil?
|
54
|
-
series_name = Regexp.escape(quoted_series[1..-2])
|
55
|
-
del = Regexp.escape(fanout_options[:delimeter])
|
56
|
-
rstr = "^#{series_name}"
|
57
|
-
fanouts.each do |f_name|
|
58
|
-
rstr += "(?:#{del}#{Regexp.escape(f_name)}#{del}(?<#{f_name}>[^#{del}]+))?"
|
59
|
-
end
|
60
|
-
rstr += "$"
|
61
|
-
@fanout_rxp = Regexp.new(rstr)
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
module Influxer
|
2
|
-
module FanoutQuery #:nodoc:
|
3
|
-
# Instance methods are included to Relation
|
4
|
-
def build_fanout(key, val)
|
5
|
-
@values[:has_fanout] = true
|
6
|
-
if val.is_a?(Regexp)
|
7
|
-
@values[:fanout_rxp] = true
|
8
|
-
fanout_values[key.to_s] = val.inspect[1..-2]
|
9
|
-
else
|
10
|
-
fanout_values[key.to_s] = val.to_s
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def build_series_name
|
15
|
-
if @values[:has_fanout] == true
|
16
|
-
fan_parts = [@instance.series[1..-2]]
|
17
|
-
@klass.fanouts.each do |name|
|
18
|
-
if fanout_values.key?(name)
|
19
|
-
fan_parts << name
|
20
|
-
fan_parts << fanout_values[name]
|
21
|
-
end
|
22
|
-
end
|
23
|
-
if @values[:fanout_rxp] == true
|
24
|
-
"/^#{ fan_parts.join(@klass.fanout_options[:delimeter]) }$/"
|
25
|
-
else
|
26
|
-
@klass.quoted_series(fan_parts.join(@klass.fanout_options[:delimeter]))
|
27
|
-
end
|
28
|
-
else
|
29
|
-
@instance.series
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def prepare_fanout_points(hash)
|
34
|
-
hash.each do |k, v|
|
35
|
-
data = extract_values(k)
|
36
|
-
v.each { |p| p.merge!(data) } unless data.empty?
|
37
|
-
end
|
38
|
-
hash
|
39
|
-
end
|
40
|
-
|
41
|
-
private
|
42
|
-
|
43
|
-
# Extract fanout values from series name
|
44
|
-
def extract_values(name)
|
45
|
-
data = @klass.fanout_rxp.match(name)
|
46
|
-
Hash[data.names.zip(data.captures)].delete_if { |_k, v| v.nil? }
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
data/spec/config_spec.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Influxer::Config do
|
4
|
-
let(:conf) { Influxer.config }
|
5
|
-
|
6
|
-
it "should load config from file" do
|
7
|
-
expect(conf.retry).to eq 5
|
8
|
-
expect(conf.host).to eq "test.host"
|
9
|
-
end
|
10
|
-
|
11
|
-
unless Rails.application.try(:secrets).nil?
|
12
|
-
it "should load config from secrets" do
|
13
|
-
expect(conf.username).to eq "test"
|
14
|
-
expect(conf.password).to eq "test"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
data/spec/dummy/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
DELETED
File without changes
|
@@ -1,13 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
File without changes
|
File without changes
|
data/spec/dummy/app/models/.keep
DELETED
File without changes
|
File without changes
|
@@ -1,6 +0,0 @@
|
|
1
|
-
class Testo < ActiveRecord::Base
|
2
|
-
has_metrics
|
3
|
-
has_metrics :testo_metrics, class_name: "TestoMetrics", inherits: [:receipt_id]
|
4
|
-
has_metrics :testo2_metrics, class_name: "TestoMetrics", foreign_key: :testo
|
5
|
-
has_metrics :custom_metrics, class_name: "TestoMetrics", foreign_key: nil
|
6
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Dummy</title>
|
5
|
-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
-
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
<%= yield %>
|
12
|
-
|
13
|
-
</body>
|
14
|
-
</html>
|
data/spec/dummy/bin/bundle
DELETED
data/spec/dummy/bin/rails
DELETED
data/spec/dummy/bin/rake
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
Bundler.require(*Rails.groups)
|
6
|
-
require "influxer"
|
7
|
-
|
8
|
-
module Dummy
|
9
|
-
class Application < Rails::Application
|
10
|
-
config.cache_store = :memory_store
|
11
|
-
# Settings in config/environments/* take precedence over those specified here.
|
12
|
-
# Application configuration should go into files in config/initializers
|
13
|
-
# -- all .rb files in that directory are automatically loaded.
|
14
|
-
|
15
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
16
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
17
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
18
|
-
|
19
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
20
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
21
|
-
# config.i18n.default_locale = :de
|
22
|
-
end
|
23
|
-
end
|
data/spec/dummy/config/boot.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3
|
3
|
-
#
|
4
|
-
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
-
# gem 'sqlite3'
|
6
|
-
#
|
7
|
-
default: &default
|
8
|
-
adapter: sqlite3
|
9
|
-
pool: 5
|
10
|
-
timeout: 5000
|
11
|
-
|
12
|
-
development:
|
13
|
-
<<: *default
|
14
|
-
database: db/development.sqlite3
|
15
|
-
|
16
|
-
# Warning: The database defined as "test" will be erased and
|
17
|
-
# re-generated from your development database when you run "rake".
|
18
|
-
# Do not set this db to the same as development or production.
|
19
|
-
test:
|
20
|
-
<<: *default
|
21
|
-
database: db/test.sqlite3
|
22
|
-
|
23
|
-
production:
|
24
|
-
<<: *default
|
25
|
-
database: db/production.sqlite3
|
@@ -1,37 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Do not eager load code on boot.
|
10
|
-
config.eager_load = false
|
11
|
-
|
12
|
-
# Show full error reports and disable caching.
|
13
|
-
config.consider_all_requests_local = true
|
14
|
-
config.action_controller.perform_caching = false
|
15
|
-
|
16
|
-
# Don't care if the mailer can't send.
|
17
|
-
config.action_mailer.raise_delivery_errors = false
|
18
|
-
|
19
|
-
# Print deprecation notices to the Rails logger.
|
20
|
-
config.active_support.deprecation = :log
|
21
|
-
|
22
|
-
# Raise an error on page load if there are pending migrations.
|
23
|
-
config.active_record.migration_error = :page_load
|
24
|
-
|
25
|
-
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
-
# This option may cause significant delays in view rendering with a large
|
27
|
-
# number of complex assets.
|
28
|
-
config.assets.debug = true
|
29
|
-
|
30
|
-
# Adds additional error checking when serving assets at runtime.
|
31
|
-
# Checks for improperly declared sprockets dependencies.
|
32
|
-
# Raises helpful error messages.
|
33
|
-
config.assets.raise_runtime_errors = true
|
34
|
-
|
35
|
-
# Raises error for missing translations
|
36
|
-
# config.action_view.raise_on_missing_translations = true
|
37
|
-
end
|