authenticate_user
end
rescue AuthSourceException => e
- logger.error "An error occured when authenticating #{params[:username]}: #{e.message}"
+ logger.error "An error occurred when authenticating #{params[:username]}: #{e.message}"
render_error :message => e.message
end
render_error "An error occurred while executing the query and has been logged. Please report this error to your Redmine administrator."
end
- # Renders a 200 response for successfull updates or deletions via the API
+ # Renders a 200 response for successful updates or deletions via the API
def render_api_ok
render_api_head :ok
end
private
# ApplicationController's find_model_object sets it based on the controller
- # name so it needs to be overriden and set to @news instead
+ # name so it needs to be overridden and set to @news instead
def find_model_object
super
@news = @object
end
# Overrides Redmine::Acts::Positioned#set_default_position so that enumeration overrides
- # get the same position as the overriden enumeration
+ # get the same position as the overridden enumeration
def set_default_position
if position.nil? && parent
self.position = parent.position
end
# Overrides Redmine::Acts::Positioned#update_position so that overrides get the same
- # position as the overriden enumeration
+ # position as the overridden enumeration
def update_position
super
if position_changed?
end
# Overrides Redmine::Acts::Positioned#remove_position so that enumeration overrides
- # get the same position as the overriden enumeration
+ # get the same position as the overridden enumeration
def remove_position
if parent_id.blank?
super
members
end
- # Finds or initilizes a Member for the given project and principal
+ # Finds or initializes a Member for the given project and principal
def self.find_or_new(project, principal)
project_id = project.is_a?(Project) ? project.id : project
principal_id = principal.is_a?(Principal) ? principal.id : principal
# create a new changeset....
unless cs
# we use a temporary revision number here (just for inserting)
- # later on, we calculate a continous positive number
+ # later on, we calculate a continuous positive number
tmp_time2 = tmp_time.clone.gmtime
branch = revision.paths[0][:branch]
scmid = branch + "-" + tmp_time2.strftime("%Y%m%d-%H%M%S")
:comments => revision.message)
tmp_rev_num += 1
end
- # convert CVS-File-States to internal Action-abbrevations
+ # convert CVS-File-States to internal Action-abbreviations
# default action is (M)odified
action = "M"
if revision.paths[0][:action] == "Exp" && revision.paths[0][:revision] == "1.1"
# Do not include all helpers
config.action_controller.include_all_helpers = false
- # Do not supress errors in after_rollback and after_commit callbacks
+ # Do not suppress errors in after_rollback and after_commit callbacks
config.active_record.raise_in_transactional_callbacks = true
# XML parameter parser removed from core in Rails 4.0
Examples:
No project specified, emails MUST contain the 'Project' keyword, otherwise
- they will be dropped (not recommanded):
+ they will be dropped (not recommended):
rdm-mailhandler.rb --url http://redmine.domain.foo --key secret
begin
response = Net::HTTPS.post_form(URI.parse(uri), data, headers, :no_check_certificate => no_check_certificate, :certificate_bundle => certificate_bundle)
rescue SystemCallError, IOError => e # connection refused, etc.
- warn "An error occured while contacting your Redmine server: #{e.message}"
+ warn "An error occurred while contacting your Redmine server: #{e.message}"
return 75 # temporary failure
end
debug "Response received: #{response.code}"
RedmineDbUser "redmine"
RedmineDbPass "password"
## Optional where clause (fulltext search would be slow and
- ## database dependant).
+ ## database dependent).
# RedmineDbWhereClause "and members.role_id IN (1,2)"
## Optional credentials cache size
# RedmineCacheCredsMax 50
# scales to fix the space.
attr_accessor :width
# Set the path to an external stylesheet, set to '' if
- # you want to revert back to using the defaut internal version.
+ # you want to revert back to using the default internal version.
#
# To create an external stylesheet create a graph using the
# default internal version and copy the stylesheet section to
#
# = Notes
#
- # The default stylesheet handles upto 10 data sets, if you
+ # The default stylesheet handles up to 10 data sets, if you
# use more you must create your own stylesheet and add the
# additional settings for the extra data sets. You will know
# if you go over 10 data sets as they will have no style and
# Note that the data must be in time,value pairs, and that the date format
# may be any date that is parseable by ParseDate.
# Also note that, in this example, we're mixing scales; the data from d1
- # will probably not be discernable if both data sets are plotted on the same
+ # will probably not be discernible if both data sets are plotted on the same
# graph, since d1 is too granular.
def add_data data
@data = [] unless @data
end
module ClassMethods
- # Returns events of type event_type visible by user that occured between from and to
+ # Returns events of type event_type visible by user that occurred between from and to
def find_events(event_type, user, from, to, options)
provider_options = activity_provider_options[event_type]
raise "#{self.name} can not provide #{event_type} events." if provider_options.nil?
#
# Calling this method also turns was_used? to true, therefore
# it is important to only call this when sudo is actually needed, as the last
- # condition to determine wether a change can be done or not.
+ # condition to determine whether a change can be done or not.
#
# If you do it wrong, timeout of the sudo mode will happen too late or not at
# all.
files.each do |path|
# Skip certain locales
(puts "Skipping #{path}"; next) if File.basename(path, ".yml") =~ skips
- # TODO: Check for dupliate/existing keys
+ # TODO: Check for duplicate/existing keys
puts "Adding #{key_list} to #{path}"
File.open(path, 'a') do |file|
adds.each do |kv|
assert_equal 2, @gantt.number_of_rows
end
- test "#number_of_rows with no project should return the total number of rows for all the projects, resursively" do
+ test "#number_of_rows with no project should return the total number of rows for all the projects, recursively" do
p1, p2 = Project.generate!, Project.generate!
create_gantt(nil)
# fix the return value of #number_of_rows_on_project() to an arbitrary value
test "#allowed_to? for normal users" do
project = Project.find(1)
assert_equal true, @jsmith.allowed_to?(:delete_messages, project) #Manager
- assert_equal false, @dlopper.allowed_to?(:delete_messages, project) #Developper
+ assert_equal false, @dlopper.allowed_to?(:delete_messages, project) #Developer
end
test "#allowed_to? with empty array should return false" do
end
test "#allowed_to? with with options[:global] should return true if user has one role with the permission" do
- @dlopper2 = User.find(5) #only Developper on a project, not Manager anywhere
+ @dlopper2 = User.find(5) #only Developer on a project, not Manager anywhere
@anonymous = User.find(6)
assert_equal true, @jsmith.allowed_to?(:delete_issue_watchers, nil, :global => true)
assert_equal false, @dlopper2.allowed_to?(:delete_issue_watchers, nil, :global => true)
# this is just a proxy method, the test only calls it to ensure it doesn't break trivially
test "#allowed_to_globally?" do
- @dlopper2 = User.find(5) #only Developper on a project, not Manager anywhere
+ @dlopper2 = User.find(5) #only Developer on a project, not Manager anywhere
@anonymous = User.find(6)
assert_equal true, @jsmith.allowed_to_globally?(:delete_issue_watchers)
assert_equal false, @dlopper2.allowed_to_globally?(:delete_issue_watchers)