checkoff 0.223.0 → 0.225.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/checkoff.gemspec +10 -5
- data/lib/checkoff/cli.rb +1 -1
- data/lib/checkoff/clients.rb +1 -1
- data/lib/checkoff/custom_fields.rb +1 -1
- data/lib/checkoff/events.rb +1 -1
- data/lib/checkoff/internal/config_loader.rb +2 -3
- data/lib/checkoff/internal/selector_classes/section/function_evaluator.rb +3 -2
- data/lib/checkoff/my_tasks.rb +1 -1
- data/lib/checkoff/portfolios.rb +11 -9
- data/lib/checkoff/projects.rb +1 -1
- data/lib/checkoff/sections.rb +3 -4
- data/lib/checkoff/tags.rb +66 -17
- data/lib/checkoff/tasks.rb +1 -1
- data/lib/checkoff/version.rb +1 -1
- data/lib/checkoff/workspaces.rb +1 -1
- data/rbi/checkoff.rbi +4529 -0
- data/sig/checkoff.rbs +3749 -0
- metadata +4 -210
- data/.circleci/config.yml +0 -291
- data/.envrc +0 -9
- data/.git-hooks/pre_commit/circle_ci.rb +0 -26
- data/.git-hooks/pre_commit/punchlist.rb +0 -52
- data/.git-hooks/pre_commit/solargraph_typecheck.rb +0 -77
- data/.gitattributes +0 -6
- data/.gitignore +0 -65
- data/.markdownlint_style.rb +0 -4
- data/.mdlrc +0 -1
- data/.overcommit.yml +0 -115
- data/.rubocop.yml +0 -143
- data/.rubocop_todo.yml +0 -90
- data/.solargraph.yml +0 -35
- data/.yamllint.yml +0 -8
- data/.yardopts +0 -2
- data/CODE_OF_CONDUCT.md +0 -133
- data/CONTRIBUTING.rst +0 -75
- data/DEVELOPMENT.md +0 -69
- data/GLOSSARY.md +0 -16
- data/Gemfile +0 -67
- data/Gemfile.lock +0 -351
- data/LICENSE +0 -21
- data/Makefile +0 -139
- data/bin/brakeman +0 -27
- data/bin/bump +0 -29
- data/bin/checkoff +0 -29
- data/bin/console +0 -15
- data/bin/overcommit +0 -29
- data/bin/overcommit_branch +0 -114
- data/bin/rake +0 -29
- data/bin/rubocop +0 -27
- data/bin/setup +0 -8
- data/bin/solargraph +0 -27
- data/bin/sord +0 -27
- data/bin/spoom +0 -27
- data/bin/srb +0 -27
- data/bin/srb-rbi +0 -27
- data/bin/tapioca +0 -27
- data/bin/yard +0 -27
- data/config/annotations_asana.rb +0 -253
- data/config/annotations_misc.rb +0 -68
- data/config/env.1p +0 -2
- data/docs/.gitignore +0 -3
- data/docs/cookiecutter_input.json +0 -17
- data/docs/example_project.png +0 -0
- data/fix.sh +0 -534
- data/metrics/bigfiles_high_water_mark +0 -1
- data/metrics/brakeman_high_water_mark +0 -1
- data/metrics/bundle-audit_high_water_mark +0 -1
- data/metrics/cane_high_water_mark +0 -1
- data/metrics/eslint_high_water_mark +0 -1
- data/metrics/flake8_high_water_mark +0 -1
- data/metrics/flay_high_water_mark +0 -1
- data/metrics/flog_high_water_mark +0 -1
- data/metrics/jscs_high_water_mark +0 -1
- data/metrics/mdl_high_water_mark +0 -1
- data/metrics/pep8_high_water_mark +0 -1
- data/metrics/punchlist_high_water_mark +0 -1
- data/metrics/pycodestyle_high_water_mark +0 -1
- data/metrics/rails_best_practices_high_water_mark +0 -1
- data/metrics/rubocop_high_water_mark +0 -1
- data/metrics/scalastyle_high_water_mark +0 -1
- data/metrics/shellcheck_high_water_mark +0 -1
- data/package.json +0 -9
- data/rakelib/citest.rake +0 -4
- data/rakelib/clear_metrics.rake +0 -9
- data/rakelib/console.rake +0 -15
- data/rakelib/default.rake +0 -4
- data/rakelib/doc.rake +0 -6
- data/rakelib/gem_tasks.rake +0 -3
- data/rakelib/localtest.rake +0 -4
- data/rakelib/overcommit.rake +0 -6
- data/rakelib/quality.rake +0 -4
- data/rakelib/repl.rake +0 -4
- data/rakelib/test.rake +0 -10
- data/rakelib/trigger_next_builds.rake +0 -7
- data/rakelib/undercover.rake +0 -8
- data/requirements_dev.txt +0 -2
- data/sorbet/config +0 -4
- data/sorbet/rbi/annotations/.gitattributes +0 -1
- data/sorbet/rbi/annotations/activesupport.rbi +0 -453
- data/sorbet/rbi/annotations/faraday.rbi +0 -17
- data/sorbet/rbi/annotations/minitest.rbi +0 -119
- data/sorbet/rbi/annotations/mocha.rbi +0 -34
- data/sorbet/rbi/annotations/rainbow.rbi +0 -269
- data/sorbet/rbi/annotations/webmock.rbi +0 -9
- data/sorbet/rbi/dsl/.gitattributes +0 -1
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -23
- data/sorbet/rbi/gems/.gitattributes +0 -1
- data/sorbet/rbi/gems/activesupport@7.1.5.rbi +0 -18746
- data/sorbet/rbi/gems/addressable@2.8.6.rbi +0 -1994
- data/sorbet/rbi/gems/ansi@1.5.0.rbi +0 -688
- data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +0 -6142
- data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
- data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -523
- data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
- data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
- data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +0 -78
- data/sorbet/rbi/gems/brakeman@6.2.2.rbi +0 -222
- data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -505
- data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
- data/sorbet/rbi/gems/cache@0.4.1.rbi +0 -211
- data/sorbet/rbi/gems/cache_method@0.2.7.rbi +0 -293
- data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +0 -9
- data/sorbet/rbi/gems/childprocess@5.1.0.rbi +0 -383
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
- data/sorbet/rbi/gems/commander@4.6.0.rbi +0 -9
- data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +0 -11591
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
- data/sorbet/rbi/gems/crack@0.4.5.rbi +0 -145
- data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -969
- data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -377
- data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
- data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -9
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -152
- data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +0 -222
- data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +0 -126
- data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +0 -136
- data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +0 -145
- data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +0 -259
- data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +0 -142
- data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +0 -118
- data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +0 -125
- data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +0 -133
- data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +0 -198
- data/sorbet/rbi/gems/faraday@1.10.3.rbi +0 -2729
- data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +0 -29
- data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +0 -1004
- data/sorbet/rbi/gems/gli@2.22.0.rbi +0 -9
- data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +0 -351
- data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -9
- data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
- data/sorbet/rbi/gems/imagen@0.1.8.rbi +0 -340
- data/sorbet/rbi/gems/iniparse@1.5.0.rbi +0 -899
- data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +0 -22
- data/sorbet/rbi/gems/json@2.7.1.rbi +0 -1562
- data/sorbet/rbi/gems/jwt@2.7.1.rbi +0 -1405
- data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -128
- data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3272
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
- data/sorbet/rbi/gems/logger@1.6.2.rbi +0 -923
- data/sorbet/rbi/gems/mdl@0.13.0.rbi +0 -445
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -273
- data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +0 -127
- data/sorbet/rbi/gems/mime-types@3.5.1.rbi +0 -1252
- data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +0 -136
- data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +0 -1014
- data/sorbet/rbi/gems/minitest@5.21.1.rbi +0 -1539
- data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +0 -314
- data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +0 -581
- data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +0 -629
- data/sorbet/rbi/gems/mocha@2.1.0.rbi +0 -12
- data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
- data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +0 -102
- data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +0 -234
- data/sorbet/rbi/gems/mutex_m@0.3.0.rbi +0 -97
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
- data/sorbet/rbi/gems/nokogiri@1.17.0.rbi +0 -8201
- data/sorbet/rbi/gems/oauth2@1.4.11.rbi +0 -833
- data/sorbet/rbi/gems/overcommit@0.64.1.rbi +0 -2400
- data/sorbet/rbi/gems/parallel@1.23.0.rbi +0 -274
- data/sorbet/rbi/gems/parlour@5.0.0.rbi +0 -3007
- data/sorbet/rbi/gems/parser@3.2.2.4.rbi +0 -7253
- data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
- data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10070
- data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +0 -936
- data/sorbet/rbi/gems/punchlist@1.3.2.rbi +0 -173
- data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
- data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4896
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
- data/sorbet/rbi/gems/rake@13.1.0.rbi +0 -3022
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
- data/sorbet/rbi/gems/rbs@2.8.4.rbi +0 -5613
- data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +0 -3750
- data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -390
- data/sorbet/rbi/gems/rexml@3.3.9.rbi +0 -4964
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +0 -7127
- data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +0 -2577
- data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +0 -3262
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -329
- data/sorbet/rbi/gems/rubocop-rspec@3.0.0.rbi +0 -7546
- data/sorbet/rbi/gems/rubocop@1.59.0.rbi +0 -57238
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
- data/sorbet/rbi/gems/rugged@1.6.3.rbi +0 -1577
- data/sorbet/rbi/gems/securerandom@0.4.0.rbi +0 -75
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -217
- data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +0 -256
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
- data/sorbet/rbi/gems/solargraph-rails@1.1.0-9dc37915bd4f3b169046e34db6fb32193ab347d8.rbi +0 -320
- data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +0 -9396
- data/sorbet/rbi/gems/sord@5.1.0.rbi +0 -820
- data/sorbet/rbi/gems/source_finder@3.2.1.rbi +0 -317
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
- data/sorbet/rbi/gems/tapioca@0.16.5.rbi +0 -3617
- data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
- data/sorbet/rbi/gems/tilt@2.4.0.rbi +0 -933
- data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +0 -9
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
- data/sorbet/rbi/gems/undercover@0.5.0.rbi +0 -433
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -66
- data/sorbet/rbi/gems/webmock@3.19.1.rbi +0 -1769
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
- data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18406
- data/sorbet/rbi/todo.rbi +0 -11
- data/sorbet/tapioca/config.yml +0 -13
- data/sorbet/tapioca/require.rb +0 -4
@@ -1,509 +0,0 @@
|
|
1
|
-
# typed: strict
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `base64` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem base64`.
|
6
|
-
|
7
|
-
|
8
|
-
# \Module \Base64 provides methods for:
|
9
|
-
#
|
10
|
-
# - Encoding a binary string (containing non-ASCII characters)
|
11
|
-
# as a string of printable ASCII characters.
|
12
|
-
# - Decoding such an encoded string.
|
13
|
-
#
|
14
|
-
# \Base64 is commonly used in contexts where binary data
|
15
|
-
# is not allowed or supported:
|
16
|
-
#
|
17
|
-
# - Images in HTML or CSS files, or in URLs.
|
18
|
-
# - Email attachments.
|
19
|
-
#
|
20
|
-
# A \Base64-encoded string is about one-third larger that its source.
|
21
|
-
# See the {Wikipedia article}[https://en.wikipedia.org/wiki/Base64]
|
22
|
-
# for more information.
|
23
|
-
#
|
24
|
-
# This module provides three pairs of encode/decode methods.
|
25
|
-
# Your choices among these methods should depend on:
|
26
|
-
#
|
27
|
-
# - Which character set is to be used for encoding and decoding.
|
28
|
-
# - Whether "padding" is to be used.
|
29
|
-
# - Whether encoded strings are to contain newlines.
|
30
|
-
#
|
31
|
-
# Note: Examples on this page assume that the including program has executed:
|
32
|
-
#
|
33
|
-
# require 'base64'
|
34
|
-
#
|
35
|
-
# == Encoding Character Sets
|
36
|
-
#
|
37
|
-
# A \Base64-encoded string consists only of characters from a 64-character set:
|
38
|
-
#
|
39
|
-
# - <tt>('A'..'Z')</tt>.
|
40
|
-
# - <tt>('a'..'z')</tt>.
|
41
|
-
# - <tt>('0'..'9')</tt>.
|
42
|
-
# - <tt>=</tt>, the 'padding' character.
|
43
|
-
# - Either:
|
44
|
-
# - <tt>%w[+ /]</tt>:
|
45
|
-
# {RFC-2045-compliant}[https://datatracker.ietf.org/doc/html/rfc2045];
|
46
|
-
# _not_ safe for URLs.
|
47
|
-
# - <tt>%w[- _]</tt>:
|
48
|
-
# {RFC-4648-compliant}[https://datatracker.ietf.org/doc/html/rfc4648];
|
49
|
-
# safe for URLs.
|
50
|
-
#
|
51
|
-
# If you are working with \Base64-encoded strings that will come from
|
52
|
-
# or be put into URLs, you should choose this encoder-decoder pair
|
53
|
-
# of RFC-4648-compliant methods:
|
54
|
-
#
|
55
|
-
# - Base64.urlsafe_encode64 and Base64.urlsafe_decode64.
|
56
|
-
#
|
57
|
-
# Otherwise, you may choose any of the pairs in this module,
|
58
|
-
# including the pair above, or the RFC-2045-compliant pairs:
|
59
|
-
#
|
60
|
-
# - Base64.encode64 and Base64.decode64.
|
61
|
-
# - Base64.strict_encode64 and Base64.strict_decode64.
|
62
|
-
#
|
63
|
-
# == Padding
|
64
|
-
#
|
65
|
-
# \Base64-encoding changes a triplet of input bytes
|
66
|
-
# into a quartet of output characters.
|
67
|
-
#
|
68
|
-
# <b>Padding in Encode Methods</b>
|
69
|
-
#
|
70
|
-
# Padding -- extending an encoded string with zero, one, or two trailing
|
71
|
-
# <tt>=</tt> characters -- is performed by methods Base64.encode64,
|
72
|
-
# Base64.strict_encode64, and, by default, Base64.urlsafe_encode64:
|
73
|
-
#
|
74
|
-
# Base64.encode64('s') # => "cw==\n"
|
75
|
-
# Base64.strict_encode64('s') # => "cw=="
|
76
|
-
# Base64.urlsafe_encode64('s') # => "cw=="
|
77
|
-
# Base64.urlsafe_encode64('s', padding: false) # => "cw"
|
78
|
-
#
|
79
|
-
# When padding is performed, the encoded string is always of length <em>4n</em>,
|
80
|
-
# where +n+ is a non-negative integer:
|
81
|
-
#
|
82
|
-
# - Input bytes of length <em>3n</em> generate unpadded output characters
|
83
|
-
# of length <em>4n</em>:
|
84
|
-
#
|
85
|
-
# # n = 1: 3 bytes => 4 characters.
|
86
|
-
# Base64.strict_encode64('123') # => "MDEy"
|
87
|
-
# # n = 2: 6 bytes => 8 characters.
|
88
|
-
# Base64.strict_encode64('123456') # => "MDEyMzQ1"
|
89
|
-
#
|
90
|
-
# - Input bytes of length <em>3n+1</em> generate padded output characters
|
91
|
-
# of length <em>4(n+1)</em>, with two padding characters at the end:
|
92
|
-
#
|
93
|
-
# # n = 1: 4 bytes => 8 characters.
|
94
|
-
# Base64.strict_encode64('1234') # => "MDEyMw=="
|
95
|
-
# # n = 2: 7 bytes => 12 characters.
|
96
|
-
# Base64.strict_encode64('1234567') # => "MDEyMzQ1Ng=="
|
97
|
-
#
|
98
|
-
# - Input bytes of length <em>3n+2</em> generate padded output characters
|
99
|
-
# of length <em>4(n+1)</em>, with one padding character at the end:
|
100
|
-
#
|
101
|
-
# # n = 1: 5 bytes => 8 characters.
|
102
|
-
# Base64.strict_encode64('12345') # => "MDEyMzQ="
|
103
|
-
# # n = 2: 8 bytes => 12 characters.
|
104
|
-
# Base64.strict_encode64('12345678') # => "MDEyMzQ1Njc="
|
105
|
-
#
|
106
|
-
# When padding is suppressed, for a positive integer <em>n</em>:
|
107
|
-
#
|
108
|
-
# - Input bytes of length <em>3n</em> generate unpadded output characters
|
109
|
-
# of length <em>4n</em>:
|
110
|
-
#
|
111
|
-
# # n = 1: 3 bytes => 4 characters.
|
112
|
-
# Base64.urlsafe_encode64('123', padding: false) # => "MDEy"
|
113
|
-
# # n = 2: 6 bytes => 8 characters.
|
114
|
-
# Base64.urlsafe_encode64('123456', padding: false) # => "MDEyMzQ1"
|
115
|
-
#
|
116
|
-
# - Input bytes of length <em>3n+1</em> generate unpadded output characters
|
117
|
-
# of length <em>4n+2</em>, with two padding characters at the end:
|
118
|
-
#
|
119
|
-
# # n = 1: 4 bytes => 6 characters.
|
120
|
-
# Base64.urlsafe_encode64('1234', padding: false) # => "MDEyMw"
|
121
|
-
# # n = 2: 7 bytes => 10 characters.
|
122
|
-
# Base64.urlsafe_encode64('1234567', padding: false) # => "MDEyMzQ1Ng"
|
123
|
-
#
|
124
|
-
# - Input bytes of length <em>3n+2</em> generate unpadded output characters
|
125
|
-
# of length <em>4n+3</em>, with one padding character at the end:
|
126
|
-
#
|
127
|
-
# # n = 1: 5 bytes => 7 characters.
|
128
|
-
# Base64.urlsafe_encode64('12345', padding: false) # => "MDEyMzQ"
|
129
|
-
# # m = 2: 8 bytes => 11 characters.
|
130
|
-
# Base64.urlsafe_encode64('12345678', padding: false) # => "MDEyMzQ1Njc"
|
131
|
-
#
|
132
|
-
# <b>Padding in Decode Methods</b>
|
133
|
-
#
|
134
|
-
# All of the \Base64 decode methods support (but do not require) padding.
|
135
|
-
#
|
136
|
-
# \Method Base64.decode64 does not check the size of the padding:
|
137
|
-
#
|
138
|
-
# Base64.decode64("MDEyMzQ1Njc") # => "01234567"
|
139
|
-
# Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
|
140
|
-
# Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
|
141
|
-
#
|
142
|
-
# \Method Base64.strict_decode64 strictly enforces padding size:
|
143
|
-
#
|
144
|
-
# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
|
145
|
-
# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
|
146
|
-
# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
|
147
|
-
#
|
148
|
-
# \Method Base64.urlsafe_decode64 allows padding in +str+,
|
149
|
-
# which if present, must be correct:
|
150
|
-
# see {Padding}[Base64.html#module-Base64-label-Padding], above:
|
151
|
-
#
|
152
|
-
# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
|
153
|
-
# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
|
154
|
-
# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
|
155
|
-
#
|
156
|
-
# == Newlines
|
157
|
-
#
|
158
|
-
# An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64
|
159
|
-
# has an embedded newline character
|
160
|
-
# after each 60-character sequence, and, if non-empty, at the end:
|
161
|
-
#
|
162
|
-
# # No newline if empty.
|
163
|
-
# encoded = Base64.encode64("\x00" * 0)
|
164
|
-
# encoded.index("\n") # => nil
|
165
|
-
#
|
166
|
-
# # Newline at end of short output.
|
167
|
-
# encoded = Base64.encode64("\x00" * 1)
|
168
|
-
# encoded.size # => 4
|
169
|
-
# encoded.index("\n") # => 4
|
170
|
-
#
|
171
|
-
# # Newline at end of longer output.
|
172
|
-
# encoded = Base64.encode64("\x00" * 45)
|
173
|
-
# encoded.size # => 60
|
174
|
-
# encoded.index("\n") # => 60
|
175
|
-
#
|
176
|
-
# # Newlines embedded and at end of still longer output.
|
177
|
-
# encoded = Base64.encode64("\x00" * 46)
|
178
|
-
# encoded.size # => 65
|
179
|
-
# encoded.rindex("\n") # => 65
|
180
|
-
# encoded.split("\n").map {|s| s.size } # => [60, 4]
|
181
|
-
#
|
182
|
-
# The string to be encoded may itself contain newlines,
|
183
|
-
# which are encoded as \Base64:
|
184
|
-
#
|
185
|
-
# # Base64.encode64("\n\n\n") # => "CgoK\n"
|
186
|
-
# s = "This is line 1\nThis is line 2\n"
|
187
|
-
# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
|
188
|
-
#
|
189
|
-
# source://base64//lib/base64.rb#184
|
190
|
-
module Base64
|
191
|
-
private
|
192
|
-
|
193
|
-
# Returns a string containing the decoding of an RFC-2045-compliant
|
194
|
-
# \Base64-encoded string +str+:
|
195
|
-
#
|
196
|
-
# s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
|
197
|
-
# Base64.decode64(s) # => "This is line 1\nThis is line 2\n"
|
198
|
-
#
|
199
|
-
# Non-\Base64 characters in +str+ are ignored;
|
200
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
201
|
-
# these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
|
202
|
-
#
|
203
|
-
# Base64.decode64("\x00\n-_") # => ""
|
204
|
-
#
|
205
|
-
# Padding in +str+ (even if incorrect) is ignored:
|
206
|
-
#
|
207
|
-
# Base64.decode64("MDEyMzQ1Njc") # => "01234567"
|
208
|
-
# Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
|
209
|
-
# Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
|
210
|
-
#
|
211
|
-
# source://base64//lib/base64.rb#241
|
212
|
-
def decode64(str); end
|
213
|
-
|
214
|
-
# Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
|
215
|
-
#
|
216
|
-
# Per RFC 2045, the returned string may contain the URL-unsafe characters
|
217
|
-
# <tt>+</tt> or <tt>/</tt>;
|
218
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
219
|
-
#
|
220
|
-
# Base64.encode64("\xFB\xEF\xBE") # => "++++\n"
|
221
|
-
# Base64.encode64("\xFF\xFF\xFF") # => "////\n"
|
222
|
-
#
|
223
|
-
# The returned string may include padding;
|
224
|
-
# see {Padding}[Base64.html#module-Base64-label-Padding] above.
|
225
|
-
#
|
226
|
-
# Base64.encode64('*') # => "Kg==\n"
|
227
|
-
#
|
228
|
-
# The returned string ends with a newline character, and if sufficiently long
|
229
|
-
# will have one or more embedded newline characters;
|
230
|
-
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
|
231
|
-
#
|
232
|
-
# Base64.encode64('*') # => "Kg==\n"
|
233
|
-
# Base64.encode64('*' * 46)
|
234
|
-
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n"
|
235
|
-
#
|
236
|
-
# The string to be encoded may itself contain newlines,
|
237
|
-
# which will be encoded as ordinary \Base64:
|
238
|
-
#
|
239
|
-
# Base64.encode64("\n\n\n") # => "CgoK\n"
|
240
|
-
# s = "This is line 1\nThis is line 2\n"
|
241
|
-
# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
|
242
|
-
#
|
243
|
-
# source://base64//lib/base64.rb#219
|
244
|
-
def encode64(bin); end
|
245
|
-
|
246
|
-
# Returns a string containing the decoding of an RFC-2045-compliant
|
247
|
-
# \Base64-encoded string +str+:
|
248
|
-
#
|
249
|
-
# s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
|
250
|
-
# Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"
|
251
|
-
#
|
252
|
-
# Non-\Base64 characters in +str+ not allowed;
|
253
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
254
|
-
# these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
|
255
|
-
#
|
256
|
-
# Base64.strict_decode64("\n") # Raises ArgumentError
|
257
|
-
# Base64.strict_decode64('-') # Raises ArgumentError
|
258
|
-
# Base64.strict_decode64('_') # Raises ArgumentError
|
259
|
-
#
|
260
|
-
# Padding in +str+, if present, must be correct:
|
261
|
-
#
|
262
|
-
# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
|
263
|
-
# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
|
264
|
-
# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
|
265
|
-
#
|
266
|
-
# source://base64//lib/base64.rb#297
|
267
|
-
def strict_decode64(str); end
|
268
|
-
|
269
|
-
# Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
|
270
|
-
#
|
271
|
-
# Per RFC 2045, the returned string may contain the URL-unsafe characters
|
272
|
-
# <tt>+</tt> or <tt>/</tt>;
|
273
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
274
|
-
#
|
275
|
-
# Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n"
|
276
|
-
# Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n"
|
277
|
-
#
|
278
|
-
# The returned string may include padding;
|
279
|
-
# see {Padding}[Base64.html#module-Base64-label-Padding] above.
|
280
|
-
#
|
281
|
-
# Base64.strict_encode64('*') # => "Kg==\n"
|
282
|
-
#
|
283
|
-
# The returned string will have no newline characters, regardless of its length;
|
284
|
-
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
|
285
|
-
#
|
286
|
-
# Base64.strict_encode64('*') # => "Kg=="
|
287
|
-
# Base64.strict_encode64('*' * 46)
|
288
|
-
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
|
289
|
-
#
|
290
|
-
# The string to be encoded may itself contain newlines,
|
291
|
-
# which will be encoded as ordinary \Base64:
|
292
|
-
#
|
293
|
-
# Base64.strict_encode64("\n\n\n") # => "CgoK"
|
294
|
-
# s = "This is line 1\nThis is line 2\n"
|
295
|
-
# Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
|
296
|
-
#
|
297
|
-
# source://base64//lib/base64.rb#273
|
298
|
-
def strict_encode64(bin); end
|
299
|
-
|
300
|
-
# Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+:
|
301
|
-
#
|
302
|
-
# +str+ may not contain non-Base64 characters;
|
303
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
304
|
-
#
|
305
|
-
# Base64.urlsafe_decode64('+') # Raises ArgumentError.
|
306
|
-
# Base64.urlsafe_decode64('/') # Raises ArgumentError.
|
307
|
-
# Base64.urlsafe_decode64("\n") # Raises ArgumentError.
|
308
|
-
#
|
309
|
-
# Padding in +str+, if present, must be correct:
|
310
|
-
# see {Padding}[Base64.html#module-Base64-label-Padding], above:
|
311
|
-
#
|
312
|
-
# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
|
313
|
-
# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
|
314
|
-
# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
|
315
|
-
#
|
316
|
-
# source://base64//lib/base64.rb#351
|
317
|
-
def urlsafe_decode64(str); end
|
318
|
-
|
319
|
-
# Returns the RFC-4648-compliant \Base64-encoding of +bin+.
|
320
|
-
#
|
321
|
-
# Per RFC 4648, the returned string will not contain the URL-unsafe characters
|
322
|
-
# <tt>+</tt> or <tt>/</tt>,
|
323
|
-
# but instead may contain the URL-safe characters
|
324
|
-
# <tt>-</tt> and <tt>_</tt>;
|
325
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
326
|
-
#
|
327
|
-
# Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----"
|
328
|
-
# Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____"
|
329
|
-
#
|
330
|
-
# By default, the returned string may have padding;
|
331
|
-
# see {Padding}[Base64.html#module-Base64-label-Padding], above:
|
332
|
-
#
|
333
|
-
# Base64.urlsafe_encode64('*') # => "Kg=="
|
334
|
-
#
|
335
|
-
# Optionally, you can suppress padding:
|
336
|
-
#
|
337
|
-
# Base64.urlsafe_encode64('*', padding: false) # => "Kg"
|
338
|
-
#
|
339
|
-
# The returned string will have no newline characters, regardless of its length;
|
340
|
-
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
|
341
|
-
#
|
342
|
-
# Base64.urlsafe_encode64('*') # => "Kg=="
|
343
|
-
# Base64.urlsafe_encode64('*' * 46)
|
344
|
-
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
|
345
|
-
#
|
346
|
-
# source://base64//lib/base64.rb#328
|
347
|
-
def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
|
348
|
-
|
349
|
-
class << self
|
350
|
-
# Returns a string containing the decoding of an RFC-2045-compliant
|
351
|
-
# \Base64-encoded string +str+:
|
352
|
-
#
|
353
|
-
# s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
|
354
|
-
# Base64.decode64(s) # => "This is line 1\nThis is line 2\n"
|
355
|
-
#
|
356
|
-
# Non-\Base64 characters in +str+ are ignored;
|
357
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
358
|
-
# these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
|
359
|
-
#
|
360
|
-
# Base64.decode64("\x00\n-_") # => ""
|
361
|
-
#
|
362
|
-
# Padding in +str+ (even if incorrect) is ignored:
|
363
|
-
#
|
364
|
-
# Base64.decode64("MDEyMzQ1Njc") # => "01234567"
|
365
|
-
# Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
|
366
|
-
# Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
|
367
|
-
#
|
368
|
-
# source://base64//lib/base64.rb#241
|
369
|
-
def decode64(str); end
|
370
|
-
|
371
|
-
# Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
|
372
|
-
#
|
373
|
-
# Per RFC 2045, the returned string may contain the URL-unsafe characters
|
374
|
-
# <tt>+</tt> or <tt>/</tt>;
|
375
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
376
|
-
#
|
377
|
-
# Base64.encode64("\xFB\xEF\xBE") # => "++++\n"
|
378
|
-
# Base64.encode64("\xFF\xFF\xFF") # => "////\n"
|
379
|
-
#
|
380
|
-
# The returned string may include padding;
|
381
|
-
# see {Padding}[Base64.html#module-Base64-label-Padding] above.
|
382
|
-
#
|
383
|
-
# Base64.encode64('*') # => "Kg==\n"
|
384
|
-
#
|
385
|
-
# The returned string ends with a newline character, and if sufficiently long
|
386
|
-
# will have one or more embedded newline characters;
|
387
|
-
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
|
388
|
-
#
|
389
|
-
# Base64.encode64('*') # => "Kg==\n"
|
390
|
-
# Base64.encode64('*' * 46)
|
391
|
-
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n"
|
392
|
-
#
|
393
|
-
# The string to be encoded may itself contain newlines,
|
394
|
-
# which will be encoded as ordinary \Base64:
|
395
|
-
#
|
396
|
-
# Base64.encode64("\n\n\n") # => "CgoK\n"
|
397
|
-
# s = "This is line 1\nThis is line 2\n"
|
398
|
-
# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
|
399
|
-
#
|
400
|
-
# source://base64//lib/base64.rb#219
|
401
|
-
def encode64(bin); end
|
402
|
-
|
403
|
-
# Returns a string containing the decoding of an RFC-2045-compliant
|
404
|
-
# \Base64-encoded string +str+:
|
405
|
-
#
|
406
|
-
# s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
|
407
|
-
# Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"
|
408
|
-
#
|
409
|
-
# Non-\Base64 characters in +str+ not allowed;
|
410
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
411
|
-
# these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
|
412
|
-
#
|
413
|
-
# Base64.strict_decode64("\n") # Raises ArgumentError
|
414
|
-
# Base64.strict_decode64('-') # Raises ArgumentError
|
415
|
-
# Base64.strict_decode64('_') # Raises ArgumentError
|
416
|
-
#
|
417
|
-
# Padding in +str+, if present, must be correct:
|
418
|
-
#
|
419
|
-
# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
|
420
|
-
# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
|
421
|
-
# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
|
422
|
-
#
|
423
|
-
# source://base64//lib/base64.rb#297
|
424
|
-
def strict_decode64(str); end
|
425
|
-
|
426
|
-
# Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
|
427
|
-
#
|
428
|
-
# Per RFC 2045, the returned string may contain the URL-unsafe characters
|
429
|
-
# <tt>+</tt> or <tt>/</tt>;
|
430
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
431
|
-
#
|
432
|
-
# Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n"
|
433
|
-
# Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n"
|
434
|
-
#
|
435
|
-
# The returned string may include padding;
|
436
|
-
# see {Padding}[Base64.html#module-Base64-label-Padding] above.
|
437
|
-
#
|
438
|
-
# Base64.strict_encode64('*') # => "Kg==\n"
|
439
|
-
#
|
440
|
-
# The returned string will have no newline characters, regardless of its length;
|
441
|
-
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
|
442
|
-
#
|
443
|
-
# Base64.strict_encode64('*') # => "Kg=="
|
444
|
-
# Base64.strict_encode64('*' * 46)
|
445
|
-
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
|
446
|
-
#
|
447
|
-
# The string to be encoded may itself contain newlines,
|
448
|
-
# which will be encoded as ordinary \Base64:
|
449
|
-
#
|
450
|
-
# Base64.strict_encode64("\n\n\n") # => "CgoK"
|
451
|
-
# s = "This is line 1\nThis is line 2\n"
|
452
|
-
# Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
|
453
|
-
#
|
454
|
-
# source://base64//lib/base64.rb#273
|
455
|
-
def strict_encode64(bin); end
|
456
|
-
|
457
|
-
# Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+:
|
458
|
-
#
|
459
|
-
# +str+ may not contain non-Base64 characters;
|
460
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
461
|
-
#
|
462
|
-
# Base64.urlsafe_decode64('+') # Raises ArgumentError.
|
463
|
-
# Base64.urlsafe_decode64('/') # Raises ArgumentError.
|
464
|
-
# Base64.urlsafe_decode64("\n") # Raises ArgumentError.
|
465
|
-
#
|
466
|
-
# Padding in +str+, if present, must be correct:
|
467
|
-
# see {Padding}[Base64.html#module-Base64-label-Padding], above:
|
468
|
-
#
|
469
|
-
# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
|
470
|
-
# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
|
471
|
-
# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
|
472
|
-
#
|
473
|
-
# source://base64//lib/base64.rb#351
|
474
|
-
def urlsafe_decode64(str); end
|
475
|
-
|
476
|
-
# Returns the RFC-4648-compliant \Base64-encoding of +bin+.
|
477
|
-
#
|
478
|
-
# Per RFC 4648, the returned string will not contain the URL-unsafe characters
|
479
|
-
# <tt>+</tt> or <tt>/</tt>,
|
480
|
-
# but instead may contain the URL-safe characters
|
481
|
-
# <tt>-</tt> and <tt>_</tt>;
|
482
|
-
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
|
483
|
-
#
|
484
|
-
# Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----"
|
485
|
-
# Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____"
|
486
|
-
#
|
487
|
-
# By default, the returned string may have padding;
|
488
|
-
# see {Padding}[Base64.html#module-Base64-label-Padding], above:
|
489
|
-
#
|
490
|
-
# Base64.urlsafe_encode64('*') # => "Kg=="
|
491
|
-
#
|
492
|
-
# Optionally, you can suppress padding:
|
493
|
-
#
|
494
|
-
# Base64.urlsafe_encode64('*', padding: false) # => "Kg"
|
495
|
-
#
|
496
|
-
# The returned string will have no newline characters, regardless of its length;
|
497
|
-
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
|
498
|
-
#
|
499
|
-
# Base64.urlsafe_encode64('*') # => "Kg=="
|
500
|
-
# Base64.urlsafe_encode64('*' * 46)
|
501
|
-
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
|
502
|
-
#
|
503
|
-
# source://base64//lib/base64.rb#328
|
504
|
-
def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
|
505
|
-
end
|
506
|
-
end
|
507
|
-
|
508
|
-
# source://base64//lib/base64.rb#186
|
509
|
-
Base64::VERSION = T.let(T.unsafe(nil), String)
|