1
0
mirror of https://github.com/bitwarden/help synced 2026-01-04 17:43:14 +00:00

Promote to Master (#748)

* initial commit

* adding quotes for the array error

* Create Gemfile

* Create Gemfile.lock

* add .nvmrc and .node-version

* removed /article from URL

* update links to work with netlify

* more fixed links

* link fixes

* update bad links

* Update netlify.toml

toml test for redirects

* article redirect

* link fixes

* Update index.html

* Update netlify.toml

* Update _config.yml

* Update netlify.toml

* Update netlify.toml

* Update netlify.toml

* Update netlify.toml

* Update netlify.toml

* add article back into URL for launch

* Update netlify.toml

* Update netlify.toml

* add order to categories front matter

* Update netlify.toml

* update

* sidemenu update

* Revert "sidemenu update"

This reverts commit 5441c3d35c.

* update order prop

* Navbar updates per Gary and compiler warnings

* font/style tweaks

* Update sidebar.html

* Stage Release Documentation (#739)

* initial drafts

* rewrite Custom Fields article to prioritize new context-menu option & better organize ancillary information

* edit

* edit

* Custom Field Context Menu & CAPTCHA item in release notes

* SSO relink event

* update rn

* small edits

* improve release notes titles

* fix side menu

* Edits courtest of mportune!

* update order

* link fixes

* link cleanup

* image updates and a link

* fix trailing slash

Co-authored-by: DanHillesheim <79476558+DanHillesheim@users.noreply.github.com>
This commit is contained in:
fred_the_tech_writer
2021-09-21 13:21:11 -04:00
committed by GitHub
parent 63f78e8979
commit 906e2ca0dd
3304 changed files with 386714 additions and 8864 deletions

View File

@@ -0,0 +1,24 @@
# ----------------------------------------------------------------------------
# Frozen-string-literal: true
# Copyright: 2015-2016 Jordon Bedwell - MIT License
# Encoding: utf-8
# ----------------------------------------------------------------------------
source "https://rubygems.org"
gem "rake", :require => false
gemspec
group :test do
gem "rspec-helpers", :require => false
gem "codeclimate-test-reporter", :require => false
gem "luna-rspec-formatters", :require => false
gem "rspec", :require => false
end
group :development do
gem "luna-rubocop-formatters", :require => false
gem "rubocop", :github => "bbatsov/rubocop", :require => false
gem "pry", {
:require => false
}
end

View File

@@ -0,0 +1,19 @@
Copyright (c) 2015-2016 Jordon Bedwell
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,13 @@
# ----------------------------------------------------------------------------
# Frozen-string-literal: true
# Copyright: 2015-2016 Jordon Bedwell - MIT License
# Encoding: utf-8
# ----------------------------------------------------------------------------
$LOAD_PATH.unshift(File.expand_path("../lib", __FILE__))
require "luna/rubocop/rake/task"
require "rspec/core/rake_task"
task :default => [:spec]
RSpec::Core::RakeTask.new :spec
task :test => :spec

View File

@@ -0,0 +1,202 @@
# ----------------------------------------------------------------------------
# Frozen-string-literal: true
# Copyright: 2015-2016 Jordon Bedwell - MIT License
# Encoding: utf-8
# ----------------------------------------------------------------------------
require "forwardable/extended/version"
require "forwardable"
module Forwardable
module Extended
# ------------------------------------------------------------------------
# Make our methods private on the class, there is no reason for public.
# ------------------------------------------------------------------------
def self.extended(klass)
instance_methods.each do |method|
klass.private_class_method(
method
)
end
end
# ------------------------------------------------------------------------
# Delegate using a Rails-like interface.
# ------------------------------------------------------------------------
def rb_delegate(method, to: nil, alias_of: method, **kwd)
raise ArgumentError, "to must be provided" unless to
def_delegator(
to, alias_of, method, **kwd
)
end
# ------------------------------------------------------------------------
# Delegate a method to a hash and key.
# ------------------------------------------------------------------------
def def_hash_delegator(hash, method, key: method, **kwd)
prefix, suffix, wrap = prepare_delegate(**kwd)
if suffix
method = method.to_s.gsub(
/\?$/, ""
)
end
class_eval delegate_debug(<<-STR), __FILE__, __LINE__ - 9
def #{method}#{suffix}(*args)
#{wrap}(
#{prefix}#{hash}[#{key.inspect}]
)
rescue Exception
if !Forwardable.debug && $@ && $@.respond_to?(:delete_if)
$@.delete_if do |source|
source =~ %r"#{Regexp.escape(__FILE__)}"o
end
end
raise
end
STR
end
# ------------------------------------------------------------------------
# Delegate a method to an instance variable.
# ------------------------------------------------------------------------
def def_ivar_delegator(ivar, alias_ = ivar, **kwd)
prefix, suffix, wrap = prepare_delegate(**kwd)
if suffix
alias_ = alias_.to_s.gsub(
/\?$/, ""
)
end
class_eval delegate_debug(<<-STR), __FILE__, __LINE__ - 9
def #{alias_.to_s.gsub(/\A@/, "")}#{suffix}
#{wrap}(
#{prefix}#{ivar}
)
rescue Exception
if !Forwardable.debug && $@ && $@.respond_to?(:delete_if)
$@.delete_if do |source|
source =~ %r"#{Regexp.escape(__FILE__)}"o
end
end
raise
end
STR
end
# ------------------------------------------------------------------------
# Like def_delegator but allows you to send args and do other stuff.
# ------------------------------------------------------------------------
def def_modern_delegator(accessor, method, alias_ = method, args: \
{ :before => [], :after => [] }, **kwd)
prefix, suffix, wrap = prepare_delegate(**kwd)
args = { :before => args } unless args.is_a?(Hash)
b = [args[:before]].flatten.compact.map(&:to_s).join(", ")
a = [args[ :after]].flatten.compact.map(&:to_s).join(", ")
b = b + ", " unless args[:before].nil? || args[:before].empty?
a = ", " + a unless args[ :after].nil? || args[ :after].empty?
alias_ = alias_.to_s.gsub(/\?$/, "") if suffix
class_eval delegate_debug(<<-STR), __FILE__, __LINE__ - 10
def #{alias_}#{suffix}(*args, &block)
#{wrap}(#{prefix}#{accessor}.send(
#{method.inspect}, #{b}*args#{a}, &block
))
rescue Exception
if !Forwardable.debug && $@ && $@.respond_to?(:delete_if)
$@.delete_if do |source|
source =~ %r"#{Regexp.escape(__FILE__)}"o
end
end
raise
end
STR
end
# ------------------------------------------------------------------------
# Wraps around traditional delegation and modern delegation.
# ------------------------------------------------------------------------
def def_delegator(accessor, method, alias_ = method, **kwd)
kwd, alias_ = alias_, method if alias_.is_a?(Hash) && !kwd.any?
if alias_.is_a?(Hash) || !kwd.any?
Forwardable.instance_method(:def_delegator).bind(self) \
.call(accessor, method, alias_)
elsif !kwd[:type]
def_modern_delegator(
accessor, method, alias_, **kwd
)
else
raise ArgumentError, "Alias not supported." if alias_ != method
send("def_#{kwd[:type]}_delegator", accessor, method, **kwd.tap do |obj|
obj.delete(:type)
end)
end
end
# ------------------------------------------------------------------------
# Create multiple delegates at once.
# ------------------------------------------------------------------------
def def_delegators(accessor, *methods)
kwd = methods.shift if methods.first.is_a?(Hash)
kwd = methods.pop if methods. last.is_a?(Hash)
kwd = {} unless kwd
methods.each do |method|
def_delegator accessor, method, **kwd
end
end
# ------------------------------------------------------------------------
# Prepares a delegate and it's few arguments.
# ------------------------------------------------------------------------
private
def prepare_delegate(wrap: nil, bool: false)
prefix = (bool == :reverse ? "!!!" : "!!") if bool
wrap = "self.class.new" if wrap.is_a?(TrueClass)
suffix = "?" if bool
return [
prefix, suffix, wrap
]
end
# ------------------------------------------------------------------------
private
def delegate_debug(str)
if Forwardable.debug && !Forwardable.debug.is_a?(TrueClass)
then Forwardable.debug.debug(
str
)
elsif Forwardable.debug
$stdout.puts(
"\n# ------\n\n", str
)
end
str
end
end
end

View File

@@ -0,0 +1,9 @@
# Frozen-string-literal: true
# Copyright: 2015-2016 Jordon Bedwell - MIT License
# Encoding: utf-8
module Forwardable
module Extended
VERSION = "2.6.0"
end
end