Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,47 @@ GEM
base64 (0.3.0)
bigdecimal (4.1.3)
concurrent-ruby (1.3.8)
connection_pool (3.0.2)
connection_pool (3.0.3)
drb (2.2.3)
i18n (1.15.2)
concurrent-ruby (~> 1.0)
json (3.1.0)
json (3.2.0)
language_server-protocol (3.17.0.6)
lint_roller (1.1.0)
logger (1.7.0)
minitest (6.1.0)
drb (~> 2.0)
prism (>= 1.5, < 3)
parallel (2.3.0)
parser (3.3.13.0)
parser (3.3.14.0)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
prism (1.9.0)
prism (2.1.0)
racc (1.8.1)
rack (3.2.8)
rack (3.2.9)
rainbow (3.1.1)
regexp_parser (2.13.1)
rubocop (1.92.2)
regexp_parser (2.13.4)
rubocop (1.93.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.11.3, < 3.0)
rubocop-ast (>= 1.49.0, < 2.0)
rubocop-ast (>= 1.54.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.50.0)
rubocop-ast (1.54.0)
ast (~> 2.4)
parser (>= 3.3.7.2)
prism (~> 1.7)
prism (>= 1.7)
racc
rubocop-capybara (3.1.0)
lint_roller (~> 1.1)
rubocop (~> 1.89)
rubocop-discourse (4.0.0)
rubocop-discourse (4.1.0)
activesupport (>= 6.1)
lint_roller (>= 1.1.0)
rubocop (>= 1.82.0)
Expand All @@ -77,10 +79,9 @@ GEM
rack (>= 1.1)
rubocop (>= 1.89.0, < 2.0)
rubocop-ast (>= 1.44.0, < 2.0)
rubocop-rspec (3.10.2)
rubocop-rspec (3.11.0)
lint_roller (~> 1.1)
regexp_parser (>= 2.0)
rubocop (~> 1.86, >= 1.86.2)
rubocop (~> 1.92)
rubocop-rspec_rails (2.33.0)
lint_roller (~> 1.1)
rubocop (~> 1.89)
Expand Down
22 changes: 14 additions & 8 deletions lib/discourse_disteleplus/telegram_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,13 @@ def download_file(file_id, max_bytes:)
uri = URI("#{BASE}/file/bot#{@token}/#{file_path}")
tempfile = Tempfile.new(["disteleplus", File.extname(file_path)], binmode: true)

Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
http.open_timeout = OPEN_TIMEOUT
http.read_timeout = READ_TIMEOUT
Net::HTTP.start(
uri.host,
uri.port,
use_ssl: true,
open_timeout: OPEN_TIMEOUT,
read_timeout: READ_TIMEOUT,
) do |http|
http.request(Net::HTTP::Get.new(uri.request_uri)) do |response|
raise "unexpected #{response.code}" unless response.code.to_i == 200
response.read_body do |chunk|
Expand All @@ -96,11 +100,13 @@ def download_file(file_id, max_bytes:)
private

def perform(uri, request)
Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
http.open_timeout = OPEN_TIMEOUT
http.read_timeout = READ_TIMEOUT
http.request(request)
end
Net::HTTP.start(
uri.host,
uri.port,
use_ssl: true,
open_timeout: OPEN_TIMEOUT,
read_timeout: READ_TIMEOUT,
) { |http| http.request(request) }
end

def parse_response(response)
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"private": true,
"devDependencies": {
"@discourse/lint-configs": "3.9.1",
"@glint/ember-tsc": "1.14.3",
"@types/node": "^26.6.6",
"concurrently": "^10.0.6",
"@discourse/lint-configs": "3.12.0",
"@glint/ember-tsc": "1.14.4",
"@types/node": "^26.6.11",
"concurrently": "^10.0.7",
"discourse": "npm:@discourse/types@2026.10.0-a5125163",
"esbuild": "0.28.2",
"eslint": "10.6.0",
"espree": "11.2.0",
"jiti": "^2.7.0",
"lucide-static": "1.69.0",
"playwright-core": "1.65.0",
"postcss": "8.5.32",
"lucide-static": "1.83.0",
"playwright-core": "1.65.1",
"postcss": "8.5.34",
"prettier": "3.8.1",
"sass": "1.107.1",
"sass": "1.108.2",
"sharp": "0.35.5",
"stylelint": "17.5.0",
"typescript": "5.9.3"
Expand Down
Loading
Loading