diff options
author | ash <smashwilson@gmail.com> | 2013-05-18 19:13:24 +0000 |
---|---|---|
committer | ash <smashwilson@gmail.com> | 2013-05-18 19:13:24 +0000 |
commit | ceb23a6230850f26a8c3eb2282ae25af6aa23665 (patch) | |
tree | 003234405819dc12c258c1c65aaa895234bc4380 | |
parent | 7626d9575e5f95fcf127a0fc5fcaa4fde2585547 (diff) | |
download | gitlab-shell-ceb23a6230850f26a8c3eb2282ae25af6aa23665.tar.gz |
Use :warn instead of :error for invalid commands.
-rw-r--r-- | lib/gitlab_keys.rb | 2 | ||||
-rw-r--r-- | lib/gitlab_projects.rb | 2 | ||||
-rw-r--r-- | spec/gitlab_keys_spec.rb | 4 | ||||
-rw-r--r-- | spec/gitlab_projects_spec.rb | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/gitlab_keys.rb b/lib/gitlab_keys.rb index 8047c1b..03026ed 100644 --- a/lib/gitlab_keys.rb +++ b/lib/gitlab_keys.rb @@ -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 diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb index 2b8bbed..e60438e 100644 --- a/lib/gitlab_projects.rb +++ b/lib/gitlab_projects.rb @@ -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 diff --git a/spec/gitlab_keys_spec.rb b/spec/gitlab_keys_spec.rb index 67bc122..09f5872 100644 --- a/spec/gitlab_keys_spec.rb +++ b/spec/gitlab_keys_spec.rb @@ -63,10 +63,10 @@ describe GitlabKeys do gitlab_keys.exec end - it 'should log an 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 diff --git a/spec/gitlab_projects_spec.rb b/spec/gitlab_projects_spec.rb index 0d9fc72..5bcc5c8 100644 --- a/spec/gitlab_projects_spec.rb +++ b/spec/gitlab_projects_spec.rb @@ -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 |