Removes unrelated dashboard changes
This commit is contained in:
@@ -61,8 +61,6 @@ module ApplicationHelper
|
|||||||
"#{root_url.chomp("\/")}#{url}"
|
"#{root_url.chomp("\/")}#{url}"
|
||||||
end
|
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)
|
def self.asset_data_base64(path)
|
||||||
asset = (Rails.application.assets || ::Sprockets::Railtie.build_environment(Rails.application)).find_asset(path)
|
asset = (Rails.application.assets || ::Sprockets::Railtie.build_environment(Rails.application)).find_asset(path)
|
||||||
throw "Could not find asset '#{path}'" if asset.nil?
|
throw "Could not find asset '#{path}'" if asset.nil?
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ module Abilities
|
|||||||
can [:create, :destroy, :manage], ::Poll::BoothAssignment
|
can [:create, :destroy, :manage], ::Poll::BoothAssignment
|
||||||
can [:create, :destroy], ::Poll::OfficerAssignment
|
can [:create, :destroy], ::Poll::OfficerAssignment
|
||||||
can [:read, :create, :update], Poll::Question
|
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::Page
|
||||||
can :manage, SiteCustomization::Image
|
can :manage, SiteCustomization::Image
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<%= layout_menu_link_to t("layouts.header.proposals"),
|
<%= layout_menu_link_to t("layouts.header.proposals"),
|
||||||
proposals_path,
|
proposals_path,
|
||||||
controller_name == 'proposals' || @poll&.related&.is_a?(Proposal),
|
controller_name == 'proposals',
|
||||||
accesskey: "2",
|
accesskey: "2",
|
||||||
title: t("shared.go_to_page") + t("layouts.header.proposals") %>
|
title: t("shared.go_to_page") + t("layouts.header.proposals") %>
|
||||||
</li>
|
</li>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<%= layout_menu_link_to t("layouts.header.poll_questions"),
|
<%= layout_menu_link_to t("layouts.header.poll_questions"),
|
||||||
polls_path,
|
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",
|
accesskey: "3",
|
||||||
title: t("shared.go_to_page") + t("layouts.header.poll_questions") %>
|
title: t("shared.go_to_page") + t("layouts.header.poll_questions") %>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ begin
|
|||||||
rescue LoadError => e
|
rescue LoadError => e
|
||||||
raise unless e.message.include?('spring')
|
raise unless e.message.include?('spring')
|
||||||
end
|
end
|
||||||
|
# frozen_string_literal: true
|
||||||
|
#
|
||||||
# This file was generated by Bundler.
|
# This file was generated by Bundler.
|
||||||
#
|
#
|
||||||
# The application 'rspec' is installed as part of a gem, and
|
# 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
|
# config valid only for current version of Capistrano
|
||||||
lock '~> 3.10.1'
|
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 ||= 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
|
end
|
||||||
|
|
||||||
set :rails_env, fetch(:stage)
|
set :rails_env, fetch(:stage)
|
||||||
|
set :rvm1_ruby_version, '2.3.2'
|
||||||
if deploysecret(:use_rvm, true)
|
|
||||||
require 'rvm1/capistrano3'
|
|
||||||
set :rvm1_ruby_version, deploysecret(:ruby_version, '2.3.2')
|
|
||||||
end
|
|
||||||
|
|
||||||
set :application, 'consul'
|
set :application, 'consul'
|
||||||
set :full_app_name, deploysecret(:full_app_name)
|
set :full_app_name, deploysecret(:full_app_name)
|
||||||
|
|
||||||
set :server_name, deploysecret(:server_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
|
set :revision, `git rev-parse --short #{fetch(:branch)}`.strip
|
||||||
|
|
||||||
@@ -44,22 +40,10 @@ set(:config_files, %w(
|
|||||||
|
|
||||||
set :whenever_roles, -> { :app }
|
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
|
namespace :deploy do
|
||||||
if deploysecret(:use_rvm, true)
|
before :starting, 'rvm1:install:rvm' # install/update RVM
|
||||||
before :starting, 'rvm1:install:rvm' # install/update RVM
|
before :starting, 'rvm1:install:ruby' # install Ruby and create gemset
|
||||||
before :starting, 'rvm1:install:ruby' # install Ruby and create gemset
|
before :starting, 'install_bundler_gem' # install bundler gem
|
||||||
before :starting, 'install_bundler_gem' # install bundler gem
|
|
||||||
end
|
|
||||||
|
|
||||||
after :publishing, 'deploy:restart'
|
after :publishing, 'deploy:restart'
|
||||||
after :published, 'delayed_job:restart'
|
after :published, 'delayed_job:restart'
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ set :deploy_to, deploysecret(:deploy_to)
|
|||||||
set :server_name, deploysecret(:server_name)
|
set :server_name, deploysecret(:server_name)
|
||||||
set :db_server, deploysecret(:db_server)
|
set :db_server, deploysecret(:db_server)
|
||||||
set :branch, ENV['branch'] || :master
|
set :branch, ENV['branch'] || :master
|
||||||
|
set :ssh_options, port: deploysecret(:ssh_port)
|
||||||
set :stage, :preproduction
|
set :stage, :preproduction
|
||||||
set :rails_env, :preproduction
|
set :rails_env, :preproduction
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ set :deploy_to, deploysecret(:deploy_to)
|
|||||||
set :server_name, deploysecret(:server_name)
|
set :server_name, deploysecret(:server_name)
|
||||||
set :db_server, deploysecret(:db_server)
|
set :db_server, deploysecret(:db_server)
|
||||||
set :branch, :stable
|
set :branch, :stable
|
||||||
|
set :ssh_options, port: deploysecret(:ssh_port)
|
||||||
set :stage, :production
|
set :stage, :production
|
||||||
set :rails_env, :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 :server_name, deploysecret(:server_name)
|
||||||
set :db_server, deploysecret(:db_server)
|
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 :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)
|
server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer cron)
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,9 @@
|
|||||||
namespace :deploy do
|
namespace :deploy do
|
||||||
desc 'Commands for passenger/unicorn application'
|
desc 'Commands for 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|
|
||||||
%w(start stop force-stop restart upgrade reopen-logs).each do |command|
|
task command.to_sym do
|
||||||
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
|
|
||||||
on roles(:app), in: :sequence, wait: 5 do
|
on roles(:app), in: :sequence, wait: 5 do
|
||||||
# Your restart mechanism here, for example:
|
execute "/etc/init.d/unicorn_#{fetch(:full_app_name)} #{command}"
|
||||||
execute :touch, release_path.join('tmp/restart.txt')
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -802,7 +802,7 @@ feature 'Budget Investments' do
|
|||||||
visit new_budget_investment_path(budget)
|
visit new_budget_investment_path(budget)
|
||||||
fill_in "budget_investment_title", with: "item"
|
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'
|
expect(page).not_to have_content 'You are seeing'
|
||||||
end
|
end
|
||||||
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 "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", "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",
|
it_behaves_like "nested imageable",
|
||||||
"budget_investment",
|
"budget_investment",
|
||||||
|
|||||||
Reference in New Issue
Block a user