<%= Rails.version -%> <%= Rails.vendor_rails? ? "vendor" : "gem" -%> <%= RAILS_ROOT -%> <%= RAILS_ENV -%> <%= if File.exist?("#{RAILS_ROOT}/.git") "git" elsif File.exist?("#{RAILS_ROOT}/.svn") "subversion" else "other" end -%> <%= File.basename(`git symbolic-ref HEAD`) -%> <% dir=RAILS_ROOT if dir.blank? -%> <%= Dir.chdir(dir) {`git rev-list "HEAD^..HEAD" --abbrev-commit --abbrev=7`} -%> <% dir=RAILS_ROOT if dir.blank? -%> <%= Dir.chdir(dir) {`git ls-files -m`}.blank? ? "clean" : "modified" -%> <%= `git log "HEAD^..HEAD" --pretty=format:%cD` -%> <% method = cms_method.strip -%> <% method = cms_method.strip -%> <% method = cms_method.strip -%> <% method = cms_method.strip -%> <%= Hobo::VERSION -%> <% gems = ActiveSupport::OrderedHash.new -%> <% Rails.configuration.gems.each do |gem| gems[name] ||= gem gem.dependencies.each do |dep| gems[dep] ||= dep end end -%> <%= this.name -%> <%= this.requirements.map{|l| l.first+l.second.to_s}.join(",") -%> <%= this.specification.version.to_s -%> <%= this.frozen? ? "frozen" : (this.installed? ? "installed" : "missing") -%> <%= this.name -%> <% plugins = Rails.configuration.plugin_loader.new(Hobo.rails_initializer).plugins %> <%= this.name -%> <%= this.directory -%> <%= braids = File.open("#{RAILS_ROOT}/.braids") {|f| YAML::load(f) } rescue {} if !braids[this.directory.gsub(RAILS_ROOT+"/", "")].nil? "braid" elsif File.lstat(this.directory).symlink? "symlink" elsif File.exist?(this.directory+"/.git") "git-submodule" else "other" end -%> <% method = plugin_method.strip -%> <% method = plugin_method.strip -%> <%= diff=`braid diff #{this.directory.gsub(RAILS_ROOT+"/", "")}` diff.strip.empty? ? "clean" : "modified" -%> <%= braids = File.open("#{RAILS_ROOT}/.braids") {|f| YAML::load(f) } rescue {} b=braids[this.directory.gsub(RAILS_ROOT+"/", "")] b['revision'][0...7] if b -%> <%= this -%> <%= Rails.configuration.database_configuration[this]['adapter'] -%> <%= Rails.configuration.database_configuration[this]['database'] -%> <% # stolen from railroad/model_diagram.rb files = Dir.glob("app/models/**/*.rb") models = files.map do |file| model_name = (model_path = file.gsub(/^(app\/models\/)([\w_\/\\]+)\.rb/, '\2')).camelize # Hack to skip all xxx_related.rb files next if /_related/i =~ model_name begin model_name.constantize rescue LoadError oldlen = model_path.length model_path.gsub!(/.*[\/\\]/, '') model_name = model_path.camelize if oldlen > model_path.length retry end next rescue NameError next end end -%> <%= this.to_s -%> <%= this.try.table_name -%> <%= this.type.to_s -%> <%= this.name -%> <%= this.name.to_s -%> <%= if this.macro.to_s=='has_many' && this.options[:through] 'has_many :through' else this.macro.to_s end -%> <%= (this.class_name.try.respond_to? 'underscore') ? this.class_name.underscore.singularize.camelize : this.try.class_name -%>