Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
c57c5982
Commit
c57c5982
authored
Aug 27, 2011
by
Holger Just
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix trailing whitespace
parent
7eeeaa7d
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
24 additions
and
24 deletions
+24
-24
projects_controller.rb
app/controllers/projects_controller.rb
+1
-1
change.rb
app/models/change.rb
+1
-1
changeset.rb
app/models/changeset.rb
+2
-2
issue.rb
app/models/issue.rb
+1
-1
20100714111652_update_journals_for_acts_as_journalized.rb
...20100714111652_update_journals_for_acts_as_journalized.rb
+1
-1
20100714111653_build_initial_journals_for_acts_as_journalized.rb
...4111653_build_initial_journals_for_acts_as_journalized.rb
+3
-3
20100714111654_add_changes_from_journal_details_for_acts_as_journalized.rb
...d_changes_from_journal_details_for_acts_as_journalized.rb
+3
-3
issues_test.rb
test/integration/issues_test.rb
+1
-1
issue_test.rb
test/unit/issue_test.rb
+2
-2
journal_observer_test.rb
test/unit/journal_observer_test.rb
+6
-6
journal_test.rb
test/unit/journal_test.rb
+2
-2
message_test.rb
test/unit/message_test.rb
+1
-1
No files found.
app/controllers/projects_controller.rb
View file @
c57c5982
...
@@ -268,5 +268,5 @@ private
...
@@ -268,5 +268,5 @@ private
project
.
members
<<
m
project
.
members
<<
m
end
end
end
end
end
end
app/models/change.rb
View file @
c57c5982
...
@@ -18,7 +18,7 @@ class Change < ActiveRecord::Base
...
@@ -18,7 +18,7 @@ class Change < ActiveRecord::Base
before_save
:init_path
before_save
:init_path
delegate
:repository_encoding
,
:to
=>
:changeset
,
:allow_nil
=>
true
,
:prefix
=>
true
delegate
:repository_encoding
,
:to
=>
:changeset
,
:allow_nil
=>
true
,
:prefix
=>
true
def
relative_path
def
relative_path
changeset
.
repository
.
relative_path
(
path
)
changeset
.
repository
.
relative_path
(
path
)
end
end
...
...
app/models/changeset.rb
View file @
c57c5982
...
@@ -82,7 +82,7 @@ class Changeset < ActiveRecord::Base
...
@@ -82,7 +82,7 @@ class Changeset < ActiveRecord::Base
nil
nil
end
end
end
end
# Committer of the Changeset
# Committer of the Changeset
#
#
# Attribute reader for committer that encodes the committer string to
# Attribute reader for committer that encodes the committer string to
...
@@ -278,7 +278,7 @@ class Changeset < ActiveRecord::Base
...
@@ -278,7 +278,7 @@ class Changeset < ActiveRecord::Base
end
end
end
end
else
else
txtar
=
""
txtar
=
""
begin
begin
txtar
+=
Iconv
.
new
(
'UTF-8'
,
normalized_encoding
).
iconv
(
str
)
txtar
+=
Iconv
.
new
(
'UTF-8'
,
normalized_encoding
).
iconv
(
str
)
...
...
app/models/issue.rb
View file @
c57c5982
...
@@ -549,7 +549,7 @@ class Issue < ActiveRecord::Base
...
@@ -549,7 +549,7 @@ class Issue < ActiveRecord::Base
def
nested_set_span
def
nested_set_span
rgt
-
lft
rgt
-
lft
end
end
# Returns a string of css classes that apply to the issue
# Returns a string of css classes that apply to the issue
def
css_classes
def
css_classes
s
=
"issue status-
#{
status
.
position
}
priority-
#{
priority
.
position
}
"
s
=
"issue status-
#{
status
.
position
}
priority-
#{
priority
.
position
}
"
...
...
db/migrate/20100714111652_update_journals_for_acts_as_journalized.rb
View file @
c57c5982
...
@@ -34,7 +34,7 @@ class UpdateJournalsForActsAsJournalized < ActiveRecord::Migration
...
@@ -34,7 +34,7 @@ class UpdateJournalsForActsAsJournalized < ActiveRecord::Migration
rescue
ActiveRecord
::
RecordInvalid
=>
ex
rescue
ActiveRecord
::
RecordInvalid
=>
ex
puts
"Error saving:
#{
j
.
class
.
to_s
}
#
#{
j
.
id
}
-
#{
ex
.
message
}
"
puts
"Error saving:
#{
j
.
class
.
to_s
}
#
#{
j
.
id
}
-
#{
ex
.
message
}
"
end
end
end
end
end
end
end
end
...
...
db/migrate/20100714111653_build_initial_journals_for_acts_as_journalized.rb
View file @
c57c5982
...
@@ -51,14 +51,14 @@ class BuildInitialJournalsForActsAsJournalized < ActiveRecord::Migration
...
@@ -51,14 +51,14 @@ class BuildInitialJournalsForActsAsJournalized < ActiveRecord::Migration
end
end
end
end
end
end
end
end
end
end
end
end
def
self
.
down
def
self
.
down
# No-op
# No-op
end
end
end
end
db/migrate/20100714111654_add_changes_from_journal_details_for_acts_as_journalized.rb
View file @
c57c5982
...
@@ -34,15 +34,15 @@ class AddChangesFromJournalDetailsForActsAsJournalized < ActiveRecord::Migration
...
@@ -34,15 +34,15 @@ class AddChangesFromJournalDetailsForActsAsJournalized < ActiveRecord::Migration
rescue
ActiveRecord
::
RecordInvalid
=>
ex
rescue
ActiveRecord
::
RecordInvalid
=>
ex
puts
"Error saving:
#{
journal
.
class
.
to_s
}
#
#{
journal
.
id
}
-
#{
ex
.
message
}
"
puts
"Error saving:
#{
journal
.
class
.
to_s
}
#
#{
journal
.
id
}
-
#{
ex
.
message
}
"
end
end
end
end
end
end
end
end
def
self
.
down
def
self
.
down
# No-op
# No-op
end
end
end
end
test/integration/issues_test.rb
View file @
c57c5982
...
@@ -86,7 +86,7 @@ class IssuesTest < ActionController::IntegrationTest
...
@@ -86,7 +86,7 @@ class IssuesTest < ActionController::IntegrationTest
assert_select
"a"
,
:text
=>
/testfile.txt/
assert_select
"a"
,
:text
=>
/testfile.txt/
end
end
end
end
# remove the attachments
# remove the attachments
Issue
.
find
(
1
).
attachments
.
each
(
&
:destroy
)
Issue
.
find
(
1
).
attachments
.
each
(
&
:destroy
)
assert_equal
0
,
Issue
.
find
(
1
).
attachments
.
length
assert_equal
0
,
Issue
.
find
(
1
).
attachments
.
length
...
...
test/unit/issue_test.rb
View file @
c57c5982
...
@@ -882,7 +882,7 @@ class IssueTest < ActiveSupport::TestCase
...
@@ -882,7 +882,7 @@ class IssueTest < ActiveSupport::TestCase
issue
.
update_attribute
(
:description
,
"Description with newlines
\n\n
embedded"
)
issue
.
update_attribute
(
:description
,
"Description with newlines
\n\n
embedded"
)
issue
.
reload
issue
.
reload
assert
issue
.
description
.
include?
(
"
\n
"
)
assert
issue
.
description
.
include?
(
"
\n
"
)
assert_no_difference
(
"Journal.count"
)
do
assert_no_difference
(
"Journal.count"
)
do
issue
.
safe_attributes
=
{
issue
.
safe_attributes
=
{
'description'
=>
"Description with newlines
\r\n\r\n
embedded"
'description'
=>
"Description with newlines
\r\n\r\n
embedded"
...
@@ -892,5 +892,5 @@ class IssueTest < ActiveSupport::TestCase
...
@@ -892,5 +892,5 @@ class IssueTest < ActiveSupport::TestCase
assert_equal
"Description with newlines
\n\n
embedded"
,
issue
.
reload
.
description
assert_equal
"Description with newlines
\n\n
embedded"
,
issue
.
reload
.
description
end
end
end
end
test/unit/journal_observer_test.rb
View file @
c57c5982
...
@@ -39,7 +39,7 @@ class JournalObserverTest < ActiveSupport::TestCase
...
@@ -39,7 +39,7 @@ class JournalObserverTest < ActiveSupport::TestCase
assert
@issue
.
save
assert
@issue
.
save
end
end
end
end
end
end
context
"#after_create for 'issue_note_added'"
do
context
"#after_create for 'issue_note_added'"
do
...
@@ -49,7 +49,7 @@ class JournalObserverTest < ActiveSupport::TestCase
...
@@ -49,7 +49,7 @@ class JournalObserverTest < ActiveSupport::TestCase
@issue
.
init_journal
(
@user
,
'This update has a note'
)
@issue
.
init_journal
(
@user
,
'This update has a note'
)
assert
@issue
.
save
assert
@issue
.
save
end
end
end
end
should
"not send a notification with not configured"
do
should
"not send a notification with not configured"
do
...
@@ -58,7 +58,7 @@ class JournalObserverTest < ActiveSupport::TestCase
...
@@ -58,7 +58,7 @@ class JournalObserverTest < ActiveSupport::TestCase
@issue
.
init_journal
(
@user
,
'This update has a note'
)
@issue
.
init_journal
(
@user
,
'This update has a note'
)
assert
@issue
.
save
assert
@issue
.
save
end
end
end
end
end
end
...
@@ -71,7 +71,7 @@ class JournalObserverTest < ActiveSupport::TestCase
...
@@ -71,7 +71,7 @@ class JournalObserverTest < ActiveSupport::TestCase
assert
@issue
.
save
assert
@issue
.
save
end
end
end
end
should
"not send a notification with not configured"
do
should
"not send a notification with not configured"
do
...
@@ -93,7 +93,7 @@ class JournalObserverTest < ActiveSupport::TestCase
...
@@ -93,7 +93,7 @@ class JournalObserverTest < ActiveSupport::TestCase
@issue
.
priority
=
IssuePriority
.
generate!
@issue
.
priority
=
IssuePriority
.
generate!
assert
@issue
.
save
assert
@issue
.
save
end
end
end
end
should
"not send a notification with not configured"
do
should
"not send a notification with not configured"
do
...
@@ -103,7 +103,7 @@ class JournalObserverTest < ActiveSupport::TestCase
...
@@ -103,7 +103,7 @@ class JournalObserverTest < ActiveSupport::TestCase
@issue
.
priority
=
IssuePriority
.
generate!
@issue
.
priority
=
IssuePriority
.
generate!
assert
@issue
.
save
assert
@issue
.
save
end
end
end
end
end
end
end
end
test/unit/journal_test.rb
View file @
c57c5982
...
@@ -73,13 +73,13 @@ class JournalTest < ActiveSupport::TestCase
...
@@ -73,13 +73,13 @@ class JournalTest < ActiveSupport::TestCase
assert_difference
(
"Journal.count"
)
do
assert_difference
(
"Journal.count"
)
do
assert
issue
.
save
assert
issue
.
save
end
end
journal
=
issue
.
reload
.
journals
.
first
journal
=
issue
.
reload
.
journals
.
first
assert_equal
[
""
,
"Test initial journal"
],
journal
.
changes
[
"subject"
]
assert_equal
[
""
,
"Test initial journal"
],
journal
.
changes
[
"subject"
]
assert_equal
[
0
,
@project
.
id
],
journal
.
changes
[
"project_id"
]
assert_equal
[
0
,
@project
.
id
],
journal
.
changes
[
"project_id"
]
assert_equal
[
nil
,
"Some content"
],
journal
.
changes
[
"description"
]
assert_equal
[
nil
,
"Some content"
],
journal
.
changes
[
"description"
]
end
end
test
"creating a journal should update the updated_on value of the parent record (touch)"
do
test
"creating a journal should update the updated_on value of the parent record (touch)"
do
@user
=
User
.
generate!
@user
=
User
.
generate!
@project
=
Project
.
generate!
@project
=
Project
.
generate!
...
...
test/unit/message_test.rb
View file @
c57c5982
...
@@ -145,6 +145,6 @@ class MessageTest < ActiveSupport::TestCase
...
@@ -145,6 +145,6 @@ class MessageTest < ActiveSupport::TestCase
message
=
Message
.
new
(
:board
=>
@board
,
:subject
=>
'Test message'
,
:content
=>
'Test message content'
,
:author
=>
@user
)
message
=
Message
.
new
(
:board
=>
@board
,
:subject
=>
'Test message'
,
:content
=>
'Test message content'
,
:author
=>
@user
)
assert
message
.
save
assert
message
.
save
end
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment