summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-05 11:35:27 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-05 11:35:27 +0100
commitb86d8afe23524d10956cfbc1b87337fd2ce75e8c (patch)
treeee4d9ef71a31177164025eccb11e7bdd01105225 /lib
parentd55ff247569a2bf5c78c80f966a56b28d5c8332f (diff)
downloadgitlab-ce-b86d8afe23524d10956cfbc1b87337fd2ce75e8c.tar.gz
Fold core/extended status modules to reduce nesting
Diffstat (limited to 'lib')
-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.rb6
-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
12 files changed, 43 insertions, 49 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