capistrano-twingly 4.0.3 → 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 +23 -0
- data/README.md +2 -2
- data/capistrano-twingly.gemspec +2 -2
- data/lib/capistrano/twingly/tasks/servers_from_srv_record.rake +16 -5
- metadata +5 -5
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,28 @@
|
|
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
|
+
|
13
|
+
## [v4.0.3](https://github.com/twingly/capistrano-twingly/tree/v4.0.3) (2021-01-14)
|
14
|
+
|
15
|
+
[Full Changelog](https://github.com/twingly/capistrano-twingly/compare/v4.0.2...v4.0.3)
|
16
|
+
|
17
|
+
**Implemented enhancements:**
|
18
|
+
|
19
|
+
- Deprecation warnings from capistrano-bundler [\#61](https://github.com/twingly/capistrano-twingly/issues/61)
|
20
|
+
|
21
|
+
**Merged pull requests:**
|
22
|
+
|
23
|
+
- Explicitly use the git plugin [\#60](https://github.com/twingly/capistrano-twingly/pull/60) ([walro](https://github.com/walro))
|
24
|
+
- Trigger CI on pull-request events [\#59](https://github.com/twingly/capistrano-twingly/pull/59) ([walro](https://github.com/walro))
|
25
|
+
|
3
26
|
## [v4.0.2](https://github.com/twingly/capistrano-twingly/tree/v4.0.2) (2020-11-24)
|
4
27
|
|
5
28
|
[Full Changelog](https://github.com/twingly/capistrano-twingly/compare/v4.0.1...v4.0.2)
|
data/README.md
CHANGED
@@ -131,9 +131,9 @@ end
|
|
131
131
|
|
132
132
|
bundle exec rake release
|
133
133
|
|
134
|
-
* Update the changelog with [GitHub Changelog Generator](https://github.com/
|
134
|
+
* Update the changelog with [GitHub Changelog Generator](https://github.com/github-changelog-generator/github-changelog-generator) (`gem install github_changelog_generator` if you don't have it, set `CHANGELOG_GITHUB_TOKEN` to a personal access token to avoid rate limiting by GitHub). This command will update `CHANGELOG.md`. You need to commit and push manually.
|
135
135
|
|
136
|
-
github_changelog_generator
|
136
|
+
github_changelog_generator -u twingly -p capistrano-twingly
|
137
137
|
|
138
138
|
## Note about `CHANGELOG.md`
|
139
139
|
|
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}
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency "capistrano-bundler", "~> 2.0"
|
22
22
|
spec.add_dependency "capistrano-chruby", "0.1.2"
|
23
23
|
spec.add_dependency "foreman", "~> 0.82"
|
24
|
-
spec.add_dependency "net-ssh", "~>
|
24
|
+
spec.add_dependency "net-ssh", "~> 7.0"
|
25
25
|
spec.add_dependency "ed25519", ">= 1.2", "< 1.3"
|
26
26
|
spec.add_dependency "bcrypt_pbkdf", ">= 1.0", "< 2.0"
|
27
27
|
|
@@ -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
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '7.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '7.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: ed25519
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
198
|
+
rubygems_version: 3.3.7
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: Capistrano 3 tasks used for Twingly's Ruby deployment
|