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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b97291ee91b0d574373b50fac3a33d6627b57091
4
- data.tar.gz: c01bf416f9c8764c509d9e24498b3db71150db2a
3
+ metadata.gz: a98e49b2f7085c5e01dcdfa21cc136a6f7907ee6
4
+ data.tar.gz: 86846f099e3a62cb83804fc1ea362c185add8992
5
5
  SHA512:
6
- metadata.gz: 2eb6a6dc65620c2dd6ef6d6cff8ad25d524244b6b115e06ed3c689d55726dc10649f15b9054b429d4a96ac4f3a8dfa7cdd394479fd1bf008b1b0f27e19384a34
7
- data.tar.gz: 6eb53b3436dba96464bb6d8ff06c48f424a38f6576ef596d6ff5a37a6ce1dbedf27b72df3d0d28c8f42cff2a8858335c1516447bed6df93796e997581f512cb2
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
- Style/AccessorMethodName:
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
- Style/SpaceInsideStringInterpolation:
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.49"
32
+ s.add_development_dependency "rubocop", "~> 0.52"
33
33
  end
@@ -32,7 +32,7 @@ module Influxer
32
32
  time_precision: 'ns',
33
33
  cache: false
34
34
 
35
- def load
35
+ def load(*)
36
36
  super
37
37
  # we want pass @cache value as options to cache store, so we want it to be a Hash
38
38
  @cache = {}.with_indifferent_access if @cache == true
@@ -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
- if matches.nil?
93
- @series = superclass.respond_to?(:series) ? superclass.series : to_s.underscore
94
- else
95
- @series = matches[1].split("::").join("_").underscore
96
- end
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
@@ -84,7 +84,6 @@ module Influxer
84
84
  @instance = klass.new params[:attributes]
85
85
  reset
86
86
  where(params[:attributes]) if params[:attributes].present?
87
- self
88
87
  end
89
88
 
90
89
  def write(params = {})
@@ -8,7 +8,7 @@ module Influxer
8
8
  extend ActiveSupport::Concern
9
9
 
10
10
  module ClassMethods # :nodoc:
11
- # rubocop:disable Style/PredicateName
11
+ # rubocop:disable Naming/PredicateName
12
12
  # rubocop:disable Metrics/MethodLength
13
13
  # rubocop:disable Metrics/AbcSize
14
14
  def has_metrics(*args, **params)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Influxer # :nodoc:
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
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.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-07-31 00:00:00.000000000 Z
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.49'
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.49'
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.11
256
+ rubygems_version: 2.6.13
257
257
  signing_key:
258
258
  specification_version: 4
259
259
  summary: InfluxDB for Rails