diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-21 15:16:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-21 15:16:22 +0300 |
commit | cb6f08be88608936fbeafa535cf725e1eaa3ffeb (patch) | |
tree | 79a5474206546033b6fe428a0944a4b49c22a42e /app/experiments | |
parent | 62b0d21a48b2adbfd4ac63159fe0efac73ada922 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/experiments')
-rw-r--r-- | app/experiments/new_project_readme_content_experiment.rb | 30 | ||||
-rw-r--r-- | app/experiments/templates/new_project_readme_content/readme_basic.md.tt | 3 |
2 files changed, 0 insertions, 33 deletions
diff --git a/app/experiments/new_project_readme_content_experiment.rb b/app/experiments/new_project_readme_content_experiment.rb deleted file mode 100644 index 1de7632268d..00000000000 --- a/app/experiments/new_project_readme_content_experiment.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class NewProjectReadmeContentExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass - TEMPLATE_PATH = Rails.root.join('app', 'experiments', 'templates', 'new_project_readme_content') - include Rails.application.routes.url_helpers - - def run_with(project, variant: nil) - @project = project - publish_to_database - run(variant) - end - - def control_behavior - template('readme_basic.md') - end - - def advanced_behavior - template('readme_advanced.md') - end - - def redirect(to_url) - experiment_redirect_url(self, url: to_url) - end - - private - - def template(name) - ERB.new(File.read(TEMPLATE_PATH.join("#{name}.tt")), trim_mode: '<>').result(binding) - end -end diff --git a/app/experiments/templates/new_project_readme_content/readme_basic.md.tt b/app/experiments/templates/new_project_readme_content/readme_basic.md.tt deleted file mode 100644 index 1e68eaf2f05..00000000000 --- a/app/experiments/templates/new_project_readme_content/readme_basic.md.tt +++ /dev/null @@ -1,3 +0,0 @@ -# <%= @project.name %> - -<%= @project.description %> |