influxer 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -2
- data/README.md +1 -1
- data/influxer.gemspec +1 -1
- data/lib/influxer/config.rb +1 -1
- data/lib/influxer/metrics/metrics.rb +8 -5
- data/lib/influxer/metrics/relation.rb +0 -1
- data/lib/influxer/model.rb +1 -1
- data/lib/influxer/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a98e49b2f7085c5e01dcdfa21cc136a6f7907ee6
|
4
|
+
data.tar.gz: 86846f099e3a62cb83804fc1ea362c185add8992
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce0f7ee3f32f256bc425cad1109333d27d52b7155e19f2dd8b92ba7cef8fb2496ad82ea292ac65cf9487402c7c580e4b734d151ca05f06e8c5cc4de9fa815f01
|
7
|
+
data.tar.gz: cf48787c5ee242c0c35413e92bcad1f4b74a8f9f974b5041f54872db0d21cd56e7d0ef42cb6ab9964ca7fcaad4bf06f69f0d45af37e1a3877f9141bb049794de
|
data/.rubocop.yml
CHANGED
@@ -24,7 +24,7 @@ Style/SymbolArray:
|
|
24
24
|
Style/SafeNavigation:
|
25
25
|
Enabled: false
|
26
26
|
|
27
|
-
|
27
|
+
Naming/AccessorMethodName:
|
28
28
|
Enabled: false
|
29
29
|
|
30
30
|
Style/TrivialAccessors:
|
@@ -37,13 +37,16 @@ Style/Documentation:
|
|
37
37
|
Style/StringLiterals:
|
38
38
|
Enabled: false
|
39
39
|
|
40
|
-
|
40
|
+
Naming/SpaceInsideStringInterpolation:
|
41
41
|
EnforcedStyle: no_space
|
42
42
|
|
43
43
|
Style/BlockDelimiters:
|
44
44
|
Exclude:
|
45
45
|
- 'spec/**/*.rb'
|
46
46
|
|
47
|
+
Lint/MissingCopEnableDirective:
|
48
|
+
Enabled: false
|
49
|
+
|
47
50
|
Lint/AmbiguousRegexpLiteral:
|
48
51
|
Enabled: false
|
49
52
|
|
@@ -65,3 +68,6 @@ Rails/Date:
|
|
65
68
|
|
66
69
|
Rails/TimeZone:
|
67
70
|
Enabled: false
|
71
|
+
|
72
|
+
Gemspec/OrderedDependencies:
|
73
|
+
Enabled: false
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![Gem Version](https://badge.fury.io/rb/influxer.svg)](https://rubygems.org/gems/influxer) [![Build Status](https://travis-ci.org/palkan/influxer.svg?branch=master)](https://travis-ci.org/palkan/influxer)
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/influxer.svg)](https://rubygems.org/gems/influxer) [![Build Status](https://travis-ci.org/palkan/influxer.svg?branch=master)](https://travis-ci.org/palkan/influxer) [![Dependency Status](https://dependencyci.com/github/palkan/influxer/badge)](https://dependencyci.com/github/palkan/influxer)
|
2
2
|
## Influxer
|
3
3
|
|
4
4
|
**NOTE**: Version 0.3.x supports InfluxDB >= 0.9.0. For InfluxDB 0.8.x use [version 0.2.5](https://github.com/palkan/influxer/tree/0.2.5).
|
data/influxer.gemspec
CHANGED
@@ -29,5 +29,5 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_development_dependency 'pry-byebug'
|
30
30
|
s.add_development_dependency "rspec", ">= 3.1.0"
|
31
31
|
s.add_development_dependency "webmock", "~> 2.1"
|
32
|
-
s.add_development_dependency "rubocop", "~> 0.
|
32
|
+
s.add_development_dependency "rubocop", "~> 0.52"
|
33
33
|
end
|
data/lib/influxer/config.rb
CHANGED
@@ -13,11 +13,13 @@ module Influxer
|
|
13
13
|
class Metrics
|
14
14
|
TIME_FACTOR = 1_000_000_000
|
15
15
|
|
16
|
+
# rubocop:disable Style/MixinUsage
|
16
17
|
if Influxer.active_model3?
|
17
18
|
include Influxer::ActiveModel3::Model
|
18
19
|
else
|
19
20
|
include ActiveModel::Model
|
20
21
|
end
|
22
|
+
# rubocop:enable Style/MixinUsage
|
21
23
|
|
22
24
|
include ActiveModel::Validations
|
23
25
|
extend ActiveModel::Callbacks
|
@@ -89,11 +91,12 @@ module Influxer
|
|
89
91
|
def set_series(*args)
|
90
92
|
if args.empty?
|
91
93
|
matches = to_s.match(/^(.*)Metrics$/)
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
@series =
|
95
|
+
if matches.nil?
|
96
|
+
superclass.respond_to?(:series) ? superclass.series : to_s.underscore
|
97
|
+
else
|
98
|
+
matches[1].split("::").join("_").underscore
|
99
|
+
end
|
97
100
|
elsif args.first.is_a?(Proc)
|
98
101
|
@series = args.first
|
99
102
|
else
|
data/lib/influxer/model.rb
CHANGED
@@ -8,7 +8,7 @@ module Influxer
|
|
8
8
|
extend ActiveSupport::Concern
|
9
9
|
|
10
10
|
module ClassMethods # :nodoc:
|
11
|
-
# rubocop:disable
|
11
|
+
# rubocop:disable Naming/PredicateName
|
12
12
|
# rubocop:disable Metrics/MethodLength
|
13
13
|
# rubocop:disable Metrics/AbcSize
|
14
14
|
def has_metrics(*args, **params)
|
data/lib/influxer/version.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.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vlad Dem
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '0.
|
173
|
+
version: '0.52'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '0.
|
180
|
+
version: '0.52'
|
181
181
|
description: InfluxDB the Rails way
|
182
182
|
email:
|
183
183
|
- dementiev.vm@gmail.com
|
@@ -253,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
253
253
|
version: '0'
|
254
254
|
requirements: []
|
255
255
|
rubyforge_project:
|
256
|
-
rubygems_version: 2.6.
|
256
|
+
rubygems_version: 2.6.13
|
257
257
|
signing_key:
|
258
258
|
specification_version: 4
|
259
259
|
summary: InfluxDB for Rails
|