influxer 1.2.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{Changelog.md → CHANGELOG.md} +26 -50
- data/{MIT-LICENSE → LICENSE.txt} +1 -1
- data/README.md +83 -24
- data/lib/influxer/client.rb +1 -1
- data/lib/influxer/config.rb +16 -3
- data/lib/influxer/metrics/metrics.rb +1 -1
- data/lib/influxer/metrics/relation/where_clause.rb +6 -0
- data/lib/influxer/metrics/relation.rb +16 -4
- data/lib/influxer/metrics/scoping/current_scope.rb +16 -2
- data/lib/influxer/rails/client.rb +5 -5
- data/lib/influxer/version.rb +1 -1
- data/lib/influxer.rb +4 -0
- metadata +13 -43
- data/.gitignore +0 -37
- data/.rspec +0 -2
- data/.rubocop.yml +0 -57
- data/.travis.yml +0 -15
- data/Gemfile +0 -13
- data/Rakefile +0 -15
- data/bin/console +0 -8
- data/gemfiles/rails32.gemfile +0 -7
- data/gemfiles/rails42.gemfile +0 -7
- data/gemfiles/rails5.gemfile +0 -7
- data/gemfiles/rails6.gemfile +0 -7
- data/influxer.gemspec +0 -40
- data/spec/cases/points_spec.rb +0 -36
- data/spec/cases/write_points_spec.rb +0 -85
- data/spec/client_spec.rb +0 -46
- data/spec/fixtures/empty_result.json +0 -21
- data/spec/fixtures/single_series.json +0 -29
- data/spec/metrics/metrics_spec.rb +0 -329
- data/spec/metrics/relation_spec.rb +0 -467
- data/spec/metrics/scoping_spec.rb +0 -66
- data/spec/model/user_spec.rb +0 -46
- data/spec/spec_helper.rb +0 -63
- data/spec/support/metrics/action_metrics.rb +0 -5
- data/spec/support/metrics/custom_metrics.rb +0 -6
- data/spec/support/metrics/dummy_metrics.rb +0 -12
- data/spec/support/metrics/user_metrics.rb +0 -6
- data/spec/support/metrics/visits_metrics.rb +0 -8
- data/spec/support/shared_contexts/shared_precision.rb +0 -19
- data/spec/support/shared_contexts/shared_query.rb +0 -16
- data/spec/support/user.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc1ab76fd0f5d70b0f876a0259d1d46cc3c8e878527a7aadf26c56834db55b55
|
4
|
+
data.tar.gz: 6f31a226c184219b583528d2f3f57d5482839f66dd6bec240ff8bf296360a9f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8661b96cded076dbf6674dd72ade16886ca18f375acdb8406b54a1cb89b25e10efd78aa70d90d1e26cab4dd8356ba57bb1fa2125107ebe07ca308f9b294d4d47
|
7
|
+
data.tar.gz: c7edf962257966dbbc829f0c9cd4dc0d8b924329c3ecd4ca689aaf61c54c6254e7c2f6f06e9b254131578945dcdf5dbceb292de85e934cdcda3bdfcae41393f0
|
@@ -2,6 +2,28 @@
|
|
2
2
|
|
3
3
|
## master (unreleased)
|
4
4
|
|
5
|
+
## 1.4.0 (2022-01-24)
|
6
|
+
|
7
|
+
- Fixes [#55](https://github.com/palkan/influxer/issues/55) Rails 7 deprecation warning
|
8
|
+
- Add Ruby3 Support
|
9
|
+
- Updates InfluxDB client dependency
|
10
|
+
- Removes Ruby 2.4 supporting
|
11
|
+
|
12
|
+
## 1.3.0 (2020-10-27)
|
13
|
+
|
14
|
+
- Fixes [#53](https://github.com/palkan/influxer/issues/53) Influxer client configuration issue with anyway config v2 and higher.([@AlexanderShvaykin][])
|
15
|
+
|
16
|
+
## 1.2.2 (2020-10-27)
|
17
|
+
|
18
|
+
- Fixes [#49](https://github.com/palkan/influxer/issues/49) Cache hash configuration cannot be applied.([@AlexanderShvaykin][])
|
19
|
+
- Fixes [#47](https://github.com/palkan/influxer/issues/47) Can't delete data when retention policy is set for a metric. ([@MPursche][])
|
20
|
+
|
21
|
+
## 1.2.1 (2020-07-09)
|
22
|
+
|
23
|
+
- Support for setting timezone in queries to configure influx time calculations, e.g., time epoch aggregation ([@jklimke][])
|
24
|
+
|
25
|
+
[PR](https://github.com/palkan/influxer/pull/46)
|
26
|
+
|
5
27
|
## 1.2.0 (2019-05-20)
|
6
28
|
|
7
29
|
- **Require Ruby 2.4+**
|
@@ -24,11 +46,11 @@
|
|
24
46
|
|
25
47
|
## 1.1.4
|
26
48
|
|
27
|
-
- [Fixes [#35](https://github.com/palkan/influxer/issues/35)] Support time duration suffix and handle `'s'` and `'ms'`
|
49
|
+
- [Fixes [#35](https://github.com/palkan/influxer/issues/35)] Support time duration suffix and handle `'s'` and `'ms'` precision. ([@palkan][])
|
28
50
|
|
29
51
|
[PR](https://github.com/palkan/influxer/pull/36)
|
30
52
|
|
31
|
-
**BREAKING:** `Time`-like value are only
|
53
|
+
**BREAKING:** `Time`-like value are only type-casted for `time` key.
|
32
54
|
|
33
55
|
## 1.1.2
|
34
56
|
|
@@ -78,56 +100,10 @@ end
|
|
78
100
|
|
79
101
|
- Fix missing `#delegate` in ActiveRecord 3.2
|
80
102
|
|
81
|
-
|
82
|
-
- Add `set_retention_policy` method
|
83
|
-
|
84
|
-
## 0.5.3
|
85
|
-
- Fix `where.not` with ranges typo
|
86
|
-
|
87
|
-
## 0.5.2
|
88
|
-
- Fix bug with query logging
|
89
|
-
|
90
|
-
## 0.5.1
|
91
|
-
- Fix whitespace around operators
|
92
|
-
- Add `Relation#from` method to redefine series
|
93
|
-
- Handle nil values for tags in #where clause
|
94
|
-
|
95
|
-
## 0.5.0
|
96
|
-
- Update `timestamp` support
|
97
|
-
- Add `epoch` method
|
98
|
-
|
99
|
-
## 0.4.0
|
100
|
-
- Rename default `time` attribute to `timestamp`
|
101
|
-
|
102
|
-
## 0.2.3
|
103
|
-
- Parse fanout queries points to handle _fanouted_ values
|
104
|
-
- Add Rubocop config and cleanup code style
|
105
|
-
|
106
|
-
## 0.1.1
|
107
|
-
- Add [anyway_config](https://github.com/palkan/anyway_config)
|
108
|
-
- Add `empty?` method
|
109
|
-
|
110
|
-
## 0.1.0
|
111
|
-
- Add logs
|
112
|
-
- Add `foreign_key` param to `has_metrics` options
|
113
|
-
|
114
|
-
## 0.1.0-rc
|
115
|
-
- Fix `Relation#to_a` (now returns array of points correctrly)
|
116
|
-
- Fix fanout queries with array args (now use `merge(Regexp)`)
|
117
|
-
|
118
|
-
## 0.1.0-alpha
|
119
|
-
- Add `time` method to Relation to group by time with constants (`:hour`, `:day`, etc) and fill support
|
120
|
-
- Series names now properly quoted with double-quotes
|
121
|
-
- Using regexps, ranges and arrays within `where` clause
|
122
|
-
- `where.not(...)` support
|
123
|
-
- Add `past` and `since` methods
|
124
|
-
- Add `merge` method and support for regexp series
|
125
|
-
- Add `delete_all` support
|
126
|
-
- Add cache support (using `Rails.cache`)
|
127
|
-
- Scopes (default and named)
|
128
|
-
- Support for fanout series
|
103
|
+
See [changelog](https://github.com/palkan/influxer/blob/1.0.0/Changelog.md) for earlier versions.
|
129
104
|
|
130
105
|
[@palkan]: https://github.com/palkan
|
131
106
|
[@MPursche]: https://github.com/MPursche
|
132
107
|
[@jklimke]: https://github.com/jklimke
|
133
108
|
[@dimiii]: https://github.com/dimiii
|
109
|
+
[@AlexanderShvaykin]: https://github.com/AlexanderShvaykin
|
data/{MIT-LICENSE → LICENSE.txt}
RENAMED
data/README.md
CHANGED
@@ -1,37 +1,88 @@
|
|
1
|
-
|
2
|
-
## Influxer
|
1
|
+
![Build](https://github.com/palkan/influxer/workflows/Build/badge.svg)
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
**NOTE**: Influxer is Rails 4+ compatible! (Rails 3.2 support is still included but no longer required to pass all the tests).
|
3
|
+
# Influxer
|
7
4
|
|
8
5
|
Influxer provides an ActiveRecord-style way to work with [InfluxDB](https://influxdb.com/) with many useful features, such as:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Adding to a gem:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
# my-cool-gem.gemspec
|
13
|
+
Gem::Specification.new do |spec|
|
14
|
+
# ...
|
15
|
+
spec.add_dependency "influxer", ">= 1.2.0"
|
16
|
+
# ...
|
17
|
+
end
|
18
|
+
```
|
19
|
+
|
20
|
+
Or adding to your project:
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
# Gemfile
|
24
|
+
gem "influxer", "~> 1.2"
|
25
|
+
```
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
### Metrics classes
|
30
|
+
|
31
|
+
To query InfluxDB or write to it, you should define a metrics class first. Each metrics class represents a measurement/series (or multiple related measurements):
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
class VisitsMetrics < Influxer::Metrics
|
35
|
+
# Define tags...
|
36
|
+
tags :account_id, :page_id
|
37
|
+
# ...and attributes
|
38
|
+
attributes :user_id, :browser
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
### Querying
|
43
|
+
|
44
|
+
Now you can use your metrics classes in a similar way to Active Record models to build queries. For example:
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
VisitsMetrics.select(:account_id, :user_id).where(page_id: /^home\/.*/)
|
48
|
+
```
|
49
|
+
|
50
|
+
Influxer provides special query methods for dealing with time series:
|
51
|
+
|
52
|
+
- Group by time: `Metrics.time(:hour) => # select * ... group by time(1h)`.
|
53
|
+
- Select only points for the last hour/minute/whatever: `Metrics.past(:day) => # select * ... where time > now() - 1d`.
|
54
|
+
- Select only points since the specified time: `Metrics.since(Time.utc(2014,12,31)) => # select * ... where time > 1419984000s`.
|
55
|
+
- and more.
|
56
|
+
|
57
|
+
See [our Wiki](https://github.com/palkan/influxer/wiki/Query-methods) for more.
|
58
|
+
|
59
|
+
### Scopes support
|
60
|
+
|
61
|
+
You can define scopes to re-use query conditions:
|
62
|
+
|
63
|
+
```ruby
|
18
64
|
class Metrics < Influxer::Metrics
|
19
|
-
default_scope -> { time(:hour).limit(1000) }
|
20
65
|
tags :account_id
|
21
66
|
attributes :value
|
67
|
+
|
68
|
+
default_scope -> { time(:hour).limit(1000) }
|
69
|
+
|
22
70
|
scope :unlimited, -> { limit(nil) }
|
23
71
|
scope :by_account, ->(id) { where(account_id: id) if id.present? }
|
24
72
|
end
|
25
73
|
|
26
74
|
Metrics.by_account(1)
|
27
|
-
|
75
|
+
# => select * from "metrics" group by time(1h) where account_id=1 limit 1000
|
28
76
|
|
29
77
|
Metrics.unlimited.by_account(1).time(:week)
|
30
|
-
|
78
|
+
# => select * from "metrics" group by time(1w) where account_id=1
|
79
|
+
```
|
80
|
+
|
81
|
+
### Active Record integration
|
31
82
|
|
32
|
-
|
33
|
-
|
34
|
-
|
83
|
+
You can association metrics with Active Record models:
|
84
|
+
|
85
|
+
```ruby
|
35
86
|
class UserVisits < Influxer::Metrics
|
36
87
|
end
|
37
88
|
|
@@ -41,10 +92,18 @@ end
|
|
41
92
|
|
42
93
|
user = User.find(1)
|
43
94
|
user.visits.write(page_id: "home")
|
44
|
-
|
95
|
+
#=> < creates point {user_id: 1, page_id: 'home'} in 'user_visits' series >
|
45
96
|
|
46
97
|
user.visits.where(page_id: "home")
|
47
|
-
|
48
|
-
|
98
|
+
#=> select * from user_visits where page_id='home'
|
99
|
+
```
|
100
|
+
|
101
|
+
Find more on [Wiki](https://github.com/palkan/influxer/wiki/ActiveRecord-integration).
|
102
|
+
|
103
|
+
## Contributing
|
104
|
+
|
105
|
+
Bug reports and pull requests are welcome on GitHub at [https://github.com/palkan/influxer](https://github.com/palkan/influxer).
|
106
|
+
|
107
|
+
## License
|
49
108
|
|
50
|
-
|
109
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/influxer/client.rb
CHANGED
data/lib/influxer/config.rb
CHANGED
@@ -28,15 +28,28 @@ module Influxer
|
|
28
28
|
:denormalize,
|
29
29
|
:udp,
|
30
30
|
:async,
|
31
|
+
:cache_enabled,
|
32
|
+
:cache,
|
31
33
|
database: "db",
|
32
34
|
time_precision: "ns",
|
33
|
-
cache: false,
|
34
35
|
time_duration_suffix_enabled: false
|
35
36
|
|
36
37
|
def load(*)
|
37
38
|
super
|
38
|
-
|
39
|
-
|
39
|
+
if cache_enabled.nil?
|
40
|
+
self.cache_enabled = cache_enabled_value
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def cache=(value)
|
45
|
+
super
|
46
|
+
self.cache_enabled = cache_enabled_value
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def cache_enabled_value
|
52
|
+
!!cache
|
40
53
|
end
|
41
54
|
end
|
42
55
|
end
|
@@ -33,7 +33,7 @@ module Influxer
|
|
33
33
|
[
|
34
34
|
:write, :write!, :select, :where,
|
35
35
|
:group, :time, :past, :since,
|
36
|
-
:limit, :offset, :fill, :delete_all, :epoch
|
36
|
+
:limit, :offset, :fill, :delete_all, :epoch, :timezone
|
37
37
|
] + Influxer::Calculations::CALCULATION_METHODS
|
38
38
|
),
|
39
39
|
to: :all
|
@@ -22,11 +22,11 @@ module Influxer
|
|
22
22
|
|
23
23
|
MULTI_KEY_METHODS = %i[fanout].freeze
|
24
24
|
|
25
|
-
SINGLE_VALUE_METHODS = %i[fill time limit offset slimit soffset from normalized].freeze
|
25
|
+
SINGLE_VALUE_METHODS = %i[fill time limit offset slimit soffset from normalized timezone].freeze
|
26
26
|
|
27
27
|
MULTI_VALUE_SIMPLE_METHODS = %i[select group].freeze
|
28
28
|
|
29
|
-
SINGLE_VALUE_SIMPLE_METHODS = %i[fill limit offset slimit soffset from].freeze
|
29
|
+
SINGLE_VALUE_SIMPLE_METHODS = %i[fill limit offset slimit soffset from timezone].freeze
|
30
30
|
|
31
31
|
MULTI_VALUE_METHODS.each do |name|
|
32
32
|
class_eval <<-CODE, __FILE__, __LINE__ + 1
|
@@ -121,6 +121,13 @@ module Influxer
|
|
121
121
|
self
|
122
122
|
end
|
123
123
|
|
124
|
+
def timezone(val)
|
125
|
+
return self if val.blank?
|
126
|
+
|
127
|
+
@values[:timezone] = val
|
128
|
+
self
|
129
|
+
end
|
130
|
+
|
124
131
|
def order(val)
|
125
132
|
case val
|
126
133
|
when Hash
|
@@ -159,6 +166,7 @@ module Influxer
|
|
159
166
|
sql << "offset #{offset_value}" unless offset_value.nil?
|
160
167
|
sql << "slimit #{slimit_value}" unless slimit_value.nil?
|
161
168
|
sql << "soffset #{soffset_value}" unless soffset_value.nil?
|
169
|
+
sql << "TZ('#{timezone_value}')" unless timezone_value.blank?
|
162
170
|
sql.join " "
|
163
171
|
end
|
164
172
|
# rubocop:enable Metrics/AbcSize
|
@@ -205,9 +213,13 @@ module Influxer
|
|
205
213
|
end
|
206
214
|
|
207
215
|
def delete_all
|
208
|
-
sql =
|
216
|
+
sql = if where_contains_time?
|
217
|
+
["delete"]
|
218
|
+
else
|
219
|
+
["drop series"]
|
220
|
+
end
|
209
221
|
|
210
|
-
sql << "from #{@instance.series}"
|
222
|
+
sql << "from #{@instance.series(write: true)}"
|
211
223
|
|
212
224
|
sql << "where #{where_values.join(" and ")}" unless where_values.empty?
|
213
225
|
|
@@ -1,6 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
if Influxer.thread_registry_support?
|
4
|
+
require "active_support/per_thread_registry"
|
5
|
+
else
|
6
|
+
require "active_support/core_ext/module/delegation"
|
7
|
+
end
|
4
8
|
|
5
9
|
module Influxer
|
6
10
|
module Scoping
|
@@ -15,7 +19,17 @@ module Influxer
|
|
15
19
|
end
|
16
20
|
|
17
21
|
class ScopeRegistry # :nodoc:
|
18
|
-
|
22
|
+
if Influxer.thread_registry_support?
|
23
|
+
extend ActiveSupport::PerThreadRegistry
|
24
|
+
else
|
25
|
+
class << self
|
26
|
+
delegate :value_for, :set_value_for, to: :instance
|
27
|
+
|
28
|
+
def instance
|
29
|
+
ActiveSupport::IsolatedExecutionState[:influxer_scope_registry] ||= new
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
19
33
|
|
20
34
|
VALID_SCOPE_TYPES = [:current_scope].freeze
|
21
35
|
|
@@ -6,10 +6,10 @@ module Influxer
|
|
6
6
|
class Client
|
7
7
|
def query(sql, options = {})
|
8
8
|
log_sql(sql) do
|
9
|
-
if !options.fetch(:cache, true)
|
10
|
-
super(sql, options)
|
9
|
+
if !(options.fetch(:cache, true) && Influxer.config.cache_enabled)
|
10
|
+
super(sql, **options)
|
11
11
|
else
|
12
|
-
Rails.cache.fetch(normalized_cache_key(sql), cache_options(sql)) { super(sql, options) }
|
12
|
+
Rails.cache.fetch(normalized_cache_key(sql), **cache_options(sql)) { super(sql, **options) }
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -33,8 +33,8 @@ module Influxer
|
|
33
33
|
# of config.cache if defined
|
34
34
|
def cache_options(sql = nil)
|
35
35
|
options = Influxer.config.cache.dup
|
36
|
-
options[:expires_in] = (options[:cache_now_for] || 60) if
|
37
|
-
options
|
36
|
+
options[:expires_in] = (options[:cache_now_for] || 60) if /\snow\(\)/.match?(sql)
|
37
|
+
options.symbolize_keys
|
38
38
|
end
|
39
39
|
|
40
40
|
# add prefix; remove whitespaces
|
data/lib/influxer/version.rb
CHANGED
data/lib/influxer.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: influxer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vlad Dem
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.8'
|
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.8'
|
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: '2.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: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: timecop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -143,21 +143,9 @@ executables: []
|
|
143
143
|
extensions: []
|
144
144
|
extra_rdoc_files: []
|
145
145
|
files:
|
146
|
-
-
|
147
|
-
-
|
148
|
-
- ".rubocop.yml"
|
149
|
-
- ".travis.yml"
|
150
|
-
- Changelog.md
|
151
|
-
- Gemfile
|
152
|
-
- MIT-LICENSE
|
146
|
+
- CHANGELOG.md
|
147
|
+
- LICENSE.txt
|
153
148
|
- README.md
|
154
|
-
- Rakefile
|
155
|
-
- bin/console
|
156
|
-
- gemfiles/rails32.gemfile
|
157
|
-
- gemfiles/rails42.gemfile
|
158
|
-
- gemfiles/rails5.gemfile
|
159
|
-
- gemfiles/rails6.gemfile
|
160
|
-
- influxer.gemspec
|
161
149
|
- lib/influxer.rb
|
162
150
|
- lib/influxer/client.rb
|
163
151
|
- lib/influxer/config.rb
|
@@ -177,24 +165,6 @@ files:
|
|
177
165
|
- lib/influxer/model.rb
|
178
166
|
- lib/influxer/rails/client.rb
|
179
167
|
- lib/influxer/version.rb
|
180
|
-
- spec/cases/points_spec.rb
|
181
|
-
- spec/cases/write_points_spec.rb
|
182
|
-
- spec/client_spec.rb
|
183
|
-
- spec/fixtures/empty_result.json
|
184
|
-
- spec/fixtures/single_series.json
|
185
|
-
- spec/metrics/metrics_spec.rb
|
186
|
-
- spec/metrics/relation_spec.rb
|
187
|
-
- spec/metrics/scoping_spec.rb
|
188
|
-
- spec/model/user_spec.rb
|
189
|
-
- spec/spec_helper.rb
|
190
|
-
- spec/support/metrics/action_metrics.rb
|
191
|
-
- spec/support/metrics/custom_metrics.rb
|
192
|
-
- spec/support/metrics/dummy_metrics.rb
|
193
|
-
- spec/support/metrics/user_metrics.rb
|
194
|
-
- spec/support/metrics/visits_metrics.rb
|
195
|
-
- spec/support/shared_contexts/shared_precision.rb
|
196
|
-
- spec/support/shared_contexts/shared_query.rb
|
197
|
-
- spec/support/user.rb
|
198
168
|
homepage: http://github.com/palkan/influxer
|
199
169
|
licenses:
|
200
170
|
- MIT
|
@@ -204,7 +174,7 @@ metadata:
|
|
204
174
|
documentation_uri: http://github.com/palkan/influxer
|
205
175
|
homepage_uri: http://github.com/palkan/influxer
|
206
176
|
source_code_uri: http://github.com/palkan/influxer
|
207
|
-
post_install_message:
|
177
|
+
post_install_message:
|
208
178
|
rdoc_options: []
|
209
179
|
require_paths:
|
210
180
|
- lib
|
@@ -212,15 +182,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
212
182
|
requirements:
|
213
183
|
- - ">="
|
214
184
|
- !ruby/object:Gem::Version
|
215
|
-
version: 2.
|
185
|
+
version: 2.5.0
|
216
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
187
|
requirements:
|
218
188
|
- - ">="
|
219
189
|
- !ruby/object:Gem::Version
|
220
190
|
version: '0'
|
221
191
|
requirements: []
|
222
|
-
rubygems_version: 3.
|
223
|
-
signing_key:
|
192
|
+
rubygems_version: 3.2.32
|
193
|
+
signing_key:
|
224
194
|
specification_version: 4
|
225
195
|
summary: InfluxDB for Rails
|
226
196
|
test_files: []
|
data/.gitignore
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
# Numerous always-ignore extensions
|
2
|
-
*.diff
|
3
|
-
*.err
|
4
|
-
*.orig
|
5
|
-
*.log
|
6
|
-
*.rej
|
7
|
-
*.swo
|
8
|
-
*.swp
|
9
|
-
*.vi
|
10
|
-
*~
|
11
|
-
*.sass-cache
|
12
|
-
*.iml
|
13
|
-
.idea/
|
14
|
-
|
15
|
-
# Sublime
|
16
|
-
*.sublime-project
|
17
|
-
*.sublime-workspace
|
18
|
-
|
19
|
-
# OS or Editor folders
|
20
|
-
.DS_Store
|
21
|
-
.cache
|
22
|
-
.project
|
23
|
-
.settings
|
24
|
-
.tmproj
|
25
|
-
Thumbs.db
|
26
|
-
|
27
|
-
.bundle/
|
28
|
-
log/*.log
|
29
|
-
pkg/
|
30
|
-
spec/dummy/db/*.sqlite3
|
31
|
-
spec/dummy/db/*.sqlite3-journal
|
32
|
-
spec/dummy/tmp/
|
33
|
-
tmp/
|
34
|
-
|
35
|
-
Gemfile.lock
|
36
|
-
Gemfile.local
|
37
|
-
*.gem
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
require:
|
2
|
-
- standard/cop/semantic_blocks
|
3
|
-
- rubocop-md
|
4
|
-
|
5
|
-
inherit_gem:
|
6
|
-
standard: config/base.yml
|
7
|
-
|
8
|
-
AllCops:
|
9
|
-
Exclude:
|
10
|
-
- 'bin/*'
|
11
|
-
- 'tmp/**/*'
|
12
|
-
- 'docs/**/*'
|
13
|
-
- 'Gemfile'
|
14
|
-
- 'vendor/**/*'
|
15
|
-
- 'gemfiles/**/*'
|
16
|
-
DisplayCopNames: true
|
17
|
-
TargetRubyVersion: 2.4
|
18
|
-
|
19
|
-
Standard/SemanticBlocks:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
Style/FrozenStringLiteralComment:
|
23
|
-
Enabled: true
|
24
|
-
|
25
|
-
Naming/AccessorMethodName:
|
26
|
-
Enabled: false
|
27
|
-
|
28
|
-
Style/TrailingCommaInArrayLiteral:
|
29
|
-
EnforcedStyleForMultiline: no_comma
|
30
|
-
|
31
|
-
Style/TrailingCommaInHashLiteral:
|
32
|
-
EnforcedStyleForMultiline: no_comma
|
33
|
-
|
34
|
-
Layout/AlignParameters:
|
35
|
-
EnforcedStyle: with_first_parameter
|
36
|
-
|
37
|
-
Lint/Void:
|
38
|
-
Exclude:
|
39
|
-
- '**/*.md'
|
40
|
-
|
41
|
-
# See https://github.com/rubocop-hq/rubocop/issues/4222
|
42
|
-
Lint/AmbiguousBlockAssociation:
|
43
|
-
Exclude:
|
44
|
-
- 'spec/**/*'
|
45
|
-
- '**/*.md'
|
46
|
-
|
47
|
-
Lint/DuplicateMethods:
|
48
|
-
Exclude:
|
49
|
-
- '**/*.md'
|
50
|
-
|
51
|
-
Naming/FileName:
|
52
|
-
Exclude:
|
53
|
-
- '**/*.md'
|
54
|
-
|
55
|
-
Layout/InitialIndentation:
|
56
|
-
Exclude:
|
57
|
-
- 'CHANGELOG.md'
|