Merge branch '3.2-master' into 190-encodings
Conflicts: db/schema.rb
This commit is contained in:
commit
2db7726d55
|
@ -55,7 +55,7 @@ class CommentPresenter < ApplicationPresenter
|
|||
end
|
||||
|
||||
def image
|
||||
@image ||= "https://secure.gravatar.com/avatar/#{Digest::MD5.hexdigest(@user.email.downcase)}?s=40&r=pg"
|
||||
@image ||= helpers.avatar_url(@user, :medium)
|
||||
end
|
||||
|
||||
def date
|
||||
|
|
|
@ -22,7 +22,12 @@ class GitPresenters::CommitAsMessagePresenter < ApplicationPresenter
|
|||
end
|
||||
|
||||
def image
|
||||
@image ||= "https://secure.gravatar.com/avatar/#{Digest::MD5.hexdigest(committer.email.downcase)}?s=40&r=pg"
|
||||
c = committer
|
||||
@image ||= if c.class == User
|
||||
helpers.avatar_url(c, :medium)
|
||||
else
|
||||
helpers.avatar_url_by_email(c.email, :medium)
|
||||
end
|
||||
end
|
||||
|
||||
def date
|
||||
|
|
122
db/schema.rb
122
db/schema.rb
|
@ -23,8 +23,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
|
||||
create_table "arches", :force => true do |t|
|
||||
t.string "name", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "arches", ["name"], :name => "index_arches_on_name", :unique => true
|
||||
|
@ -33,8 +33,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.integer "user_id"
|
||||
t.string "provider"
|
||||
t.string "uid"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "authentications", ["provider", "uid"], :name => "index_authentications_on_provider_and_uid", :unique => true
|
||||
|
@ -45,8 +45,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.integer "arch_id"
|
||||
t.integer "pl_id"
|
||||
t.integer "bpl_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "build_list_items", :force => true do |t|
|
||||
|
@ -54,8 +54,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.integer "level"
|
||||
t.integer "status"
|
||||
t.integer "build_list_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "version"
|
||||
end
|
||||
|
||||
|
@ -69,8 +69,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.integer "project_id"
|
||||
t.integer "arch_id"
|
||||
t.datetime "notified_at"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "is_circle", :default => false
|
||||
t.text "additional_repos"
|
||||
t.string "name"
|
||||
|
@ -94,16 +94,16 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.string "name"
|
||||
t.string "ancestry"
|
||||
t.integer "projects_count", :default => 0, :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "comments", :force => true do |t|
|
||||
t.string "commentable_type"
|
||||
t.integer "user_id"
|
||||
t.text "body"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.decimal "commentable_id", :precision => 50, :scale => 0
|
||||
t.integer "project_id"
|
||||
end
|
||||
|
@ -112,8 +112,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.string "name", :null => false
|
||||
t.integer "project_id", :null => false
|
||||
t.integer "owner_id", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "delayed_jobs", :force => true do |t|
|
||||
|
@ -125,8 +125,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.datetime "locked_at"
|
||||
t.datetime "failed_at"
|
||||
t.string "locked_by"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "queue"
|
||||
end
|
||||
|
||||
|
@ -138,8 +138,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.string "distro"
|
||||
t.string "platform"
|
||||
t.integer "counter", :default => 0
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "event_logs", :force => true do |t|
|
||||
|
@ -154,14 +154,14 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.string "controller"
|
||||
t.string "action"
|
||||
t.text "message"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "groups", :force => true do |t|
|
||||
t.integer "owner_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "uname"
|
||||
t.integer "own_projects_count", :default => 0, :null => false
|
||||
t.text "description"
|
||||
|
@ -174,8 +174,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.string "title"
|
||||
t.text "body"
|
||||
t.string "status", :default => "open"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "creator_id"
|
||||
t.datetime "closed_at"
|
||||
t.integer "closed_by"
|
||||
|
@ -206,8 +206,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.string "description"
|
||||
t.string "name"
|
||||
t.integer "parent_platform_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "released", :default => false
|
||||
t.integer "owner_id"
|
||||
t.string "owner_type"
|
||||
|
@ -220,8 +220,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.integer "platform_id"
|
||||
t.string "login"
|
||||
t.string "password"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "user_id"
|
||||
end
|
||||
|
||||
|
@ -229,8 +229,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.integer "product_id"
|
||||
t.integer "status", :default => 2, :null => false
|
||||
t.datetime "notified_at"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "product_build_lists", ["product_id"], :name => "index_product_build_lists_on_product_id"
|
||||
|
@ -240,8 +240,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.integer "platform_id", :null => false
|
||||
t.integer "build_status", :default => 2, :null => false
|
||||
t.string "build_path"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.text "build_script"
|
||||
t.text "counter"
|
||||
t.text "ks"
|
||||
|
@ -261,8 +261,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.string "name"
|
||||
t.string "version"
|
||||
t.datetime "file_mtime"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "platform_id"
|
||||
end
|
||||
|
||||
|
@ -271,14 +271,14 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
create_table "project_to_repositories", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.integer "repository_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "projects", :force => true do |t|
|
||||
t.string "name"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "owner_id"
|
||||
t.string "owner_type"
|
||||
t.string "visibility", :default => "open"
|
||||
|
@ -286,11 +286,11 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.text "description"
|
||||
t.string "ancestry"
|
||||
t.boolean "has_issues", :default => true
|
||||
t.boolean "has_wiki", :default => false
|
||||
t.string "srpm_file_name"
|
||||
t.string "srpm_content_type"
|
||||
t.integer "srpm_file_size"
|
||||
t.datetime "srpm_updated_at"
|
||||
t.boolean "has_wiki", :default => false
|
||||
t.string "default_branch", :default => "master"
|
||||
t.boolean "is_rpm", :default => true
|
||||
end
|
||||
|
@ -304,8 +304,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.string "token"
|
||||
t.boolean "approved", :default => false
|
||||
t.boolean "rejected", :default => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "interest"
|
||||
t.text "more"
|
||||
end
|
||||
|
@ -318,16 +318,16 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.string "object_type"
|
||||
t.integer "target_id"
|
||||
t.string "target_type"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "role"
|
||||
end
|
||||
|
||||
create_table "repositories", :force => true do |t|
|
||||
t.string "description", :null => false
|
||||
t.integer "platform_id", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "name", :null => false
|
||||
end
|
||||
|
||||
|
@ -335,8 +335,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.string "name", :null => false
|
||||
t.integer "arch_id", :null => false
|
||||
t.integer "project_id", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "rpms", ["project_id", "arch_id"], :name => "index_rpms_on_project_id_and_arch_id"
|
||||
|
@ -349,8 +349,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.boolean "new_comment_reply", :default => true
|
||||
t.boolean "new_issue", :default => true
|
||||
t.boolean "issue_assign", :default => true
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "new_comment_commit_owner", :default => true
|
||||
t.boolean "new_comment_commit_repo_owner", :default => true
|
||||
t.boolean "new_comment_commit_commentor", :default => true
|
||||
|
@ -359,8 +359,8 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
create_table "subscribes", :force => true do |t|
|
||||
t.string "subscribeable_type"
|
||||
t.integer "user_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "status", :default => true
|
||||
t.integer "project_id"
|
||||
t.decimal "subscribeable_id", :precision => 50, :scale => 0
|
||||
|
@ -368,18 +368,18 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
|
||||
create_table "users", :force => true do |t|
|
||||
t.string "name"
|
||||
t.string "email", :default => "", :null => false
|
||||
t.string "encrypted_password", :default => "", :null => false
|
||||
t.string "email", :default => "", :null => false
|
||||
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
||||
t.string "reset_password_token"
|
||||
t.datetime "reset_password_sent_at"
|
||||
t.datetime "remember_created_at"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.text "ssh_key"
|
||||
t.string "uname"
|
||||
t.string "role"
|
||||
t.string "language", :default => "en"
|
||||
t.integer "own_projects_count", :default => 0, :null => false
|
||||
t.string "language", :default => "en"
|
||||
t.datetime "reset_password_sent_at"
|
||||
t.integer "own_projects_count", :default => 0, :null => false
|
||||
t.text "professional_experience"
|
||||
t.string "site"
|
||||
t.string "company"
|
||||
|
@ -388,7 +388,7 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
|
|||
t.string "avatar_content_type"
|
||||
t.integer "avatar_file_size"
|
||||
t.datetime "avatar_updated_at"
|
||||
t.integer "failed_attempts", :default => 0
|
||||
t.integer "failed_attempts", :default => 0
|
||||
t.string "unlock_token"
|
||||
t.datetime "locked_at"
|
||||
end
|
||||
|
|
|
@ -15,6 +15,10 @@ module RosaPresenter
|
|||
Thread.current[:rosa_presenter_controller]
|
||||
end
|
||||
|
||||
def helpers
|
||||
controller.view_context
|
||||
end
|
||||
|
||||
# TODO it needs to be refactored!
|
||||
class << self
|
||||
def present(item, opts, &block)
|
||||
|
|
Loading…
Reference in New Issue