X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=vendor%2Frails%2Frailties%2Fbuiltin%2Frails_info%2Frails%2Finfo.rb;fp=vendor%2Frails%2Frailties%2Fbuiltin%2Frails_info%2Frails%2Finfo.rb;h=0000000000000000000000000000000000000000;hb=36d9f3351a3b4e8159279445190e2287ffdea86c;hp=a20d9bfe62947451e8b17296abea08fc3762b7e7;hpb=913cf6054b1d29b5d2f5e620304af7ee77cc1f1f;p=feedcatcher.git diff --git a/vendor/rails/railties/builtin/rails_info/rails/info.rb b/vendor/rails/railties/builtin/rails_info/rails/info.rb deleted file mode 100644 index a20d9bf..0000000 --- a/vendor/rails/railties/builtin/rails_info/rails/info.rb +++ /dev/null @@ -1,129 +0,0 @@ -module Rails - module Info - mattr_accessor :properties - class << (@@properties = []) - def names - map &:first - end - - def value_for(property_name) - if property = assoc(property_name) - property.last - end - end - end - - class << self #:nodoc: - def property(name, value = nil) - value ||= yield - properties << [name, value] if value - rescue Exception - end - - def frameworks - %w( active_record action_pack active_resource action_mailer active_support ) - end - - def framework_version(framework) - require "#{framework}/version" - "#{framework.classify}::VERSION::STRING".constantize - end - - def edge_rails_revision(info = git_info) - info[/commit ([a-z0-9-]+)/, 1] || freeze_edge_version - end - - def freeze_edge_version - if File.exist?(rails_vendor_root) - begin - Dir[File.join(rails_vendor_root, 'REVISION_*')].first.scan(/_(\d+)$/).first.first - rescue - Dir[File.join(rails_vendor_root, 'TAG_*')].first.scan(/_(.+)$/).first.first rescue 'unknown' - end - end - end - - def to_s - column_width = properties.names.map {|name| name.length}.max - ["About your application's environment", *properties.map do |property| - "%-#{column_width}s %s" % property - end] * "\n" - end - - alias inspect to_s - - def to_html - returning table = '
#{CGI.escapeHTML(name.to_s)} | ) - table << %(#{CGI.escapeHTML(value.to_s)} |