From 57b9eb3e79c3956eec9810ffcd4872de794a4a12 Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Wed, 22 Jan 2025 22:43:22 +0900 Subject: [PATCH] Make work with modern ruby --- .ruby-version | 2 +- map/Gemfile | 3 ++- map/Gemfile.lock | 14 +++++--------- map/server.rb | 5 ++++- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.ruby-version b/.ruby-version index 57cf282..2c6109e 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.5 +3.3.4 \ No newline at end of file diff --git a/map/Gemfile b/map/Gemfile index 23ac7af..911d346 100644 --- a/map/Gemfile +++ b/map/Gemfile @@ -3,4 +3,5 @@ source "https://rubygems.org" gem 'sinatra' gem 'sinatra-contrib' -gem 'pry' +gem 'base64' +gem 'webrick' diff --git a/map/Gemfile.lock b/map/Gemfile.lock index 48e7d13..be89864 100644 --- a/map/Gemfile.lock +++ b/map/Gemfile.lock @@ -1,15 +1,10 @@ GEM remote: https://rubygems.org/ specs: - coderay (1.1.1) - method_source (0.8.2) + base64 (0.2.0) multi_json (1.15.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) - pry (0.10.4) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) rack (2.2.3) rack-protection (2.2.0) rack @@ -25,16 +20,17 @@ GEM rack-protection (= 2.2.0) sinatra (= 2.2.0) tilt (~> 2.0) - slop (3.6.0) tilt (2.0.10) + webrick (1.8.1) PLATFORMS ruby DEPENDENCIES - pry + base64 sinatra sinatra-contrib + webrick BUNDLED WITH - 1.17.2 + 2.5.11 diff --git a/map/server.rb b/map/server.rb index 51e7efd..883bfdd 100644 --- a/map/server.rb +++ b/map/server.rb @@ -1,13 +1,14 @@ require "bundler/setup" require "sinatra" require "sinatra/json" -require "pry" require "json" require "yaml" require "erb" require_relative './helpers' +set :public_folder, 'public' + get "/" do send_file "public/admin.html" end @@ -38,3 +39,5 @@ status 200 end + +Sinatra::Application.run! \ No newline at end of file