diff options
-rw-r--r-- | lib/gitlab/ci/status/canceled.rb (renamed from lib/gitlab/ci/status/core/canceled.rb) | 8 | ||||
-rw-r--r-- | lib/gitlab/ci/status/core.rb (renamed from lib/gitlab/ci/status/core/base.rb) | 8 | ||||
-rw-r--r-- | lib/gitlab/ci/status/created.rb (renamed from lib/gitlab/ci/status/core/created.rb) | 8 | ||||
-rw-r--r-- | lib/gitlab/ci/status/extended.rb (renamed from lib/gitlab/ci/status/extended/base.rb) | 8 | ||||
-rw-r--r-- | lib/gitlab/ci/status/factory.rb | 6 | ||||
-rw-r--r-- | lib/gitlab/ci/status/failed.rb (renamed from lib/gitlab/ci/status/core/failed.rb) | 8 | ||||
-rw-r--r-- | lib/gitlab/ci/status/pending.rb (renamed from lib/gitlab/ci/status/core/pending.rb) | 8 | ||||
-rw-r--r-- | lib/gitlab/ci/status/pipeline/common.rb (renamed from lib/gitlab/ci/status/extended/pipeline/common.rb) | 6 | ||||
-rw-r--r-- | lib/gitlab/ci/status/pipeline/success_with_warnings.rb (renamed from lib/gitlab/ci/status/extended/pipeline/success_with_warnings.rb) | 8 | ||||
-rw-r--r-- | lib/gitlab/ci/status/running.rb (renamed from lib/gitlab/ci/status/core/running.rb) | 8 | ||||
-rw-r--r-- | lib/gitlab/ci/status/skipped.rb (renamed from lib/gitlab/ci/status/core/skipped.rb) | 8 | ||||
-rw-r--r-- | lib/gitlab/ci/status/success.rb (renamed from lib/gitlab/ci/status/core/success.rb) | 8 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/canceled_spec.rb (renamed from spec/lib/gitlab/ci/status/core/canceled_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/created_spec.rb (renamed from spec/lib/gitlab/ci/status/core/created_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/extended_spec.rb (renamed from spec/lib/gitlab/ci/status/extended/base_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/factory_spec.rb | 0 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/failed_spec.rb (renamed from spec/lib/gitlab/ci/status/core/failed_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/pending_spec.rb (renamed from spec/lib/gitlab/ci/status/core/pending_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/pipeline/common_spec.rb (renamed from spec/lib/gitlab/ci/status/extended/pipeline/common_spec.rb) | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/pipeline/success_with_warnings_spec.rb (renamed from spec/lib/gitlab/ci/status/extended/pipeline/success_with_warnings_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/running_spec.rb (renamed from spec/lib/gitlab/ci/status/core/running_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/skipped_spec.rb (renamed from spec/lib/gitlab/ci/status/core/skipped_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/success_spec.rb (renamed from spec/lib/gitlab/ci/status/core/success_spec.rb) | 2 |
23 files changed, 54 insertions, 60 deletions
diff --git a/lib/gitlab/ci/status/core/canceled.rb b/lib/gitlab/ci/status/canceled.rb index a05ac8ee3cc..dd6d99e9075 100644 --- a/lib/gitlab/ci/status/core/canceled.rb +++ b/lib/gitlab/ci/status/canceled.rb @@ -1,7 +1,7 @@ -module Gitlab::Ci - module Status - module Core - class Canceled < Core::Base +module Gitlab + module Ci + module Status + class Canceled < Status::Core def text 'canceled' end diff --git a/lib/gitlab/ci/status/core/base.rb b/lib/gitlab/ci/status/core.rb index d1896a610b7..fbfe257eeca 100644 --- a/lib/gitlab/ci/status/core/base.rb +++ b/lib/gitlab/ci/status/core.rb @@ -1,9 +1,9 @@ -module Gitlab::Ci - module Status - module Core +module Gitlab + module Ci + module Status # Base abstract class fore core status # - class Base + class Core include Gitlab::Routing.url_helpers def initialize(subject) diff --git a/lib/gitlab/ci/status/core/created.rb b/lib/gitlab/ci/status/created.rb index ee8bf2e8dac..6596d7e01ca 100644 --- a/lib/gitlab/ci/status/core/created.rb +++ b/lib/gitlab/ci/status/created.rb @@ -1,7 +1,7 @@ -module Gitlab::Ci - module Status - module Core - class Created < Core::Base +module Gitlab + module Ci + module Status + class Created < Status::Core def text 'created' end diff --git a/lib/gitlab/ci/status/extended/base.rb b/lib/gitlab/ci/status/extended.rb index 1d7819c6891..6bfb5d38c1f 100644 --- a/lib/gitlab/ci/status/extended/base.rb +++ b/lib/gitlab/ci/status/extended.rb @@ -1,7 +1,7 @@ -module Gitlab::Ci - module Status - module Extended - module Base +module Gitlab + module Ci + module Status + module Extended def matches?(_subject) raise NotImplementedError end diff --git a/lib/gitlab/ci/status/factory.rb b/lib/gitlab/ci/status/factory.rb deleted file mode 100644 index 212cd1a1687..00000000000 --- a/lib/gitlab/ci/status/factory.rb +++ /dev/null @@ -1,6 +0,0 @@ -module Gitlab::Ci - module Status - class Factory - end - end -end diff --git a/lib/gitlab/ci/status/core/failed.rb b/lib/gitlab/ci/status/failed.rb index ea1615853c0..c5b5e3203ad 100644 --- a/lib/gitlab/ci/status/core/failed.rb +++ b/lib/gitlab/ci/status/failed.rb @@ -1,7 +1,7 @@ -module Gitlab::Ci - module Status - module Core - class Failed < Core::Base +module Gitlab + module Ci + module Status + class Failed < Status::Core def text 'failed' end diff --git a/lib/gitlab/ci/status/core/pending.rb b/lib/gitlab/ci/status/pending.rb index 95fbb710735..d30f35a59a2 100644 --- a/lib/gitlab/ci/status/core/pending.rb +++ b/lib/gitlab/ci/status/pending.rb @@ -1,7 +1,7 @@ -module Gitlab::Ci - module Status - module Core - class Pending < Core::Base +module Gitlab + module Ci + module Status + class Pending < Status::Core def text 'pending' end diff --git a/lib/gitlab/ci/status/extended/pipeline/common.rb b/lib/gitlab/ci/status/pipeline/common.rb index 1b70ba303dc..25e52bec3da 100644 --- a/lib/gitlab/ci/status/extended/pipeline/common.rb +++ b/lib/gitlab/ci/status/pipeline/common.rb @@ -1,6 +1,6 @@ -module Gitlab::Ci - module Status - module Extended +module Gitlab + module Ci + module Status module Pipeline module Common def has_details? diff --git a/lib/gitlab/ci/status/extended/pipeline/success_with_warnings.rb b/lib/gitlab/ci/status/pipeline/success_with_warnings.rb index 8f1d9cf87c7..97dfba81ff5 100644 --- a/lib/gitlab/ci/status/extended/pipeline/success_with_warnings.rb +++ b/lib/gitlab/ci/status/pipeline/success_with_warnings.rb @@ -1,9 +1,9 @@ -module Gitlab::Ci - module Status - module Extended +module Gitlab + module Ci + module Status module Pipeline class SuccessWithWarnings < SimpleDelegator - extend Status::Extended::Base + extend Status::Extended def text 'passed' diff --git a/lib/gitlab/ci/status/core/running.rb b/lib/gitlab/ci/status/running.rb index 5580c1a5154..2aba3c373c7 100644 --- a/lib/gitlab/ci/status/core/running.rb +++ b/lib/gitlab/ci/status/running.rb @@ -1,7 +1,7 @@ -module Gitlab::Ci - module Status - module Core - class Running < Core::Base +module Gitlab + module Ci + module Status + class Running < Status::Core def text 'running' end diff --git a/lib/gitlab/ci/status/core/skipped.rb b/lib/gitlab/ci/status/skipped.rb index 0e8e42f525b..16282aefd03 100644 --- a/lib/gitlab/ci/status/core/skipped.rb +++ b/lib/gitlab/ci/status/skipped.rb @@ -1,7 +1,7 @@ -module Gitlab::Ci - module Status - module Core - class Skipped < Core::Base +module Gitlab + module Ci + module Status + class Skipped < Status::Core def text 'skipped' end diff --git a/lib/gitlab/ci/status/core/success.rb b/lib/gitlab/ci/status/success.rb index 7efafdb615f..c09c5f006e3 100644 --- a/lib/gitlab/ci/status/core/success.rb +++ b/lib/gitlab/ci/status/success.rb @@ -1,7 +1,7 @@ -module Gitlab::Ci - module Status - module Core - class Success < Core::Base +module Gitlab + module Ci + module Status + class Success < Status::Core def text 'passed' end diff --git a/spec/lib/gitlab/ci/status/core/canceled_spec.rb b/spec/lib/gitlab/ci/status/canceled_spec.rb index fd90eb6beda..619ecbcba67 100644 --- a/spec/lib/gitlab/ci/status/core/canceled_spec.rb +++ b/spec/lib/gitlab/ci/status/canceled_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::Ci::Status::Core::Canceled do +describe Gitlab::Ci::Status::Canceled do subject { described_class.new(double('subject')) } describe '#text' do diff --git a/spec/lib/gitlab/ci/status/core/created_spec.rb b/spec/lib/gitlab/ci/status/created_spec.rb index a35a3e14929..157302c65a8 100644 --- a/spec/lib/gitlab/ci/status/core/created_spec.rb +++ b/spec/lib/gitlab/ci/status/created_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::Ci::Status::Core::Created do +describe Gitlab::Ci::Status::Created do subject { described_class.new(double('subject')) } describe '#text' do diff --git a/spec/lib/gitlab/ci/status/extended/base_spec.rb b/spec/lib/gitlab/ci/status/extended_spec.rb index 7cdc68c927f..120e121aae5 100644 --- a/spec/lib/gitlab/ci/status/extended/base_spec.rb +++ b/spec/lib/gitlab/ci/status/extended_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::Ci::Status::Extended::Base do +describe Gitlab::Ci::Status::Extended do subject do Class.new.extend(described_class) end diff --git a/spec/lib/gitlab/ci/status/factory_spec.rb b/spec/lib/gitlab/ci/status/factory_spec.rb deleted file mode 100644 index e69de29bb2d..00000000000 --- a/spec/lib/gitlab/ci/status/factory_spec.rb +++ /dev/null diff --git a/spec/lib/gitlab/ci/status/core/failed_spec.rb b/spec/lib/gitlab/ci/status/failed_spec.rb index 41ce63b3a6f..0b3cb8168e6 100644 --- a/spec/lib/gitlab/ci/status/core/failed_spec.rb +++ b/spec/lib/gitlab/ci/status/failed_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::Ci::Status::Core::Failed do +describe Gitlab::Ci::Status::Failed do subject { described_class.new(double('subject')) } describe '#text' do diff --git a/spec/lib/gitlab/ci/status/core/pending_spec.rb b/spec/lib/gitlab/ci/status/pending_spec.rb index 988d3c0a9e2..57c901c1202 100644 --- a/spec/lib/gitlab/ci/status/core/pending_spec.rb +++ b/spec/lib/gitlab/ci/status/pending_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::Ci::Status::Core::Pending do +describe Gitlab::Ci::Status::Pending do subject { described_class.new(double('subject')) } describe '#text' do diff --git a/spec/lib/gitlab/ci/status/extended/pipeline/common_spec.rb b/spec/lib/gitlab/ci/status/pipeline/common_spec.rb index 32939800c70..21adee3f8e7 100644 --- a/spec/lib/gitlab/ci/status/extended/pipeline/common_spec.rb +++ b/spec/lib/gitlab/ci/status/pipeline/common_spec.rb @@ -1,10 +1,10 @@ require 'spec_helper' -describe Gitlab::Ci::Status::Extended::Pipeline::Common do +describe Gitlab::Ci::Status::Pipeline::Common do let(:pipeline) { create(:ci_pipeline) } subject do - Gitlab::Ci::Status::Core::Success + Class.new(Gitlab::Ci::Status::Core) .new(pipeline).extend(described_class) end diff --git a/spec/lib/gitlab/ci/status/extended/pipeline/success_with_warnings_spec.rb b/spec/lib/gitlab/ci/status/pipeline/success_with_warnings_spec.rb index b1a63c5f2f9..02e526e3de2 100644 --- a/spec/lib/gitlab/ci/status/extended/pipeline/success_with_warnings_spec.rb +++ b/spec/lib/gitlab/ci/status/pipeline/success_with_warnings_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::Ci::Status::Extended::Pipeline::SuccessWithWarnings do +describe Gitlab::Ci::Status::Pipeline::SuccessWithWarnings do subject do described_class.new(double('status')) end diff --git a/spec/lib/gitlab/ci/status/core/running_spec.rb b/spec/lib/gitlab/ci/status/running_spec.rb index dbb0d37659c..c023f1872cc 100644 --- a/spec/lib/gitlab/ci/status/core/running_spec.rb +++ b/spec/lib/gitlab/ci/status/running_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::Ci::Status::Core::Running do +describe Gitlab::Ci::Status::Running do subject { described_class.new(double('subject')) } describe '#text' do diff --git a/spec/lib/gitlab/ci/status/core/skipped_spec.rb b/spec/lib/gitlab/ci/status/skipped_spec.rb index 624348af2d1..d4f7f4b3b70 100644 --- a/spec/lib/gitlab/ci/status/core/skipped_spec.rb +++ b/spec/lib/gitlab/ci/status/skipped_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::Ci::Status::Core::Skipped do +describe Gitlab::Ci::Status::Skipped do subject { described_class.new(double('subject')) } describe '#text' do diff --git a/spec/lib/gitlab/ci/status/core/success_spec.rb b/spec/lib/gitlab/ci/status/success_spec.rb index c4bc0d5e234..9e261a3aa5f 100644 --- a/spec/lib/gitlab/ci/status/core/success_spec.rb +++ b/spec/lib/gitlab/ci/status/success_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::Ci::Status::Core::Success do +describe Gitlab::Ci::Status::Success do subject { described_class.new(double('subject')) } describe '#text' do |