influxer 0.5.1 → 0.5.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: a56f1b17d497e12281a8ae86939c49f83d2037dc
4
- data.tar.gz: c64d0f15b9a76e2fdd8190be12914c315651d166
3
+ metadata.gz: 4a1ea06be51c4a1ef0994b986ac93b1e931329ff
4
+ data.tar.gz: bf863f875e968bdbcfef1d5f6efe833637d7dc14
5
5
  SHA512:
6
- metadata.gz: c2250060657155d5454d9a4603a1cb5d589f5ce3b66d66091c2d0267ec0e50968ebd0851811bb10bce1f655ab88a239741eb979343321fc4b30b8bd779e4e25a
7
- data.tar.gz: 1ada172a89d606bb1d19399318c0976108ff5c7084ed68d274df07954550484dca58d2ec82474e1b3d11f54d6de98425441ccdc7883d1071a96acb196b7aae8c
6
+ metadata.gz: 01a0afe32a47e09a7bcedfbaabc7df322542eee72f2c1d4835b09a8661e90ebe4c7cffcc82dcdae747fccc106a097a868fe8142aba8bd90e4a942dfbd35be5a7
7
+ data.tar.gz: f564557f561ebd6553ef9d63592a6d877cf901877a0f2ea5c656a1e621396f7c4881c9ad120736b46acfc9640531d4bb96dcf2593dc4f252e8094939e27386f2
data/.travis.yml CHANGED
@@ -3,4 +3,7 @@ cache: bundler
3
3
  matrix:
4
4
  include:
5
5
  - rvm: 2.3.0
6
- gemfile: gemfiles/rails42.gemfile
6
+ gemfile: gemfiles/rails42.gemfile
7
+ - rvm: 2.3.1
8
+ gemfile: gemfiles/rails5.gemfile
9
+
data/Changelog.md CHANGED
@@ -1,4 +1,7 @@
1
- ## master
1
+ ## 0.5.2
2
+ - Fix bug with query logging
3
+
4
+ ## 0.5.1
2
5
  - Fix whitespace around operators
3
6
  - Add `Relation#from` method to redefine series
4
7
  - Handle nil values for tags in #where clause
data/README.md CHANGED
@@ -3,6 +3,8 @@
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).
5
5
 
6
+ **NOTE**: Influxer is Rails 5 compatible!
7
+
6
8
  Influxer provides an ActiveRecord-style way to work with [InfluxDB](https://influxdb.com/) with many useful features, such as:
7
9
  - Familar query language (use `select`, `where`, `not`, `group` etc).
8
10
  - Support for Regex conditions: `where(page_id: /^home\/.*/) #=> select * ... where page_id=~/^home\/.*/`.
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'sqlite3', platform: :mri
4
+ gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
5
+ gem 'activerecord', '~> 5.0.0'
6
+
7
+ gemspec path: '..'
data/influxer.gemspec CHANGED
@@ -25,6 +25,6 @@ Gem::Specification.new do |s|
25
25
  s.add_development_dependency 'sqlite3'
26
26
  s.add_development_dependency 'activerecord', '>= 4.0'
27
27
  s.add_development_dependency 'pry-byebug'
28
- s.add_development_dependency "rspec", "~> 3.1.0"
28
+ s.add_development_dependency "rspec", ">= 3.1.0"
29
29
  s.add_development_dependency "webmock", "~> 1.21.0"
30
30
  end
@@ -7,5 +7,9 @@ module Influxer
7
7
  ActiveRecord::Base.send :include, Influxer::Model
8
8
  end
9
9
  end
10
+
11
+ initializer "set InfluxDB logger" do |_app|
12
+ InfluxDB::Logging.logger = Rails.logger
13
+ end
10
14
  end
11
15
  end
@@ -3,7 +3,7 @@ module Influxer
3
3
  # - Add cache support for queries
4
4
  class Client
5
5
  def query(sql, options = {})
6
- log(sql) do
6
+ log_sql(sql) do
7
7
  if !options.fetch(:cache, true) || Influxer.config.cache == false
8
8
  super(sql, options)
9
9
  else
@@ -12,7 +12,7 @@ module Influxer
12
12
  end
13
13
  end
14
14
 
15
- def log(sql)
15
+ def log_sql(sql)
16
16
  return yield unless logger.debug?
17
17
 
18
18
  start_ts = Time.now
@@ -1,3 +1,3 @@
1
1
  module Influxer # :nodoc:
2
- VERSION = "0.5.1".freeze
2
+ VERSION = "0.5.2".freeze
3
3
  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: 0.5.1
4
+ version: 0.5.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: 2016-05-24 00:00:00.000000000 Z
11
+ date: 2016-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -140,14 +140,14 @@ dependencies:
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: 3.1.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: 3.1.0
153
153
  - !ruby/object:Gem::Dependency
@@ -181,6 +181,7 @@ files:
181
181
  - README.md
182
182
  - Rakefile
183
183
  - gemfiles/rails42.gemfile
184
+ - gemfiles/rails5.gemfile
184
185
  - influxer.gemspec
185
186
  - lib/influxer.rb
186
187
  - lib/influxer/client.rb
@@ -233,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
234
  version: '0'
234
235
  requirements: []
235
236
  rubyforge_project:
236
- rubygems_version: 2.5.1
237
+ rubygems_version: 2.6.4
237
238
  signing_key:
238
239
  specification_version: 4
239
240
  summary: InfluxDB for Rails