diff --git a/lib/api_taster.rb b/lib/api_taster.rb index c1bac0a..e74e8e8 100644 --- a/lib/api_taster.rb +++ b/lib/api_taster.rb @@ -1,5 +1,4 @@ require 'jquery-rails' -#require 'bootstrap-sass' require 'remotipart' require 'active_support/dependencies' require 'api_taster/engine' @@ -13,7 +12,11 @@ module ApiTaster self.global_params = {} mattr_accessor :route_path - self.route_path = "#{Rails.root}/lib/api_tasters" + def self.route_path + @@route_path ||= begin + "#{Rails.root.to_s}/lib/api_tasters" + end + end mattr_accessor :global_headers self.global_headers = {} diff --git a/lib/api_taster/route.rb b/lib/api_taster/route.rb index e0acfbf..c9230b5 100644 --- a/lib/api_taster/route.rb +++ b/lib/api_taster/route.rb @@ -9,6 +9,7 @@ class Route cattr_accessor :metadata class << self + def map_routes(path = ApiTaster.route_path) self.route_set = Rails.application.routes self.supplied_params = {} diff --git a/lib/api_taster/version.rb b/lib/api_taster/version.rb index 2185af7..8f25ba5 100644 --- a/lib/api_taster/version.rb +++ b/lib/api_taster/version.rb @@ -1,3 +1,3 @@ module ApiTaster - VERSION = "0.8.3" + VERSION = "0.8.4" end