Revision 912:5e80956cc792 .svn/pristine/04
| .svn/pristine/04/04389a310fa0201bca85505cd492c1ab5010af2e.svn-base | ||
|---|---|---|
| 1 |
# encoding: utf-8 |
|
| 2 |
# |
|
| 3 |
# Redmine - project management software |
|
| 4 |
# Copyright (C) 2006-2011 Jean-Philippe Lang |
|
| 5 |
# |
|
| 6 |
# This program is free software; you can redistribute it and/or |
|
| 7 |
# modify it under the terms of the GNU General Public License |
|
| 8 |
# as published by the Free Software Foundation; either version 2 |
|
| 9 |
# of the License, or (at your option) any later version. |
|
| 10 |
# |
|
| 11 |
# This program is distributed in the hope that it will be useful, |
|
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 14 |
# GNU General Public License for more details. |
|
| 15 |
# |
|
| 16 |
# You should have received a copy of the GNU General Public License |
|
| 17 |
# along with this program; if not, write to the Free Software |
|
| 18 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
| 19 |
|
|
| 20 |
module DocumentsHelper |
|
| 21 |
end |
|
| .svn/pristine/04/045cde29760447c94f70470e61f71e26e3da5dec.svn-base | ||
|---|---|---|
| 1 |
Dir[File.dirname(__FILE__) + "/core_ext/*.rb"].each { |file| require(file) }
|
|
| .svn/pristine/04/046e745fdf9ac7fc7dec5d1b9e47c29909c11738.svn-base | ||
|---|---|---|
| 1 |
.jstEditor {
|
|
| 2 |
padding-left: 0px; |
|
| 3 |
} |
|
| 4 |
.jstEditor textarea, .jstEditor iframe {
|
|
| 5 |
margin: 0; |
|
| 6 |
} |
|
| 7 |
|
|
| 8 |
.jstHandle {
|
|
| 9 |
height: 10px; |
|
| 10 |
font-size: 0.1em; |
|
| 11 |
cursor: s-resize; |
|
| 12 |
/*background: transparent url(img/resizer.png) no-repeat 45% 50%;*/ |
|
| 13 |
} |
|
| 14 |
|
|
| 15 |
.jstElements {
|
|
| 16 |
padding: 3px 3px 3px 0; |
|
| 17 |
} |
|
| 18 |
|
|
| 19 |
.jstElements button {
|
|
| 20 |
margin-right: 4px; |
|
| 21 |
width : 24px; |
|
| 22 |
height: 24px; |
|
| 23 |
padding: 4px; |
|
| 24 |
border-style: solid; |
|
| 25 |
border-width: 1px; |
|
| 26 |
border-color: #ddd; |
|
| 27 |
background-color : #f7f7f7; |
|
| 28 |
background-position : 50% 50%; |
|
| 29 |
background-repeat: no-repeat; |
|
| 30 |
} |
|
| 31 |
.jstElements button:hover {
|
|
| 32 |
border-color: #bbb; |
|
| 33 |
background-color: #e5e5e5; |
|
| 34 |
} |
|
| 35 |
.jstElements button span {
|
|
| 36 |
display : none; |
|
| 37 |
} |
|
| 38 |
.jstElements span {
|
|
| 39 |
display : inline; |
|
| 40 |
} |
|
| 41 |
|
|
| 42 |
.jstSpacer {
|
|
| 43 |
width : 0px; |
|
| 44 |
font-size: 1px; |
|
| 45 |
margin-right: 6px; |
|
| 46 |
} |
|
| 47 |
|
|
| 48 |
.jstElements .help { float: right; margin-right: 0.5em; padding-top: 8px; font-size: 0.9em; }
|
|
| 49 |
.jstElements .help a {padding: 2px 0 2px 20px; background: url(../images/help.png) no-repeat 0 50%;}
|
|
| 50 |
|
|
| 51 |
/* Buttons |
|
| 52 |
-------------------------------------------------------- */ |
|
| 53 |
.jstb_strong {
|
|
| 54 |
background-image: url(../images/jstoolbar/bt_strong.png); |
|
| 55 |
} |
|
| 56 |
.jstb_em {
|
|
| 57 |
background-image: url(../images/jstoolbar/bt_em.png); |
|
| 58 |
} |
|
| 59 |
.jstb_ins {
|
|
| 60 |
background-image: url(../images/jstoolbar/bt_ins.png); |
|
| 61 |
} |
|
| 62 |
.jstb_del {
|
|
| 63 |
background-image: url(../images/jstoolbar/bt_del.png); |
|
| 64 |
} |
|
| 65 |
.jstb_code {
|
|
| 66 |
background-image: url(../images/jstoolbar/bt_code.png); |
|
| 67 |
} |
|
| 68 |
.jstb_h1 {
|
|
| 69 |
background-image: url(../images/jstoolbar/bt_h1.png); |
|
| 70 |
} |
|
| 71 |
.jstb_h2 {
|
|
| 72 |
background-image: url(../images/jstoolbar/bt_h2.png); |
|
| 73 |
} |
|
| 74 |
.jstb_h3 {
|
|
| 75 |
background-image: url(../images/jstoolbar/bt_h3.png); |
|
| 76 |
} |
|
| 77 |
.jstb_ul {
|
|
| 78 |
background-image: url(../images/jstoolbar/bt_ul.png); |
|
| 79 |
} |
|
| 80 |
.jstb_ol {
|
|
| 81 |
background-image: url(../images/jstoolbar/bt_ol.png); |
|
| 82 |
} |
|
| 83 |
.jstb_bq {
|
|
| 84 |
background-image: url(../images/jstoolbar/bt_bq.png); |
|
| 85 |
} |
|
| 86 |
.jstb_unbq {
|
|
| 87 |
background-image: url(../images/jstoolbar/bt_bq_remove.png); |
|
| 88 |
} |
|
| 89 |
.jstb_pre {
|
|
| 90 |
background-image: url(../images/jstoolbar/bt_pre.png); |
|
| 91 |
} |
|
| 92 |
.jstb_link {
|
|
| 93 |
background-image: url(../images/jstoolbar/bt_link.png); |
|
| 94 |
} |
|
| 95 |
.jstb_img {
|
|
| 96 |
background-image: url(../images/jstoolbar/bt_img.png); |
|
| 97 |
} |
|
| .svn/pristine/04/0498f22fd69f96a75cd1f1df26f11c6b9f18a2ee.svn-base | ||
|---|---|---|
| 1 |
require File.dirname(__FILE__) + '/test_helper' |
|
| 2 |
|
|
| 3 |
class StatusTest < Test::Unit::TestCase |
|
| 4 |
include OpenIdAuthentication |
|
| 5 |
|
|
| 6 |
def test_state_conditional |
|
| 7 |
assert Result[:missing].missing? |
|
| 8 |
assert Result[:missing].unsuccessful? |
|
| 9 |
assert !Result[:missing].successful? |
|
| 10 |
|
|
| 11 |
assert Result[:successful].successful? |
|
| 12 |
assert !Result[:successful].unsuccessful? |
|
| 13 |
end |
|
| 14 |
end |
|
| .svn/pristine/04/04bafe6e6b402a0f59316ed78a7582dc8951a46f.svn-base | ||
|---|---|---|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
|
|
| 3 |
<% end %> |
|
| 4 |
|
|
| 5 |
<div class="contextual"> |
|
| 6 |
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') + ' |' if User.current.allowed_to?(:add_project, nil, :global => true) %>
|
|
| 7 |
<%= link_to(l(:label_issue_view_all), { :controller => 'issues' }) + ' |' if User.current.allowed_to?(:view_issues, nil, :global => true) %>
|
|
| 8 |
<%= link_to(l(:label_overall_spent_time), { :controller => 'time_entries' }) + ' |' if User.current.allowed_to?(:view_time_entries, nil, :global => true) %>
|
|
| 9 |
<%= link_to l(:label_overall_activity), { :controller => 'activities', :action => 'index' }%>
|
|
| 10 |
</div> |
|
| 11 |
|
|
| 12 |
<h2><%=l(:label_project_plural)%></h2> |
|
| 13 |
|
|
| 14 |
<%= render_project_hierarchy(@projects)%> |
|
| 15 |
|
|
| 16 |
<% if User.current.logged? %> |
|
| 17 |
<p style="text-align:right;"> |
|
| 18 |
<span class="my-project"><%= l(:label_my_projects) %></span> |
|
| 19 |
</p> |
|
| 20 |
<% end %> |
|
| 21 |
|
|
| 22 |
<% other_formats_links do |f| %> |
|
| 23 |
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
|
| 24 |
<% end %> |
|
| 25 |
|
|
| 26 |
<% html_title(l(:label_project_plural)) -%> |
|
| .svn/pristine/04/04bd6b422ff086dcb557f90d7ba79b9553b3ae87.svn-base | ||
|---|---|---|
| 1 |
# encoding: utf-8 |
|
| 2 |
module CodeRay |
|
| 3 |
module Scanners |
|
| 4 |
|
|
| 5 |
class Ruby |
|
| 6 |
|
|
| 7 |
class StringState < Struct.new :type, :interpreted, :delim, :heredoc, |
|
| 8 |
:opening_paren, :paren_depth, :pattern, :next_state # :nodoc: all |
|
| 9 |
|
|
| 10 |
CLOSING_PAREN = Hash[ *%w[ |
|
| 11 |
( ) |
|
| 12 |
[ ] |
|
| 13 |
< > |
|
| 14 |
{ }
|
|
| 15 |
] ].each { |k,v| k.freeze; v.freeze } # debug, if I try to change it with <<
|
|
| 16 |
|
|
| 17 |
STRING_PATTERN = Hash.new do |h, k| |
|
| 18 |
delim, interpreted = *k |
|
| 19 |
# delim = delim.dup # workaround for old Ruby |
|
| 20 |
delim_pattern = Regexp.escape(delim) |
|
| 21 |
if closing_paren = CLOSING_PAREN[delim] |
|
| 22 |
delim_pattern << Regexp.escape(closing_paren) |
|
| 23 |
end |
|
| 24 |
delim_pattern << '\\\\' unless delim == '\\' |
|
| 25 |
|
|
| 26 |
# special_escapes = |
|
| 27 |
# case interpreted |
|
| 28 |
# when :regexp_symbols |
|
| 29 |
# '| [|?*+(){}\[\].^$]'
|
|
| 30 |
# end |
|
| 31 |
|
|
| 32 |
h[k] = |
|
| 33 |
if interpreted && delim != '#' |
|
| 34 |
/ (?= [#{delim_pattern}] | \# [{$@] ) /mx
|
|
| 35 |
else |
|
| 36 |
/ (?= [#{delim_pattern}] ) /mx
|
|
| 37 |
end |
|
| 38 |
end |
|
| 39 |
|
|
| 40 |
def initialize kind, interpreted, delim, heredoc = false |
|
| 41 |
if heredoc |
|
| 42 |
pattern = heredoc_pattern delim, interpreted, heredoc == :indented |
|
| 43 |
delim = nil |
|
| 44 |
else |
|
| 45 |
pattern = STRING_PATTERN[ [delim, interpreted] ] |
|
| 46 |
if closing_paren = CLOSING_PAREN[delim] |
|
| 47 |
opening_paren = delim |
|
| 48 |
delim = closing_paren |
|
| 49 |
paren_depth = 1 |
|
| 50 |
end |
|
| 51 |
end |
|
| 52 |
super kind, interpreted, delim, heredoc, opening_paren, paren_depth, pattern, :initial |
|
| 53 |
end |
|
| 54 |
|
|
| 55 |
def heredoc_pattern delim, interpreted, indented |
|
| 56 |
# delim = delim.dup # workaround for old Ruby |
|
| 57 |
delim_pattern = Regexp.escape(delim) |
|
| 58 |
delim_pattern = / (?:\A|\n) #{ '(?>[ \t]*)' if indented } #{ Regexp.new delim_pattern } $ /x
|
|
| 59 |
if interpreted |
|
| 60 |
/ (?= #{delim_pattern}() | \\ | \# [{$@] ) /mx # $1 set == end of heredoc
|
|
| 61 |
else |
|
| 62 |
/ (?= #{delim_pattern}() | \\ ) /mx
|
|
| 63 |
end |
|
| 64 |
end |
|
| 65 |
|
|
| 66 |
end |
|
| 67 |
|
|
| 68 |
end |
|
| 69 |
|
|
| 70 |
end |
|
| 71 |
end |
|
| .svn/pristine/04/04fbda284b00bec052d898fc58aac289855e9000.svn-base | ||
|---|---|---|
| 1 |
class Wiki < ActiveRecord::Base |
|
| 2 |
generator_for :start_page => 'Start' |
|
| 3 |
generator_for :project, :method => :generate_project |
|
| 4 |
|
|
| 5 |
def self.generate_project |
|
| 6 |
Project.generate! |
|
| 7 |
end |
|
| 8 |
end |
|
Also available in: Unified diff