Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-shell
Commits
ceb23a62
Commit
ceb23a62
authored
May 18, 2013
by
ash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use :warn instead of :error for invalid commands.
parent
7626d957
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
lib/gitlab_keys.rb
lib/gitlab_keys.rb
+1
-1
lib/gitlab_projects.rb
lib/gitlab_projects.rb
+1
-1
spec/gitlab_keys_spec.rb
spec/gitlab_keys_spec.rb
+2
-2
spec/gitlab_projects_spec.rb
spec/gitlab_projects_spec.rb
+2
-2
No files found.
lib/gitlab_keys.rb
View file @
ceb23a62
...
...
@@ -18,7 +18,7 @@ class GitlabKeys
when
'add-key'
;
add_key
when
'rm-key'
;
rm_key
else
$logger
.
error
"Attempt to execute invalid gitlab-keys command
#{
@command
.
inspect
}
."
$logger
.
warn
"Attempt to execute invalid gitlab-keys command
#{
@command
.
inspect
}
."
puts
'not allowed'
false
end
...
...
lib/gitlab_projects.rb
View file @
ceb23a62
...
...
@@ -32,7 +32,7 @@ class GitlabProjects
when
'import-project'
;
import_project
when
'fork-project'
;
fork_project
else
$logger
.
error
"Attempt to execute invalid gitlab-projects command
#{
@command
.
inspect
}
."
$logger
.
warn
"Attempt to execute invalid gitlab-projects command
#{
@command
.
inspect
}
."
puts
'not allowed'
false
end
...
...
spec/gitlab_keys_spec.rb
View file @
ceb23a62
...
...
@@ -63,10 +63,10 @@ describe GitlabKeys do
gitlab_keys
.
exec
end
it
'should log a
n error
on unknown commands'
do
it
'should log a
warning
on unknown commands'
do
gitlab_keys
=
build_gitlab_keys
(
'nooope'
)
gitlab_keys
.
stub
(
puts:
nil
)
$logger
.
should_receive
(
:
error
).
with
(
'Attempt to execute invalid gitlab-keys command "nooope".'
)
$logger
.
should_receive
(
:
warn
).
with
(
'Attempt to execute invalid gitlab-keys command "nooope".'
)
gitlab_keys
.
exec
end
end
...
...
spec/gitlab_projects_spec.rb
View file @
ceb23a62
...
...
@@ -180,9 +180,9 @@ describe GitlabProjects do
gitlab_projects
.
exec
end
it
'should log a
message
for unknown commands'
do
it
'should log a
warning
for unknown commands'
do
gitlab_projects
=
build_gitlab_projects
(
'hurf-durf'
,
repo_name
)
$logger
.
should_receive
(
:
error
).
with
(
'Attempt to execute invalid gitlab-projects command "hurf-durf".'
)
$logger
.
should_receive
(
:
warn
).
with
(
'Attempt to execute invalid gitlab-projects command "hurf-durf".'
)
gitlab_projects
.
exec
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