Permalink
Browse files

remove deprecations planned for 0.14

  • Loading branch information...
ujifgc committed Nov 2, 2016
1 parent d5a8079 commit 365f23b5dcf69d72bfab7fb6dcbf4c82fe5d7945
@@ -10,15 +10,6 @@
module PadrinoTasks
def self.init(init=false)
- lib_path = File.expand_path("lib")
- unless $LOAD_PATH.any?{ |path| File.expand_path(path) == lib_path }
- warn <<-EOT
-WARNING! In Padrino >= 0.14.0 cli command `padrino rake` will NOT add
-'./lib' folder to $LOAD_PATH. Please alter your `require` calls accordingly
-if you depend on this behavior.
- EOT
- $LOAD_PATH.unshift lib_path
- end
Padrino::Tasks.files.flatten.uniq.each { |rakefile| Rake.application.add_import(rakefile) rescue puts "<= Failed load #{ext}" }
load(File.expand_path('../rake_tasks.rb', __FILE__))
Rake.application.load_imports
@@ -2,7 +2,6 @@
# This file loads certain extensions required by Padrino.
#
require 'padrino-support/core_ext/string/colorize'
-require 'padrino-support/core_ext/object_space'
require 'padrino-support/file_set'
require 'padrino-support/utils'
@@ -1,36 +0,0 @@
-module ObjectSpace
- class << self
- ##
- # Returns all the classes in the object space.
- # Optionally, a block can be passed, for example the following code
- # would return the classes that start with the character "A":
- #
- # ObjectSpace.classes do |klass|
- # if klass.to_s[0] == "A"
- # klass
- # end
- # end
- #
- def classes(&block)
- warn 'Warning! ObjectSpace.classes will be removed in Padrino 0.14'
- require 'padrino-core/reloader'
- Padrino::Reloader::Storage.send(:object_classes, &block)
- end
-
- ##
- # Returns a list of existing classes that are not included in "snapshot"
- # This method is useful to get the list of new classes that were loaded
- # after an event like requiring a file.
- # Usage:
- #
- # snapshot = ObjectSpace.classes
- # # require a file
- # ObjectSpace.new_classes(snapshot)
- #
- def new_classes(snapshot)
- warn 'Warning! ObjectSpace.new_classes will be removed in Padrino 0.14'
- require 'padrino-core/reloader'
- Padrino::Reloader::Storage.send(:new_classes, snapshot)
- end
- end
-end

0 comments on commit 365f23b

Please sign in to comment.