mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #7321 from Matt-Yorkley/remove-bugherd
Remove Bugherd
This commit is contained in:
@@ -3,7 +3,7 @@ module Spree
|
||||
class GeneralSettingsController < Spree::Admin::BaseController
|
||||
def edit
|
||||
@preferences_general = [:site_name, :default_seo_title, :default_meta_keywords,
|
||||
:default_meta_description, :site_url, :bugherd_api_key]
|
||||
:default_meta_description, :site_url]
|
||||
@preferences_security = [:allow_ssl_in_production,
|
||||
:allow_ssl_in_staging, :allow_ssl_in_development_and_test]
|
||||
@preferences_currency = [:display_currency, :hide_cents]
|
||||
|
||||
@@ -122,7 +122,6 @@ module Spree
|
||||
preference :last_job_queue_heartbeat_at, :string, default: nil
|
||||
|
||||
# External services
|
||||
preference :bugherd_api_key, :string, default: nil
|
||||
preference :matomo_url, :string, default: nil
|
||||
preference :matomo_site_id, :string, default: nil
|
||||
preference :matomo_tag_manager_url, :string, default: nil
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
- if (Rails.env.staging? || Rails.env.production?) && Spree::Config.bugherd_api_key.present?
|
||||
:javascript
|
||||
(function (d, t) {
|
||||
var bh = d.createElement(t), s = d.getElementsByTagName(t)[0];
|
||||
bh.type = 'text/javascript';
|
||||
bh.src = '//www.bugherd.com/sidebarv2.js?apikey=#{Spree::Config.bugherd_api_key}';
|
||||
s.parentNode.insertBefore(bh, s);
|
||||
})(document, 'script');
|
||||
@@ -61,5 +61,4 @@
|
||||
= inject_currency_config
|
||||
= yield :injection_data
|
||||
|
||||
= render "layouts/bugherd_script"
|
||||
= render "layouts/matomo_tag"
|
||||
|
||||
@@ -35,4 +35,3 @@
|
||||
= yield :injection_data
|
||||
|
||||
= render "layouts/i18n_script"
|
||||
= render "layouts/bugherd_script"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
%script
|
||||
= raw "var AUTH_TOKEN = \"#{form_authenticity_token}\";"
|
||||
|
||||
= render "layouts/bugherd_script"
|
||||
%link{'data-require' => "font-awesome@*", 'data-semver'=>"4.2.0", 'rel' => "stylesheet", 'href' => "//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css"}
|
||||
|
||||
= render "layouts/auth_token_script"
|
||||
|
||||
@@ -3097,7 +3097,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
back_to_adjustments_list: "Back to adjustments"
|
||||
back_to_users_list: "Back to users"
|
||||
back_to_zones_list: "Back to zones"
|
||||
bugherd_api_key: "Bugherd API key"
|
||||
card_code: "Card code"
|
||||
card_number: "Card number"
|
||||
category: "Category"
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'External services' do
|
||||
include AuthenticationHelper
|
||||
|
||||
describe "bugherd" do
|
||||
before do
|
||||
Spree::Config.bugherd_api_key = nil
|
||||
login_to_admin_section
|
||||
end
|
||||
|
||||
it "lets me set an API key" do
|
||||
visit spree.edit_admin_general_settings_path
|
||||
|
||||
fill_in 'bugherd_api_key', with: 'abc123'
|
||||
click_button 'Update'
|
||||
|
||||
expect(page).to have_content 'General Settings has been successfully updated!'
|
||||
expect(Spree::Config.bugherd_api_key).to eq 'abc123'
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user