rails_db 2.0.5 → 2.0.6

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
  SHA256:
3
- metadata.gz: d5a9049298d5b4c4dd682e90e76cceee9a5a02ee4cdfa4aca8bca6fe982c361d
4
- data.tar.gz: 50361c597d2bdbdbeed0c830ca39932699e644776b2888020ca91e4a667e3831
3
+ metadata.gz: a93993de667f0685489cb8f5bfc808c6dd38f06faa4ba31e5e6f94c087075464
4
+ data.tar.gz: 222191ecaf961bf0604b79b1151e7104f9845241eac0ed0f4a19e5810699c129
5
5
  SHA512:
6
- metadata.gz: 60de4a11da325080db672e74174a6964d12b7e1b8bbc02ec04a9a8c7dd3a58dab0e55af3023e1d25c6afdba49e701d8d30b2e85f49e906cb912ecef41253af86
7
- data.tar.gz: cd731321900d634d36f88757cf889dbfa5f16cb228f413404d82f5ea48aaa320adabcb03c06c595ab494c29c7f56d50aec1b06525df95d3ff4a8630a85b653a5
6
+ metadata.gz: d73372834d7db11c241b11540c063f191cc5d7df1ee21b30a0f554fee59dc6a6a1120b97673b405ba1ee3f1b5e83380382291de46f5a9b6ef93895804c07125b
7
+ data.tar.gz: 552b70ffd82d6455df32444cbb400bbe0d94bc01e588e982c8c3bcc5416d47fb460eab494a913a6a083fac6c39da089936f7af4c95cb67bf43b869a58cc66a32
@@ -12,7 +12,8 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- rails_db (2.0.5)
15
+ rails_db (2.0.6)
16
+ activerecord
16
17
  codemirror-rails
17
18
  kaminari
18
19
  rails (>= 5.0.0)
@@ -3,6 +3,7 @@ require 'codemirror-rails'
3
3
  require 'terminal-table'
4
4
  require 'csv'
5
5
  require 'simple_form'
6
+ require 'active_record'
6
7
  require 'ransack'
7
8
  require 'kaminari'
8
9
 
@@ -63,4 +64,4 @@ require_relative "libs"
63
64
  require_relative "rails_db/engine"
64
65
  require_relative "rails/routes"
65
66
  require_relative "ext/simple_form_ext"
66
- require_relative "ext/ransack_ext"
67
+ require_relative "ext/ransack_ext"
@@ -3,6 +3,8 @@ module RailsDb
3
3
 
4
4
  def connection
5
5
  ActiveRecord::Base.connection
6
+ rescue ActiveRecord::ConnectionNotEstablished
7
+ ActiveRecord::Base.establish_connection(Rails.application.config.database_configuration[Rails.env]).connection
6
8
  end
7
9
 
8
10
  def columns
@@ -22,4 +24,4 @@ module RailsDb
22
24
  end
23
25
 
24
26
  end
25
- end
27
+ end
@@ -1,3 +1,3 @@
1
1
  module RailsDb
2
- VERSION = "2.0.5"
2
+ VERSION = "2.0.6"
3
3
  end
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency 'codemirror-rails'
22
22
  s.add_dependency 'terminal-table'
23
23
  s.add_dependency 'simple_form', '>= 4.0.1'
24
+ s.add_dependency 'activerecord'
24
25
  s.add_dependency 'ransack'
25
26
  s.add_dependency 'kaminari'
26
27
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-14 00:00:00.000000000 Z
11
+ date: 2019-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: 4.0.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: activerecord
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: ransack
71
85
  requirement: !ruby/object:Gem::Requirement