rack-discord-interactions 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/rspec.yml +29 -0
- data/.github/workflows/rubocop.yml +24 -0
- data/.github/workflows/yard.yml +32 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.rubocop.yml +27 -0
- data/.yardopts +3 -0
- data/CHANGELOG.md +14 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +57 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/example/config.ru +28 -0
- data/example/sinatra.rb +18 -0
- data/lib/rack/discord-interactions.rb +3 -0
- data/lib/rack/discord-interactions/verifier.rb +62 -0
- data/lib/rack/discord-interactions/version.rb +9 -0
- data/rack-discord-interactions.gemspec +38 -0
- metadata +191 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 435c7c929ceff26f1a4732aa8523f8c2e4a1fcf9778aebe613b8164a6b409fa5
|
4
|
+
data.tar.gz: fddf51ea31325b46541d2458f7fbcbc9159255e88b81f8822051aef20ff2624f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fa4262c1dcf88ce62d3745bcc03395e22f21bc15df5bfe291dc38a4701e730c4430a88a9e58d1f33fe116b5a1ea4d2909b3189005e64f3525771ec40f9fa6814
|
7
|
+
data.tar.gz: e941cc74240f9defbb678160b2389b3942cd5ce0eecf49721cbf01fa4fed7169f82315a66ae0fdd0536b3272b339ef9ed12330d297648f4edb7988a6e957424b
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: RSpec
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
paths-ignore:
|
6
|
+
- "**.md"
|
7
|
+
pull_request:
|
8
|
+
paths-ignore:
|
9
|
+
- "**.md"
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
rspec:
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
os: [ ubuntu-20.04, macos-10.15, windows-2019 ]
|
16
|
+
ruby: [ 2.5, 2.7, 3.0 ]
|
17
|
+
runs-on: ${{ matrix.os }}
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v2
|
21
|
+
- name: Set up Ruby
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: ${{ matrix.ruby }}
|
25
|
+
bundler-cache: true
|
26
|
+
- name: Install dependencies
|
27
|
+
run: bundle install
|
28
|
+
- name: Run RSpec
|
29
|
+
run: bundle exec rake
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: Rubocop
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
paths-ignore:
|
6
|
+
- "**.md"
|
7
|
+
pull_request:
|
8
|
+
paths-ignore:
|
9
|
+
- "**.md"
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
rubocop:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
- name: Set up Ruby
|
17
|
+
uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: 2.5.0
|
20
|
+
bundler-cache: true
|
21
|
+
- name: Install dependencies
|
22
|
+
run: bundle install
|
23
|
+
- name: Run Rubocop
|
24
|
+
run: bundle exec rubocop -c .rubocop.yml -P
|
@@ -0,0 +1,32 @@
|
|
1
|
+
ame: YARD
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
paths-ignore:
|
6
|
+
- "*.gemspec"
|
7
|
+
- "CHANGELOG.md"
|
8
|
+
- ".rubocop.yml"
|
9
|
+
- ".rspec"
|
10
|
+
- "Rakefile"
|
11
|
+
pull_request:
|
12
|
+
paths-ignore:
|
13
|
+
- "*.gemspec"
|
14
|
+
- "CHANGELOG.md"
|
15
|
+
- ".rubocop.yml"
|
16
|
+
- ".rspec"
|
17
|
+
- "Rakefile"
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
yard:
|
21
|
+
runs-on: ubuntu-latest
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v2
|
24
|
+
- name: Set up Ruby
|
25
|
+
uses: ruby/setup-ruby@v1
|
26
|
+
with:
|
27
|
+
ruby-version: 2.5.0
|
28
|
+
bundler-cache: true
|
29
|
+
- name: Install dependencies
|
30
|
+
run: bundle install
|
31
|
+
- name: Run YARD
|
32
|
+
run: bundle exec yard doc
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
- rubocop-rspec
|
4
|
+
|
5
|
+
inherit_mode:
|
6
|
+
merge:
|
7
|
+
- AllowedNames
|
8
|
+
|
9
|
+
AllCops:
|
10
|
+
NewCops: enable
|
11
|
+
TargetRubyVersion: 2.5
|
12
|
+
SuggestExtensions: false
|
13
|
+
|
14
|
+
Naming/FileName:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Metrics/BlockLength:
|
18
|
+
Exclude:
|
19
|
+
- 'Rakefile'
|
20
|
+
- '*.gemspec'
|
21
|
+
- 'spec/**/*.rb'
|
22
|
+
|
23
|
+
RSpec/NestedGroups:
|
24
|
+
Max: 4
|
25
|
+
|
26
|
+
RSpec/FilePath:
|
27
|
+
Enabled: false
|
data/.yardopts
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
## [1.0.0] - 2021-03-12
|
10
|
+
### Added
|
11
|
+
- Initial release
|
12
|
+
|
13
|
+
[Unreleased]: https://github.com/shardlab/rack-discord-interactions/compare/v1.0.0...HEAD
|
14
|
+
[1.0.0]: https://github.com/shardlab/rack-discord-interactions/releases/tag/v1.0.0
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at matthew.b.carey@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 Matthew Carey
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# Rack::DiscordInteractions
|
2
|
+
|
3
|
+
Middleware to handle signature verification for Discord Interaction HTTP requests.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'rack-discord-interactions'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle install
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install rack-discord-interactions
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'sinatra'
|
25
|
+
require 'rack/discord-interactions'
|
26
|
+
require 'json'
|
27
|
+
|
28
|
+
use Rack::DiscordInteractions::Verifier, ENV['INTERACTIONS_PUBLIC_KEY'], path: '/interactions'
|
29
|
+
|
30
|
+
post '/interactions' do
|
31
|
+
body = JSON.parse(request.body.read)
|
32
|
+
|
33
|
+
case body['type']
|
34
|
+
when 2 # COMMAND
|
35
|
+
{ type: 5 }.to_json
|
36
|
+
else
|
37
|
+
halt 400, 'Invalid type'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
## Development
|
43
|
+
|
44
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
45
|
+
|
46
|
+
## Contributing
|
47
|
+
|
48
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/shardlab/rack-discord-interactions. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/shardlab/rack-discord-interactions/blob/master/CODE_OF_CONDUCT.md).
|
49
|
+
|
50
|
+
|
51
|
+
## License
|
52
|
+
|
53
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
54
|
+
|
55
|
+
## Code of Conduct
|
56
|
+
|
57
|
+
Everyone interacting in the Rack::Slash::Commands project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/shardlab/rack-discord-interactions/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'rack/slash/commands'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/example/config.ru
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rack/discord-interactions'
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
# App to process interaction requests
|
7
|
+
module Interactions
|
8
|
+
def self.call(env)
|
9
|
+
body = JSON.parse(env['rack.input'].read)
|
10
|
+
|
11
|
+
case body['type']
|
12
|
+
when 2 # COMMAND
|
13
|
+
[200, { 'Content-Type' => 'application/json' }, ['{"type": 5}']]
|
14
|
+
else
|
15
|
+
[400, { 'Content-Type' => 'text/plain' }, ['Invalid type']]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
app = Rack::Builder.app do
|
21
|
+
map '/interactions' do
|
22
|
+
use Rack::DiscordInteractions::Verifier, ENV['INTERACTIONS_PUBLIC_KEY']
|
23
|
+
|
24
|
+
run Interactions
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
run app
|
data/example/sinatra.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'sinatra'
|
4
|
+
require 'rack/discord-interactions'
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
use Rack::DiscordInteractions::Verifier, ENV['INTERACTIONS_PUBLIC_KEY'], path: '/interactions'
|
8
|
+
|
9
|
+
post '/interactions' do
|
10
|
+
body = JSON.parse(request.body.read)
|
11
|
+
|
12
|
+
case body['type']
|
13
|
+
when 2 # COMMAND
|
14
|
+
{ type: 5 }.to_json
|
15
|
+
else
|
16
|
+
halt 400, 'Invalid type'
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'ed25519'
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
module Rack
|
7
|
+
# Discord interaction middleware collection
|
8
|
+
module DiscordInteractions
|
9
|
+
# Middleware to handle verification of interaction signatures
|
10
|
+
class Verifier
|
11
|
+
# @!visibility private
|
12
|
+
MISSING_HEADERS = [400, {}, ['Missing headers']].freeze
|
13
|
+
|
14
|
+
# @!visibility private
|
15
|
+
PONG = [200, { 'Content-Type' => 'application/json' }, ['{"type":1}']].freeze
|
16
|
+
|
17
|
+
# @!visibility private
|
18
|
+
INVALID_SIGNATURE = [401, {}, ['Invalid request signature']].freeze
|
19
|
+
|
20
|
+
# @param app [#call] The rack app, or an object that responds to `#call`.
|
21
|
+
# @param public_key [String] The public key of the application.
|
22
|
+
# @param path [String] Path to verify, will verify all requests if `nil`.
|
23
|
+
# @param handle_pings [true, false] Whether the middleware should automatically handle responding to pings.
|
24
|
+
def initialize(app, public_key, path: nil, handle_pings: true)
|
25
|
+
@app = app
|
26
|
+
@verify_key = Ed25519::VerifyKey.new([public_key].pack('H*'))
|
27
|
+
@path = path
|
28
|
+
@handle_pings = handle_pings
|
29
|
+
end
|
30
|
+
|
31
|
+
# @!visibility private
|
32
|
+
# @param env [Hash]
|
33
|
+
def call(env)
|
34
|
+
if env['PATH_INFO'] == @path || @path.nil?
|
35
|
+
request = Rack::Request.new(env)
|
36
|
+
verify(request)
|
37
|
+
else
|
38
|
+
@app.call(env)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# @!visibility private
|
43
|
+
# @param request [Rack::Request]
|
44
|
+
def verify(request)
|
45
|
+
timestamp = request.get_header('HTTP_X_SIGNATURE_TIMESTAMP')
|
46
|
+
signature = request.get_header('HTTP_X_SIGNATURE_ED25519')
|
47
|
+
body = request.body.read
|
48
|
+
|
49
|
+
return MISSING_HEADERS unless timestamp && signature
|
50
|
+
|
51
|
+
@verify_key.verify([signature].pack('H*'), timestamp + body)
|
52
|
+
request.body.rewind
|
53
|
+
|
54
|
+
return PONG if @handle_pings && JSON.parse(body)['type'] == 1
|
55
|
+
|
56
|
+
@app.call(request.env)
|
57
|
+
rescue ArgumentError, Ed25519::VerifyError
|
58
|
+
INVALID_SIGNATURE
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/rack/discord-interactions/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'rack-discord-interactions'
|
7
|
+
spec.version = Rack::DiscordInteractions::VERSION
|
8
|
+
spec.authors = ['Matthew Carey']
|
9
|
+
spec.email = ['matthew.b.carey@gmail.com']
|
10
|
+
|
11
|
+
spec.summary = 'Rack middleware for Discord Interactions.'
|
12
|
+
spec.description = 'Rack middleware for Discord Interaction validation.'
|
13
|
+
spec.homepage = 'https://github.com/shardlab/rack-discord-interactions'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
|
16
|
+
|
17
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
18
|
+
spec.metadata['source_code_uri'] = 'https://github.com/shardlab/rack-discord-interactions'
|
19
|
+
spec.metadata['changelog_uri'] = 'https://github.com/shardlab/rack-discord-interactions/blob/main/CHANGELOG.md'
|
20
|
+
|
21
|
+
# Specify which files should be added to the gem when it is released.
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
+
end
|
26
|
+
spec.bindir = 'exe'
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ['lib']
|
29
|
+
|
30
|
+
spec.add_dependency 'ed25519', '>= 1.0.0', '< 2.0.0'
|
31
|
+
spec.add_dependency 'rack', '>= 2.0.0', '< 3.0.0'
|
32
|
+
spec.add_development_dependency 'rake', '~> 13.0.3'
|
33
|
+
spec.add_development_dependency 'rspec', '~> 3.10.0'
|
34
|
+
spec.add_development_dependency 'rubocop', '~> 1.9.1'
|
35
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.9.2'
|
36
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.2.0'
|
37
|
+
spec.add_development_dependency 'yard', '~> 0.9.26'
|
38
|
+
end
|
metadata
ADDED
@@ -0,0 +1,191 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rack-discord-interactions
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matthew Carey
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-03-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ed25519
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.0.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.0.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.0.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.0.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rack
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 2.0.0
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 3.0.0
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 2.0.0
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 3.0.0
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rake
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 13.0.3
|
60
|
+
type: :development
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - "~>"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 13.0.3
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: rspec
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: 3.10.0
|
74
|
+
type: :development
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 3.10.0
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: rubocop
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - "~>"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 1.9.1
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - "~>"
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 1.9.1
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: rubocop-performance
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - "~>"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 1.9.2
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 1.9.2
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: rubocop-rspec
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: 2.2.0
|
116
|
+
type: :development
|
117
|
+
prerelease: false
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 2.2.0
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: yard
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - "~>"
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: 0.9.26
|
130
|
+
type: :development
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - "~>"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: 0.9.26
|
137
|
+
description: Rack middleware for Discord Interaction validation.
|
138
|
+
email:
|
139
|
+
- matthew.b.carey@gmail.com
|
140
|
+
executables: []
|
141
|
+
extensions: []
|
142
|
+
extra_rdoc_files: []
|
143
|
+
files:
|
144
|
+
- ".github/workflows/rspec.yml"
|
145
|
+
- ".github/workflows/rubocop.yml"
|
146
|
+
- ".github/workflows/yard.yml"
|
147
|
+
- ".gitignore"
|
148
|
+
- ".rspec"
|
149
|
+
- ".rubocop.yml"
|
150
|
+
- ".yardopts"
|
151
|
+
- CHANGELOG.md
|
152
|
+
- CODE_OF_CONDUCT.md
|
153
|
+
- Gemfile
|
154
|
+
- LICENSE.txt
|
155
|
+
- README.md
|
156
|
+
- Rakefile
|
157
|
+
- bin/console
|
158
|
+
- bin/setup
|
159
|
+
- example/config.ru
|
160
|
+
- example/sinatra.rb
|
161
|
+
- lib/rack/discord-interactions.rb
|
162
|
+
- lib/rack/discord-interactions/verifier.rb
|
163
|
+
- lib/rack/discord-interactions/version.rb
|
164
|
+
- rack-discord-interactions.gemspec
|
165
|
+
homepage: https://github.com/shardlab/rack-discord-interactions
|
166
|
+
licenses:
|
167
|
+
- MIT
|
168
|
+
metadata:
|
169
|
+
homepage_uri: https://github.com/shardlab/rack-discord-interactions
|
170
|
+
source_code_uri: https://github.com/shardlab/rack-discord-interactions
|
171
|
+
changelog_uri: https://github.com/shardlab/rack-discord-interactions/blob/main/CHANGELOG.md
|
172
|
+
post_install_message:
|
173
|
+
rdoc_options: []
|
174
|
+
require_paths:
|
175
|
+
- lib
|
176
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 2.5.0
|
181
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - ">="
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: '0'
|
186
|
+
requirements: []
|
187
|
+
rubygems_version: 3.1.4
|
188
|
+
signing_key:
|
189
|
+
specification_version: 4
|
190
|
+
summary: Rack middleware for Discord Interactions.
|
191
|
+
test_files: []
|