Removes unrelated dashboard changes
This commit is contained in:
@@ -61,8 +61,6 @@ module ApplicationHelper
|
||||
"#{root_url.chomp("\/")}#{url}"
|
||||
end
|
||||
|
||||
# This method is used to embed the font inside CSS when the asset is precompiled. It is required in order to allow
|
||||
# wkpdfhtml embeding custom fonts inside the PDF.
|
||||
def self.asset_data_base64(path)
|
||||
asset = (Rails.application.assets || ::Sprockets::Railtie.build_environment(Rails.application)).find_asset(path)
|
||||
throw "Could not find asset '#{path}'" if asset.nil?
|
||||
|
||||
@@ -69,7 +69,7 @@ module Abilities
|
||||
can [:create, :destroy, :manage], ::Poll::BoothAssignment
|
||||
can [:create, :destroy], ::Poll::OfficerAssignment
|
||||
can [:read, :create, :update], Poll::Question
|
||||
can :destroy, Poll::Question
|
||||
can :destroy, Poll::Question # , comments_count: 0, votes_up: 0
|
||||
|
||||
can :manage, SiteCustomization::Page
|
||||
can :manage, SiteCustomization::Image
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<li>
|
||||
<%= layout_menu_link_to t("layouts.header.proposals"),
|
||||
proposals_path,
|
||||
controller_name == 'proposals' || @poll&.related&.is_a?(Proposal),
|
||||
controller_name == 'proposals',
|
||||
accesskey: "2",
|
||||
title: t("shared.go_to_page") + t("layouts.header.proposals") %>
|
||||
</li>
|
||||
@@ -22,7 +22,7 @@
|
||||
<li>
|
||||
<%= layout_menu_link_to t("layouts.header.poll_questions"),
|
||||
polls_path,
|
||||
(controller_name == "polls" && @poll&.related.nil?) || (controller_name == "questions" && controller.class.parent == Polls),
|
||||
controller_name == "polls" || (controller_name == "questions" && controller.class.parent == Polls),
|
||||
accesskey: "3",
|
||||
title: t("shared.go_to_page") + t("layouts.header.poll_questions") %>
|
||||
</li>
|
||||
|
||||
@@ -4,6 +4,8 @@ begin
|
||||
rescue LoadError => e
|
||||
raise unless e.message.include?('spring')
|
||||
end
|
||||
# frozen_string_literal: true
|
||||
#
|
||||
# This file was generated by Bundler.
|
||||
#
|
||||
# The application 'rspec' is installed as part of a gem, and
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
staging:
|
||||
deploy_to: "/var/www/consul"
|
||||
ssh_port: 21
|
||||
server: "staging.consul.es"
|
||||
db_server: "postgre.consul.es"
|
||||
user: "xxxxx"
|
||||
server_name: "staging.consul.es"
|
||||
full_app_name: "consul"
|
||||
# use_rvm: Yes
|
||||
# ruby_version: 2.3.7
|
||||
# repository: https://github.com/consul/consul.git
|
||||
# branch: master
|
||||
# rails_env: staging
|
||||
|
||||
preproduction:
|
||||
deploy_to: "/var/www/consul"
|
||||
ssh_port: 2222
|
||||
server1: xxx.xxx.xxx.xxx
|
||||
server2: xxx.xxx.xxx.xxx
|
||||
db_server: xxx.xxx.xxx.xxx
|
||||
user: xxxxx
|
||||
server_name: pre.consul.es
|
||||
full_app_name: "consul"
|
||||
|
||||
production:
|
||||
deploy_to: "/var/www/consul"
|
||||
ssh_port: 22
|
||||
server1: xxx.xxx.xxx.xxx
|
||||
server2: xxx.xxx.xxx.xxx
|
||||
db_server: xxx.xxx.xxx.xxx
|
||||
user: "deploy"
|
||||
server_name: "consul.es"
|
||||
full_app_name: "consul"
|
||||
@@ -1,23 +1,19 @@
|
||||
# config valid only for current version of Capistrano
|
||||
lock '~> 3.10.1'
|
||||
|
||||
def deploysecret(key, default = 'undefined')
|
||||
def deploysecret(key)
|
||||
@deploy_secrets_yml ||= YAML.load_file('config/deploy-secrets.yml')[fetch(:stage).to_s]
|
||||
@deploy_secrets_yml.fetch(key.to_s, default)
|
||||
@deploy_secrets_yml.fetch(key.to_s, 'undefined')
|
||||
end
|
||||
|
||||
set :rails_env, fetch(:stage)
|
||||
|
||||
if deploysecret(:use_rvm, true)
|
||||
require 'rvm1/capistrano3'
|
||||
set :rvm1_ruby_version, deploysecret(:ruby_version, '2.3.2')
|
||||
end
|
||||
set :rvm1_ruby_version, '2.3.2'
|
||||
|
||||
set :application, 'consul'
|
||||
set :full_app_name, deploysecret(:full_app_name)
|
||||
|
||||
set :server_name, deploysecret(:server_name)
|
||||
set :repo_url, deploysecret(:repository, 'https://github.com/consul/consul.git')
|
||||
set :repo_url, 'https://github.com/consul/consul.git'
|
||||
|
||||
set :revision, `git rev-parse --short #{fetch(:branch)}`.strip
|
||||
|
||||
@@ -44,22 +40,10 @@ set(:config_files, %w(
|
||||
|
||||
set :whenever_roles, -> { :app }
|
||||
|
||||
set :user, deploysecret(:user)
|
||||
set :ssh_options, -> {
|
||||
{
|
||||
user: deploysecret(:user),
|
||||
forward_agent: true,
|
||||
compression: 'none',
|
||||
port: deploysecret(:ssh_port)
|
||||
}
|
||||
}
|
||||
|
||||
namespace :deploy do
|
||||
if deploysecret(:use_rvm, true)
|
||||
before :starting, 'rvm1:install:rvm' # install/update RVM
|
||||
before :starting, 'rvm1:install:ruby' # install Ruby and create gemset
|
||||
before :starting, 'install_bundler_gem' # install bundler gem
|
||||
end
|
||||
before :starting, 'rvm1:install:rvm' # install/update RVM
|
||||
before :starting, 'rvm1:install:ruby' # install Ruby and create gemset
|
||||
before :starting, 'install_bundler_gem' # install bundler gem
|
||||
|
||||
after :publishing, 'deploy:restart'
|
||||
after :published, 'delayed_job:restart'
|
||||
|
||||
@@ -2,6 +2,7 @@ set :deploy_to, deploysecret(:deploy_to)
|
||||
set :server_name, deploysecret(:server_name)
|
||||
set :db_server, deploysecret(:db_server)
|
||||
set :branch, ENV['branch'] || :master
|
||||
set :ssh_options, port: deploysecret(:ssh_port)
|
||||
set :stage, :preproduction
|
||||
set :rails_env, :preproduction
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ set :deploy_to, deploysecret(:deploy_to)
|
||||
set :server_name, deploysecret(:server_name)
|
||||
set :db_server, deploysecret(:db_server)
|
||||
set :branch, :stable
|
||||
set :ssh_options, port: deploysecret(:ssh_port)
|
||||
set :stage, :production
|
||||
set :rails_env, :production
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
set :deploy_to, -> { deploysecret(:deploy_to) }
|
||||
set :deploy_to, deploysecret(:deploy_to)
|
||||
set :server_name, deploysecret(:server_name)
|
||||
set :db_server, deploysecret(:db_server)
|
||||
set :branch, deploysecret(:branch, ENV['branch']) || :master
|
||||
set :branch, ENV['branch'] || :master
|
||||
set :ssh_options, port: deploysecret(:ssh_port)
|
||||
set :stage, :staging
|
||||
set :rails_env, deploysecret(:rails_env, 'staging').to_sym
|
||||
set :rails_env, :staging
|
||||
|
||||
server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer cron)
|
||||
|
||||
|
||||
@@ -1,18 +1,9 @@
|
||||
namespace :deploy do
|
||||
desc 'Commands for passenger/unicorn application'
|
||||
if File.exist?("/etc/init.d/unicorn_#{fetch(:full_app_name)}")
|
||||
%w(start stop force-stop restart upgrade reopen-logs).each do |command|
|
||||
task command.to_sym do
|
||||
on roles(:app), in: :sequence, wait: 5 do
|
||||
execute "/etc/init.d/unicorn_#{fetch(:full_app_name)} #{command}"
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
task :restart do
|
||||
desc 'Commands for unicorn application'
|
||||
%w(start stop force-stop restart upgrade reopen-logs).each do |command|
|
||||
task command.to_sym do
|
||||
on roles(:app), in: :sequence, wait: 5 do
|
||||
# Your restart mechanism here, for example:
|
||||
execute :touch, release_path.join('tmp/restart.txt')
|
||||
execute "/etc/init.d/unicorn_#{fetch(:full_app_name)} #{command}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -802,7 +802,7 @@ feature 'Budget Investments' do
|
||||
visit new_budget_investment_path(budget)
|
||||
fill_in "budget_investment_title", with: "item"
|
||||
|
||||
within('div#js-suggest', visible: false) do
|
||||
within('div#js-suggest') do
|
||||
expect(page).not_to have_content 'You are seeing'
|
||||
end
|
||||
end
|
||||
@@ -1151,7 +1151,6 @@ feature 'Budget Investments' do
|
||||
it_behaves_like "followable", "budget_investment", "budget_investment_path", { "budget_id": "budget_id", "id": "id" }
|
||||
|
||||
it_behaves_like "imageable", "budget_investment", "budget_investment_path", { "budget_id": "budget_id", "id": "id" }
|
||||
it_behaves_like "imageable destroy", "budget_investment", "budget_investment_path", { "budget_id": "budget_id", "id": "id" }
|
||||
|
||||
it_behaves_like "nested imageable",
|
||||
"budget_investment",
|
||||
|
||||
Reference in New Issue
Block a user