Fix trailing whitespace

This commit is contained in:
Holger Just 2011-12-18 21:17:53 +01:00
parent d24e8186b4
commit e1ac469cfb
10 changed files with 28 additions and 28 deletions

View File

@ -110,9 +110,9 @@ class AuthSourceLdap < AuthSource
search_filters = object_filter & login_filter
end
attrs = {}
ldap_con.search( :base => self.base_dn,
:filter => search_filters,
ldap_con.search( :base => self.base_dn,
:filter => search_filters,
:attributes=> search_attributes) do |entry|
if onthefly_register?
@ -129,7 +129,7 @@ class AuthSourceLdap < AuthSource
def custom_filter_to_ldap
return nil unless custom_filter.present?
begin
return Net::LDAP::Filter.construct(custom_filter)
rescue Net::LDAP::LdapError # Filter syntax error
@ -147,7 +147,7 @@ class AuthSourceLdap < AuthSource
errors.add(:custom_filter, :invalid)
end
end
def self.get_attr(entry, attr_name)
if !attr_name.blank?
entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]

View File

@ -10,7 +10,7 @@
<% end %>
<% if @allowed_statuses.present? %>
<li class="folder status">
<li class="folder status">
<a href="#" class="context_item" onclick="return false;"><%= l(:field_status) %></a>
<ul>
<% @statuses.each do |s| -%>
@ -23,7 +23,7 @@
<% end %>
<% unless @trackers.nil? %>
<li class="folder tracker">
<li class="folder tracker">
<a href="#" class="context_item"><%= l(:field_tracker) %></a>
<ul>
<% @trackers.each do |t| -%>
@ -35,7 +35,7 @@
</li>
<% end %>
<li class="folder priority">
<li class="folder priority">
<a href="#" class="context_item"><%= l(:field_priority) %></a>
<ul>
<% @priorities.each do |p| -%>
@ -48,7 +48,7 @@
<% #TODO: allow editing versions when multiple projects %>
<% unless @project.nil? || @project.shared_versions.open.empty? -%>
<li class="folder fixed_version">
<li class="folder fixed_version">
<a href="#" class="context_item"><%= l(:field_fixed_version) %></a>
<ul>
<% @project.shared_versions.open.sort.each do |v| -%>
@ -63,7 +63,7 @@
<% end %>
<% if @assignables.present? -%>
<li class="folder assigned">
<li class="folder assigned">
<a href="#" class="context_item"><%= l(:field_assigned_to) %></a>
<ul>
<% @assignables.each do |u| -%>
@ -78,7 +78,7 @@
<% end %>
<% unless @project.nil? || @project.issue_categories.empty? -%>
<li class="folder">
<li class="folder">
<a href="#" class="context_item"><%= l(:field_category) %></a>
<ul>
<% @project.issue_categories.each do |u| -%>
@ -104,7 +104,7 @@
<div class="submenu"></div>
</li>
<% end %>
<% if !@issue.nil? %>
<% if @can[:log_time] -%>
<li class="log_time"><%= context_menu_link l(:button_log_time), {:controller => 'timelog', :action => 'new', :issue_id => @issue},

View File

@ -255,9 +255,9 @@ To go live, all you need to add is a database and a web server.
<span class="line-numbers"> 3</span> <span class="reserved">def</span> <span class="function">initialize</span>(name)
<span class="line-numbers"> 4</span> <span class="instance-variable">@name</span> = name.capitalize
<span class="line-numbers"> 5</span> <span class="reserved">end</span>
<span class="line-numbers"> 6</span>
<span class="line-numbers"> 6</span>
<span class="line-numbers"> 7</span> <span class="reserved">def</span> <span class="function">salute</span>
<span class="line-numbers"> 8</span> puts <span class="string"><span class="delimiter">"</span><span class="content">Hello </span><span class="inline"><span class="inline-delimiter">#{</span><span class="instance-variable">@name</span><span class="inline-delimiter">}</span></span><span class="content">!</span><span class="delimiter">"</span></span>
<span class="line-numbers"> 8</span> puts <span class="string"><span class="delimiter">"</span><span class="content">Hello </span><span class="inline"><span class="inline-delimiter">#{</span><span class="instance-variable">@name</span><span class="inline-delimiter">}</span></span><span class="content">!</span><span class="delimiter">"</span></span>
<span class="line-numbers"> 9</span> <span class="reserved">end</span>
<span class="line-numbers"><strong>10</strong></span> <span class="reserved">end</span></code>
</pre>

View File

@ -61,7 +61,7 @@
<div class="contextual">
<%= link_to_remote_if_authorized(l(:button_quote), { :url => {:controller => 'journals', :action => 'new', :id => @issue} }, :class => 'icon icon-comment') %>
</div>
<p><strong><%=l(:field_description)%></strong></p>
<div class="wiki">
<%= textilizable @issue, :description, :attachments => @issue.attachments %>

View File

@ -46,7 +46,7 @@
<li class="drop-down">
<%= link_to l(:label_project_plural), { :controller => 'projects', :action => 'index' }, :class => "projects" %>
<ul style="display:none;">
<%
<%
project_content = ''
project_tree(User.current.projects.all) do |project, level|
name_prefix = (level > 0 ? ('&nbsp;' * 2 * level + '&#187; ') : '')
@ -104,7 +104,7 @@
<%= page_header_title %>
</div>
</div>
<% main_menu = render_main_menu(@project) %>
<% if (side_displayed = has_content?(:sidebar) || has_content?(:main_menu) || !main_menu.blank?) %>
<% display_sidebar = true %>
@ -118,7 +118,7 @@
<%= yield :main_menu %>
<% if display_sidebar %>
<!-- Sidebar -->
<div id="sidebar">
<div id="sidebar">
<%= yield :sidebar %>
<%= call_hook :view_layouts_base_sidebar %>
</div>

View File

@ -14,7 +14,7 @@
# Patches active_support/core_ext/load_error.rb to support 1.9.3 LoadError message
if RUBY_VERSION >= '1.9.3'
MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1]
MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1]
end
require 'active_record'

View File

@ -16,25 +16,25 @@ class ActsAsTaggableOnMigration < ActiveRecord::Migration
create_table :tags do |t|
t.column :name, :string
end
create_table :taggings do |t|
t.column :tag_id, :integer
t.column :taggable_id, :integer
t.column :tagger_id, :integer
t.column :tagger_type, :string
# You should make sure that the column created is
# long enough to store the required class names.
t.column :taggable_type, :string
t.column :context, :string
t.column :created_at, :datetime
end
add_index :taggings, :tag_id
add_index :taggings, [:taggable_id, :taggable_type, :context]
end
def self.down
drop_table :taggings
drop_table :tags

View File

@ -19,7 +19,7 @@ class WikiController; def rescue_action(e) raise e end; end
class WikiControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis, :wiki_pages, :wiki_contents, :journals, :attachments, :enumerations
def setup
@controller = WikiController.new
@request = ActionController::TestRequest.new

View File

@ -41,10 +41,10 @@ class AuthSourceLdapTest < ActiveSupport::TestCase
@auth.custom_filter = "(& (homeDirectory=*) (sn=O*))"
assert @auth.valid?
assert_equal nil, @auth.errors.on(:custom_filter)
end
end
if ldap_configured?
context '#authenticate' do
setup do

View File

@ -17,7 +17,7 @@ class Redmine::ThemesTest < ActiveSupport::TestCase
def setup
Redmine::Themes.rescan
end
def test_themes
themes = Redmine::Themes.themes
assert_kind_of Array, themes