1
0
mirror of https://github.com/cmur2/dyndnsd.git synced 2025-08-08 08:33:56 +02:00

Compare commits

..

1 Commits

Author SHA1 Message Date
cn
3f150ad065 docs: add link to newer version 2020-07-28 17:33:27 +02:00
9 changed files with 21 additions and 27 deletions

View File

@@ -1,6 +1,5 @@
AllCops:
TargetRubyVersion: '2.5'
NewCops: enable
TargetRubyVersion: '2.3'
Layout/EmptyLineAfterGuardClause:
Enabled: false

View File

@@ -5,6 +5,8 @@ rvm:
- 2.7
- 2.6
- 2.5
- 2.4
- 2.3
script:
- bundle exec rake travis

View File

@@ -1,11 +1,5 @@
# Changelog
## 3.0.0 (July 29, 2020)
IMPROVEMENTS:
- Drop EOL Ruby 2.4 and lower support, now minimum version supported is Ruby 2.5
## 2.3.1 (July 27, 2020)
IMPROVEMENTS:

View File

@@ -1,9 +1,10 @@
# dyndnsd.rb
[![Build Status](https://travis-ci.org/cmur2/dyndnsd.svg?branch=master)](https://travis-ci.org/cmur2/dyndnsd) [![Dependencies](https://badges.depfu.com/badges/4f25da8493f7a29f652ac892fbf9227b/overview.svg)](https://depfu.com/github/cmur2/dyndnsd)
[![Build Status](https://travis-ci.org/cmur2/dyndnsd.svg?branch=dyndnsd-2.x)](https://travis-ci.org/cmur2/dyndnsd) [![Dependencies](https://badges.depfu.com/badges/4f25da8493f7a29f652ac892fbf9227b/overview.svg)](https://depfu.com/github/cmur2/dyndnsd)
A small, lightweight and extensible DynDNS server written with Ruby and Rack.
**Note:** a newer version of dyndnsd.rb is available on [branch master](https://github.com/cmur2/dyndnsd), see also the [changelog](https://github.com/cmur2/dyndnsd/blob/master/CHANGELOG.md).
## Description

View File

@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
s.executables = ['dyndnsd']
s.extra_rdoc_files = Dir['README.md', 'CHANGELOG.md', 'LICENSE']
s.required_ruby_version = '>= 2.5'
s.required_ruby_version = '>= 2.3'
s.add_runtime_dependency 'async-dns', '~> 1.2.0'
s.add_runtime_dependency 'jaeger-client', '~> 0.10.0'
@@ -39,6 +39,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rack-test'
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec'
s.add_development_dependency 'rubocop', '~> 0.88.0'
s.add_development_dependency 'rubocop', '~> 0.81.0'
s.add_development_dependency 'solargraph'
end

View File

@@ -27,10 +27,9 @@ module Dyndnsd
# @param body [Array{String}]
# @return [Array{Integer,Hash{String => String},Array{String}}]
def decorate_dyndnsd_response(status_code, headers, body)
case status_code
when 200
if status_code == 200
[200, {'Content-Type' => 'text/plain'}, [get_success_body(body[0], body[1])]]
when 422
elsif status_code == 422
error_response_map[headers['X-DynDNS-Response']]
end
end
@@ -40,10 +39,9 @@ module Dyndnsd
# @param _body [Array{String}]
# @return [Array{Integer,Hash{String => String},Array{String}}]
def decorate_other_response(status_code, headers, _body)
case status_code
when 400
if status_code == 400
[status_code, headers, ['Bad Request']]
when 401
elsif status_code == 401
[status_code, headers, ['badauth']]
end
end

View File

@@ -27,10 +27,9 @@ module Dyndnsd
# @param body [Array{String}]
# @return [Array{Integer,Hash{String => String},Array{String}}]
def decorate_dyndnsd_response(status_code, headers, body)
case status_code
when 200
if status_code == 200
[200, {'Content-Type' => 'text/plain'}, [get_success_body(body[0], body[1])]]
when 422
elsif status_code == 422
error_response_map[headers['X-DynDNS-Response']]
end
end
@@ -40,10 +39,9 @@ module Dyndnsd
# @param _body [Array{String}]
# @return [Array{Integer,Hash{String => String},Array{String}}]
def decorate_other_response(status_code, headers, _body)
case status_code
when 400
if status_code == 400
[status_code, headers, ['Bad Request']]
when 401
elsif status_code == 401
[status_code, headers, ['Unauthorized']]
end
end

View File

@@ -28,9 +28,11 @@ module Dyndnsd
sleep @interval
Thread.new do
write
rescue StandardError => e
@on_error[e] rescue nil
begin
write
rescue StandardError => e
@on_error[e] rescue nil
end
end
end
end

View File

@@ -1,5 +1,5 @@
# frozen_string_literal: true
module Dyndnsd
VERSION = '3.0.0'
VERSION = '2.3.1'
end