summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-01-25 10:47:58 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-01-25 10:47:58 +0100
commitb368447cf7fbd090704e22311dde72cd293d9779 (patch)
tree4e34665813874679da769d402690425baec178d6 /lib
parentac92554dfc25fc8129b1972da9a385af8d8b733f (diff)
downloadgitlab-ce-b368447cf7fbd090704e22311dde72cd293d9779.tar.gz
Remove unneeded code and fix offensesbackport-ee-changes-for-build-minutes
Diffstat (limited to 'lib')
-rw-r--r--lib/ci/api/builds.rb2
-rw-r--r--lib/prependable.rb24
2 files changed, 1 insertions, 25 deletions
diff --git a/lib/ci/api/builds.rb b/lib/ci/api/builds.rb
index 6c869cde515..a9da8ea7eeb 100644
--- a/lib/ci/api/builds.rb
+++ b/lib/ci/api/builds.rb
@@ -24,7 +24,7 @@ module Ci
new_update = current_runner.ensure_runner_queue_value
build = Ci::RegisterBuildService.new(current_runner).execute
-
+
if build
Gitlab::Metrics.add_event(:build_found,
project: build.project.path_with_namespace)
diff --git a/lib/prependable.rb b/lib/prependable.rb
deleted file mode 100644
index ff0630d9da3..00000000000
--- a/lib/prependable.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# This module is based on: https://gist.github.com/bcardarella/5735987
-
-module Prependable
- include ActiveSupport::Concern
-
- def self.extended(base) #:nodoc:
- base.instance_variable_set(:@_dependencies, [])
- end
-
- def prepend_features(base)
- if base.instance_variable_defined?(:@_dependencies)
- base.instance_variable_get(:@_dependencies) << self
- return false
- else
- return false if base < self
- super
- base.singleton_class.send(:prepend, const_get('ClassMethods')) if const_defined?(:ClassMethods)
- @_dependencies.each { |dep| base.send(:include, dep) }
- base.class_eval(&@_included_block) if instance_variable_defined?(:@_included_block)
- end
- end
-
- alias_method :prepended, :included
-end