diff --git a/api_taster.gemspec b/api_taster.gemspec index 4405d68..5728a79 100644 --- a/api_taster.gemspec +++ b/api_taster.gemspec @@ -16,8 +16,9 @@ Gem::Specification.new do |s| s.add_dependency 'rails', '>= 3.1.0' s.add_dependency 'jquery-rails' - s.add_dependency 'sass-rails' - s.add_dependency 'bootstrap-sass', '~> 2.1' + s.add_dependency 'sass-rails', '~> 3.2' + s.add_dependency 'bootstrap-sass', '~> 2.2.2.0' + s.add_dependency 'redcarpet' s.add_dependency 'remotipart', '~> 1.0' diff --git a/app/controllers/api_taster/routes_controller.rb b/app/controllers/api_taster/routes_controller.rb index e5d8678..414aa99 100644 --- a/app/controllers/api_taster/routes_controller.rb +++ b/app/controllers/api_taster/routes_controller.rb @@ -1,11 +1,10 @@ module ApiTaster class RoutesController < ApiTaster::ApplicationController before_filter :map_routes + helper_method :missing_definitions?, :obsolete_definitions? def index @routes = Route.grouped_routes - @has_missing_definitions = Route.missing_definitions.present? - @has_obsolete_definitions = Route.obsolete_definitions.present? end def show @@ -27,5 +26,13 @@ def obsolete_definitions def map_routes Route.map_routes end + + def missing_definitions? + Route.missing_definitions.present? && ApiTaster.config.include_missing_definitions + end + + def obsolete_definitions? + Route.obsolete_definitions.present? && ApiTaster.config.include_obsolete_definitions + end end end diff --git a/app/views/api_taster/routes/index.html.erb b/app/views/api_taster/routes/index.html.erb index 8e99942..e09c9a2 100644 --- a/app/views/api_taster/routes/index.html.erb +++ b/app/views/api_taster/routes/index.html.erb @@ -2,19 +2,17 @@