rails_db 2.0.1 → 2.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10dbc8b9c76a8fc36b5be202bcf3fd8ca221ccbc
|
4
|
+
data.tar.gz: 74d578d77d640bf1f48eadd947d0689bcc04ae1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c363fe57bfb187af161d0b04468aa23992991edc6d163a1d64d1957b7fb0a958c04c9e8566a394f9a2d1cf3123f2c494cfb63c4096c1aa979ec9be710cf666b9
|
7
|
+
data.tar.gz: de98dbd0da65b2e8ced8880ed88ea458a5f57bb1b2e8576275b7744cc1fe3f8a7814aa952be8688e37d9315a40f112d46ec637b831bec81ac0017c22e16221c3
|
data/Gemfile.lock
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
module RailsDb
|
2
2
|
module ApplicationHelper
|
3
|
+
|
4
|
+
def rails_db
|
5
|
+
super
|
6
|
+
rescue NameError
|
7
|
+
guess_name
|
8
|
+
end
|
9
|
+
|
10
|
+
# in case engine was added in namespace
|
11
|
+
def guess_name
|
12
|
+
sections = request.path.split('/').reject(&:blank?)
|
13
|
+
if sections.size > 1
|
14
|
+
sections[-1] = 'rails_db'
|
15
|
+
variable = sections.join("_")
|
16
|
+
result = eval(variable)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
3
20
|
def rails_db_tables
|
4
21
|
RailsDb::Database.accessible_tables
|
5
22
|
end
|
data/lib/rails_db/version.rb
CHANGED
@@ -87,6 +87,12 @@ class DashboardControllerTest < ActionDispatch::IntegrationTest
|
|
87
87
|
assert_equal 200, status
|
88
88
|
customer.reload
|
89
89
|
assert_equal 'STI', customer.name
|
90
|
+
|
91
|
+
get '/x/y/db'
|
92
|
+
assert_equal 200, status
|
93
|
+
RailsDb::Database.accessible_tables.each do |table|
|
94
|
+
assert_match(table, response.body)
|
95
|
+
end
|
90
96
|
end
|
91
97
|
|
92
98
|
end
|
data/test/dummy/config/routes.rb
CHANGED
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.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Kasyanchuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|