From 1fc617d5fa9b0eadb30eeb75990f3ad1d12b7827 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 1 Aug 2016 16:57:55 +0800 Subject: [PATCH] =?UTF-8?q?pull=20request=E9=A1=B5=E9=9D=A2=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/javascripts/pull_rquests.js.coffee | 3 -- app/assets/stylesheets/pull_rquests.css.scss | 3 -- app/controllers/pull_rquests_controller.rb | 31 ------------------- app/helpers/pull_rquests_helper.rb | 2 -- app/views/pull_requests/index.html.erb | 10 ++++++ app/views/pull_rquests/index.html.erb | 10 ------ app/views/pull_rquests/new.html.erb | 0 app/views/pull_rquests/show.html.erb | 1 - .../pull_rquests_controller_spec.rb | 5 --- 9 files changed, 10 insertions(+), 55 deletions(-) delete mode 100644 app/assets/javascripts/pull_rquests.js.coffee delete mode 100644 app/assets/stylesheets/pull_rquests.css.scss delete mode 100644 app/controllers/pull_rquests_controller.rb delete mode 100644 app/helpers/pull_rquests_helper.rb delete mode 100644 app/views/pull_rquests/index.html.erb delete mode 100644 app/views/pull_rquests/new.html.erb delete mode 100644 app/views/pull_rquests/show.html.erb delete mode 100644 spec/controllers/pull_rquests_controller_spec.rb diff --git a/app/assets/javascripts/pull_rquests.js.coffee b/app/assets/javascripts/pull_rquests.js.coffee deleted file mode 100644 index 761567942..000000000 --- a/app/assets/javascripts/pull_rquests.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/stylesheets/pull_rquests.css.scss b/app/assets/stylesheets/pull_rquests.css.scss deleted file mode 100644 index 89d608475..000000000 --- a/app/assets/stylesheets/pull_rquests.css.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the pull_rquests controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/pull_rquests_controller.rb b/app/controllers/pull_rquests_controller.rb deleted file mode 100644 index 230f832bd..000000000 --- a/app/controllers/pull_rquests_controller.rb +++ /dev/null @@ -1,31 +0,0 @@ -class PullRquestsController < ApplicationController - before_filter :find_project_and_repository - before_filter :connect_gitlab, :only => [:index, :show] - - layout "base_projects" - - def index - results = @g.merge_requests(@project.gpid) - end - - def new - - end - - def create - - end - - private - def connect_gitlab - @g = Gitlab.client - end - - def find_project_and_repository - @project = Project.find(params[:project_id]) - render_404 if @project.gpid.blank? - @repository = Repository.where(:project_id => @project.id, :type => "Repository::Gitlab") - rescue ActiveRecord::RecordNotFound - render_404 - end -end diff --git a/app/helpers/pull_rquests_helper.rb b/app/helpers/pull_rquests_helper.rb deleted file mode 100644 index 1b3eef9a4..000000000 --- a/app/helpers/pull_rquests_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module PullRquestsHelper -end diff --git a/app/views/pull_requests/index.html.erb b/app/views/pull_requests/index.html.erb index e69de29bb..cad9247a6 100644 --- a/app/views/pull_requests/index.html.erb +++ b/app/views/pull_requests/index.html.erb @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/app/views/pull_rquests/index.html.erb b/app/views/pull_rquests/index.html.erb deleted file mode 100644 index cad9247a6..000000000 --- a/app/views/pull_rquests/index.html.erb +++ /dev/null @@ -1,10 +0,0 @@ - - - \ No newline at end of file diff --git a/app/views/pull_rquests/new.html.erb b/app/views/pull_rquests/new.html.erb deleted file mode 100644 index e69de29bb..000000000 diff --git a/app/views/pull_rquests/show.html.erb b/app/views/pull_rquests/show.html.erb deleted file mode 100644 index bd0b03266..000000000 --- a/app/views/pull_rquests/show.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= project_pull_rquest_path %> \ No newline at end of file diff --git a/spec/controllers/pull_rquests_controller_spec.rb b/spec/controllers/pull_rquests_controller_spec.rb deleted file mode 100644 index 8b7e55743..000000000 --- a/spec/controllers/pull_rquests_controller_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'rails_helper' - -RSpec.describe PullRquestsController, :type => :controller do - -end