Merge pull request #6 from dNitza/use-hanami-22b1
Upgrade to Hanami 2.2.0.beta1
This commit is contained in:
20
Gemfile
20
Gemfile
@@ -4,12 +4,13 @@ source "https://rubygems.org"
|
|||||||
|
|
||||||
ruby "3.3.0"
|
ruby "3.3.0"
|
||||||
|
|
||||||
gem "hanami", "2.1.0"
|
gem "hanami", "~> 2.2.0.beta"
|
||||||
gem "hanami-router", "2.1.0"
|
gem "hanami-router", "~> 2.2.0.beta"
|
||||||
gem "hanami-controller", "2.1.0"
|
gem "hanami-controller", "~> 2.2.0.beta"
|
||||||
gem "hanami-validations", "2.1.0"
|
gem "hanami-validations", "~> 2.2.0.beta"
|
||||||
gem "hanami-assets", "2.1.0"
|
gem "hanami-assets", "~> 2.2.0.beta"
|
||||||
gem "hanami-view", "2.1.0"
|
gem "hanami-view", "~> 2.2.0.beta"
|
||||||
|
gem "hanami-db", "~> 2.2.0.beta"
|
||||||
# gem "hanami-view", file: "~/Documents/projects/hanami/view"
|
# gem "hanami-view", file: "~/Documents/projects/hanami/view"
|
||||||
|
|
||||||
gem "csv"
|
gem "csv"
|
||||||
@@ -20,7 +21,7 @@ gem "dotenv"
|
|||||||
gem "whenever", require: false
|
gem "whenever", require: false
|
||||||
gem "warning"
|
gem "warning"
|
||||||
|
|
||||||
gem "dry-types"
|
gem "dry-types", "~> 1.0", ">= 1.6.1"
|
||||||
gem "dry-matcher"
|
gem "dry-matcher"
|
||||||
gem "dry-monads"
|
gem "dry-monads"
|
||||||
gem "puma"
|
gem "puma"
|
||||||
@@ -69,7 +70,7 @@ gem "steam-api"
|
|||||||
|
|
||||||
group :cli, :development do
|
group :cli, :development do
|
||||||
gem "irb"
|
gem "irb"
|
||||||
gem "hanami-reloader", "~> 2.1.0.rc"
|
gem "hanami-reloader", "~> 2.2.0.beta"
|
||||||
gem "rubocop", require: false
|
gem "rubocop", require: false
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -80,7 +81,8 @@ end
|
|||||||
group :development do
|
group :development do
|
||||||
gem "ed25519"
|
gem "ed25519"
|
||||||
gem "bcrypt_pbkdf"
|
gem "bcrypt_pbkdf"
|
||||||
gem "guard-puma", "~> 0.8"
|
gem "hanami-webconsole", "~> 2.2.0.beta"
|
||||||
|
gem "guard-puma"
|
||||||
gem "standardrb"
|
gem "standardrb"
|
||||||
gem "capistrano", "~> 3.7", require: false
|
gem "capistrano", "~> 3.7", require: false
|
||||||
gem "capistrano-bundler"
|
gem "capistrano-bundler"
|
||||||
|
187
Gemfile.lock
187
Gemfile.lock
@@ -36,7 +36,7 @@ GIT
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (7.1.3.3)
|
activesupport (7.1.3.4)
|
||||||
base64
|
base64
|
||||||
bigdecimal
|
bigdecimal
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
@@ -46,8 +46,8 @@ GEM
|
|||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
mutex_m
|
mutex_m
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
addressable (2.8.6)
|
addressable (2.8.7)
|
||||||
public_suffix (>= 2.0.2, < 6.0)
|
public_suffix (>= 2.0.2, < 7.0)
|
||||||
airbrussh (1.5.2)
|
airbrussh (1.5.2)
|
||||||
sshkit (>= 1.6.1, != 1.7.0)
|
sshkit (>= 1.6.1, != 1.7.0)
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
@@ -56,14 +56,20 @@ GEM
|
|||||||
bcrypt_pbkdf (1.1.1)
|
bcrypt_pbkdf (1.1.1)
|
||||||
bcrypt_pbkdf (1.1.1-arm64-darwin)
|
bcrypt_pbkdf (1.1.1-arm64-darwin)
|
||||||
bcrypt_pbkdf (1.1.1-x86_64-darwin)
|
bcrypt_pbkdf (1.1.1-x86_64-darwin)
|
||||||
|
better_errors (2.10.1)
|
||||||
|
erubi (>= 1.0.0)
|
||||||
|
rack (>= 0.9.0)
|
||||||
|
rouge (>= 1.0.0)
|
||||||
bigdecimal (3.1.8)
|
bigdecimal (3.1.8)
|
||||||
|
binding_of_caller (1.0.1)
|
||||||
|
debug_inspector (>= 1.2.0)
|
||||||
bskyrb (0.5.3)
|
bskyrb (0.5.3)
|
||||||
date (>= 3.3.3)
|
date (>= 3.3.3)
|
||||||
httparty (>= 0.21.0)
|
httparty (>= 0.21.0)
|
||||||
json (>= 2.0)
|
json (>= 2.0)
|
||||||
xrpc (>= 0.0.4)
|
xrpc (>= 0.0.4)
|
||||||
builder (3.2.4)
|
builder (3.3.0)
|
||||||
capistrano (3.18.1)
|
capistrano (3.19.1)
|
||||||
airbrussh (>= 1.0.0)
|
airbrussh (>= 1.0.0)
|
||||||
i18n
|
i18n
|
||||||
rake (>= 10.0.0)
|
rake (>= 10.0.0)
|
||||||
@@ -75,10 +81,10 @@ GEM
|
|||||||
sshkit (~> 1.3)
|
sshkit (~> 1.3)
|
||||||
capistrano-systemd-multiservice (0.1.0.beta13)
|
capistrano-systemd-multiservice (0.1.0.beta13)
|
||||||
capistrano (~> 3.7)
|
capistrano (~> 3.7)
|
||||||
charlock_holmes (0.7.7)
|
charlock_holmes (0.7.9)
|
||||||
chronic (0.10.2)
|
chronic (0.10.2)
|
||||||
coderay (1.1.3)
|
coderay (1.1.3)
|
||||||
concurrent-ruby (1.2.3)
|
concurrent-ruby (1.3.3)
|
||||||
connection_pool (2.4.1)
|
connection_pool (2.4.1)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
csv (3.3.0)
|
csv (3.3.0)
|
||||||
@@ -87,6 +93,7 @@ GEM
|
|||||||
database_cleaner-core (~> 2.0.0)
|
database_cleaner-core (~> 2.0.0)
|
||||||
sequel
|
sequel
|
||||||
date (3.3.4)
|
date (3.3.4)
|
||||||
|
debug_inspector (1.2.0)
|
||||||
diff-lcs (1.5.1)
|
diff-lcs (1.5.1)
|
||||||
domain_name (0.6.20240107)
|
domain_name (0.6.20240107)
|
||||||
dotenv (3.1.2)
|
dotenv (3.1.2)
|
||||||
@@ -96,8 +103,8 @@ GEM
|
|||||||
dry-auto_inject (1.0.1)
|
dry-auto_inject (1.0.1)
|
||||||
dry-core (~> 1.0)
|
dry-core (~> 1.0)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
dry-cli (1.0.0)
|
dry-cli (1.1.0)
|
||||||
dry-configurable (1.1.0)
|
dry-configurable (1.2.0)
|
||||||
dry-core (~> 1.0, < 2)
|
dry-core (~> 1.0, < 2)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
dry-core (1.0.1)
|
dry-core (1.0.1)
|
||||||
@@ -107,7 +114,7 @@ GEM
|
|||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
dry-core (~> 1.0, < 2)
|
dry-core (~> 1.0, < 2)
|
||||||
dry-files (1.1.0)
|
dry-files (1.1.0)
|
||||||
dry-inflector (1.0.0)
|
dry-inflector (1.1.0)
|
||||||
dry-initializer (3.1.1)
|
dry-initializer (3.1.1)
|
||||||
dry-logger (1.0.4)
|
dry-logger (1.0.4)
|
||||||
dry-logic (1.5.0)
|
dry-logic (1.5.0)
|
||||||
@@ -137,11 +144,11 @@ GEM
|
|||||||
dry-types (>= 1.7, < 2)
|
dry-types (>= 1.7, < 2)
|
||||||
ice_nine (~> 0.11)
|
ice_nine (~> 0.11)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
dry-system (1.0.1)
|
dry-system (1.1.0.beta1)
|
||||||
dry-auto_inject (~> 1.0, < 2)
|
dry-auto_inject (~> 1.0)
|
||||||
dry-configurable (~> 1.0, < 2)
|
dry-configurable (~> 1.0)
|
||||||
dry-core (~> 1.0, < 2)
|
dry-core (~> 1.0)
|
||||||
dry-inflector (~> 1.0, < 2)
|
dry-inflector (~> 1.0)
|
||||||
dry-transformer (1.0.1)
|
dry-transformer (1.0.1)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
dry-types (1.7.2)
|
dry-types (1.7.2)
|
||||||
@@ -158,7 +165,8 @@ GEM
|
|||||||
dry-schema (>= 1.12, < 2)
|
dry-schema (>= 1.12, < 2)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
ed25519 (1.3.0)
|
ed25519 (1.3.0)
|
||||||
faker (3.3.1)
|
erubi (1.13.0)
|
||||||
|
faker (3.4.2)
|
||||||
i18n (>= 1.8.11, < 2)
|
i18n (>= 1.8.11, < 2)
|
||||||
faraday (1.10.3)
|
faraday (1.10.3)
|
||||||
faraday-em_http (~> 1.0)
|
faraday-em_http (~> 1.0)
|
||||||
@@ -178,16 +186,18 @@ GEM
|
|||||||
faraday-httpclient (1.0.1)
|
faraday-httpclient (1.0.1)
|
||||||
faraday-multipart (1.0.4)
|
faraday-multipart (1.0.4)
|
||||||
multipart-post (~> 2)
|
multipart-post (~> 2)
|
||||||
faraday-net_http (1.0.1)
|
faraday-net_http (1.0.2)
|
||||||
faraday-net_http_persistent (1.2.0)
|
faraday-net_http_persistent (1.2.0)
|
||||||
faraday-patron (1.0.0)
|
faraday-patron (1.0.0)
|
||||||
faraday-rack (1.0.0)
|
faraday-rack (1.0.0)
|
||||||
faraday-retry (1.0.3)
|
faraday-retry (1.0.3)
|
||||||
ffi (1.16.3)
|
ffi (1.17.0-arm64-darwin)
|
||||||
|
ffi (1.17.0-x86_64-darwin)
|
||||||
|
ffi (1.17.0-x86_64-linux-gnu)
|
||||||
formatador (1.1.0)
|
formatador (1.1.0)
|
||||||
georuby (2.5.2)
|
georuby (2.5.2)
|
||||||
gnuplot (2.6.2)
|
gnuplot (2.6.2)
|
||||||
gpx (1.1.1)
|
gpx (1.2.0)
|
||||||
nokogiri (~> 1.7)
|
nokogiri (~> 1.7)
|
||||||
rake
|
rake
|
||||||
guard (2.18.1)
|
guard (2.18.1)
|
||||||
@@ -205,36 +215,40 @@ GEM
|
|||||||
guard-compat (~> 1.2)
|
guard-compat (~> 1.2)
|
||||||
puma (>= 4.0, < 7)
|
puma (>= 4.0, < 7)
|
||||||
guess_html_encoding (0.0.11)
|
guess_html_encoding (0.0.11)
|
||||||
hanami (2.1.0)
|
hanami (2.2.0.beta1)
|
||||||
bundler (>= 1.16, < 3)
|
bundler (>= 1.16, < 3)
|
||||||
dry-configurable (~> 1.0, < 2)
|
dry-configurable (~> 1.0, >= 1.2.0, < 2)
|
||||||
dry-core (~> 1.0, < 2)
|
dry-core (~> 1.0, < 2)
|
||||||
dry-inflector (~> 1.0, < 2)
|
dry-inflector (~> 1.0, >= 1.1.0, < 2)
|
||||||
dry-logger (~> 1.0, < 2)
|
dry-logger (~> 1.0, < 2)
|
||||||
dry-monitor (~> 1.0, >= 1.0.1, < 2)
|
dry-monitor (~> 1.0, >= 1.0.1, < 2)
|
||||||
dry-system (~> 1.0, < 2)
|
dry-system (= 1.1.0.beta1)
|
||||||
hanami-cli (~> 2.1)
|
hanami-cli (= 2.2.0.beta1)
|
||||||
hanami-utils (~> 2.1)
|
hanami-utils (~> 2.2.beta)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
hanami-assets (2.1.0)
|
hanami-assets (2.2.0.beta1)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
hanami-cli (2.1.1)
|
hanami-cli (2.2.0.beta1)
|
||||||
bundler (~> 2.1)
|
bundler (~> 2.1)
|
||||||
dry-cli (~> 1.0, < 2)
|
dry-cli (~> 1.0, >= 1.1.0)
|
||||||
dry-files (~> 1.0, >= 1.0.2, < 2)
|
dry-files (~> 1.0, >= 1.0.2, < 2)
|
||||||
dry-inflector (~> 1.0, < 2)
|
dry-inflector (~> 1.0, < 2)
|
||||||
rake (~> 13.0)
|
rake (~> 13.0)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
hanami-controller (2.1.0)
|
hanami-controller (2.2.0.beta1)
|
||||||
dry-configurable (~> 1.0, < 2)
|
dry-configurable (~> 1.0, < 2)
|
||||||
dry-core (~> 1.0)
|
dry-core (~> 1.0)
|
||||||
hanami-utils (~> 2.1)
|
hanami-utils (~> 2.2.beta)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
hanami-reloader (2.1.0)
|
hanami-db (2.2.0.beta1)
|
||||||
hanami-cli (~> 2.1)
|
rom (~> 5.3)
|
||||||
|
rom-sql (~> 3.6, >= 3.6.4)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
hanami-router (2.1.0)
|
hanami-reloader (2.2.0.beta1)
|
||||||
|
hanami-cli (~> 2.2.beta)
|
||||||
|
zeitwerk (~> 2.6)
|
||||||
|
hanami-router (2.2.0.beta1)
|
||||||
mustermann (~> 3.0)
|
mustermann (~> 3.0)
|
||||||
mustermann-contrib (~> 3.0)
|
mustermann-contrib (~> 3.0)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0)
|
||||||
@@ -243,24 +257,27 @@ GEM
|
|||||||
rake (~> 13.0)
|
rake (~> 13.0)
|
||||||
rspec (~> 3.12)
|
rspec (~> 3.12)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
hanami-utils (2.1.0)
|
hanami-utils (2.2.0.beta1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
dry-core (~> 1.0, < 2)
|
dry-core (~> 1.0, < 2)
|
||||||
dry-transformer (~> 1.0, < 2)
|
dry-transformer (~> 1.0, < 2)
|
||||||
hanami-validations (2.1.0)
|
hanami-validations (2.2.0.beta1)
|
||||||
dry-validation (>= 1.10, < 2)
|
dry-validation (>= 1.10, < 2)
|
||||||
zeitwerk (~> 2.6.0)
|
zeitwerk (~> 2.6.0)
|
||||||
hanami-view (2.1.0)
|
hanami-view (2.2.0.beta1)
|
||||||
dry-configurable (~> 1.0)
|
dry-configurable (~> 1.0)
|
||||||
dry-core (~> 1.0)
|
dry-core (~> 1.0)
|
||||||
dry-inflector (~> 1.0, < 2)
|
dry-inflector (~> 1.0, < 2)
|
||||||
temple (~> 0.10.0, >= 0.10.2)
|
temple (~> 0.10.0, >= 0.10.2)
|
||||||
tilt (~> 2.3)
|
tilt (~> 2.3)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
|
hanami-webconsole (2.2.0.beta1)
|
||||||
|
better_errors (~> 2.10, >= 2.10.1)
|
||||||
|
binding_of_caller (~> 1.0)
|
||||||
hansi (0.2.1)
|
hansi (0.2.1)
|
||||||
hashie (2.1.2)
|
hashie (2.1.2)
|
||||||
http-accept (1.7.0)
|
http-accept (1.7.0)
|
||||||
http-cookie (1.0.5)
|
http-cookie (1.0.6)
|
||||||
domain_name (~> 0.5)
|
domain_name (~> 0.5)
|
||||||
httparty (0.22.0)
|
httparty (0.22.0)
|
||||||
csv
|
csv
|
||||||
@@ -269,15 +286,15 @@ GEM
|
|||||||
i18n (1.14.5)
|
i18n (1.14.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
ice_nine (0.11.2)
|
ice_nine (0.11.2)
|
||||||
image_processing (1.12.2)
|
image_processing (1.13.0)
|
||||||
mini_magick (>= 4.9.5, < 5)
|
mini_magick (>= 4.9.5, < 5)
|
||||||
ruby-vips (>= 2.0.17, < 3)
|
ruby-vips (>= 2.0.17, < 3)
|
||||||
io-console (0.7.2)
|
io-console (0.7.2)
|
||||||
irb (1.13.1)
|
irb (1.14.0)
|
||||||
rdoc (>= 4.0.0)
|
rdoc (>= 4.0.0)
|
||||||
reline (>= 0.4.2)
|
reline (>= 0.4.2)
|
||||||
json (2.7.2)
|
json (2.7.2)
|
||||||
jwt (2.8.1)
|
jwt (2.8.2)
|
||||||
base64
|
base64
|
||||||
language_server-protocol (3.17.0.3)
|
language_server-protocol (3.17.0.3)
|
||||||
lastfm (1.27.4)
|
lastfm (1.27.4)
|
||||||
@@ -287,6 +304,7 @@ GEM
|
|||||||
listen (3.9.0)
|
listen (3.9.0)
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
|
logger (1.6.0)
|
||||||
lumberjack (1.2.10)
|
lumberjack (1.2.10)
|
||||||
mail (2.8.1)
|
mail (2.8.1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
@@ -297,21 +315,21 @@ GEM
|
|||||||
method_source (1.1.0)
|
method_source (1.1.0)
|
||||||
mime-types (3.5.2)
|
mime-types (3.5.2)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2024.0507)
|
mime-types-data (3.2024.0702)
|
||||||
mini_magick (4.12.0)
|
mini_magick (4.13.2)
|
||||||
mini_mime (1.1.5)
|
mini_mime (1.1.5)
|
||||||
minitest (5.23.1)
|
minitest (5.24.1)
|
||||||
multi_xml (0.7.1)
|
multi_xml (0.7.1)
|
||||||
bigdecimal (~> 3.1)
|
bigdecimal (~> 3.1)
|
||||||
multipart-post (2.4.1)
|
multipart-post (2.4.1)
|
||||||
mustermann (3.0.0)
|
mustermann (3.0.1)
|
||||||
ruby2_keywords (~> 0.0.1)
|
ruby2_keywords (~> 0.0.1)
|
||||||
mustermann-contrib (3.0.0)
|
mustermann-contrib (3.0.1)
|
||||||
hansi (~> 0.2.0)
|
hansi (~> 0.2.0)
|
||||||
mustermann (= 3.0.0)
|
mustermann (= 3.0.1)
|
||||||
mutex_m (0.2.0)
|
mutex_m (0.2.0)
|
||||||
nenv (0.3.0)
|
nenv (0.3.0)
|
||||||
net-imap (0.4.11)
|
net-imap (0.4.14)
|
||||||
date
|
date
|
||||||
net-protocol
|
net-protocol
|
||||||
net-pop (0.1.2)
|
net-pop (0.1.2)
|
||||||
@@ -327,11 +345,11 @@ GEM
|
|||||||
net-ssh (7.2.3)
|
net-ssh (7.2.3)
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
nio4r (2.7.3)
|
nio4r (2.7.3)
|
||||||
nokogiri (1.16.5-arm64-darwin)
|
nokogiri (1.16.7-arm64-darwin)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.16.5-x86_64-darwin)
|
nokogiri (1.16.7-x86_64-darwin)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.16.5-x86_64-linux)
|
nokogiri (1.16.7-x86_64-linux)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
notiffany (0.1.3)
|
notiffany (0.1.3)
|
||||||
nenv (~> 0.1)
|
nenv (~> 0.1)
|
||||||
@@ -349,21 +367,21 @@ GEM
|
|||||||
omdb-api (1.4.3)
|
omdb-api (1.4.3)
|
||||||
activesupport
|
activesupport
|
||||||
httparty
|
httparty
|
||||||
parallel (1.24.0)
|
parallel (1.25.1)
|
||||||
parser (3.3.1.0)
|
parser (3.3.4.0)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
racc
|
racc
|
||||||
pg (1.5.6)
|
pg (1.5.7)
|
||||||
pry (0.14.2)
|
pry (0.14.2)
|
||||||
coderay (~> 1.1)
|
coderay (~> 1.1)
|
||||||
method_source (~> 1.0)
|
method_source (~> 1.0)
|
||||||
psych (5.1.2)
|
psych (5.1.2)
|
||||||
stringio
|
stringio
|
||||||
public_suffix (5.0.5)
|
public_suffix (6.0.1)
|
||||||
puma (6.4.2)
|
puma (6.4.2)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
que (2.3.0)
|
que (2.3.0)
|
||||||
racc (1.8.0)
|
racc (1.8.1)
|
||||||
rack (2.2.9)
|
rack (2.2.9)
|
||||||
rack-attack (6.7.0)
|
rack-attack (6.7.0)
|
||||||
rack (>= 1.0, < 4)
|
rack (>= 1.0, < 4)
|
||||||
@@ -387,7 +405,7 @@ GEM
|
|||||||
redis-client (0.22.2)
|
redis-client (0.22.2)
|
||||||
connection_pool
|
connection_pool
|
||||||
regexp_parser (2.9.2)
|
regexp_parser (2.9.2)
|
||||||
reline (0.5.7)
|
reline (0.5.9)
|
||||||
io-console (~> 0.5)
|
io-console (~> 0.5)
|
||||||
rest-client (2.1.0)
|
rest-client (2.1.0)
|
||||||
http-accept (>= 1.7.0, < 2.0)
|
http-accept (>= 1.7.0, < 2.0)
|
||||||
@@ -396,7 +414,7 @@ GEM
|
|||||||
netrc (~> 0.8)
|
netrc (~> 0.8)
|
||||||
reverse_markdown (2.1.1)
|
reverse_markdown (2.1.1)
|
||||||
nokogiri
|
nokogiri
|
||||||
rexml (3.3.2)
|
rexml (3.3.4)
|
||||||
strscan
|
strscan
|
||||||
rom (5.3.2)
|
rom (5.3.2)
|
||||||
rom-changeset (~> 5.3, >= 5.3.0)
|
rom-changeset (~> 5.3, >= 5.3.0)
|
||||||
@@ -425,25 +443,26 @@ GEM
|
|||||||
dry-core (~> 1.0)
|
dry-core (~> 1.0)
|
||||||
dry-initializer (~> 3.0, >= 3.0.1)
|
dry-initializer (~> 3.0, >= 3.0.1)
|
||||||
rom-core (~> 5.3, >= 5.3.0)
|
rom-core (~> 5.3, >= 5.3.0)
|
||||||
rom-sql (3.6.3)
|
rom-sql (3.6.4)
|
||||||
dry-core (~> 1.0)
|
dry-core (~> 1.0)
|
||||||
dry-types (~> 1.0)
|
dry-types (~> 1.0)
|
||||||
rom (~> 5.2, >= 5.2.1)
|
rom (~> 5.2, >= 5.2.1)
|
||||||
sequel (>= 4.49)
|
sequel (>= 4.49)
|
||||||
|
rouge (4.3.0)
|
||||||
rspec (3.13.0)
|
rspec (3.13.0)
|
||||||
rspec-core (~> 3.13.0)
|
rspec-core (~> 3.13.0)
|
||||||
rspec-expectations (~> 3.13.0)
|
rspec-expectations (~> 3.13.0)
|
||||||
rspec-mocks (~> 3.13.0)
|
rspec-mocks (~> 3.13.0)
|
||||||
rspec-core (3.13.0)
|
rspec-core (3.13.0)
|
||||||
rspec-support (~> 3.13.0)
|
rspec-support (~> 3.13.0)
|
||||||
rspec-expectations (3.13.0)
|
rspec-expectations (3.13.1)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.13.0)
|
rspec-support (~> 3.13.0)
|
||||||
rspec-mocks (3.13.1)
|
rspec-mocks (3.13.1)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.13.0)
|
rspec-support (~> 3.13.0)
|
||||||
rspec-support (3.13.1)
|
rspec-support (3.13.1)
|
||||||
rubocop (1.63.5)
|
rubocop (1.64.1)
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
language_server-protocol (>= 3.17.0)
|
language_server-protocol (>= 3.17.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
@@ -456,20 +475,21 @@ GEM
|
|||||||
unicode-display_width (>= 2.4.0, < 3.0)
|
unicode-display_width (>= 2.4.0, < 3.0)
|
||||||
rubocop-ast (1.31.3)
|
rubocop-ast (1.31.3)
|
||||||
parser (>= 3.3.1.0)
|
parser (>= 3.3.1.0)
|
||||||
rubocop-performance (1.21.0)
|
rubocop-performance (1.21.1)
|
||||||
rubocop (>= 1.48.1, < 2.0)
|
rubocop (>= 1.48.1, < 2.0)
|
||||||
rubocop-ast (>= 1.31.1, < 2.0)
|
rubocop-ast (>= 1.31.1, < 2.0)
|
||||||
ruby-progressbar (1.13.0)
|
ruby-progressbar (1.13.0)
|
||||||
ruby-readability (0.7.0)
|
ruby-readability (0.7.1)
|
||||||
guess_html_encoding (>= 0.0.4)
|
guess_html_encoding (>= 0.0.4)
|
||||||
nokogiri (>= 1.6.0)
|
nokogiri (>= 1.6.0)
|
||||||
ruby-vips (2.2.1)
|
ruby-vips (2.2.2)
|
||||||
ffi (~> 1.12)
|
ffi (~> 1.12)
|
||||||
|
logger
|
||||||
ruby2_keywords (0.0.5)
|
ruby2_keywords (0.0.5)
|
||||||
sanitize (6.1.0)
|
sanitize (6.1.2)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.12.0)
|
nokogiri (>= 1.12.0)
|
||||||
sequel (5.80.0)
|
sequel (5.83.0)
|
||||||
bigdecimal
|
bigdecimal
|
||||||
shellany (0.0.1)
|
shellany (0.0.1)
|
||||||
simple-rss (1.3.3)
|
simple-rss (1.3.3)
|
||||||
@@ -479,16 +499,15 @@ GEM
|
|||||||
snaky_hash (2.0.1)
|
snaky_hash (2.0.1)
|
||||||
hashie
|
hashie
|
||||||
version_gem (~> 1.1, >= 1.1.1)
|
version_gem (~> 1.1, >= 1.1.1)
|
||||||
sshkit (1.22.2)
|
sshkit (1.23.0)
|
||||||
base64
|
base64
|
||||||
mutex_m
|
|
||||||
net-scp (>= 1.1.2)
|
net-scp (>= 1.1.2)
|
||||||
net-sftp (>= 2.1.2)
|
net-sftp (>= 2.1.2)
|
||||||
net-ssh (>= 2.8.0)
|
net-ssh (>= 2.8.0)
|
||||||
standard (1.36.0)
|
standard (1.39.2)
|
||||||
language_server-protocol (~> 3.17.0.2)
|
language_server-protocol (~> 3.17.0.2)
|
||||||
lint_roller (~> 1.0)
|
lint_roller (~> 1.0)
|
||||||
rubocop (~> 1.63.0)
|
rubocop (~> 1.64.0)
|
||||||
standard-custom (~> 1.0.0)
|
standard-custom (~> 1.0.0)
|
||||||
standard-performance (~> 1.4)
|
standard-performance (~> 1.4)
|
||||||
standard-custom (1.0.2)
|
standard-custom (1.0.2)
|
||||||
@@ -501,13 +520,13 @@ GEM
|
|||||||
standard
|
standard
|
||||||
steam-api (1.2.0)
|
steam-api (1.2.0)
|
||||||
faraday (~> 1.0)
|
faraday (~> 1.0)
|
||||||
stringio (3.1.0)
|
stringio (3.1.1)
|
||||||
strscan (3.1.0)
|
strscan (3.1.0)
|
||||||
temple (0.10.3)
|
temple (0.10.3)
|
||||||
thor (1.3.1)
|
thor (1.3.1)
|
||||||
tilt (2.3.0)
|
tilt (2.4.0)
|
||||||
time_math2 (0.1.1)
|
time_math2 (0.1.1)
|
||||||
timecop (0.9.8)
|
timecop (0.9.10)
|
||||||
timeout (0.4.1)
|
timeout (0.4.1)
|
||||||
transproc (1.1.1)
|
transproc (1.1.1)
|
||||||
tzinfo (2.0.6)
|
tzinfo (2.0.6)
|
||||||
@@ -516,7 +535,7 @@ GEM
|
|||||||
unicode-emoji (3.4.0)
|
unicode-emoji (3.4.0)
|
||||||
unicode-version (~> 1.0)
|
unicode-version (~> 1.0)
|
||||||
unicode-version (1.4.0)
|
unicode-version (1.4.0)
|
||||||
vernier (1.0.1)
|
vernier (1.1.1)
|
||||||
version_gem (1.1.4)
|
version_gem (1.1.4)
|
||||||
warning (1.4.0)
|
warning (1.4.0)
|
||||||
whenever (1.0.0)
|
whenever (1.0.0)
|
||||||
@@ -527,7 +546,7 @@ GEM
|
|||||||
date
|
date
|
||||||
httparty
|
httparty
|
||||||
json (>= 2.0)
|
json (>= 2.0)
|
||||||
zeitwerk (2.6.15)
|
zeitwerk (2.6.17)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
arm64-darwin-23
|
arm64-darwin-23
|
||||||
@@ -553,20 +572,22 @@ DEPENDENCIES
|
|||||||
down
|
down
|
||||||
dry-matcher
|
dry-matcher
|
||||||
dry-monads
|
dry-monads
|
||||||
dry-types
|
dry-types (~> 1.0, >= 1.6.1)
|
||||||
ed25519
|
ed25519
|
||||||
georuby
|
georuby
|
||||||
gnuplot
|
gnuplot
|
||||||
gpx
|
gpx
|
||||||
guard-puma (~> 0.8)
|
guard-puma
|
||||||
hanami (= 2.1.0)
|
hanami (~> 2.2.0.beta)
|
||||||
hanami-assets (= 2.1.0)
|
hanami-assets (~> 2.2.0.beta)
|
||||||
hanami-controller (= 2.1.0)
|
hanami-controller (~> 2.2.0.beta)
|
||||||
hanami-reloader (~> 2.1.0.rc)
|
hanami-db (~> 2.2.0.beta)
|
||||||
hanami-router (= 2.1.0)
|
hanami-reloader (~> 2.2.0.beta)
|
||||||
|
hanami-router (~> 2.2.0.beta)
|
||||||
hanami-rspec (~> 2.1.0.rc)
|
hanami-rspec (~> 2.1.0.rc)
|
||||||
hanami-validations (= 2.1.0)
|
hanami-validations (~> 2.2.0.beta)
|
||||||
hanami-view (= 2.1.0)
|
hanami-view (~> 2.2.0.beta)
|
||||||
|
hanami-webconsole (~> 2.2.0.beta)
|
||||||
httparty
|
httparty
|
||||||
image_processing (~> 1.0)
|
image_processing (~> 1.0)
|
||||||
irb
|
irb
|
||||||
|
2
Rakefile
2
Rakefile
@@ -85,7 +85,7 @@ namespace :blog do
|
|||||||
require "hanami/prepare"
|
require "hanami/prepare"
|
||||||
require "que"
|
require "que"
|
||||||
|
|
||||||
Que.connection = Adamantium::Container["persistence.db"]
|
Que.connection = Adamantium::Container["db.gateway"].connection
|
||||||
Adamantium::Jobs::ArchiveDeletedWebmentions.enqueue
|
Adamantium::Jobs::ArchiveDeletedWebmentions.enqueue
|
||||||
end
|
end
|
||||||
|
|
||||||
|
10
app/db/relation.rb
Normal file
10
app/db/relation.rb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require "hanami/db/relation"
|
||||||
|
|
||||||
|
module Adamantium
|
||||||
|
module DB
|
||||||
|
class Relation < Hanami::DB::Relation
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
10
app/db/repo.rb
Normal file
10
app/db/repo.rb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require "hanami/db/repo"
|
||||||
|
|
||||||
|
module Adamantium
|
||||||
|
module DB
|
||||||
|
class Repo < Hanami::DB::Repo
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class AutoTaggings < ROM::Relation[:sql]
|
class AutoTaggings < Adamantium::DB::Relation
|
||||||
schema :auto_taggings, infer: true do
|
schema :auto_taggings, infer: true do
|
||||||
associations do
|
associations do
|
||||||
belongs_to :tag
|
belongs_to :tag
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class Highlights < ROM::Relation[:sql]
|
class Highlights < Adamantium::DB::Relation
|
||||||
schema :highlights, infer: true do
|
schema :highlights, infer: true do
|
||||||
associations do
|
associations do
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class LoginTokens < ROM::Relation[:sql]
|
class LoginTokens < Adamantium::DB::Relation
|
||||||
schema :login_tokens, infer: true
|
schema :login_tokens, infer: true
|
||||||
|
|
||||||
auto_struct(true)
|
auto_struct(true)
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class Movies < ROM::Relation[:sql]
|
class Movies < Adamantium::DB::Relation
|
||||||
schema :movies, infer: true
|
schema :movies, infer: true
|
||||||
|
|
||||||
auto_struct(true)
|
auto_struct(true)
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class Pages < ROM::Relation[:sql]
|
class Pages < Adamantium::DB::Relation
|
||||||
schema :pages, infer: true
|
schema :pages, infer: true
|
||||||
|
|
||||||
auto_struct(true)
|
auto_struct(true)
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class PodcastScrobbles < ROM::Relation[:sql]
|
class PodcastScrobbles < Adamantium::DB::Relation
|
||||||
schema :podcast_scrobbles, infer: true
|
schema :podcast_scrobbles, infer: true
|
||||||
|
|
||||||
auto_struct(true)
|
auto_struct(true)
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class Podcasts < ROM::Relation[:sql]
|
class Podcasts < Adamantium::DB::Relation
|
||||||
schema :podcasts, infer: true
|
schema :podcasts, infer: true
|
||||||
|
|
||||||
auto_struct(true)
|
auto_struct(true)
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class PostTags < ROM::Relation[:sql]
|
class PostTags < Adamantium::DB::Relation
|
||||||
schema :post_tags, infer: true do
|
schema :post_tags, infer: true do
|
||||||
associations do
|
associations do
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class PostTrips < ROM::Relation[:sql]
|
class PostTrips < Adamantium::DB::Relation
|
||||||
schema :post_trips, infer: true do
|
schema :post_trips, infer: true do
|
||||||
associations do
|
associations do
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class Posts < ROM::Relation[:sql]
|
class Posts < Adamantium::DB::Relation
|
||||||
schema :posts, infer: true do
|
schema :posts, infer: true do
|
||||||
associations do
|
associations do
|
||||||
has_many :post_tags
|
has_many :post_tags
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class Reactions < ROM::Relation[:sql]
|
class Reactions < Adamantium::DB::Relation
|
||||||
schema :reactions, infer: true do
|
schema :reactions, infer: true do
|
||||||
associations do
|
associations do
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class Tags < ROM::Relation[:sql]
|
class Tags < Adamantium::DB::Relation
|
||||||
schema :tags, infer: true do
|
schema :tags, infer: true do
|
||||||
associations do
|
associations do
|
||||||
has_many :post_tags
|
has_many :post_tags
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class TopTracks < ROM::Relation[:sql]
|
class TopTracks < Adamantium::DB::Relation
|
||||||
schema :top_tracks, infer: true
|
schema :top_tracks, infer: true
|
||||||
|
|
||||||
auto_struct(true)
|
auto_struct(true)
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class Trips < ROM::Relation[:sql]
|
class Trips < Adamantium::DB::Relation
|
||||||
schema :trips, infer: true do
|
schema :trips, infer: true do
|
||||||
associations do
|
associations do
|
||||||
has_many :post_trips
|
has_many :post_trips
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class Users < ROM::Relation[:sql]
|
class Users < Adamantium::DB::Relation
|
||||||
schema :users, infer: true
|
schema :users, infer: true
|
||||||
|
|
||||||
auto_struct(true)
|
auto_struct(true)
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class Webmentions < ROM::Relation[:sql]
|
class Webmentions < Adamantium::DB::Relation
|
||||||
schema :webmentions, infer: true do
|
schema :webmentions, infer: true do
|
||||||
associations do
|
associations do
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Relations
|
module Relations
|
||||||
class Workouts < ROM::Relation[:sql]
|
class Workouts < Adamantium::DB::Relation
|
||||||
schema :workouts, infer: true
|
schema :workouts, infer: true
|
||||||
|
|
||||||
auto_struct(true)
|
auto_struct(true)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Adamantium
|
module Adamantium
|
||||||
module Repos
|
module Repos
|
||||||
class PageRepo < Adamantium::Repo[:pages]
|
class PageRepo < Adamantium::DB::Repo[:pages]
|
||||||
def fetch!(slug:)
|
def fetch!(slug:)
|
||||||
pages
|
pages
|
||||||
.published
|
.published
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Adamantium
|
module Adamantium
|
||||||
module Repos
|
module Repos
|
||||||
class PodcastScrobbleRepo < Adamantium::Repo[:podcast_scrobbles]
|
class PodcastScrobbleRepo < Adamantium::DB::Repo[:podcast_scrobbles]
|
||||||
commands :create
|
commands :create
|
||||||
|
|
||||||
def exists?(id:)
|
def exists?(id:)
|
||||||
|
@@ -2,7 +2,7 @@ require "time_math"
|
|||||||
|
|
||||||
module Adamantium
|
module Adamantium
|
||||||
module Repos
|
module Repos
|
||||||
class PostRepo < Adamantium::Repo[:posts]
|
class PostRepo < Adamantium::DB::Repo[:posts]
|
||||||
def recent(limit:)
|
def recent(limit:)
|
||||||
date = Time.now
|
date = Time.now
|
||||||
|
|
||||||
|
@@ -29,6 +29,7 @@ module Adamantium
|
|||||||
"clients.blue_sky",
|
"clients.blue_sky",
|
||||||
"clients.mastodon",
|
"clients.mastodon",
|
||||||
"clients.steam",
|
"clients.steam",
|
||||||
|
"db.rom",
|
||||||
"geo.gpx_parser",
|
"geo.gpx_parser",
|
||||||
"param_parser.micropub_post",
|
"param_parser.micropub_post",
|
||||||
"param_parser.webmention",
|
"param_parser.webmention",
|
||||||
|
@@ -1,45 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
Hanami.app.register_provider :persistence, namespace: true do
|
|
||||||
prepare do
|
|
||||||
require "rom-changeset"
|
|
||||||
require "rom/core"
|
|
||||||
require "rom/sql"
|
|
||||||
|
|
||||||
# TODO(Hanami): As part of built-in rom setup, configure ROM with app inflector
|
|
||||||
silence_warnings { ROM::Inflector = Hanami.app["inflector"] }
|
|
||||||
|
|
||||||
rom_config = ROM::Configuration.new(:sql, target["settings"].database_url)
|
|
||||||
|
|
||||||
rom_config.plugin(:sql, relations: :instrumentation) do |plugin_config|
|
|
||||||
plugin_config.notifications = target["notifications"]
|
|
||||||
end
|
|
||||||
|
|
||||||
rom_config.plugin(:sql, relations: :auto_restrictions)
|
|
||||||
|
|
||||||
register "config", rom_config
|
|
||||||
register "db", rom_config.gateways[:default].connection
|
|
||||||
end
|
|
||||||
|
|
||||||
start do
|
|
||||||
rom_config = target["persistence.config"]
|
|
||||||
rom_config.auto_registration(
|
|
||||||
target.root.join("app"),
|
|
||||||
namespace: Hanami.app.namespace.to_s
|
|
||||||
)
|
|
||||||
|
|
||||||
register "rom", ROM.container(rom_config)
|
|
||||||
end
|
|
||||||
|
|
||||||
stop do
|
|
||||||
target["persistence.rom"].disconnect
|
|
||||||
end
|
|
||||||
|
|
||||||
define_method(:silence_warnings) do |&block|
|
|
||||||
orig_verbose = $VERBOSE
|
|
||||||
$VERBOSE = nil
|
|
||||||
result = block.call
|
|
||||||
$VERBOSE = orig_verbose
|
|
||||||
result
|
|
||||||
end
|
|
||||||
end
|
|
@@ -1,10 +0,0 @@
|
|||||||
# auto_register: false
|
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require "rom-repository"
|
|
||||||
|
|
||||||
module Adamantium
|
|
||||||
class Repo < ROM::Repository::Root
|
|
||||||
include Deps[container: "persistence.rom"]
|
|
||||||
end
|
|
||||||
end
|
|
@@ -5,7 +5,7 @@ module Admin
|
|||||||
module Bookmarks
|
module Bookmarks
|
||||||
class Clean < Action
|
class Clean < Action
|
||||||
def handle(req, res)
|
def handle(req, res)
|
||||||
Que.connection = Adamantium::Container["persistence.db"]
|
Que.connection = Adamantium::Container["db.gateway"].connection
|
||||||
|
|
||||||
res.status = 200
|
res.status = 200
|
||||||
if Que.job_stats.any? { |job| job[:job_class] == Adamantium::Jobs::ArchiveDeadBookmarks.name }
|
if Que.job_stats.any? { |job| job[:job_class] == Adamantium::Jobs::ArchiveDeadBookmarks.name }
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class AutoTaggingRepo < Adamantium::Repo[:auto_taggings]
|
class AutoTaggingRepo < Adamantium::DB::Repo[:auto_taggings]
|
||||||
commands :create
|
commands :create
|
||||||
|
|
||||||
def find(id)
|
def find(id)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class BookRepo < Adamantium::Repo[:posts]
|
class BookRepo < Adamantium::DB::Repo[:posts]
|
||||||
commands :create, update: :by_pk
|
commands :create, update: :by_pk
|
||||||
|
|
||||||
def list_all
|
def list_all
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class BookmarkRepo < Adamantium::Repo[:posts]
|
class BookmarkRepo < Adamantium::DB::Repo[:posts]
|
||||||
def list
|
def list
|
||||||
posts
|
posts
|
||||||
.where(post_type: "bookmark")
|
.where(post_type: "bookmark")
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class HighlightRepo < Adamantium::Repo[:highlights]
|
class HighlightRepo < Adamantium::DB::Repo[:highlights]
|
||||||
commands :create, delete: :by_pk
|
commands :create, delete: :by_pk
|
||||||
|
|
||||||
def list_all
|
def list_all
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class LoginTokensRepo < Adamantium::Repo[:login_tokens]
|
class LoginTokensRepo < Adamantium::DB::Repo[:login_tokens]
|
||||||
commands :create
|
commands :create
|
||||||
|
|
||||||
def by_token(token:)
|
def by_token(token:)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class MovieRepo < Adamantium::Repo[:movies]
|
class MovieRepo < Adamantium::DB::Repo[:movies]
|
||||||
commands :create
|
commands :create
|
||||||
|
|
||||||
def by_title_and_year(title:, year:)
|
def by_title_and_year(title:, year:)
|
||||||
|
@@ -2,7 +2,7 @@ require "time_math"
|
|||||||
|
|
||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class PageRepo < Adamantium::Repo[:pages]
|
class PageRepo < Adamantium::DB::Repo[:pages]
|
||||||
commands :create, update: :by_pk
|
commands :create, update: :by_pk
|
||||||
|
|
||||||
def list
|
def list
|
||||||
|
@@ -2,7 +2,7 @@ require "time_math"
|
|||||||
|
|
||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class PostRepo < Adamantium::Repo[:posts]
|
class PostRepo < Adamantium::DB::Repo[:posts]
|
||||||
commands update: :by_pk
|
commands update: :by_pk
|
||||||
|
|
||||||
def tag_post(post_id:, tags:)
|
def tag_post(post_id:, tags:)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class PostTagRepo < Adamantium::Repo[:post_tags]
|
class PostTagRepo < Adamantium::DB::Repo[:post_tags]
|
||||||
def merge_tags(target_id:, source_id:)
|
def merge_tags(target_id:, source_id:)
|
||||||
post_tags.where(tag_id: source_id).update(tag_id: target_id)
|
post_tags.where(tag_id: source_id).update(tag_id: target_id)
|
||||||
end
|
end
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class PostTripRepo < Adamantium::Repo[:post_trips]
|
class PostTripRepo < Adamantium::DB::Repo[:post_trips]
|
||||||
commands :create
|
commands :create
|
||||||
|
|
||||||
def remove(trip_id:, post_id:)
|
def remove(trip_id:, post_id:)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class TagRepo < Adamantium::Repo[:tags]
|
class TagRepo < Adamantium::DB::Repo[:tags]
|
||||||
def list
|
def list
|
||||||
tags
|
tags
|
||||||
.order(Sequel.function(:lower, :label))
|
.order(Sequel.function(:lower, :label))
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class TripRepo < Adamantium::Repo[:trips]
|
class TripRepo < Adamantium::DB::Repo[:trips]
|
||||||
commands :create
|
commands :create
|
||||||
|
|
||||||
def list
|
def list
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class UserRepo < Adamantium::Repo[:users]
|
class UserRepo < Adamantium::DB::Repo[:users]
|
||||||
commands :create
|
commands :create
|
||||||
|
|
||||||
def exists(id)
|
def exists(id)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Admin
|
module Admin
|
||||||
module Repos
|
module Repos
|
||||||
class WebmentionRepo < Adamantium::Repo[:webmentions]
|
class WebmentionRepo < Adamantium::DB::Repo[:webmentions]
|
||||||
commands update: :by_pk
|
commands update: :by_pk
|
||||||
|
|
||||||
def list_all_for_check
|
def list_all_for_check
|
||||||
|
@@ -19,7 +19,7 @@ module Admin
|
|||||||
end
|
end
|
||||||
|
|
||||||
expose :running_jobs do
|
expose :running_jobs do
|
||||||
Que.connection = Adamantium::Container["persistence.db"]
|
Que.connection = Adamantium::Container["db.gateway"].connection
|
||||||
Que.job_stats.any? { |job| job[:job_class] == Adamantium::Jobs::ArchiveDeadBookmarks.name }
|
Que.job_stats.any? { |job| job[:job_class] == Adamantium::Jobs::ArchiveDeadBookmarks.name }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Main
|
module Main
|
||||||
module Repos
|
module Repos
|
||||||
class MovieRepo < Adamantium::Repo[:movies]
|
class MovieRepo < Adamantium::DB::Repo[:movies]
|
||||||
def listing
|
def listing
|
||||||
movies.order(Sequel.lit("year desc")).to_a
|
movies.order(Sequel.lit("year desc")).to_a
|
||||||
end
|
end
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Main
|
module Main
|
||||||
module Repos
|
module Repos
|
||||||
class PageRepo < Adamantium::Repo[:pages]
|
class PageRepo < Adamantium::DB::Repo[:pages]
|
||||||
def fetch!(slug:)
|
def fetch!(slug:)
|
||||||
pages
|
pages
|
||||||
.published
|
.published
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Main
|
module Main
|
||||||
module Repos
|
module Repos
|
||||||
class PodcastRepo < Adamantium::Repo[:podcasts]
|
class PodcastRepo < Adamantium::DB::Repo[:podcasts]
|
||||||
def listing
|
def listing
|
||||||
podcasts.order(:name).to_a
|
podcasts.order(:name).to_a
|
||||||
end
|
end
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Main
|
module Main
|
||||||
module Repos
|
module Repos
|
||||||
class PodcastScrobbleRepo < Adamantium::Repo[:podcast_scrobbles]
|
class PodcastScrobbleRepo < Adamantium::DB::Repo[:podcast_scrobbles]
|
||||||
def exists?(id:)
|
def exists?(id:)
|
||||||
!!podcast_scrobbles
|
!!podcast_scrobbles
|
||||||
.where(overcast_id: id)
|
.where(overcast_id: id)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Main
|
module Main
|
||||||
module Repos
|
module Repos
|
||||||
class PostRepo < Adamantium::Repo[:posts]
|
class PostRepo < Adamantium::DB::Repo[:posts]
|
||||||
Sequel.extension :pg_json
|
Sequel.extension :pg_json
|
||||||
Sequel.extension :pg_json_ops
|
Sequel.extension :pg_json_ops
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Main
|
module Main
|
||||||
module Repos
|
module Repos
|
||||||
class PostTagRepo < Adamantium::Repo[:post_tags]
|
class PostTagRepo < Adamantium::DB::Repo[:post_tags]
|
||||||
def posts_tagged(tag:)
|
def posts_tagged(tag:)
|
||||||
tag_id = post_tags
|
tag_id = post_tags
|
||||||
.tags
|
.tags
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Main
|
module Main
|
||||||
module Repos
|
module Repos
|
||||||
class ReactionRepo < Adamantium::Repo[:reactions]
|
class ReactionRepo < Adamantium::DB::Repo[:reactions]
|
||||||
commands :create
|
commands :create
|
||||||
|
|
||||||
def count(post_id:)
|
def count(post_id:)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Main
|
module Main
|
||||||
module Repos
|
module Repos
|
||||||
class TagRepo < Adamantium::Repo[:tags]
|
class TagRepo < Adamantium::DB::Repo[:tags]
|
||||||
def fetch!(slug)
|
def fetch!(slug)
|
||||||
tags.where(slug: slug).one!
|
tags.where(slug: slug).one!
|
||||||
end
|
end
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Main
|
module Main
|
||||||
module Repos
|
module Repos
|
||||||
class TopTrackRepo < Adamantium::Repo[:top_tracks]
|
class TopTrackRepo < Adamantium::DB::Repo[:top_tracks]
|
||||||
def for_post(id:)
|
def for_post(id:)
|
||||||
top_tracks
|
top_tracks
|
||||||
.where(post_id: id)
|
.where(post_id: id)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Main
|
module Main
|
||||||
module Repos
|
module Repos
|
||||||
class TripRepo < Adamantium::Repo[:trips]
|
class TripRepo < Adamantium::DB::Repo[:trips]
|
||||||
def fetch!(id)
|
def fetch!(id)
|
||||||
trips
|
trips
|
||||||
.where(id: id)
|
.where(id: id)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Main
|
module Main
|
||||||
module Repos
|
module Repos
|
||||||
class WorkoutRepo < Adamantium::Repo[:workouts]
|
class WorkoutRepo < Adamantium::DB::Repo[:workouts]
|
||||||
def list
|
def list
|
||||||
workouts.order(:published_at).to_a
|
workouts.order(:published_at).to_a
|
||||||
end
|
end
|
||||||
|
@@ -8,7 +8,7 @@ module Micropub
|
|||||||
include Deps["settings", "post_utilities.link_finder"]
|
include Deps["settings", "post_utilities.link_finder"]
|
||||||
|
|
||||||
def call(post_content:, post_url:, in_reply_to:)
|
def call(post_content:, post_url:, in_reply_to:)
|
||||||
Que.connection = Adamantium::Container["persistence.db"]
|
Que.connection = Adamantium::Container["db.gateway"].connection
|
||||||
|
|
||||||
Adamantium::Jobs::SendWebMentions.enqueue(post_content: post_content, post_url: post_url, in_reply_to: in_reply_to)
|
Adamantium::Jobs::SendWebMentions.enqueue(post_content: post_content, post_url: post_url, in_reply_to: in_reply_to)
|
||||||
end
|
end
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Micropub
|
module Micropub
|
||||||
module Repos
|
module Repos
|
||||||
class AutoTaggingRepo < Adamantium::Repo[:auto_taggings]
|
class AutoTaggingRepo < Adamantium::DB::Repo[:auto_taggings]
|
||||||
def find(id)
|
def find(id)
|
||||||
auto_taggings
|
auto_taggings
|
||||||
.where(id: id)
|
.where(id: id)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Micropub
|
module Micropub
|
||||||
module Repos
|
module Repos
|
||||||
class MovieRepo < Adamantium::Repo[:movies]
|
class MovieRepo < Adamantium::DB::Repo[:movies]
|
||||||
commands :create
|
commands :create
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Micropub
|
module Micropub
|
||||||
module Repos
|
module Repos
|
||||||
class PodcastRepo < Adamantium::Repo[:podcasts]
|
class PodcastRepo < Adamantium::DB::Repo[:podcasts]
|
||||||
commands :create
|
commands :create
|
||||||
|
|
||||||
def listing
|
def listing
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Micropub
|
module Micropub
|
||||||
module Repos
|
module Repos
|
||||||
class PostRepo < Adamantium::Repo[:posts]
|
class PostRepo < Adamantium::DB::Repo[:posts]
|
||||||
commands update: :by_pk
|
commands update: :by_pk
|
||||||
|
|
||||||
def remove_tag(post_id:, tag:)
|
def remove_tag(post_id:, tag:)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Micropub
|
module Micropub
|
||||||
module Repos
|
module Repos
|
||||||
class WebmentionsRepo < Adamantium::Repo[:webmentions]
|
class WebmentionsRepo < Adamantium::DB::Repo[:webmentions]
|
||||||
commands :create
|
commands :create
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
module Micropub
|
module Micropub
|
||||||
module Repos
|
module Repos
|
||||||
class WorkoutRepo < Adamantium::Repo[:workouts]
|
class WorkoutRepo < Adamantium::DB::Repo[:workouts]
|
||||||
commands :create, update: :by_pk
|
commands :create, update: :by_pk
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
RSpec.describe "Webmention creation", :db, :requests do
|
RSpec.describe "Webmention creation", :db, :requests do
|
||||||
let(:post_repo) { Adamantium::Repos::PostRepo.new }
|
let(:post_repo) { Adamantium::DB::Repos::PostRepo.new }
|
||||||
let(:post_record) { Test::Factory[:post] }
|
let(:post_record) { Test::Factory[:post] }
|
||||||
|
|
||||||
context "reply" do
|
context "reply" do
|
||||||
|
@@ -6,10 +6,6 @@ require_relative "db/database_cleaner"
|
|||||||
require_relative "db/factory"
|
require_relative "db/factory"
|
||||||
|
|
||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
config.before :suite do
|
|
||||||
Hanami.app.start :persistence
|
|
||||||
end
|
|
||||||
|
|
||||||
config.include Test::DB::Helpers, :db
|
config.include Test::DB::Helpers, :db
|
||||||
|
|
||||||
config.include(Test::DB::FactoryHelper.new, factory: nil)
|
config.include(Test::DB::FactoryHelper.new, factory: nil)
|
||||||
|
@@ -8,11 +8,11 @@ module Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
def rom
|
def rom
|
||||||
Hanami.app["persistence.rom"]
|
Hanami.app["db.rom"]
|
||||||
end
|
end
|
||||||
|
|
||||||
def db
|
def db
|
||||||
Hanami.app["persistence.db"]
|
Hanami.app["db.gateway"].connection
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user