rails_db_info 0.1.6 → 0.1.7

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: ac910d6f5186e67b479785eca891478751eed9f2
4
- data.tar.gz: d7d4cd69be3995aba32f0aea351fb109739d38f9
3
+ metadata.gz: 1ae99a334d11999d3e8865ee69c07a3747a8977d
4
+ data.tar.gz: bd252afd14826532231746ac1f7fe1f6edb72bca
5
5
  SHA512:
6
- metadata.gz: 70859985633a124490910e6b7e89f822bedd11cb8ccca6eb601b79a68184561b3aea34db602c8fb7994fdc2db6ea31fcfef0933fbb1c19d659484b7f35909093
7
- data.tar.gz: 82643091144e0380fc6637c597a6adb03774048015732a6d87def73d205085f3cc47e2251864c32b5aa70425aab7c33bac92a8ffd520502f84bfd3d7331a5a25
6
+ metadata.gz: 3384f542f07269ed2423b9a2de58ae2ac2b5f838af266f77ab05dee80cf44ae5198ffec17b8921d1840992fe51b2ccfa700a3886c97101c2ae221b7983875310
7
+ data.tar.gz: 32e27b6785f614799a79d516f6a3eac9608cc976e89846deed645672c4ff80ecd52ebccbec396e2bab2a3634dd0f8a4715f01c5236697f13522757c35925d94f
data/Rakefile CHANGED
@@ -30,5 +30,4 @@ Rake::TestTask.new(:test) do |t|
30
30
  t.verbose = false
31
31
  end
32
32
 
33
-
34
33
  task default: :test
data/lib/rails/routes.rb CHANGED
@@ -2,8 +2,8 @@ module ActionDispatch::Routing
2
2
  class Mapper
3
3
  # Includes mount_rails_db_info method for routes. This method is responsible to
4
4
  # generate all needed routes for rails_db_info
5
- def mount_rails_db_info
6
- mount RailsDbInfo::Engine=> "/rails/info/db"
5
+ def mount_rails_db_info(options = {})
6
+ mount RailsDbInfo::Engine => "/rails/info/db", as: options[:as] || 'rails_db_info'
7
7
  end
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module RailsDbInfo
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
data/lib/rails_db_info.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require "rails_db_info/engine"
2
- require "rails/routes"
2
+ require_relative "rails/routes"
3
3
 
4
4
  module RailsDbInfo
5
5
  end
@@ -1,3 +1,6 @@
1
1
  Rails.application.routes.draw do
2
- # mount RailsDbInfo::Engine => "/rails/info/db"
2
+ if ENV['CATCH_ALL_ROUTE']
3
+ mount_rails_db_info as: 'rails_db_info_engine'
4
+ get '*path' => 'foo#bar'
5
+ end
3
6
  end