obs_deploy 0.3.9 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 270586d05289871ade6a65de49c6e363d58525745535da5fc5f95c3a155f26b2
4
- data.tar.gz: 5df94bb7f4fbeb7a0068ecf59af2d0904aafbc0b854aa03884b3ffa445b2ecae
3
+ metadata.gz: 742d7413da49ee796b72615ec9afe90e02932ff51515ed35f309a69bd36d70b7
4
+ data.tar.gz: 1c3dc21990343ce26ddd0adf22dd5b648e6f242d5e51d610517185768c9f9ec6
5
5
  SHA512:
6
- metadata.gz: c26bb9750eaa66e1fda974966b25077a2b9b4bb40ecf0eca4d5bc208b433f5e7145a7b583b35d95c8ef8f3156245af8588f02cb25882a11129d95f08c8da0a75
7
- data.tar.gz: e15d6d0fc1842b721b2db3dd759a4185330809d490f8ed850c9962444b5504b2df2ea787ecb0e3485b422ae26a607c7434e08a610c104ea47787cde28e58c231
6
+ metadata.gz: 774d0befa8e754c054956e2eaefdc208460bf4f1e7914fb0f92208dfd21b09bcef0d60ba2a255d9543cadd54cc3d0ed8eb8cbf50cd9a89c282bcde42d05b7665
7
+ data.tar.gz: 71c62909fe69a8899e91eefe7a6bd7ccfb2f56a45561913dc854dc5d9838790ecf75080abb23c3f747e90fbad142ee0e682b14219b82d570a31f17506f334fa2
@@ -10,7 +10,7 @@ module ObsDeploy
10
10
 
11
11
  def enable_maintenance_mode
12
12
  unless maintenance_mode?
13
- content = File.read(path).gsub(/^#{server_flags}=\"STATUS\"$/,
13
+ content = File.read(path).gsub(/^#{server_flags}="STATUS"$/,
14
14
  apache_status_line(maintenance))
15
15
  write_apache_sysconfig(content)
16
16
  end
@@ -18,7 +18,7 @@ module ObsDeploy
18
18
 
19
19
  def disable_maintenance_mode
20
20
  if maintenance_mode?
21
- content = File.read(path).gsub(/^#{server_flags}=\"STATUS MAINTENANCE\"/,
21
+ content = File.read(path).gsub(/^#{server_flags}="STATUS MAINTENANCE"/,
22
22
  apache_status_line(no_maintenance))
23
23
  write_apache_sysconfig(content)
24
24
  end
@@ -1,19 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'openssl'
3
4
  module ObsDeploy
4
5
  module CLI
5
6
  module Commands
6
7
  class GetPendingMigration < Dry::CLI::Command
7
- option :url, type: :string, default: 'https://api.opensuse.org', desc: 'API url'
8
- option :ignore_certificate, aliases: ['k'], type: :bool, default: false, desc: 'Ignore invalid or self-signed SSL certificates'
8
+ option :url, type: :string, default: 'https://api.opensuse.org', desc: 'where the packages are available to be installed'
9
+ option :targeturl, type: :string, default: 'https://api.opensuse.org', desc: 'where we actually want to deploy '
10
+ option :ignore_certificate, aliases: ['k'], type: :boolean, default: false, desc: 'Ignore invalid or self-signed SSL certificates'
9
11
 
10
- def call(url:, ignore_certificate:, **)
12
+ def call(url:, targeturl:, ignore_certificate:, **)
11
13
  if ignore_certificate
12
14
  OpenSSL::SSL.send(:remove_const, :VERIFY_PEER)
13
15
  OpenSSL::SSL.const_set(:VERIFY_PEER, OpenSSL::SSL::VERIFY_NONE)
14
16
  end
15
17
 
16
- migrations = ObsDeploy::CheckDiff.new(server: url).migrations
18
+ migrations = ObsDeploy::CheckDiff.new(server: url, target_server: targeturl).migrations
19
+
17
20
  if migrations.empty?
18
21
  puts 'No pending migrations'
19
22
  exit(0)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ObsDeploy
4
- VERSION = '0.3.9'
4
+ VERSION = '0.4.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obs_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pereira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-05 00:00:00.000000000 Z
11
+ date: 2021-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler