From bc2d8c3f62bb66dc8fbe2a31ad1abf811cc64358 Mon Sep 17 00:00:00 2001 From: radex Date: Tue, 30 Jan 2024 23:42:10 +0100 Subject: [PATCH] clean up old junk --- Gemfile | 3 --- Gemfile.lock | 13 ------------- main.rb | 14 -------------- 3 files changed, 30 deletions(-) diff --git a/Gemfile b/Gemfile index 111df68..801d433 100644 --- a/Gemfile +++ b/Gemfile @@ -2,9 +2,6 @@ source 'https://rubygems.org' gem 'prawn' gem 'prawn-qrcode', :git => 'https://github.com/jabbrwcky/prawn-qrcode' -gem 'prawn-svg' gem 'sinatra' -gem 'color' gem 'excon' -gem 'rmagick' gem 'json' diff --git a/Gemfile.lock b/Gemfile.lock index 3d5400b..7420edd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,12 +9,7 @@ GIT GEM remote: https://rubygems.org/ specs: - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) chunky_png (1.3.11) - color (1.8) - css_parser (1.7.1) - addressable excon (0.73.0) json (2.3.0) mustermann (1.1.1) @@ -23,14 +18,9 @@ GEM prawn (2.2.2) pdf-core (~> 0.7.0) ttfunk (~> 1.5) - prawn-svg (0.30.0) - css_parser (~> 1.6) - prawn (>= 0.11.1, < 3) - public_suffix (4.0.5) rack (2.2.2) rack-protection (2.0.8.1) rack - rmagick (4.1.2) rqrcode (1.1.2) chunky_png (~> 1.0) rqrcode_core (~> 0.1) @@ -48,13 +38,10 @@ PLATFORMS ruby DEPENDENCIES - color excon json prawn prawn-qrcode! - prawn-svg - rmagick sinatra BUNDLED WITH diff --git a/main.rb b/main.rb index b2b13fc..0a39e5f 100644 --- a/main.rb +++ b/main.rb @@ -1,15 +1,10 @@ require 'rubygems' require 'sinatra' -require 'rqrcode' require 'prawn' require 'prawn/measurements' require 'prawn/qrcode' -require 'prawn-svg' -require 'color' require 'excon' -require 'rmagick' require 'json' -require 'zlib' require 'shellwords' include Prawn::Measurements @@ -83,15 +78,6 @@ get '/api/1/preview/:id.pdf' do render_label params["id"] end -get '/api/1/preview/:id.png' do - headers["Content-Type"] = "image/png" - img = Magick::ImageList.new() - img = img.from_blob(render_label(params["id"])){ self.density = 200 }.first - img.format = 'png' - img.background_color = 'white' - img.to_blob -end - post '/api/1/print/:id' do temp = Tempfile.new('labelmaker') temp.write(render_label(params["id"]))