init
This commit is contained in:
51
.gitignore
vendored
Normal file
51
.gitignore
vendored
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
ed by dotenv library to load environment variables.
|
||||||
|
# .env
|
||||||
|
|
||||||
|
# Ignore Byebug command history file.
|
||||||
|
.byebug_history
|
||||||
|
|
||||||
|
## Specific to RubyMotion:
|
||||||
|
.dat*
|
||||||
|
.repl_history
|
||||||
|
build/
|
||||||
|
*.bridgesupport
|
||||||
|
build-iPhoneOS/
|
||||||
|
build-iPhoneSimulator/
|
||||||
|
|
||||||
|
## Specific to RubyMotion (use of CocoaPods):
|
||||||
|
#
|
||||||
|
# We recommend against adding the Pods directory to your
|
||||||
|
# .gitignore. However
|
||||||
|
# you should judge for yourself, the pros and cons are
|
||||||
|
# mentioned at:
|
||||||
|
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
||||||
|
#
|
||||||
|
# vendor/Pods/
|
||||||
|
|
||||||
|
## Documentation cache and generated files:
|
||||||
|
/.yardoc/
|
||||||
|
/_yardoc/
|
||||||
|
/doc/
|
||||||
|
/rdoc/
|
||||||
|
|
||||||
|
## Environment normalization:
|
||||||
|
/.bundle/
|
||||||
|
/vendor/bundle
|
||||||
|
/lib/bundler/man/
|
||||||
|
|
||||||
|
# for a library or gem, you might want to ignore these files
|
||||||
|
# since the code is
|
||||||
|
# intended to run in multiple environments; otherwise, check
|
||||||
|
# them in:
|
||||||
|
# Gemfile.lock
|
||||||
|
# .ruby-version
|
||||||
|
# .ruby-gemset
|
||||||
|
|
||||||
|
# unless supporting rvm < 1.11.0 or doing something fancy,
|
||||||
|
# ignore this:
|
||||||
|
.rvmrc
|
||||||
|
|
||||||
|
# Used by RuboCop. Remote config files pulled in from
|
||||||
|
# inherit_from directive.
|
||||||
|
# .rubocop-https?--*
|
||||||
|
.gem_rbs_collection/
|
||||||
5
.rubocop.yml
Normal file
5
.rubocop.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Style:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Layout:
|
||||||
|
Enabled: false
|
||||||
1
.ruby-version
Normal file
1
.ruby-version
Normal file
@@ -0,0 +1 @@
|
|||||||
|
3.4.8
|
||||||
29
.solargraph.yml
Normal file
29
.solargraph.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
include:
|
||||||
|
- Rakefile
|
||||||
|
- Gemfile
|
||||||
|
- "*.gemspec"
|
||||||
|
- "**/*.rb"
|
||||||
|
exclude:
|
||||||
|
- spec/**/*
|
||||||
|
- test/**/*
|
||||||
|
- vendor/**/*
|
||||||
|
- ".bundle/**/*"
|
||||||
|
require: []
|
||||||
|
domains: []
|
||||||
|
reporters:
|
||||||
|
- rubocop
|
||||||
|
- require_not_found
|
||||||
|
formatter:
|
||||||
|
rubocop:
|
||||||
|
cops: safe
|
||||||
|
except: []
|
||||||
|
only:
|
||||||
|
- Syntax
|
||||||
|
- Lint
|
||||||
|
extra_args: []
|
||||||
|
type_checker:
|
||||||
|
rules: {}
|
||||||
|
require_paths: []
|
||||||
|
plugins: []
|
||||||
|
max_files: 5000
|
||||||
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
FROM ruby:3.4.8
|
||||||
|
|
||||||
|
RUN mkdir /app
|
||||||
|
COPY . /app
|
||||||
|
WORKDIR /app
|
||||||
|
RUN bundler install
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
CMD ruby main.rb -e production -p 8080
|
||||||
16
Gemfile
Normal file
16
Gemfile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
gem "bundler"
|
||||||
|
gem "sinatra"
|
||||||
|
gem 'solargraph', group: :development
|
||||||
|
|
||||||
|
gem "rackup", "~> 2.3"
|
||||||
|
gem "puma", "~> 7.2"
|
||||||
|
|
||||||
|
gem "http", "~> 5.3"
|
||||||
|
|
||||||
|
gem "activesupport", "~> 8.1"
|
||||||
|
|
||||||
|
gem "builder", "~> 3.3"
|
||||||
239
Gemfile.lock
Normal file
239
Gemfile.lock
Normal file
@@ -0,0 +1,239 @@
|
|||||||
|
GEM
|
||||||
|
remote: https://rubygems.org/
|
||||||
|
specs:
|
||||||
|
activesupport (8.1.2)
|
||||||
|
base64
|
||||||
|
bigdecimal
|
||||||
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
||||||
|
connection_pool (>= 2.2.5)
|
||||||
|
drb
|
||||||
|
i18n (>= 1.6, < 2)
|
||||||
|
json
|
||||||
|
logger (>= 1.4.2)
|
||||||
|
minitest (>= 5.1)
|
||||||
|
securerandom (>= 0.3)
|
||||||
|
tzinfo (~> 2.0, >= 2.0.5)
|
||||||
|
uri (>= 0.13.1)
|
||||||
|
addressable (2.8.8)
|
||||||
|
public_suffix (>= 2.0.2, < 8.0)
|
||||||
|
ast (2.4.3)
|
||||||
|
backport (1.2.0)
|
||||||
|
base64 (0.3.0)
|
||||||
|
benchmark (0.5.0)
|
||||||
|
bigdecimal (4.0.1)
|
||||||
|
builder (3.3.0)
|
||||||
|
concurrent-ruby (1.3.6)
|
||||||
|
connection_pool (3.0.2)
|
||||||
|
diff-lcs (1.6.2)
|
||||||
|
domain_name (0.6.20240107)
|
||||||
|
drb (2.2.3)
|
||||||
|
ffi (1.17.3-x86_64-linux-gnu)
|
||||||
|
ffi-compiler (1.3.2)
|
||||||
|
ffi (>= 1.15.5)
|
||||||
|
rake
|
||||||
|
http (5.3.1)
|
||||||
|
addressable (~> 2.8)
|
||||||
|
http-cookie (~> 1.0)
|
||||||
|
http-form_data (~> 2.2)
|
||||||
|
llhttp-ffi (~> 0.5.0)
|
||||||
|
http-cookie (1.1.0)
|
||||||
|
domain_name (~> 0.5)
|
||||||
|
http-form_data (2.3.0)
|
||||||
|
i18n (1.14.8)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
jaro_winkler (1.6.1)
|
||||||
|
json (2.18.0)
|
||||||
|
kramdown (2.5.2)
|
||||||
|
rexml (>= 3.4.4)
|
||||||
|
kramdown-parser-gfm (1.1.0)
|
||||||
|
kramdown (~> 2.0)
|
||||||
|
language_server-protocol (3.17.0.5)
|
||||||
|
lint_roller (1.1.0)
|
||||||
|
llhttp-ffi (0.5.1)
|
||||||
|
ffi-compiler (~> 1.0)
|
||||||
|
rake (~> 13.0)
|
||||||
|
logger (1.7.0)
|
||||||
|
minitest (6.0.1)
|
||||||
|
prism (~> 1.5)
|
||||||
|
mustermann (3.0.4)
|
||||||
|
ruby2_keywords (~> 0.0.1)
|
||||||
|
nio4r (2.7.5)
|
||||||
|
nokogiri (1.19.0-x86_64-linux-gnu)
|
||||||
|
racc (~> 1.4)
|
||||||
|
observer (0.1.2)
|
||||||
|
open3 (0.2.1)
|
||||||
|
ostruct (0.6.3)
|
||||||
|
parallel (1.27.0)
|
||||||
|
parser (3.3.10.1)
|
||||||
|
ast (~> 2.4.1)
|
||||||
|
racc
|
||||||
|
prism (1.9.0)
|
||||||
|
public_suffix (7.0.2)
|
||||||
|
puma (7.2.0)
|
||||||
|
nio4r (~> 2.0)
|
||||||
|
racc (1.8.1)
|
||||||
|
rack (3.2.4)
|
||||||
|
rack-protection (4.2.1)
|
||||||
|
base64 (>= 0.1.0)
|
||||||
|
logger (>= 1.6.0)
|
||||||
|
rack (>= 3.0.0, < 4)
|
||||||
|
rack-session (2.1.1)
|
||||||
|
base64 (>= 0.1.0)
|
||||||
|
rack (>= 3.0.0)
|
||||||
|
rackup (2.3.1)
|
||||||
|
rack (>= 3)
|
||||||
|
rainbow (3.1.1)
|
||||||
|
rake (13.3.1)
|
||||||
|
rbs (3.10.3)
|
||||||
|
logger
|
||||||
|
tsort
|
||||||
|
regexp_parser (2.11.3)
|
||||||
|
reverse_markdown (3.0.2)
|
||||||
|
nokogiri
|
||||||
|
rexml (3.4.4)
|
||||||
|
rubocop (1.84.0)
|
||||||
|
json (~> 2.3)
|
||||||
|
language_server-protocol (~> 3.17.0.2)
|
||||||
|
lint_roller (~> 1.1.0)
|
||||||
|
parallel (~> 1.10)
|
||||||
|
parser (>= 3.3.0.2)
|
||||||
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
|
regexp_parser (>= 2.9.3, < 3.0)
|
||||||
|
rubocop-ast (>= 1.49.0, < 2.0)
|
||||||
|
ruby-progressbar (~> 1.7)
|
||||||
|
unicode-display_width (>= 2.4.0, < 4.0)
|
||||||
|
rubocop-ast (1.49.0)
|
||||||
|
parser (>= 3.3.7.2)
|
||||||
|
prism (~> 1.7)
|
||||||
|
ruby-progressbar (1.13.0)
|
||||||
|
ruby2_keywords (0.0.5)
|
||||||
|
securerandom (0.4.1)
|
||||||
|
sinatra (4.2.1)
|
||||||
|
logger (>= 1.6.0)
|
||||||
|
mustermann (~> 3.0)
|
||||||
|
rack (>= 3.0.0, < 4)
|
||||||
|
rack-protection (= 4.2.1)
|
||||||
|
rack-session (>= 2.0.0, < 3)
|
||||||
|
tilt (~> 2.0)
|
||||||
|
solargraph (0.58.2)
|
||||||
|
ast (~> 2.4.3)
|
||||||
|
backport (~> 1.2)
|
||||||
|
benchmark (~> 0.4)
|
||||||
|
bundler (>= 2.0)
|
||||||
|
diff-lcs (~> 1.4)
|
||||||
|
jaro_winkler (~> 1.6, >= 1.6.1)
|
||||||
|
kramdown (~> 2.3)
|
||||||
|
kramdown-parser-gfm (~> 1.1)
|
||||||
|
logger (~> 1.6)
|
||||||
|
observer (~> 0.1)
|
||||||
|
open3 (~> 0.2.1)
|
||||||
|
ostruct (~> 0.6)
|
||||||
|
parser (~> 3.0)
|
||||||
|
prism (~> 1.4)
|
||||||
|
rbs (>= 3.6.1, <= 4.0.0.dev.4)
|
||||||
|
reverse_markdown (~> 3.0)
|
||||||
|
rubocop (~> 1.76)
|
||||||
|
thor (~> 1.0)
|
||||||
|
tilt (~> 2.0)
|
||||||
|
yard (~> 0.9, >= 0.9.24)
|
||||||
|
yard-activesupport-concern (~> 0.0)
|
||||||
|
yard-solargraph (~> 0.1)
|
||||||
|
thor (1.5.0)
|
||||||
|
tilt (2.7.0)
|
||||||
|
tsort (0.2.0)
|
||||||
|
tzinfo (2.0.6)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
unicode-display_width (3.2.0)
|
||||||
|
unicode-emoji (~> 4.1)
|
||||||
|
unicode-emoji (4.2.0)
|
||||||
|
uri (1.1.1)
|
||||||
|
yard (0.9.38)
|
||||||
|
yard-activesupport-concern (0.0.1)
|
||||||
|
yard (>= 0.8)
|
||||||
|
yard-solargraph (0.1.0)
|
||||||
|
yard (~> 0.9)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
x86_64-linux
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
activesupport (~> 8.1)
|
||||||
|
builder (~> 3.3)
|
||||||
|
bundler
|
||||||
|
http (~> 5.3)
|
||||||
|
puma (~> 7.2)
|
||||||
|
rackup (~> 2.3)
|
||||||
|
sinatra
|
||||||
|
solargraph
|
||||||
|
|
||||||
|
CHECKSUMS
|
||||||
|
activesupport (8.1.2) sha256=88842578ccd0d40f658289b0e8c842acfe9af751afee2e0744a7873f50b6fdae
|
||||||
|
addressable (2.8.8) sha256=7c13b8f9536cf6364c03b9d417c19986019e28f7c00ac8132da4eb0fe393b057
|
||||||
|
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
|
||||||
|
backport (1.2.0) sha256=912c7dfdd9ee4625d013ddfccb6205c3f92da69a8990f65c440e40f5b2fc7f75
|
||||||
|
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
||||||
|
benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
|
||||||
|
bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7
|
||||||
|
builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
|
||||||
|
concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
|
||||||
|
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
||||||
|
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
|
||||||
|
domain_name (0.6.20240107) sha256=5f693b2215708476517479bf2b3802e49068ad82167bcd2286f899536a17d933
|
||||||
|
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
||||||
|
ffi (1.17.3-x86_64-linux-gnu) sha256=3746b01f677aae7b16dc1acb7cb3cc17b3e35bdae7676a3f568153fb0e2c887f
|
||||||
|
ffi-compiler (1.3.2) sha256=a94f3d81d12caf5c5d4ecf13980a70d0aeaa72268f3b9cc13358bcc6509184a0
|
||||||
|
http (5.3.1) sha256=c50802d8e9be3926cb84ac3b36d1a31fbbac383bc4cbecdce9053cb604231d7d
|
||||||
|
http-cookie (1.1.0) sha256=38a5e60d1527eebc396831b8c4b9455440509881219273a6c99943d29eadbb19
|
||||||
|
http-form_data (2.3.0) sha256=cc4eeb1361d9876821e31d7b1cf0b68f1cf874b201d27903480479d86448a5f3
|
||||||
|
i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
|
||||||
|
jaro_winkler (1.6.1) sha256=c056b61bbf7f1fc0151bde7c8f589a2d666d42d0cdb889395b9b73b328e1b393
|
||||||
|
json (2.18.0) sha256=b10506aee4183f5cf49e0efc48073d7b75843ce3782c68dbeb763351c08fd505
|
||||||
|
kramdown (2.5.2) sha256=1ba542204c66b6f9111ff00dcc26075b95b220b07f2905d8261740c82f7f02fa
|
||||||
|
kramdown-parser-gfm (1.1.0) sha256=fb39745516427d2988543bf01fc4cf0ab1149476382393e0e9c48592f6581729
|
||||||
|
language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
|
||||||
|
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
|
||||||
|
llhttp-ffi (0.5.1) sha256=9a25a7fc19311f691a78c9c0ac0fbf4675adbd0cca74310228fdf841018fa7bc
|
||||||
|
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
||||||
|
minitest (6.0.1) sha256=7854c74f48e2e975969062833adc4013f249a4b212f5e7b9d5c040bf838d54bb
|
||||||
|
mustermann (3.0.4) sha256=85fadcb6b3c6493a8b511b42426f904b7f27b282835502233dd154daab13aa22
|
||||||
|
nio4r (2.7.5) sha256=6c90168e48fb5f8e768419c93abb94ba2b892a1d0602cb06eef16d8b7df1dca1
|
||||||
|
nokogiri (1.19.0-x86_64-linux-gnu) sha256=f482b95c713d60031d48c44ce14562f8d2ce31e3a9e8dd0ccb131e9e5a68b58c
|
||||||
|
observer (0.1.2) sha256=d8a3107131ba661138d748e7be3dbafc0d82e732fffba9fccb3d7829880950ac
|
||||||
|
open3 (0.2.1) sha256=8e2d7d2113526351201438c1aa35c8139f0141c9e8913baa007c898973bf3952
|
||||||
|
ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
|
||||||
|
parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
|
||||||
|
parser (3.3.10.1) sha256=06f6a725d2cd91e5e7f2b7c32ba143631e1f7c8ae2fb918fc4cebec187e6a688
|
||||||
|
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
|
||||||
|
public_suffix (7.0.2) sha256=9114090c8e4e7135c1fd0e7acfea33afaab38101884320c65aaa0ffb8e26a857
|
||||||
|
puma (7.2.0) sha256=bf8ef4ab514a4e6d4554cb4326b2004eba5036ae05cf765cfe51aba9706a72a8
|
||||||
|
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
||||||
|
rack (3.2.4) sha256=5d74b6f75082a643f43c1e76b419c40f0e5527fcfee1e669ac1e6b73c0ccb6f6
|
||||||
|
rack-protection (4.2.1) sha256=cf6e2842df8c55f5e4d1a4be015e603e19e9bc3a7178bae58949ccbb58558bac
|
||||||
|
rack-session (2.1.1) sha256=0b6dc07dea7e4b583f58a48e8b806d4c9f1c6c9214ebc202ec94562cbea2e4e9
|
||||||
|
rackup (2.3.1) sha256=6c79c26753778e90983761d677a48937ee3192b3ffef6bc963c0950f94688868
|
||||||
|
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
|
||||||
|
rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
|
||||||
|
rbs (3.10.3) sha256=70627f3919016134d554e6c99195552ae3ef6020fe034c8e983facc9c192daa6
|
||||||
|
regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4
|
||||||
|
reverse_markdown (3.0.2) sha256=818ebb92ce39dbb1a291690dd1ec9a6d62530d4725296b17e9c8f668f9a5b8af
|
||||||
|
rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
|
||||||
|
rubocop (1.84.0) sha256=88dec310153bb685a879f5a7cdb601f6287b8f0ee675d9dc63a17c7204c4190a
|
||||||
|
rubocop-ast (1.49.0) sha256=49c3676d3123a0923d333e20c6c2dbaaae2d2287b475273fddee0c61da9f71fd
|
||||||
|
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
||||||
|
ruby2_keywords (0.0.5) sha256=ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef
|
||||||
|
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
|
||||||
|
sinatra (4.2.1) sha256=b7aeb9b11d046b552972ade834f1f9be98b185fa8444480688e3627625377080
|
||||||
|
solargraph (0.58.2) sha256=132f1da100a5803994ce1fa3a645f33578134cfd252edef5d7c895c819534e09
|
||||||
|
thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
|
||||||
|
tilt (2.7.0) sha256=0d5b9ba69f6a36490c64b0eee9f6e9aad517e20dcc848800a06eb116f08c6ab3
|
||||||
|
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
|
||||||
|
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
|
||||||
|
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
|
||||||
|
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
|
||||||
|
uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
|
||||||
|
yard (0.9.38) sha256=721fb82afb10532aa49860655f6cc2eaa7130889df291b052e1e6b268283010f
|
||||||
|
yard-activesupport-concern (0.0.1) sha256=be790cb0efc23e2e87677063598ac8b743586154657bbd9655a7f03ce78390ef
|
||||||
|
yard-solargraph (0.1.0) sha256=a19a4619c942181a618fb9458970a9d2534cf7fda69fc43949629a7948a5930e
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
4.0.3
|
||||||
17
main.rb
Executable file
17
main.rb
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#! /bin/env ruby
|
||||||
|
|
||||||
|
require "sinatra"
|
||||||
|
require "json"
|
||||||
|
require "http"
|
||||||
|
require "active_support/all"
|
||||||
|
|
||||||
|
# USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
|
||||||
|
USER_AGENT = "MoxProx 0.1.0"
|
||||||
|
|
||||||
|
get "/deck_xml" do
|
||||||
|
deck_id = params['id']
|
||||||
|
api_url = "https://api2.moxfield.com/v3/decks/all/" + deck_id
|
||||||
|
content = HTTP.headers({"User-Agent" => USER_AGENT, 'Accept' => 'application/json'}).get(api_url)
|
||||||
|
puts content
|
||||||
|
JSON.parse(content).to_xml(:root => :deck)
|
||||||
|
end
|
||||||
224
rbs_collection.lock.yaml
Normal file
224
rbs_collection.lock.yaml
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
---
|
||||||
|
path: ".gem_rbs_collection"
|
||||||
|
gems:
|
||||||
|
- name: addressable
|
||||||
|
version: '2.8'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: ast
|
||||||
|
version: '2.4'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: base64
|
||||||
|
version: 0.3.0
|
||||||
|
source:
|
||||||
|
type: rubygems
|
||||||
|
- name: benchmark
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: cgi
|
||||||
|
version: '0.5'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: delegate
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: diff-lcs
|
||||||
|
version: '1.5'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: ffi
|
||||||
|
version: 1.17.3
|
||||||
|
source:
|
||||||
|
type: rubygems
|
||||||
|
- name: fileutils
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: forwardable
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: http
|
||||||
|
version: '5.1'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: json
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: logger
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: monitor
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: nokogiri
|
||||||
|
version: '1.11'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: observer
|
||||||
|
version: '0.1'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: open3
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: optparse
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: parallel
|
||||||
|
version: '1.20'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: parser
|
||||||
|
version: '3.2'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: prism
|
||||||
|
version: 1.9.0
|
||||||
|
source:
|
||||||
|
type: rubygems
|
||||||
|
- name: rack
|
||||||
|
version: '2.2'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: rainbow
|
||||||
|
version: '3.0'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: rake
|
||||||
|
version: '13.0'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: rbs
|
||||||
|
version: 3.10.3
|
||||||
|
source:
|
||||||
|
type: rubygems
|
||||||
|
- name: rdoc
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: regexp_parser
|
||||||
|
version: '2.8'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: ripper
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: rubocop
|
||||||
|
version: '1.57'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: rubocop-ast
|
||||||
|
version: '1.46'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: sinatra
|
||||||
|
version: '4.0'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: stringio
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: tempfile
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: thor
|
||||||
|
version: '1.2'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
- name: tsort
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: uri
|
||||||
|
version: '0'
|
||||||
|
source:
|
||||||
|
type: stdlib
|
||||||
|
- name: yard
|
||||||
|
version: '0.9'
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
revision: 5aeae33367fa324abf3a4ef912f4e27aaf17f6b9
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
repo_dir: gems
|
||||||
|
gemfile_lock_path: Gemfile.lock
|
||||||
19
rbs_collection.yaml
Normal file
19
rbs_collection.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Download sources
|
||||||
|
sources:
|
||||||
|
- type: git
|
||||||
|
name: ruby/gem_rbs_collection
|
||||||
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
||||||
|
revision: main
|
||||||
|
repo_dir: gems
|
||||||
|
|
||||||
|
# You can specify local directories as sources also.
|
||||||
|
# - type: local
|
||||||
|
# path: path/to/your/local/repository
|
||||||
|
|
||||||
|
# A directory to install the downloaded RBSs
|
||||||
|
path: .gem_rbs_collection
|
||||||
|
|
||||||
|
# gems:
|
||||||
|
# # If you want to avoid installing rbs files for gems, you can specify them here.
|
||||||
|
# - name: GEM_NAME
|
||||||
|
# ignore: true
|
||||||
Reference in New Issue
Block a user