Fix trailing whitespace
This commit is contained in:
parent
d24e8186b4
commit
e1ac469cfb
@ -110,9 +110,9 @@ class AuthSourceLdap < AuthSource
|
|||||||
search_filters = object_filter & login_filter
|
search_filters = object_filter & login_filter
|
||||||
end
|
end
|
||||||
attrs = {}
|
attrs = {}
|
||||||
|
|
||||||
ldap_con.search( :base => self.base_dn,
|
ldap_con.search( :base => self.base_dn,
|
||||||
:filter => search_filters,
|
:filter => search_filters,
|
||||||
:attributes=> search_attributes) do |entry|
|
:attributes=> search_attributes) do |entry|
|
||||||
|
|
||||||
if onthefly_register?
|
if onthefly_register?
|
||||||
@ -129,7 +129,7 @@ class AuthSourceLdap < AuthSource
|
|||||||
|
|
||||||
def custom_filter_to_ldap
|
def custom_filter_to_ldap
|
||||||
return nil unless custom_filter.present?
|
return nil unless custom_filter.present?
|
||||||
|
|
||||||
begin
|
begin
|
||||||
return Net::LDAP::Filter.construct(custom_filter)
|
return Net::LDAP::Filter.construct(custom_filter)
|
||||||
rescue Net::LDAP::LdapError # Filter syntax error
|
rescue Net::LDAP::LdapError # Filter syntax error
|
||||||
@ -147,7 +147,7 @@ class AuthSourceLdap < AuthSource
|
|||||||
errors.add(:custom_filter, :invalid)
|
errors.add(:custom_filter, :invalid)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.get_attr(entry, attr_name)
|
def self.get_attr(entry, attr_name)
|
||||||
if !attr_name.blank?
|
if !attr_name.blank?
|
||||||
entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]
|
entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if @allowed_statuses.present? %>
|
<% if @allowed_statuses.present? %>
|
||||||
<li class="folder status">
|
<li class="folder status">
|
||||||
<a href="#" class="context_item" onclick="return false;"><%= l(:field_status) %></a>
|
<a href="#" class="context_item" onclick="return false;"><%= l(:field_status) %></a>
|
||||||
<ul>
|
<ul>
|
||||||
<% @statuses.each do |s| -%>
|
<% @statuses.each do |s| -%>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% unless @trackers.nil? %>
|
<% unless @trackers.nil? %>
|
||||||
<li class="folder tracker">
|
<li class="folder tracker">
|
||||||
<a href="#" class="context_item"><%= l(:field_tracker) %></a>
|
<a href="#" class="context_item"><%= l(:field_tracker) %></a>
|
||||||
<ul>
|
<ul>
|
||||||
<% @trackers.each do |t| -%>
|
<% @trackers.each do |t| -%>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<li class="folder priority">
|
<li class="folder priority">
|
||||||
<a href="#" class="context_item"><%= l(:field_priority) %></a>
|
<a href="#" class="context_item"><%= l(:field_priority) %></a>
|
||||||
<ul>
|
<ul>
|
||||||
<% @priorities.each do |p| -%>
|
<% @priorities.each do |p| -%>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
<% #TODO: allow editing versions when multiple projects %>
|
<% #TODO: allow editing versions when multiple projects %>
|
||||||
<% unless @project.nil? || @project.shared_versions.open.empty? -%>
|
<% 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>
|
<a href="#" class="context_item"><%= l(:field_fixed_version) %></a>
|
||||||
<ul>
|
<ul>
|
||||||
<% @project.shared_versions.open.sort.each do |v| -%>
|
<% @project.shared_versions.open.sort.each do |v| -%>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if @assignables.present? -%>
|
<% if @assignables.present? -%>
|
||||||
<li class="folder assigned">
|
<li class="folder assigned">
|
||||||
<a href="#" class="context_item"><%= l(:field_assigned_to) %></a>
|
<a href="#" class="context_item"><%= l(:field_assigned_to) %></a>
|
||||||
<ul>
|
<ul>
|
||||||
<% @assignables.each do |u| -%>
|
<% @assignables.each do |u| -%>
|
||||||
@ -78,7 +78,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% unless @project.nil? || @project.issue_categories.empty? -%>
|
<% unless @project.nil? || @project.issue_categories.empty? -%>
|
||||||
<li class="folder">
|
<li class="folder">
|
||||||
<a href="#" class="context_item"><%= l(:field_category) %></a>
|
<a href="#" class="context_item"><%= l(:field_category) %></a>
|
||||||
<ul>
|
<ul>
|
||||||
<% @project.issue_categories.each do |u| -%>
|
<% @project.issue_categories.each do |u| -%>
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<div class="submenu"></div>
|
<div class="submenu"></div>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if !@issue.nil? %>
|
<% if !@issue.nil? %>
|
||||||
<% if @can[:log_time] -%>
|
<% if @can[:log_time] -%>
|
||||||
<li class="log_time"><%= context_menu_link l(:button_log_time), {:controller => 'timelog', :action => 'new', :issue_id => @issue},
|
<li class="log_time"><%= context_menu_link l(:button_log_time), {:controller => 'timelog', :action => 'new', :issue_id => @issue},
|
||||||
|
@ -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"> 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"> 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"> 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"> 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"> 9</span> <span class="reserved">end</span>
|
||||||
<span class="line-numbers"><strong>10</strong></span> <span class="reserved">end</span></code>
|
<span class="line-numbers"><strong>10</strong></span> <span class="reserved">end</span></code>
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to_remote_if_authorized(l(:button_quote), { :url => {:controller => 'journals', :action => 'new', :id => @issue} }, :class => 'icon icon-comment') %>
|
<%= link_to_remote_if_authorized(l(:button_quote), { :url => {:controller => 'journals', :action => 'new', :id => @issue} }, :class => 'icon icon-comment') %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p><strong><%=l(:field_description)%></strong></p>
|
<p><strong><%=l(:field_description)%></strong></p>
|
||||||
<div class="wiki">
|
<div class="wiki">
|
||||||
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
|
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<li class="drop-down">
|
<li class="drop-down">
|
||||||
<%= link_to l(:label_project_plural), { :controller => 'projects', :action => 'index' }, :class => "projects" %>
|
<%= link_to l(:label_project_plural), { :controller => 'projects', :action => 'index' }, :class => "projects" %>
|
||||||
<ul style="display:none;">
|
<ul style="display:none;">
|
||||||
<%
|
<%
|
||||||
project_content = ''
|
project_content = ''
|
||||||
project_tree(User.current.projects.all) do |project, level|
|
project_tree(User.current.projects.all) do |project, level|
|
||||||
name_prefix = (level > 0 ? (' ' * 2 * level + '» ') : '')
|
name_prefix = (level > 0 ? (' ' * 2 * level + '» ') : '')
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<%= page_header_title %>
|
<%= page_header_title %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% main_menu = render_main_menu(@project) %>
|
<% main_menu = render_main_menu(@project) %>
|
||||||
<% if (side_displayed = has_content?(:sidebar) || has_content?(:main_menu) || !main_menu.blank?) %>
|
<% if (side_displayed = has_content?(:sidebar) || has_content?(:main_menu) || !main_menu.blank?) %>
|
||||||
<% display_sidebar = true %>
|
<% display_sidebar = true %>
|
||||||
@ -118,7 +118,7 @@
|
|||||||
<%= yield :main_menu %>
|
<%= yield :main_menu %>
|
||||||
<% if display_sidebar %>
|
<% if display_sidebar %>
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<div id="sidebar">
|
<div id="sidebar">
|
||||||
<%= yield :sidebar %>
|
<%= yield :sidebar %>
|
||||||
<%= call_hook :view_layouts_base_sidebar %>
|
<%= call_hook :view_layouts_base_sidebar %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# Patches active_support/core_ext/load_error.rb to support 1.9.3 LoadError message
|
# Patches active_support/core_ext/load_error.rb to support 1.9.3 LoadError message
|
||||||
if RUBY_VERSION >= '1.9.3'
|
if RUBY_VERSION >= '1.9.3'
|
||||||
MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1]
|
MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1]
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'active_record'
|
require 'active_record'
|
||||||
|
@ -16,25 +16,25 @@ class ActsAsTaggableOnMigration < ActiveRecord::Migration
|
|||||||
create_table :tags do |t|
|
create_table :tags do |t|
|
||||||
t.column :name, :string
|
t.column :name, :string
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table :taggings do |t|
|
create_table :taggings do |t|
|
||||||
t.column :tag_id, :integer
|
t.column :tag_id, :integer
|
||||||
t.column :taggable_id, :integer
|
t.column :taggable_id, :integer
|
||||||
t.column :tagger_id, :integer
|
t.column :tagger_id, :integer
|
||||||
t.column :tagger_type, :string
|
t.column :tagger_type, :string
|
||||||
|
|
||||||
# You should make sure that the column created is
|
# You should make sure that the column created is
|
||||||
# long enough to store the required class names.
|
# long enough to store the required class names.
|
||||||
t.column :taggable_type, :string
|
t.column :taggable_type, :string
|
||||||
t.column :context, :string
|
t.column :context, :string
|
||||||
|
|
||||||
t.column :created_at, :datetime
|
t.column :created_at, :datetime
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index :taggings, :tag_id
|
add_index :taggings, :tag_id
|
||||||
add_index :taggings, [:taggable_id, :taggable_type, :context]
|
add_index :taggings, [:taggable_id, :taggable_type, :context]
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
drop_table :taggings
|
drop_table :taggings
|
||||||
drop_table :tags
|
drop_table :tags
|
||||||
|
@ -19,7 +19,7 @@ class WikiController; def rescue_action(e) raise e end; end
|
|||||||
|
|
||||||
class WikiControllerTest < ActionController::TestCase
|
class WikiControllerTest < ActionController::TestCase
|
||||||
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis, :wiki_pages, :wiki_contents, :journals, :attachments, :enumerations
|
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis, :wiki_pages, :wiki_contents, :journals, :attachments, :enumerations
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@controller = WikiController.new
|
@controller = WikiController.new
|
||||||
@request = ActionController::TestRequest.new
|
@request = ActionController::TestRequest.new
|
||||||
|
@ -41,10 +41,10 @@ class AuthSourceLdapTest < ActiveSupport::TestCase
|
|||||||
@auth.custom_filter = "(& (homeDirectory=*) (sn=O*))"
|
@auth.custom_filter = "(& (homeDirectory=*) (sn=O*))"
|
||||||
assert @auth.valid?
|
assert @auth.valid?
|
||||||
assert_equal nil, @auth.errors.on(:custom_filter)
|
assert_equal nil, @auth.errors.on(:custom_filter)
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if ldap_configured?
|
if ldap_configured?
|
||||||
context '#authenticate' do
|
context '#authenticate' do
|
||||||
setup do
|
setup do
|
||||||
|
@ -17,7 +17,7 @@ class Redmine::ThemesTest < ActiveSupport::TestCase
|
|||||||
def setup
|
def setup
|
||||||
Redmine::Themes.rescan
|
Redmine::Themes.rescan
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_themes
|
def test_themes
|
||||||
themes = Redmine::Themes.themes
|
themes = Redmine::Themes.themes
|
||||||
assert_kind_of Array, themes
|
assert_kind_of Array, themes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user