kono_utils 0.15.8 → 0.15.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1d4a2bf7e2dbae323d6eb43811a4e00e89bcb3b
4
- data.tar.gz: 5887a7c0415db3d9ff06f990033c3ec52f9a714b
3
+ metadata.gz: a721d40dd86ed11012f88bdf551cd01939911fef
4
+ data.tar.gz: b7f0b0ab72be491b9a0ac131c6a0346c2236fd97
5
5
  SHA512:
6
- metadata.gz: 087d7ad951c8ff2eaacea027fe810a2c6ea5f8a7c0ae7b538542220b5df6e4428b9eec8977dc027cb8c700cb7c2941a80b8858be4f757363ab8d578f6ca7fae2
7
- data.tar.gz: 70720a403e85e2cf18bdb994a6b0f2c1aa36e9f57b6cd3bf0048dcc2a84187b0150f55ae14b75646d385402bf5be74711e245290101c2bc4fbdbbfc850add86a
6
+ metadata.gz: 3fc11399099546175691b8b4331f20bf5875ab3c968a1b4a87d27f082fb41e8262272368cc1e2d0eb01fa7eed698fd887e013367e07a8f83b5a412cf774ef49b
7
+ data.tar.gz: 6eed128978155230d9c4e527c84955e8dda832e54d0acf02db8bcc31a7139c16fcc19fba71a989cd5586d7d7067c520bf2ff1e5ece5c8f8ff3112e6e1e56f2af
@@ -1,12 +1,14 @@
1
1
  # Creates DATETIME(6) column types by default which support microseconds.
2
2
  #
3
3
  # Without it, only regular (second precise) DATETIME columns are created.
4
- module ActiveRecord::ConnectionAdapters
5
- if ActiveRecord::Base.connection.instance_of? Mysql2Adapter
6
- version = Gem::Version.new(Mysql2::Client.info.fetch(:version))
7
- min_vresion = Gem::Version.new('5.6.4')
8
- if version>=min_vresion
9
- AbstractMysqlAdapter::NATIVE_DATABASE_TYPES[:datetime][:limit] = 6
4
+ if defined?(ActiveRecord)
5
+ module ActiveRecord::ConnectionAdapters
6
+ if ActiveRecord::Base.connection.instance_of? Mysql2Adapter
7
+ version = Gem::Version.new(Mysql2::Client.info.fetch(:version))
8
+ min_vresion = Gem::Version.new('5.6.4')
9
+ if version>=min_vresion
10
+ AbstractMysqlAdapter::NATIVE_DATABASE_TYPES[:datetime][:limit] = 6
11
+ end
10
12
  end
11
13
  end
12
14
  end
@@ -3,10 +3,12 @@
3
3
 
4
4
  # Where 6N is the number of places after the decimal (.)
5
5
  # For less precision (eg. miliseconds), change 6N to 3N
6
- if ActiveRecord::Base.connection.instance_of? ActiveRecord::ConnectionAdapters::Mysql2Adapter
7
- version = Gem::Version.new(Mysql2::Client.info.fetch(:version))
8
- min_vresion = Gem::Version.new('5.6.4')
9
- if version>=min_vresion
10
- Time::DATE_FORMATS[:db] = '%Y-%m-%d %H:%M:%S.%6N'
6
+ if defined?(ActiveRecord)
7
+ if ActiveRecord::Base.connection.instance_of? ActiveRecord::ConnectionAdapters::Mysql2Adapter
8
+ version = Gem::Version.new(Mysql2::Client.info.fetch(:version))
9
+ min_vresion = Gem::Version.new('5.6.4')
10
+ if version>=min_vresion
11
+ Time::DATE_FORMATS[:db] = '%Y-%m-%d %H:%M:%S.%6N'
12
+ end
11
13
  end
12
14
  end
@@ -9,5 +9,10 @@ module KonoUtils
9
9
  require 'will_paginate-bootstrap'
10
10
  require 'rdiscount'
11
11
 
12
+
13
+ initializer 'kono_utils.append_views', :group => :all do |app|
14
+ ActionController::Base.append_view_path KonoUtils::Engine.root.join("app", "views", "kono_utils")
15
+ end
16
+
12
17
  end
13
18
  end
@@ -1,3 +1,3 @@
1
1
  module KonoUtils
2
- VERSION = '0.15.8'
2
+ VERSION = '0.15.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kono_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.8
4
+ version: 0.15.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-11 00:00:00.000000000 Z
11
+ date: 2017-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -375,7 +375,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
375
375
  version: '0'
376
376
  requirements: []
377
377
  rubyforge_project:
378
- rubygems_version: 2.6.7
378
+ rubygems_version: 2.4.8
379
379
  signing_key:
380
380
  specification_version: 4
381
381
  summary: Kono Utilities
@@ -424,4 +424,3 @@ test_files:
424
424
  - spec/lib/kono_utils/fiscal_code_spec.rb
425
425
  - spec/rails_helper.rb
426
426
  - spec/spec_helper.rb
427
- has_rdoc: