mirror of
https://github.com/cmur2/dyndnsd.git
synced 2025-08-08 08:33:56 +02:00
Compare commits
3 Commits
dyndnsd-2.
...
v3.0.0
Author | SHA1 | Date | |
---|---|---|---|
af102f23ec | |||
![]() |
950c985ad1 | ||
b2d9b7745f |
@@ -1,5 +1,6 @@
|
|||||||
AllCops:
|
AllCops:
|
||||||
TargetRubyVersion: '2.3'
|
TargetRubyVersion: '2.5'
|
||||||
|
NewCops: enable
|
||||||
|
|
||||||
Layout/EmptyLineAfterGuardClause:
|
Layout/EmptyLineAfterGuardClause:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
@@ -5,8 +5,6 @@ rvm:
|
|||||||
- 2.7
|
- 2.7
|
||||||
- 2.6
|
- 2.6
|
||||||
- 2.5
|
- 2.5
|
||||||
- 2.4
|
|
||||||
- 2.3
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- bundle exec rake travis
|
- bundle exec rake travis
|
||||||
|
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# 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)
|
## 2.3.1 (July 27, 2020)
|
||||||
|
|
||||||
IMPROVEMENTS:
|
IMPROVEMENTS:
|
||||||
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
|||||||
s.executables = ['dyndnsd']
|
s.executables = ['dyndnsd']
|
||||||
s.extra_rdoc_files = Dir['README.md', 'CHANGELOG.md', 'LICENSE']
|
s.extra_rdoc_files = Dir['README.md', 'CHANGELOG.md', 'LICENSE']
|
||||||
|
|
||||||
s.required_ruby_version = '>= 2.3'
|
s.required_ruby_version = '>= 2.5'
|
||||||
|
|
||||||
s.add_runtime_dependency 'async-dns', '~> 1.2.0'
|
s.add_runtime_dependency 'async-dns', '~> 1.2.0'
|
||||||
s.add_runtime_dependency 'jaeger-client', '~> 0.10.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 'rack-test'
|
||||||
s.add_development_dependency 'rake'
|
s.add_development_dependency 'rake'
|
||||||
s.add_development_dependency 'rspec'
|
s.add_development_dependency 'rspec'
|
||||||
s.add_development_dependency 'rubocop', '~> 0.81.0'
|
s.add_development_dependency 'rubocop', '~> 0.88.0'
|
||||||
s.add_development_dependency 'solargraph'
|
s.add_development_dependency 'solargraph'
|
||||||
end
|
end
|
||||||
|
@@ -27,9 +27,10 @@ module Dyndnsd
|
|||||||
# @param body [Array{String}]
|
# @param body [Array{String}]
|
||||||
# @return [Array{Integer,Hash{String => String},Array{String}}]
|
# @return [Array{Integer,Hash{String => String},Array{String}}]
|
||||||
def decorate_dyndnsd_response(status_code, headers, body)
|
def decorate_dyndnsd_response(status_code, headers, body)
|
||||||
if status_code == 200
|
case status_code
|
||||||
|
when 200
|
||||||
[200, {'Content-Type' => 'text/plain'}, [get_success_body(body[0], body[1])]]
|
[200, {'Content-Type' => 'text/plain'}, [get_success_body(body[0], body[1])]]
|
||||||
elsif status_code == 422
|
when 422
|
||||||
error_response_map[headers['X-DynDNS-Response']]
|
error_response_map[headers['X-DynDNS-Response']]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -39,9 +40,10 @@ module Dyndnsd
|
|||||||
# @param _body [Array{String}]
|
# @param _body [Array{String}]
|
||||||
# @return [Array{Integer,Hash{String => String},Array{String}}]
|
# @return [Array{Integer,Hash{String => String},Array{String}}]
|
||||||
def decorate_other_response(status_code, headers, _body)
|
def decorate_other_response(status_code, headers, _body)
|
||||||
if status_code == 400
|
case status_code
|
||||||
|
when 400
|
||||||
[status_code, headers, ['Bad Request']]
|
[status_code, headers, ['Bad Request']]
|
||||||
elsif status_code == 401
|
when 401
|
||||||
[status_code, headers, ['badauth']]
|
[status_code, headers, ['badauth']]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -27,9 +27,10 @@ module Dyndnsd
|
|||||||
# @param body [Array{String}]
|
# @param body [Array{String}]
|
||||||
# @return [Array{Integer,Hash{String => String},Array{String}}]
|
# @return [Array{Integer,Hash{String => String},Array{String}}]
|
||||||
def decorate_dyndnsd_response(status_code, headers, body)
|
def decorate_dyndnsd_response(status_code, headers, body)
|
||||||
if status_code == 200
|
case status_code
|
||||||
|
when 200
|
||||||
[200, {'Content-Type' => 'text/plain'}, [get_success_body(body[0], body[1])]]
|
[200, {'Content-Type' => 'text/plain'}, [get_success_body(body[0], body[1])]]
|
||||||
elsif status_code == 422
|
when 422
|
||||||
error_response_map[headers['X-DynDNS-Response']]
|
error_response_map[headers['X-DynDNS-Response']]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -39,9 +40,10 @@ module Dyndnsd
|
|||||||
# @param _body [Array{String}]
|
# @param _body [Array{String}]
|
||||||
# @return [Array{Integer,Hash{String => String},Array{String}}]
|
# @return [Array{Integer,Hash{String => String},Array{String}}]
|
||||||
def decorate_other_response(status_code, headers, _body)
|
def decorate_other_response(status_code, headers, _body)
|
||||||
if status_code == 400
|
case status_code
|
||||||
|
when 400
|
||||||
[status_code, headers, ['Bad Request']]
|
[status_code, headers, ['Bad Request']]
|
||||||
elsif status_code == 401
|
when 401
|
||||||
[status_code, headers, ['Unauthorized']]
|
[status_code, headers, ['Unauthorized']]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -28,11 +28,9 @@ module Dyndnsd
|
|||||||
sleep @interval
|
sleep @interval
|
||||||
|
|
||||||
Thread.new do
|
Thread.new do
|
||||||
begin
|
write
|
||||||
write
|
rescue StandardError => e
|
||||||
rescue StandardError => e
|
@on_error[e] rescue nil
|
||||||
@on_error[e] rescue nil
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Dyndnsd
|
module Dyndnsd
|
||||||
VERSION = '2.3.1'
|
VERSION = '3.0.0'
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user