Compare commits

...

29 Commits
0.9.1 ... 0.9.3

Author SHA1 Message Date
Jean-Philippe Lang
fc6ccc1ea2 tagged version 0.9.3
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/tags/0.9.3@3515 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-28 15:12:09 +00:00
Jean-Philippe Lang
bfd9164c0a Merged r3506 for 0.9.3 release.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3507 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-28 10:21:33 +00:00
Jean-Philippe Lang
d80fb751fd Merged r3469, r3472 and r3473 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3505 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-28 10:10:55 +00:00
Jean-Philippe Lang
aacabbe645 Merged r3498 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3504 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-28 09:59:31 +00:00
Jean-Philippe Lang
8eafcbede9 Merged r3481 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3503 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-28 09:58:33 +00:00
Jean-Philippe Lang
43c1481998 Merged r3446 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3502 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-28 09:56:55 +00:00
Jean-Philippe Lang
17f60af490 Merged r3394, r3466, r3467, r3468 and r3471 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3501 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-28 09:51:10 +00:00
Jean-Philippe Lang
e5e5ad6b7a Merged r3398 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3465 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-20 10:40:02 +00:00
Jean-Philippe Lang
13fb739b56 Merged r3409 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3464 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-20 10:26:49 +00:00
Jean-Philippe Lang
73e849be58 Merged r3451 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3463 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-20 10:22:06 +00:00
Jean-Philippe Lang
0b7d4e818a Merged r3452 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3462 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-20 10:20:52 +00:00
Jean-Philippe Lang
40a4b111fa Merged r3447 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3461 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-20 10:19:02 +00:00
Jean-Philippe Lang
7d913f93c3 Merged r3448 and r3455 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3460 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-20 10:16:08 +00:00
Jean-Philippe Lang
864fd9c6a1 Merged bug fixes r3423 and r3427.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3433 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-14 15:57:56 +00:00
Jean-Philippe Lang
57dcbd7376 Merged bug fixes r3412 to r3414.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3432 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-14 15:55:00 +00:00
Jean-Philippe Lang
0ef11ef4fe Merged bug fixes r3402, r3405 to r3408 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3431 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-14 15:48:28 +00:00
Jean-Philippe Lang
b5ee8c08ca Merged r3392 from trunk (0.9.2 update).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3393 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-07 12:48:56 +00:00
Jean-Philippe Lang
9487d8dd80 Merged r3389 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3391 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-07 12:37:12 +00:00
Jean-Philippe Lang
f3bf588c82 Translations updated to trunk r3388.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3390 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-07 12:36:12 +00:00
Jean-Philippe Lang
bd38623cca Merged r3379 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3387 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-07 11:58:42 +00:00
Jean-Philippe Lang
bae86dc558 Merged r3377 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3386 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-07 11:57:49 +00:00
Jean-Philippe Lang
884c5be200 Backported r3368 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3385 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-07 11:56:49 +00:00
Jean-Philippe Lang
ad24563b1e Merged r3378 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3384 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-07 11:53:17 +00:00
Jean-Philippe Lang
cb8933ae55 Merged r3376 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3383 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-07 11:52:09 +00:00
Jean-Philippe Lang
5d75879046 Merged r3375 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3382 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-07 11:50:56 +00:00
Jean-Philippe Lang
69e5d91a2d Backported r3354 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3381 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-07 11:49:40 +00:00
Jean-Philippe Lang
7c1e877209 Merged r3357 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3380 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-07 11:45:31 +00:00
Eric Davis
76d9d01db0 Merged the Object Daddy exemplars from trunk. r3337, r3340, r3342
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3359 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-02 16:03:05 +00:00
Jean-Philippe Lang
27fa40d283 Merged r3351 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3352 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-01-30 11:24:10 +00:00
121 changed files with 1113 additions and 192 deletions

View File

@@ -21,8 +21,8 @@ class IssueRelationsController < ApplicationController
def new
@relation = IssueRelation.new(params[:relation])
@relation.issue_from = @issue
if params[:relation] && !params[:relation][:issue_to_id].blank?
@relation.issue_to = Issue.visible.find_by_id(params[:relation][:issue_to_id])
if params[:relation] && m = params[:relation][:issue_to_id].to_s.match(/^#?(\d+)$/)
@relation.issue_to = Issue.visible.find_by_id(m[1].to_i)
end
@relation.save if request.post?
respond_to do |format|

View File

@@ -57,12 +57,13 @@ class IssuesController < ApplicationController
sort_update({'id' => "#{Issue.table_name}.id"}.merge(@query.available_columns.inject({}) {|h, c| h[c.name.to_s] = c.sortable; h}))
if @query.valid?
limit = per_page_option
respond_to do |format|
format.html { }
format.atom { limit = Setting.feeds_limit.to_i }
format.csv { limit = Setting.issues_export_limit.to_i }
format.pdf { limit = Setting.issues_export_limit.to_i }
limit = case params[:format]
when 'csv', 'pdf'
Setting.issues_export_limit.to_i
when 'atom'
Setting.feeds_limit.to_i
else
per_page_option
end
@issue_count = @query.issue_count
@@ -106,7 +107,7 @@ class IssuesController < ApplicationController
@journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC")
@journals.each_with_index {|j,i| j.indice = i+1}
@journals.reverse! if User.current.wants_comments_in_reverse_order?
@changesets = @issue.changesets
@changesets = @issue.changesets.visible.all
@changesets.reverse! if User.current.wants_comments_in_reverse_order?
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
@edit_allowed = User.current.allowed_to?(:edit_issues, @project)
@@ -358,6 +359,7 @@ class IssuesController < ApplicationController
def gantt
@gantt = Redmine::Helpers::Gantt.new(params)
retrieve_query
@query.group_by = nil
if @query.valid?
events = []
# Issues that have start and due dates
@@ -397,6 +399,7 @@ class IssuesController < ApplicationController
@calendar = Redmine::Helpers::Calendar.new(Date.civil(@year, @month, 1), current_language, :month)
retrieve_query
@query.group_by = nil
if @query.valid?
events = []
events += @query.issues(:include => [:tracker, :assigned_to, :priority],

View File

@@ -320,13 +320,9 @@ class ProjectsController < ApplicationController
@issues_by_version = {}
unless @selected_tracker_ids.empty?
@versions.each do |version|
conditions = {:tracker_id => @selected_tracker_ids}
if !@project.versions.include?(version)
conditions.merge!(:project_id => project_ids)
end
issues = version.fixed_issues.visible.find(:all,
:include => [:project, :status, :tracker, :priority],
:conditions => conditions,
:conditions => {:tracker_id => @selected_tracker_ids, :project_id => project_ids},
:order => "#{Project.table_name}.lft, #{Tracker.table_name}.position, #{Issue.table_name}.id")
@issues_by_version[version] = issues
end

View File

@@ -506,17 +506,17 @@ module ApplicationHelper
# Forum messages:
# message#1218 -> Link to message with id 1218
text = text.gsub(%r{([\s\(,\-\>]|^)(!)?(attachment|document|version|commit|source|export|message)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]]\W)|,|\s|<|$)}) do |m|
leading, esc, prefix, sep, oid = $1, $2, $3, $5 || $7, $6 || $8
leading, esc, prefix, sep, identifier = $1, $2, $3, $5 || $7, $6 || $8
link = nil
if esc.nil?
if prefix.nil? && sep == 'r'
if project && (changeset = project.changesets.find_by_revision(oid))
link = link_to("r#{oid}", {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => oid},
if project && (changeset = project.changesets.find_by_revision(identifier))
link = link_to("r#{identifier}", {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision},
:class => 'changeset',
:title => truncate_single_line(changeset.comments, :length => 100))
end
elsif sep == '#'
oid = oid.to_i
oid = identifier.to_i
case prefix
when nil
if issue = Issue.visible.find_by_id(oid, :include => :status)
@@ -547,7 +547,7 @@ module ApplicationHelper
end
elsif sep == ':'
# removes the double quotes if any
name = oid.gsub(%r{^"(.*)"$}, "\\1")
name = identifier.gsub(%r{^"(.*)"$}, "\\1")
case prefix
when 'document'
if project && document = project.documents.find_by_title(name)
@@ -584,7 +584,7 @@ module ApplicationHelper
end
end
end
leading + (link || "#{prefix}#{sep}#{oid}")
leading + (link || "#{prefix}#{sep}#{identifier}")
end
text

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2008 Jean-Philippe Lang
# Copyright (C) 2006-2010 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -41,6 +41,9 @@ class Changeset < ActiveRecord::Base
validates_uniqueness_of :revision, :scope => :repository_id
validates_uniqueness_of :scmid, :scope => :repository_id, :allow_nil => true
named_scope :visible, lambda {|*args| { :include => {:repository => :project},
:conditions => Project.allowed_to_condition(args.first || User.current, :view_changesets) } }
def revision=(r)
write_attribute :revision, (r.nil? ? nil : r.to_s)
end
@@ -54,6 +57,10 @@ class Changeset < ActiveRecord::Base
super
end
def committer=(arg)
write_attribute(:committer, self.class.to_utf8(arg.to_s))
end
def project
repository.project
end
@@ -77,9 +84,6 @@ class Changeset < ActiveRecord::Base
ref_keywords = Setting.commit_ref_keywords.downcase.split(",").collect(&:strip)
# keywords used to fix issues
fix_keywords = Setting.commit_fix_keywords.downcase.split(",").collect(&:strip)
# status and optional done ratio applied
fix_status = IssueStatus.find_by_id(Setting.commit_fix_status_id)
done_ratio = Setting.commit_fix_done_ratio.blank? ? nil : Setting.commit_fix_done_ratio.to_i
kw_regexp = (ref_keywords + fix_keywords).collect{|kw| Regexp.escape(kw)}.join("|")
return if kw_regexp.blank?
@@ -90,14 +94,14 @@ class Changeset < ActiveRecord::Base
# find any issue ID in the comments
target_issue_ids = []
comments.scan(%r{([\s\(\[,-]|^)#(\d+)(?=[[:punct:]]|\s|<|$)}).each { |m| target_issue_ids << m[1] }
referenced_issues += repository.project.issues.find_all_by_id(target_issue_ids)
referenced_issues += find_referenced_issues_by_id(target_issue_ids)
end
comments.scan(Regexp.new("(#{kw_regexp})[\s:]+(([\s,;&]*#?\\d+)+)", Regexp::IGNORECASE)).each do |match|
action = match[0]
target_issue_ids = match[1].scan(/\d+/)
target_issues = repository.project.issues.find_all_by_id(target_issue_ids)
if fix_status && fix_keywords.include?(action.downcase)
target_issues = find_referenced_issues_by_id(target_issue_ids)
if fix_keywords.include?(action.downcase) && fix_status = IssueStatus.find_by_id(Setting.commit_fix_status_id)
# update status of issues
logger.debug "Issues fixed by changeset #{self.revision}: #{issue_ids.join(', ')}." if logger && logger.debug?
target_issues.each do |issue|
@@ -111,7 +115,9 @@ class Changeset < ActiveRecord::Base
end
journal = issue.init_journal(user || User.anonymous, ll(Setting.default_language, :text_status_changed_by_changeset, csettext))
issue.status = fix_status
issue.done_ratio = done_ratio if done_ratio
unless Setting.commit_fix_done_ratio.blank?
issue.done_ratio = Setting.commit_fix_done_ratio.to_i
end
Redmine::Hook.call_hook(:model_changeset_scan_commit_for_issue_ids_pre_issue_update,
{ :changeset => self, :issue => issue })
issue.save
@@ -120,7 +126,8 @@ class Changeset < ActiveRecord::Base
referenced_issues += target_issues
end
self.issues = referenced_issues.uniq
referenced_issues.uniq!
self.issues = referenced_issues unless referenced_issues.empty?
end
def short_comments
@@ -148,6 +155,15 @@ class Changeset < ActiveRecord::Base
private
# Finds issues that can be referenced by the commit message
# i.e. issues that belong to the repository project, a subproject or a parent project
def find_referenced_issues_by_id(ids)
return [] if ids.compact.empty?
Issue.find_all_by_id(ids, :include => :project).select {|issue|
project == issue.project || project.is_ancestor_of?(issue.project) || project.is_descendant_of?(issue.project)
}
end
def split_comments
comments =~ /\A(.+?)\r?\n(.*)$/m
@short_comments = $1 || comments
@@ -160,11 +176,12 @@ class Changeset < ActiveRecord::Base
encoding = Setting.commit_logs_encoding.to_s.strip
unless encoding.blank? || encoding == 'UTF-8'
begin
return Iconv.conv('UTF-8', encoding, str)
str = Iconv.conv('UTF-8', encoding, str)
rescue Iconv::Failure
# do nothing here
end
end
str
# removes invalid UTF8 sequences
Iconv.conv('UTF-8//IGNORE', 'UTF-8', str + ' ')[0..-3]
end
end

View File

@@ -159,7 +159,8 @@ class Issue < ActiveRecord::Base
end
send :attributes_without_tracker_first=, new_attributes, *args
end
alias_method_chain :attributes=, :tracker_first
# Do not redefine alias chain on reload (see #4838)
alias_method_chain(:attributes=, :tracker_first) unless method_defined?(:attributes_without_tracker_first=)
def estimated_hours=(h)
write_attribute :estimated_hours, (h.is_a?(String) ? h.to_hours : h)

View File

@@ -51,12 +51,12 @@ class Project < ActiveRecord::Base
:join_table => "#{table_name_prefix}custom_fields_projects#{table_name_suffix}",
:association_foreign_key => 'custom_field_id'
acts_as_nested_set :order => 'name', :dependent => :destroy
acts_as_nested_set :order => 'name'
acts_as_attachable :view_permission => :view_files,
:delete_permission => :manage_files
acts_as_customizable
acts_as_searchable :columns => ['name', 'description'], :project_key => 'id', :permission => nil
acts_as_searchable :columns => ['name', 'identifier', 'description'], :project_key => 'id', :permission => nil
acts_as_event :title => Proc.new {|o| "#{l(:label_project)}: #{o.name}"},
:url => Proc.new {|o| {:controller => 'projects', :action => 'show', :id => o.id}},
:author => nil
@@ -74,7 +74,7 @@ class Project < ActiveRecord::Base
# reserved words
validates_exclusion_of :identifier, :in => %w( new )
before_destroy :delete_all_members
before_destroy :delete_all_members, :destroy_children
named_scope :has_module, lambda { |mod| { :conditions => ["#{Project.table_name}.id IN (SELECT em.project_id FROM #{EnabledModule.table_name} em WHERE em.name=?)", mod.to_s] } }
named_scope :active, { :conditions => "#{Project.table_name}.status = #{STATUS_ACTIVE}"}
@@ -249,7 +249,7 @@ class Project < ActiveRecord::Base
return @allowed_parents if @allowed_parents
@allowed_parents = Project.find(:all, :conditions => Project.allowed_to_condition(User.current, :add_subprojects))
@allowed_parents = @allowed_parents - self_and_descendants
if User.current.allowed_to?(:add_project, nil, :global => true)
if User.current.allowed_to?(:add_project, nil, :global => true) || (!new_record? && parent.nil?)
@allowed_parents << nil
end
unless parent.nil? || @allowed_parents.empty? || @allowed_parents.include?(parent)
@@ -499,17 +499,36 @@ class Project < ActiveRecord::Base
private
# Destroys children before destroying self
def destroy_children
children.each do |child|
child.destroy
end
end
# Copies wiki from +project+
def copy_wiki(project)
# Check that the source project has a wiki first
unless project.wiki.nil?
self.wiki ||= Wiki.new
wiki.attributes = project.wiki.attributes.dup.except("id", "project_id")
wiki_pages_map = {}
project.wiki.pages.each do |page|
# Skip pages without content
next if page.content.nil?
new_wiki_content = WikiContent.new(page.content.attributes.dup.except("id", "page_id", "updated_on"))
new_wiki_page = WikiPage.new(page.attributes.dup.except("id", "wiki_id", "created_on", "parent_id"))
new_wiki_page.content = new_wiki_content
wiki.pages << new_wiki_page
wiki_pages_map[page.id] = new_wiki_page
end
wiki.save
# Reproduce page hierarchy
project.wiki.pages.each do |page|
if page.parent_id && wiki_pages_map[page.id]
wiki_pages_map[page.id].parent = wiki_pages_map[page.parent_id]
wiki_pages_map[page.id].save
end
end
end
end

View File

@@ -210,6 +210,10 @@ class Query < ActiveRecord::Base
add_custom_fields_filters(@project.all_issue_custom_fields)
else
# global filters for cross project issue list
system_shared_versions = Version.visible.find_all_by_sharing('system')
unless system_shared_versions.empty?
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => system_shared_versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
end
add_custom_fields_filters(IssueCustomField.find(:all, :conditions => {:is_filter => true, :is_for_all => true}))
end
@available_filters

View File

@@ -136,6 +136,7 @@ class Repository < ActiveRecord::Base
end
end
@committers = nil
@found_committer_users = nil
true
else
false
@@ -146,24 +147,34 @@ class Repository < ActiveRecord::Base
# It will return nil if the committer is not yet mapped and if no User
# with the same username or email was found
def find_committer_user(committer)
if committer
unless committer.blank?
@found_committer_users ||= {}
return @found_committer_users[committer] if @found_committer_users.has_key?(committer)
user = nil
c = changesets.find(:first, :conditions => {:committer => committer}, :include => :user)
if c && c.user
c.user
user = c.user
elsif committer.strip =~ /^([^<]+)(<(.*)>)?$/
username, email = $1.strip, $3
u = User.find_by_login(username)
u ||= User.find_by_mail(email) unless email.blank?
u
user = u
end
@found_committer_users[committer] = user
user
end
end
# fetch new changesets for all repositories
# can be called periodically by an external script
# Fetches new changesets for all repositories of active projects
# Can be called periodically by an external script
# eg. ruby script/runner "Repository.fetch_changesets"
def self.fetch_changesets
find(:all).each(&:fetch_changesets)
Project.active.has_module(:repository).find(:all, :include => :repository).each do |project|
if project.repository
project.repository.fetch_changesets
end
end
end
# scan changeset comments to find related and fixed issues for all repositories

View File

@@ -40,23 +40,26 @@ class Repository::Git < Repository
# With SCM's that have a sequential commit numbering, redmine is able to be
# clever and only fetch changesets going forward from the most recent one
# it knows about. However, with git, you never know if people have merged
# commits into the middle of the repository history, so we always have to
# parse the entire log.
# commits into the middle of the repository history, so we should parse
# the entire log. Since it's way too slow for large repositories, we only
# parse 1 week before the last known commit.
# The repository can still be fully reloaded by calling #clear_changesets
# before fetching changesets (eg. for offline resync)
def fetch_changesets
# Save ourselves an expensive operation if we're already up to date
return if scm.num_revisions == changesets.count
c = changesets.find(:first, :order => 'committed_on DESC')
since = (c ? c.committed_on - 7.days : nil)
revisions = scm.revisions('', nil, nil, :all => true)
revisions = scm.revisions('', nil, nil, :all => true, :since => since)
return if revisions.nil? || revisions.empty?
# Find revisions that redmine knows about already
existing_revisions = changesets.find(:all).map!{|c| c.scmid}
recent_changesets = changesets.find(:all, :conditions => ['committed_on >= ?', since])
# Clean out revisions that are no longer in git
Changeset.delete_all(["scmid NOT IN (?) AND repository_id = (?)", revisions.map{|r| r.scmid}, self.id])
recent_changesets.each {|c| c.destroy unless revisions.detect {|r| r.scmid.to_s == c.scmid.to_s }}
# Subtract revisions that redmine already knows about
revisions.reject!{|r| existing_revisions.include?(r.scmid)}
recent_revisions = recent_changesets.map{|c| c.scmid}
revisions.reject!{|r| recent_revisions.include?(r.scmid)}
# Save the remaining ones to the database
revisions.each{|r| r.save(self)} unless revisions.nil?

View File

@@ -15,6 +15,7 @@
<% end %>
&nbsp;
<div class="autoscroll">
<table class="list">
<thead><tr>
<th><%=l(:label_project)%></th>
@@ -40,5 +41,6 @@
<% end %>
</tbody>
</table>
</div>
<% html_title(l(:label_project_plural)) -%>

View File

@@ -1,7 +1,5 @@
<h2><%= link_to l(:label_group_plural), groups_path %> &#187; <%= l(:label_group_new) %></h2>
<%= error_messages_for :group %>
<% form_for(@group, :builder => TabularFormBuilder, :lang => current_language) do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<p><%= f.submit l(:button_create) %></p>

View File

@@ -1,5 +1,6 @@
<% form_tag({}) do -%>
<%= hidden_field_tag 'back_url', url_for(params) %>
<div class="autoscroll">
<table class="list issues">
<thead><tr>
<th><%= link_to image_tag('toggle_check.png'), {}, :onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
@@ -31,4 +32,5 @@
<% end -%>
</tbody>
</table>
</div>
<% end -%>

View File

@@ -86,7 +86,6 @@ top = headers_height + 8
<%= link_to_issue i %>
<% else %>
<span class="icon icon-package">
<%= h("#{i.project} -") unless @project && @project == i.project %>
<%= link_to_version i %>
</span>
<% end %>
@@ -211,8 +210,7 @@ top = headers_height + 10
%>
<div style="top:<%= top %>px;left:<%= i_left %>px;width:15px;" class="task milestone">&nbsp;</div>
<div style="top:<%= top %>px;left:<%= i_left + 12 %>px;background:#fff;" class="task">
<%= h("#{i.project} -") unless @project && @project == i.project %>
<strong><%=h i %></strong>
<strong><%= format_version_name i %></strong>
</div>
<% end %>
<% top = top + 20

View File

@@ -73,7 +73,7 @@
</div>
<% if @changesets.any? && User.current.allowed_to?(:view_changesets, @project) %>
<% if @changesets.any? %>
<div id="issue-changesets">
<h3><%=l(:label_associated_revisions)%></h3>
<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>

View File

@@ -1,14 +1,14 @@
<h1><%= link_to "#{issue.tracker.name} ##{issue.id}: #{issue.subject}", issue_url %></h1>
<h1><%= link_to(h("#{issue.tracker.name} ##{issue.id}: #{issue.subject}"), issue_url) %></h1>
<ul>
<li><%=l(:field_author)%>: <%= issue.author %></li>
<li><%=l(:field_status)%>: <%= issue.status %></li>
<li><%=l(:field_priority)%>: <%= issue.priority %></li>
<li><%=l(:field_assigned_to)%>: <%= issue.assigned_to %></li>
<li><%=l(:field_category)%>: <%= issue.category %></li>
<li><%=l(:field_fixed_version)%>: <%= issue.fixed_version %></li>
<li><%=l(:field_author)%>: <%=h issue.author %></li>
<li><%=l(:field_status)%>: <%=h issue.status %></li>
<li><%=l(:field_priority)%>: <%=h issue.priority %></li>
<li><%=l(:field_assigned_to)%>: <%=h issue.assigned_to %></li>
<li><%=l(:field_category)%>: <%=h issue.category %></li>
<li><%=l(:field_fixed_version)%>: <%=h issue.fixed_version %></li>
<% issue.custom_values.each do |c| %>
<li><%= c.custom_field.name %>: <%= show_value(c) %></li>
<li><%=h c.custom_field.name %>: <%=h show_value(c) %></li>
<% end %>
</ul>

View File

@@ -1,2 +1,2 @@
<p><%= l(:mail_body_account_activation_request, @user.login) %></p>
<p><%= l(:mail_body_account_activation_request, h(@user.login)) %></p>
<p><%= link_to @url, @url %></p>

View File

@@ -1,10 +1,10 @@
<% if @user.auth_source %>
<p><%= l(:mail_body_account_information_external, @user.auth_source.name) %></p>
<p><%= l(:mail_body_account_information_external, h(@user.auth_source.name)) %></p>
<% else %>
<p><%= l(:mail_body_account_information) %>:</p>
<ul>
<li><%= l(:field_login) %>: <%= @user.login %></li>
<li><%= l(:field_password) %>: <%= @password %></li>
<li><%= l(:field_login) %>: <%=h @user.login %></li>
<li><%= l(:field_password) %>: <%=h @password %></li>
</ul>
<% end %>

View File

@@ -1,5 +1,5 @@
<%= link_to @added_to, @added_to_url %><br />
<ul><% @attachments.each do |attachment | %>
<li><%= attachment.filename %></li>
<li><%=h attachment.filename %></li>
<% end %></ul>

View File

@@ -1,3 +1,3 @@
<%= link_to @document.title, @document_url %> (<%= @document.category.name %>)<br />
<%= link_to(h(@document.title), @document_url) %> (<%=h @document.category.name %>)<br />
<br />
<%= textilizable(@document, :description, :only_path => false) %>

View File

@@ -1,3 +1,3 @@
<%= l(:text_issue_added, :id => "##{@issue.id}", :author => @issue.author) %>
<%= l(:text_issue_added, :id => "##{@issue.id}", :author => h(@issue.author)) %>
<hr />
<%= render :partial => "issue_text_html", :locals => { :issue => @issue, :issue_url => @issue_url } %>

View File

@@ -1,4 +1,4 @@
<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => @journal.user) %>
<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => h(@journal.user)) %>
<ul>
<% for detail in @journal.details %>

View File

@@ -1,4 +1,4 @@
<p><%= l(:mail_body_lost_password) %><br />
<%= auto_link(@url) %></p>
<p><%= l(:field_login) %>: <b><%= @token.user.login %></b></p>
<p><%= l(:field_login) %>: <b><%=h @token.user.login %></b></p>

View File

@@ -1,4 +1,4 @@
<h1><%=h @message.board.project.name %> - <%=h @message.board.name %>: <%= link_to @message.subject, @message_url %></h1>
<em><%= @message.author %></em>
<h1><%=h @message.board.project.name %> - <%=h @message.board.name %>: <%= link_to(h(@message.subject), @message_url) %></h1>
<em><%=h @message.author %></em>
<%= textilizable(@message, :content, :only_path => false) %>

View File

@@ -1,4 +1,4 @@
<h1><%= link_to @news.title, @news_url %></h1>
<em><%= @news.author.name %></em>
<h1><%= link_to(h(@news.title), @news_url) %></h1>
<em><%=h @news.author.name %></em>
<%= textilizable(@news, :description, :only_path => false) %>

View File

@@ -3,7 +3,7 @@
<div class="contextual">
<%= watcher_tag(@topic, User.current) %>
<%= link_to_remote_if_authorized l(:button_quote), { :url => {:action => 'quote', :id => @topic} }, :class => 'icon icon-comment' %>
<%= link_to_remote_if_authorized(l(:button_quote), { :url => {:action => 'quote', :id => @topic} }, :class => 'icon icon-comment') unless @topic.locked? %>
<%= link_to(l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'icon icon-edit') if @message.editable_by?(User.current) %>
<%= link_to(l(:button_delete), {:action => 'destroy', :id => @topic}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') if @message.destroyable_by?(User.current) %>
</div>
@@ -24,7 +24,7 @@
<% @replies.each do |message| %>
<div class="message reply" id="<%= "message-#{message.id}" %>">
<div class="contextual">
<%= link_to_remote_if_authorized image_tag('comment.png'), { :url => {:action => 'quote', :id => message} }, :title => l(:button_quote) %>
<%= link_to_remote_if_authorized(image_tag('comment.png'), { :url => {:action => 'quote', :id => message} }, :title => l(:button_quote)) unless @topic.locked? %>
<%= link_to(image_tag('edit.png'), {:action => 'edit', :id => message}, :title => l(:button_edit)) if message.editable_by?(User.current) %>
<%= link_to(image_tag('delete.png'), {:action => 'destroy', :id => message}, :method => :post, :confirm => l(:text_are_you_sure), :title => l(:button_delete)) if message.destroyable_by?(User.current) %>
</div>

View File

@@ -1,7 +1,7 @@
<h3><%= l(:label_calendar) %></h3>
<% calendar = Redmine::Helpers::Calendar.new(Date.today, current_language, :week)
calendar.events = Issue.find :all,
calendar.events = Issue.visible.find :all,
:conditions => ["#{Issue.table_name}.project_id in (#{@user.projects.collect{|m| m.id}.join(',')}) AND ((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", calendar.startdt, calendar.enddt, calendar.startdt, calendar.enddt],
:include => [:project, :tracker, :priority, :assigned_to] unless @user.projects.empty? %>

View File

@@ -9,7 +9,7 @@
<div class="splitcontentleft">
<%= textilizable @project.description %>
<ul>
<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= link_to(h(@project.homepage), @project.homepage) %></li><% end %>
<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)) %></li><% end %>
<% if @subprojects.any? %>
<li><%=l(:label_subproject_plural)%>:
<%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>

View File

@@ -15,6 +15,7 @@
<% end %>
&nbsp;
<div class="autoscroll">
<table class="list">
<thead><tr>
<%= sort_header_tag('login', :caption => l(:field_login)) %>
@@ -41,7 +42,7 @@
<% end -%>
</tbody>
</table>
</div>
<p class="pagination"><%= pagination_links_full @user_pages, @user_count %></p>
<% html_title(l(:label_user_plural)) -%>

View File

@@ -25,6 +25,7 @@
<% form_tag({}, :id => 'workflow_form' ) do %>
<%= hidden_field_tag 'tracker_id', @tracker.id %>
<%= hidden_field_tag 'role_id', @role.id %>
<div class="autoscroll">
<table class="list">
<thead>
<tr>
@@ -52,6 +53,7 @@
<% end %>
</tbody>
</table>
</div>
<p><%= check_all_links 'workflow_form' %></p>
<%= submit_tag l(:button_save) %>

View File

@@ -1,4 +1,70 @@
# Outgoing email settings
# = Outgoing email settings
#
# Each environment has it's own configuration options. If you are only
# running in production, only the production block needs to be configured.
#
# == Common configurations
#
# === Sendmail command
#
# production:
# delivery_method: :sendmail
#
# === Simple SMTP server at localhost
#
# production:
# delivery_method: :smtp
# smtp_settings:
# address: "localhost"
# port: 25
#
# === SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
#
# production:
# delivery_method: :smtp
# smtp_settings:
# address: "example.com"
# port: 25
# authentication: :login
# domain: 'foo.com'
# user_name: 'myaccount'
# password: 'password'
#
# === SMTP server at example.com using PLAIN authentication
#
# production:
# delivery_method: :smtp
# smtp_settings:
# address: "example.com"
# port: 25
# authentication: :plain
# domain: 'example.com'
# user_name: 'myaccount'
# password: 'password'
#
# === SMTP server at using TLS (GMail)
#
# This requires some additional configuration. See the article at:
# http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail/
#
# production:
# delivery_method: :smtp
# smtp_settings:
# tls: true
# address: "smtp.gmail.com"
# port: 587
# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
# authentication: :plain
# user_name: "your_email@gmail.com"
# password: "your_password"
#
#
# == More configuration options
#
# See the "Configuration options" at the following website for a list of the
# full options allowed:
#
# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
production:
delivery_method: :smtp

View File

@@ -25,5 +25,5 @@ config.action_controller.session = {
config.action_controller.allow_forgery_protection = false
config.gem "thoughtbot-shoulda", :lib => "shoulda", :source => "http://gems.github.com"
config.gem "nofxx-object_daddy", :lib => "object_daddy", :source => "http://gems.github.com"
config.gem "edavis10-object_daddy", :lib => "object_daddy"
config.gem "mocha"

View File

@@ -876,3 +876,9 @@ bg:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -900,3 +900,8 @@ bs:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -879,3 +879,8 @@ ca:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -882,3 +882,8 @@ cs:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -902,3 +902,8 @@ da:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -902,3 +902,8 @@ de:
Sie sind dabei, einige oder alle ihre Berechtigungen zu entfernen. Es ist möglich, dass Sie danach das Projekt nicht mehr sehen oder editieren dürfen.
Sind Sie wirklich sicher, dass Sie dies tun möchten?
label_close_versions: Vollständige Versionen schließen
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -882,3 +882,8 @@ el:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -329,12 +329,14 @@ en:
setting_issue_done_ratio_issue_status: Use the issue status
setting_start_of_week: Start calendars on
setting_rest_api_enabled: Enable REST web service
setting_cache_formatted_text: Cache formatted text
permission_add_project: Create project
permission_add_subprojects: Create subprojects
permission_edit_project: Edit project
permission_select_project_modules: Select project modules
permission_manage_members: Manage members
permission_manage_project_activities: Manage project activities
permission_manage_versions: Manage versions
permission_manage_categories: Manage issue categories
permission_view_issues: View Issues
@@ -382,6 +384,7 @@ en:
permission_edit_own_messages: Edit own messages
permission_delete_messages: Delete messages
permission_delete_own_messages: Delete own messages
permission_export_wiki_pages: Export wiki pages
project_module_issue_tracking: Issue tracking
project_module_time_tracking: Time tracking
@@ -662,6 +665,8 @@ en:
label_board: Forum
label_board_new: New forum
label_board_plural: Forums
label_board_locked: Locked
label_board_sticky: Sticky
label_topic_plural: Topics
label_message_plural: Messages
label_message_last: Last message
@@ -880,3 +885,4 @@ en:
enumeration_doc_categories: Document categories
enumeration_activities: Activities (time tracking)
enumeration_system_activity: System Activity

View File

@@ -926,3 +926,8 @@ es:
Está a punto de eliminar algún o todos sus permisos y podría perder la posibilidad de modificar este proyecto tras hacerlo.
¿Está seguro de querer continuar?
label_close_versions: Cerrar versiones completadas
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -912,3 +912,8 @@ fi:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -352,6 +352,7 @@ fr:
setting_rest_api_enabled: Activer l'API REST
setting_gravatar_default: Image Gravatar par défaut
setting_start_of_week: Jour de début des calendriers
setting_cache_formatted_text: Mettre en cache le texte formaté
permission_add_project: Créer un projet
permission_add_subprojects: Créer des sous-projets
@@ -405,6 +406,8 @@ fr:
permission_edit_own_messages: Modifier ses propres messages
permission_delete_messages: Supprimer les messages
permission_delete_own_messages: Supprimer ses propres messages
permission_export_wiki_pages: Exporter les pages
permission_manage_project_activities: Gérer les activités
project_module_issue_tracking: Suivi des demandes
project_module_time_tracking: Suivi du temps passé
@@ -903,3 +906,5 @@ fr:
text_journal_deleted: "{{label}} {{old}} supprimé"
text_journal_added: "{{label}} {{value}} ajouté"
enumeration_system_activity: Activité système
label_board_sticky: Sticky
label_board_locked: Verrouillé

View File

@@ -902,3 +902,8 @@ gl:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -886,3 +886,8 @@ he:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -889,3 +889,8 @@ hr:
text_own_membership_delete_confirmation: |-
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -907,3 +907,8 @@
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -894,3 +894,8 @@ id:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -889,3 +889,9 @@ it:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -64,8 +64,8 @@ ja:
one: "1年以上"
other: "{{count}}年以上"
almost_x_years:
one: "almost 1 year"
other: "almost {{count}} years"
one: "ほぼ1年"
other: "ほぼ{{count}}"
number:
format:
@@ -321,6 +321,7 @@ ja:
setting_plain_text_mail: プレインテキストのみ(HTMLなし)
setting_host_name: ホスト名
setting_text_formatting: テキストの書式
setting_cache_formatted_text: 書式化されたテキストをキャッシュする
setting_wiki_compression: Wiki履歴を圧縮する
setting_feeds_limit: フィード内容の上限
setting_default_projects_public: デフォルトで新しいプロジェクトは公開にする
@@ -398,6 +399,7 @@ ja:
permission_rename_wiki_pages: Wikiページ名の変更
permission_delete_wiki_pages: Wikiページの削除
permission_view_wiki_pages: Wikiの閲覧
permission_export_wiki_pages: Wikiページを他の形式に出力
permission_view_wiki_edits: Wiki履歴の閲覧
permission_edit_wiki_pages: Wikiページの編集
permission_delete_wiki_pages_attachments: 添付ファイルの削除
@@ -534,6 +536,7 @@ ja:
label_version_new: 新しいバージョン
label_version_plural: バージョン
label_confirmation: 確認
label_close_versions: 完了したバージョンを終了にする
label_export_to: '他の形式に出力:'
label_read: 読む...
label_public_projects: 公開プロジェクト
@@ -587,8 +590,8 @@ ja:
label_query_new: 新しいクエリ
label_filter_add: フィルタ追加
label_filter_plural: フィルタ
label_equals: 含む
label_not_equals: 含まない
label_equals: 等しい
label_not_equals: 等しくない
label_in_less_than: が今日から○日後以前
label_in_more_than: が今日から○日後以降
label_greater_or_equal: 以上
@@ -692,6 +695,8 @@ ja:
label_board: フォーラム
label_board_new: 新しいフォーラム
label_board_plural: フォーラム
label_board_sticky: スティッキー
label_board_locked: ロック
label_topic_plural: トピック
label_message_plural: メッセージ
label_message_last: 最新のメッセージ
@@ -910,4 +915,4 @@ ja:
enumeration_doc_categories: 文書カテゴリ
enumeration_activities: 作業分類 (時間トラッキング)
enumeration_system_activity: システム作業分類
label_close_versions: Close completed versions
permission_manage_project_activities: Manage project activities

View File

@@ -2,7 +2,7 @@
# by Kihyun Yoon(ddumbugie@gmail.com),http://plenum.textcube.com/
# by John Hwang (jhwang@tavon.org),http://github.com/tavon
# by Yonghwan SO(please insert your email), last update at 2009-09-11
# last update at 2009-09-11 by Kihyun Yoon
# last update at 2010-01-23 by Kihyun Yoon
ko:
date:
formats:
@@ -65,8 +65,8 @@ ko:
one: "일년 이상"
other: "{{count}}년 이상"
almost_x_years:
one: "almost 1 year"
other: "almost {{count}} years"
one: "약 1년"
other: " {{count}}"
prompts:
year: "년"
month: "월"
@@ -182,8 +182,8 @@ ko:
general_lang_name: '한국어(Korean)'
general_csv_separator: ','
general_csv_decimal_separator: '.'
general_csv_encoding: UTF-8
general_pdf_encoding: UTF-8
general_csv_encoding: CP949
general_pdf_encoding: CP949
general_first_day_of_week: '7'
notice_account_updated: 계정이 성공적으로 변경되었습니다.
@@ -709,7 +709,7 @@ ko:
label_language_based: 언어설정에 따름
label_sort_by: "{{value}}(으)로 정렬"
label_send_test_email: 테스트 메일 보내기
label_feeds_access_key_created_on: "피드 접근 키가 {{value}} 이전에 생성"
label_feeds_access_key_created_on: "피드 접근 키가 {{value}} 이전에 생성되었습니다."
label_module_plural: 모듈
label_added_time_by: "{{author}}이(가) {{age}} 전에 추가함"
label_updated_time_by: "{{author}}이(가) {{age}} 전에 변경"
@@ -925,20 +925,25 @@ ko:
setting_start_of_week: 달력 시작 요일
permission_view_issues: 일감 보기
label_display_used_statuses_only: 이 일감유형에서 사용되는 상태만 보여주기
label_revision_id: Revision {{value}}
label_api_access_key: API access key
label_api_access_key_created_on: API access key created {{value}} ago
label_feeds_access_key: RSS access key
notice_api_access_key_reseted: Your API access key was reset.
setting_rest_api_enabled: Enable REST web service
label_missing_api_access_key: Missing an API access key
label_missing_feeds_access_key: Missing a RSS access key
button_show: Show
text_line_separated: Multiple values allowed (one line for each value).
setting_mail_handler_body_delimiters: Truncate emails after one of these lines
permission_add_subprojects: Create subprojects
label_subproject_new: New subproject
label_revision_id: 개정판 {{value}}
label_api_access_key: API 접근키
label_api_access_key_created_on: API 접근키가 {{value}} 전에 생성되었습니다.
label_feeds_access_key: RSS 접근키
notice_api_access_key_reseted: API 접근키가 초기화되었습니다.
setting_rest_api_enabled: REST 웹서비스 활성화
label_missing_api_access_key: API 접근키가 없습니다.
label_missing_feeds_access_key: RSS 접근키가 없습니다.
button_show: 보기
text_line_separated: 여러 값이 허용됨(값 마다 한 줄씩)
setting_mail_handler_body_delimiters: 메일 본문 구분자
permission_add_subprojects: 하위 프로젝트 만들기
label_subproject_new: 새 하위 프로젝트
text_own_membership_delete_confirmation: |-
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
권한들 일부 또는 전부를 막 삭제하려고 하고 있습니다. 그렇게 되면 이 프로젝트를 더이상 수정할 수 없게 됩니다.
계속하시겠습니까?
label_close_versions: 완료된 버전 닫기
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -950,3 +950,8 @@ lt:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -864,3 +864,8 @@ nl:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -877,3 +877,8 @@
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -907,3 +907,8 @@ pl:
version_status_locked: zablokowana
version_status_open: otwarta
label_board_sticky: Przyklejona
label_board_locked: Zamknięta
permission_export_wiki_pages: Eksport stron wiki
permission_manage_project_activities: Zarządzanie aktywnościami projektu
setting_cache_formatted_text: Cache formatted text

View File

@@ -901,11 +901,17 @@ pt-BR:
setting_rest_api_enabled: Habilitdar REST web service
label_missing_api_access_key: Chave de acesso a API faltando
label_missing_feeds_access_key: Chave de acesso ao RSS faltando
text_line_separated: Multiple values allowed (one line for each value).
setting_mail_handler_body_delimiters: Truncate emails after one of these lines
permission_add_subprojects: Create subprojects
label_subproject_new: New subproject
text_line_separated: Múltiplos valores permitidos (uma linha para cada valor).
setting_mail_handler_body_delimiters: Truncar e-mails após uma destas linhas
permission_add_subprojects: Criar subprojetos
label_subproject_new: Novo subprojeto
text_own_membership_delete_confirmation: |-
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
Você está para remover algumas de suas próprias permissões e pode não mais estar apto a editar este projeto após esta operação.
Você tem certeza que deseja continuar?
label_close_versions: Fechar versões concluídas
label_board_sticky: Marcado
label_board_locked: Travado
label_change_log: Registro de alterações
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -894,3 +894,8 @@ pt:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -879,3 +879,8 @@ ro:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -650,7 +650,7 @@ ru:
label_send_information: Отправить пользователю информацию по учетной записи
label_send_test_email: Послать email для проверки
label_settings: Настройки
label_show_completed_versions: Показать завершенную версию
label_show_completed_versions: Показывать завершенные версии
label_sort: Сортировать
label_sort_by: "Сортировать по {{value}}"
label_sort_higher: Вверх
@@ -941,7 +941,7 @@ ru:
text_journal_added: "{{label}} {{value}} добавлен"
field_active: Активно
enumeration_system_activity: Системная активность
permission_delete_issue_watchers: Удалить наблюдателей
permission_delete_issue_watchers: Удаление наблюдателей
version_status_closed: закрыт
version_status_locked: заблокирован
version_status_open: открыт
@@ -974,7 +974,7 @@ ru:
label_api_access_key: Ключ доступа к API
text_line_separated: Разрешено несколько значений (по одному значению в строку).
label_revision_id: Ревизия {{value}}
permission_view_issues: Показать проблемы
permission_view_issues: Просмотр задач
label_display_used_statuses_only: Отображать только те статусы, которые используются в этом трекере
label_api_access_key_created_on: Ключ доступ к API был создан {{value}} назад
label_feeds_access_key: Ключ доступа к RSS
@@ -984,9 +984,14 @@ ru:
label_missing_api_access_key: Отсутствует ключ доступа к API
label_missing_feeds_access_key: Отсутствует ключ доступа к RSS
setting_mail_handler_body_delimiters: Урезать письмо после одной из этих строк
permission_add_subprojects: Создать подпроекты
permission_add_subprojects: Создание подпроектов
label_subproject_new: Новый подпроект
text_own_membership_delete_confirmation: |-
Вы собираетесь удалить некоторые или все права, из-за чего могут пропасть права на редактирование этого проекта.
Продолжить?
label_close_versions: Закрыть завершенные версии
label_board_sticky: Прикреплена
label_board_locked: Заблокирована
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -881,3 +881,8 @@ sk:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -878,3 +878,8 @@ sl:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -897,3 +897,8 @@
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -713,6 +713,8 @@ sv:
label_board: Forum
label_board_new: Nytt forum
label_board_plural: Forum
label_board_locked: Låst
label_board_sticky: Sticky
label_topic_plural: Ämnen
label_message_plural: Meddelanden
label_message_last: Senaste meddelande
@@ -931,3 +933,6 @@ sv:
enumeration_doc_categories: Dokumentkategorier
enumeration_activities: Aktiviteter (tidsuppföljning)
enumeration_system_activity: Systemaktivitet
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -879,3 +879,8 @@ th:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -909,3 +909,8 @@ tr:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -878,3 +878,8 @@ uk:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -941,3 +941,8 @@ vi:
You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
Are you sure you want to continue?
label_close_versions: Close completed versions
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -755,6 +755,8 @@
label_board: 論壇
label_board_new: 建立新論壇
label_board_plural: 論壇
label_board_locked: 鎖定
label_board_sticky: 置頂
label_topic_plural: 討論主題
label_message_plural: 訊息
label_message_last: 上一封訊息
@@ -973,3 +975,6 @@
enumeration_doc_categories: 文件分類
enumeration_activities: 活動 (時間追蹤)
enumeration_system_activity: 系統活動
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -904,3 +904,9 @@ zh:
enumeration_doc_categories: 文档类别
enumeration_activities: 活动(时间跟踪)
enumeration_system_activity: 系统活动
label_board_sticky: Sticky
label_board_locked: Locked
permission_export_wiki_pages: Export wiki pages
setting_cache_formatted_text: Cache formatted text
permission_manage_project_activities: Manage project activities

View File

@@ -0,0 +1,9 @@
class AddIndexOnChangesetsScmid < ActiveRecord::Migration
def self.up
add_index :changesets, [:repository_id, :scmid], :name => :changesets_repos_scmid
end
def self.down
remove_index :changesets, :name => :changesets_repos_scmid
end
end

View File

@@ -4,7 +4,41 @@ Redmine - project management software
Copyright (C) 2006-2010 Jean-Philippe Lang
http://www.redmine.org/
== 0.9.1
== 2010-02-28 v0.9.3
Adds filter for system shared versions on the cross project issue list
Makes project identifiers searchable
Remove invalid utf8 sequences from commit comments and author name
Fixed: Wrong link when "http" not included in project "Homepage" link
Fixed: Escaping in html email templates
Fixed: Pound (#) followed by number with leading zero (0) removes leading zero when rendered in wiki
Fixed: Deselecting textile text formatting causes interning empty string errors
Fixed: error with postgres when entering a non-numeric id for an issue relation
Fixed: div.task incorrectly wrapping on Gantt Chart
Fixed: Project copy loses wiki pages hierarchy
Fixed: parent project field doesn't include blank value when a member with 'add subproject' permission edits a child project
Fixed: Repository.fetch_changesets tries to fetch changesets for archived projects
Fixed: Duplicated project name for subproject version on gantt chart
Fixed: roadmap shows subprojects issues even if subprojects is unchecked
Fixed: IndexError if all the :last menu items are deleted from a menu
Fixed: Very high CPU usage for a long time when fetching commits from a large Git repository
== 2010-02-07 v0.9.2
* Fixed: Sub-project repository commits not displayed on parent project issues
* Fixed: Potential security leak on my page calendar
* Fixed: Project tree structure is broken by deleting the project with the subproject
* Fixed: Error message shown duplicated when creating a new group
* Fixed: Firefox cuts off large pages
* Fixed: Invalid format parameter returns a DoubleRenderError on issues index
* Fixed: Unnecessary Quote button on locked forum message
* Fixed: Error raised when trying to view the gantt or calendar with a grouped query
* Fixed: PDF support for Korean locale
* Fixed: Deprecation warning in extra/svn/reposman.rb
== 2010-01-30 v0.9.1
* Vertical alignment for inline images in formatted text set to 'middle'
* Fixed: Redmine.pm error "closing dbh with active statement handles at /usr/lib/perl5/Apache/Redmine.pm"

View File

@@ -7,7 +7,11 @@ http://www.redmine.org/
== Requirements
* Ruby on Rails 2.3.5
* Ruby 1.8.6 or 1.8.7
* Ruby on Rails 2.3.5 (official downloadable Redmine releases are packaged with
the appropriate Rails version)
* A database:
* MySQL (tested with MySQL 5)
* PostgreSQL (tested with PostgreSQL 8.1)
@@ -26,15 +30,15 @@ Optional:
3. Configure database parameters in config/database.yml
for "production" environment (default database is MySQL)
4. Create the database structure. Under the application main directory:
rake db:migrate RAILS_ENV="production"
It will create tables and an administrator account.
5. Generate a session store secret
4. Generate a session store secret
Redmine stores session data in cookies by default, which requires
a secret to be generated. Run:
rake config/initializers/session_store.rb
5. Create the database structure. Under the application main directory:
rake db:migrate RAILS_ENV="production"
It will create tables and an administrator account.
6. Setting up permissions
The user who runs Redmine must have write permission on the following
subdirectories: files, log, tmp (create the last one if not present).

View File

@@ -13,17 +13,17 @@ http://www.redmine.org/
and SMTP settings (RAILS_ROOT/config/email.yml)
into the new config directory
DO NOT REPLACE ANY OTHERS FILES.
3. Migrate your database (please make a backup before doing this):
rake db:migrate RAILS_ENV="production"
4. Copy the RAILS_ROOT/files directory content into your new installation
This directory contains all the attached files
5. Generate a session store secret
3. Generate a session store secret
Redmine stores session data in cookies by default, which requires
a secret to be generated. Run:
rake config/initializers/session_store.rb
4. Migrate your database (please make a backup before doing this):
rake db:migrate RAILS_ENV="production"
5. Copy the RAILS_ROOT/files directory content into your new installation
This directory contains all the attached files
== Notes

View File

@@ -175,7 +175,7 @@ unless File.directory?($repos_base)
end
begin
require 'activeresource'
require 'active_resource'
rescue LoadError
log("This script requires activeresource.\nRun 'gem install activeresource' to install it.", :exit => true)
end

View File

@@ -35,6 +35,11 @@ module Redmine
super()
set_language_if_valid lang
case current_language.to_s.downcase
when 'ko'
extend(PDF_Korean)
AddUHCFont()
@font_for_content = 'UHC'
@font_for_footer = 'UHC'
when 'ja'
extend(PDF_Japanese)
AddSJISFont()

View File

@@ -84,6 +84,14 @@ module TreeNodePatch
end
# Wrapp remove! making sure to decrement the last_items counter if
# the removed child was a last item
def remove!(child)
@last_items_count -= +1 if child && child.last
super
end
# Will return the position (zero-based) of the current child in
# it's parent
def position
@@ -352,7 +360,7 @@ module Redmine
target_root.add(MenuItem.new(name, url, options))
end
elsif options.delete(:last)
elsif options[:last] # don't delete, needs to be stored
target_root.add_last(MenuItem.new(name, url, options))
else
target_root.add(MenuItem.new(name, url, options))
@@ -386,7 +394,7 @@ module Redmine
class MenuItem < Tree::TreeNode
include Redmine::I18n
attr_reader :name, :url, :param, :condition, :parent, :child_menus
attr_reader :name, :url, :param, :condition, :parent, :child_menus, :last
def initialize(name, url, options)
raise ArgumentError, "Invalid option :if for menu item '#{name}'" if options[:if] && !options[:if].respond_to?(:call)
@@ -403,6 +411,7 @@ module Redmine
@html_options[:class] = [@html_options[:class], @name.to_s.dasherize].compact.join(' ')
@parent = options[:parent]
@child_menus = options[:children]
@last = options[:last] || false
super @name.to_sym
end

View File

@@ -286,21 +286,23 @@ module Redmine
end
def save(repo)
if repo.changesets.find_by_scmid(scmid.to_s).nil?
changeset = Changeset.create!(
Changeset.transaction do
changeset = Changeset.new(
:repository => repo,
:revision => identifier,
:scmid => scmid,
:committer => author,
:committed_on => time,
:comments => message)
paths.each do |file|
Change.create!(
:changeset => changeset,
:action => file[:action],
:path => file[:path])
end
if changeset.save
paths.each do |file|
Change.create(
:changeset => changeset,
:action => file[:action],
:path => file[:path])
end
end
end
end
end

View File

@@ -33,21 +33,22 @@ module Redmine
end
def branches
branches = []
return @branches if @branches
@branches = []
cmd = "#{GIT_BIN} --git-dir #{target('')} branch"
shellout(cmd) do |io|
io.each_line do |line|
branches << line.match('\s*\*?\s*(.*)$')[1]
@branches << line.match('\s*\*?\s*(.*)$')[1]
end
end
branches.sort!
@branches.sort!
end
def tags
tags = []
return @tags if @tags
cmd = "#{GIT_BIN} --git-dir #{target('')} tag"
shellout(cmd) do |io|
io.readlines.sort!.map{|t| t.strip}
@tags = io.readlines.sort!.map{|t| t.strip}
end
end
@@ -110,20 +111,16 @@ module Redmine
end
end
def num_revisions
cmd = "#{GIT_BIN} --git-dir #{target('')} log --all --pretty=format:'' | wc -l"
shellout(cmd) {|io| io.gets.chomp.to_i + 1}
end
def revisions(path, identifier_from, identifier_to, options={})
revisions = Revisions.new
cmd = "#{GIT_BIN} --git-dir #{target('')} log --find-copies-harder --raw --date=iso --pretty=fuller"
cmd = "#{GIT_BIN} --git-dir #{target('')} log --raw --date=iso --pretty=fuller"
cmd << " --reverse" if options[:reverse]
cmd << " --all" if options[:all]
cmd << " -n #{options[:limit]} " if options[:limit]
cmd << " #{shell_quote(identifier_from + '..')} " if identifier_from
cmd << " #{shell_quote identifier_to} " if identifier_to
cmd << " --since=#{shell_quote(options[:since].strftime("%Y-%m-%d %H:%M:%S"))}" if options[:since]
cmd << " -- #{path}" if path && !path.empty?
shellout(cmd) do |io|

View File

@@ -4,7 +4,7 @@ module Redmine
module VERSION #:nodoc:
MAJOR = 0
MINOR = 9
TINY = 1
TINY = 3
# Branch values:
# * official release: nil

View File

@@ -25,17 +25,17 @@ module Redmine
end
def register(name, formatter, helper)
raise ArgumentError, "format name '#{name}' is already taken" if @@formatters[name.to_sym]
@@formatters[name.to_sym] = {:formatter => formatter, :helper => helper}
raise ArgumentError, "format name '#{name}' is already taken" if @@formatters[name.to_s]
@@formatters[name.to_s] = {:formatter => formatter, :helper => helper}
end
def formatter_for(name)
entry = @@formatters[name.to_sym]
entry = @@formatters[name.to_s]
(entry && entry[:formatter]) || Redmine::WikiFormatting::NullFormatter::Formatter
end
def helper_for(name)
entry = @@formatters[name.to_sym]
entry = @@formatters[name.to_s]
(entry && entry[:helper]) || Redmine::WikiFormatting::NullFormatter::Helper
end

View File

@@ -75,7 +75,7 @@ h4, .wiki h3 {font-size: 13px;padding: 2px 10px 1px 0px;margin-bottom: 5px; bord
#content { width: 80%; background-color: #fff; margin: 0px; border-right: 1px solid #ddd; padding: 6px 10px 10px 10px; z-index: 10; }
* html #content{ width: 80%; padding-left: 0; margin-top: 0px; padding: 6px 10px 10px 10px;}
html>body #content { min-height: 600px; overflow: auto; }
html>body #content { min-height: 600px; }
* html body #content { height: 600px; } /* IE */
#main.nosidebar #sidebar{ display: none; }
@@ -728,6 +728,7 @@ background-image:url('../images/close_hl.png');
padding:0;
margin:0;
line-height:0.8em;
white-space:nowrap;
}
.task_late { background:#f66 url(../images/task_late.png); border: 1px solid #f66; }

View File

@@ -0,0 +1,21 @@
class Attachment < ActiveRecord::Base
generator_for :container, :method => :generate_project
generator_for :file, :method => :generate_file
generator_for :author, :method => :generate_author
def self.generate_project
Project.generate!
end
def self.generate_author
User.generate_with_protected!
end
def self.generate_file
@file = 'a_file.png'
@file.stubs(:original_filename).returns('a_file.png')
@file.stubs(:content_type).returns('image/png')
@file.stubs(:read).returns(false)
@file
end
end

View File

@@ -0,0 +1,9 @@
class AuthSource < ActiveRecord::Base
generator_for :name, :method => :next_name
def self.next_name
@last_name ||= 'Auth0'
@last_name.succ!
@last_name
end
end

View File

@@ -0,0 +1,21 @@
class Board < ActiveRecord::Base
generator_for :name, :method => :next_name
generator_for :description, :method => :next_description
generator_for :project, :method => :generate_project
def self.next_name
@last_name ||= 'A Forum'
@last_name.succ!
@last_name
end
def self.next_description
@last_description ||= 'Some description here'
@last_description.succ!
@last_description
end
def self.generate_project
Project.generate!
end
end

View File

@@ -0,0 +1,15 @@
class Change < ActiveRecord::Base
generator_for :action => 'A'
generator_for :path, :method => :next_path
generator_for :changeset, :method => :generate_changeset
def self.next_path
@last_path ||= 'test/dir/aaa0001'
@last_path.succ!
@last_path
end
def self.generate_changeset
Changeset.generate!
end
end

View File

@@ -0,0 +1,15 @@
class Changeset < ActiveRecord::Base
generator_for :revision, :method => :next_revision
generator_for :committed_on => Date.today
generator_for :repository, :method => :generate_repository
def self.next_revision
@last_revision ||= '1'
@last_revision.succ!
@last_revision
end
def self.generate_repository
Repository::Subversion.generate!
end
end

View File

@@ -0,0 +1,13 @@
class Comment < ActiveRecord::Base
generator_for :commented, :method => :generate_news
generator_for :author, :method => :generate_author
generator_for :comments => 'What great news this is.'
def self.generate_news
News.generate!
end
def self.generate_author
User.generate_with_protected!
end
end

View File

@@ -1,2 +1,7 @@
class CustomValue < ActiveRecord::Base
generator_for :custom_field, :method => :generate_custom_field
def self.generate_custom_field
CustomField.generate!
end
end

View File

@@ -0,0 +1,9 @@
class Document < ActiveRecord::Base
generator_for :title, :method => :next_title
def self.next_title
@last_title ||= 'Document001'
@last_title.succ!
@last_title
end
end

View File

@@ -0,0 +1,10 @@
class EnabledModule < ActiveRecord::Base
generator_for :name, :method => :next_name
def self.next_name
@last_name ||= 'module_001'
@last_name.succ!
@last_name
end
end

View File

@@ -0,0 +1,10 @@
class Group < Principal
generator_for :lastname, :method => :next_lastname
def self.next_lastname
@last_lastname ||= 'Group'
@last_lastname.succ!
@last_lastname
end
end

View File

@@ -0,0 +1,9 @@
class IssueCategory < ActiveRecord::Base
generator_for :name, :method => :next_name
def self.next_name
@last_name ||= 'Category 0001'
@last_name.succ!
@last_name
end
end

View File

@@ -1,6 +1,7 @@
class Issue < ActiveRecord::Base
generator_for :subject, :method => :next_subject
generator_for :author, :method => :next_author
generator_for :priority, :method => :fetch_priority
def self.next_subject
@last_subject ||= 'Subject 0'
@@ -12,4 +13,8 @@ class Issue < ActiveRecord::Base
User.generate_with_protected!
end
def self.fetch_priority
IssuePriority.first || IssuePriority.generate!
end
end

View File

@@ -0,0 +1,13 @@
class Journal < ActiveRecord::Base
generator_for :journalized, :method => :generate_issue
generator_for :user, :method => :generate_user
def self.generate_issue
project = Project.generate!
Issue.generate_for_project!(project)
end
def self.generate_user
User.generate_with_protected!
end
end

View File

@@ -1,2 +1,12 @@
class Member < ActiveRecord::Base
generator_for :roles, :method => :generate_roles
generator_for :principal, :method => :generate_user
def self.generate_roles
[Role.generate!]
end
def self.generate_user
User.generate_with_protected!
end
end

View File

@@ -0,0 +1,12 @@
class MemberRole < ActiveRecord::Base
generator_for :member, :method => :generate_member
generator_for :role, :method => :generate_role
def self.generate_role
Role.generate!
end
def self.generate_member
Member.generate!
end
end

View File

@@ -0,0 +1,21 @@
class Message < ActiveRecord::Base
generator_for :subject, :method => :next_subject
generator_for :content, :method => :next_content
generator_for :board, :method => :generate_board
def self.next_subject
@last_subject ||= 'A Message'
@last_subject.succ!
@last_subject
end
def self.next_content
@last_content ||= 'Some content here'
@last_content.succ!
@last_content
end
def self.generate_board
Board.generate!
end
end

View File

@@ -0,0 +1,16 @@
class News < ActiveRecord::Base
generator_for :title, :method => :next_title
generator_for :description, :method => :next_description
def self.next_title
@last_title ||= 'A New Item'
@last_title.succ!
@last_title
end
def self.next_description
@last_description ||= 'Some content here'
@last_description.succ!
@last_description
end
end

View File

@@ -0,0 +1,11 @@
class Repository < ActiveRecord::Base
generator_for :type => 'Subversion'
generator_for :url, :method => :next_url
def self.next_url
@last_url ||= 'file:///test/svn'
@last_url.succ!
@last_url
end
end

View File

@@ -0,0 +1,11 @@
class Repository::Subversion < Repository
generator_for :type, :method => 'Subversion'
generator_for :url, :method => :next_url
def self.next_url
@last_url ||= 'file:///test/svn'
@last_url.succ!
@last_url
end
end

Some files were not shown because too many files have changed in this diff Show More