Organize directories
This commit is contained in:
parent
8a91c9b89b
commit
4898382f78
433 changed files with 0 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
|||
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new inflection rules using the following format. Inflections
|
||||
# are locale specific, and you may define rules for as many different
|
||||
# locales as you wish. All of these examples are active by default:
|
||||
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person', 'people'
|
||||
# inflect.uncountable %w( fish sheep )
|
||||
# end
|
||||
|
||||
# These inflection rules are supported but not enabled by default:
|
||||
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||
# inflect.acronym 'RESTful'
|
||||
# end
|
||||
|
||||
ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||
|
||||
# Rails thinks the singularized version of knowledge_bases is knowledge_basis?!
|
||||
# see: KnowledgeBase.table_name.singularize
|
||||
inflect.irregular 'base', 'bases'
|
||||
inflect.acronym 'SMIME'
|
||||
inflect.acronym 'PGP'
|
||||
inflect.acronym 'GitLab'
|
||||
inflect.acronym 'GitHub'
|
||||
end
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
require 'ruby_openpgp'
|
||||
|
||||
Rails.application.config.before_configuration do
|
||||
#FIXME need icon
|
||||
icon = File.read("public/assets/images/icons/pgp.svg")
|
||||
doc = File.open("public/assets/images/icons.svg") { |f| Nokogiri::XML(f) }
|
||||
if !doc.at_css('#icon-pgp')
|
||||
doc.at('svg').add_child(icon)
|
||||
Rails.logger.debug "PGP support icon added to icon set"
|
||||
else
|
||||
Rails.logger.debug "PGP support icon already in icon set"
|
||||
end
|
||||
File.write("public/assets/images/icons.svg", doc.to_xml)
|
||||
end
|
||||
|
||||
# Rails.application.config.after_initialize do
|
||||
# Ticket::Article.add_observer Observer::Ticket::Article::CommunicatePgpSupport.instance
|
||||
# end
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
||||
|
||||
Zammad::Application.routes.draw do
|
||||
api_path = Rails.configuration.api_path
|
||||
|
||||
match api_path + '/integration/pgp', to: 'integration/pgp#search', via: :post
|
||||
match api_path + '/integration/pgp/public_key', to: 'integration/pgp#public_key_add', via: :post
|
||||
match api_path + '/integration/pgp/public_key', to: 'integration/pgp#public_key_delete', via: :delete
|
||||
match api_path + '/integration/pgp/public_key', to: 'integration/pgp#public_key_list', via: :get
|
||||
match api_path + '/integration/pgp/private_key', to: 'integration/pgp#private_key_add', via: :post
|
||||
match api_path + '/integration/pgp/private_key', to: 'integration/pgp#private_key_delete', via: :delete
|
||||
match api_path + '/integration/pgp/public_key_download/:id', to: 'integration/pgp#public_key_download', via: :get
|
||||
match api_path + '/integration/pgp/private_key_download/:id', to: 'integration/pgp#private_key_download', via: :get
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue