capistrano-twingly 4.0.4 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +3 -3
- data/CHANGELOG.md +10 -0
- data/capistrano-twingly.gemspec +1 -1
- data/lib/capistrano/twingly/tasks/servers_from_srv_record.rake +16 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afd47e4da563c1ea3af2ba4cedfe12d6a00a3b41f97c86f677b39c8e74f73e32
|
4
|
+
data.tar.gz: 59b39f7f78d66d8ff2fdd97bc9c45558c0be8c2f15828d919d69ff105d33ed77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b73b92f74a51106df9d265027585c633ea577b85eac876f2465f9f20fd3de2d9084f634b1ff902207b7f6b68d807e57a02e3d91b59f996e3d969e621e990c4b
|
7
|
+
data.tar.gz: c5fa361fb1b561791060a843055005e8cd26afd85836a6ec9738167d11801223296152cd53115f8bce6c1b39af9f496f9936c24244b5e9cdf4637fdc51dc23fa
|
data/.github/workflows/ci.yml
CHANGED
@@ -6,15 +6,15 @@ on:
|
|
6
6
|
|
7
7
|
jobs:
|
8
8
|
build:
|
9
|
-
runs-on: ubuntu-
|
9
|
+
runs-on: ubuntu-22.04
|
10
10
|
|
11
11
|
strategy:
|
12
12
|
matrix:
|
13
|
-
ruby: [2.7.
|
13
|
+
ruby: [2.7.6, 3.0.4, 3.1.2]
|
14
14
|
|
15
15
|
steps:
|
16
16
|
- name: Checkout Code
|
17
|
-
uses: actions/checkout@
|
17
|
+
uses: actions/checkout@v3
|
18
18
|
|
19
19
|
- name: Setup Ruby ${{ matrix.ruby }}
|
20
20
|
uses: ruby/setup-ruby@v1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v4.0.4](https://github.com/twingly/capistrano-twingly/tree/v4.0.4) (2022-06-28)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/twingly/capistrano-twingly/compare/v4.0.3...v4.0.4)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Use net-ssh ~\> 7.0 [\#66](https://github.com/twingly/capistrano-twingly/pull/66) ([Pontus4](https://github.com/Pontus4))
|
10
|
+
- Run CI on latest Rubies [\#64](https://github.com/twingly/capistrano-twingly/pull/64) ([walro](https://github.com/walro))
|
11
|
+
- Ruby 3.0.0 on CI [\#62](https://github.com/twingly/capistrano-twingly/pull/62) ([walro](https://github.com/walro))
|
12
|
+
|
3
13
|
## [v4.0.3](https://github.com/twingly/capistrano-twingly/tree/v4.0.3) (2021-01-14)
|
4
14
|
|
5
15
|
[Full Changelog](https://github.com/twingly/capistrano-twingly/compare/v4.0.2...v4.0.3)
|
data/capistrano-twingly.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "capistrano-twingly"
|
7
|
-
spec.version = '4.0
|
7
|
+
spec.version = '4.1.0'
|
8
8
|
spec.authors = ["Twingly AB"]
|
9
9
|
spec.email = ["support@twingly.com"]
|
10
10
|
spec.summary = %q{Capistrano 3 tasks used for Twingly's Ruby deployment}
|
@@ -3,14 +3,25 @@ require 'resolv'
|
|
3
3
|
SRV_RECORDS = %w[
|
4
4
|
_rubyapps._tcp.sth.twingly.network
|
5
5
|
]
|
6
|
+
FALLBACK_DNS_SERVER = "gateway.sth.twingly.network"
|
6
7
|
|
7
|
-
resolver
|
8
|
+
def lookup_srv_records(resolver: Resolv::DNS.new)
|
9
|
+
SRV_RECORDS.map do |srv_record|
|
10
|
+
resolver.getresources(srv_record, Resolv::DNS::Resource::IN::SRV)
|
11
|
+
end.flatten.map(&:target).map(&:to_s)
|
12
|
+
end
|
13
|
+
|
14
|
+
servers = lookup_srv_records
|
8
15
|
|
9
|
-
|
10
|
-
|
11
|
-
|
16
|
+
# Query datacenter gateway directly if local DNS server is unable to find the SRV records
|
17
|
+
if servers.empty?
|
18
|
+
datacenter_dns_server_address = Resolv.getaddress(FALLBACK_DNS_SERVER)
|
12
19
|
|
13
|
-
|
20
|
+
resolver = Resolv::DNS.new(nameserver: datacenter_dns_server_address)
|
21
|
+
servers = lookup_srv_records(resolver: resolver)
|
22
|
+
|
23
|
+
raise "Can't find any servers, no records for #{SRV_RECORDS}" if servers.empty?
|
24
|
+
end
|
14
25
|
|
15
26
|
set :servers_from_srv_record, servers
|
16
27
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-twingly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twingly AB
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|