sct 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4e19d771e32524e38a9d685d161bdf57a17a71569536ce5af8fd51462b52960
4
- data.tar.gz: 610520f2b59b575ccc858c80af79cd1b40b470c403c849e34415559461e9b4ee
3
+ metadata.gz: 8fad01fe00c948d248dae7390285021760ae28ad592411a3cbc18ffdef650cd8
4
+ data.tar.gz: 1ba8d43b23ade6f4316767b8759c91bf98f2dac1327cb9903a2c8fa66b2f7a5e
5
5
  SHA512:
6
- metadata.gz: cd68fb3fd3e6c5ba9c4a91232cb83427697631385367eefff7a5477fd99e10f8c524f9d7ea4327c56d7ab31a93fca09e4ee610aad3b099ce14d26f7ab4777e76
7
- data.tar.gz: 2ab0d6e33f702ec64050126b05ee818e607ceae6b806a5ee91938295cf7e8e69824e3e3dacf41688e4f538041e67aaacfecd7c7708d168be3ce5311ef527e75b
6
+ metadata.gz: 88c67f14fb87bc1ca891527e46b78b7552fb5021832347fdff73e4af0a8066e6b25cd17344b295ba2588af7265682a79248b245d6d2f0b1fe93fa5e9d5b4050c
7
+ data.tar.gz: 392db33f0c88bdc2f36025b24a85614865bcf54d99f22970b8da874bf8abf1f956ec194ab5dc3d2659ee708fc5d34940d59689d6f2e0e9bf433139c3262dd5d0
@@ -23,14 +23,27 @@ module Sct
23
23
  error "Private token not set"
24
24
  end
25
25
 
26
- if options.proactive_frame
27
- UI.important("Requesting to pull database for proactive frame")
28
- process_request = `curl -X POST -F token=#{private_token} -F ref=master -F variables[DB_PULL_FRAME]=true -F variables[REMOTE_BRANCH_NAME]=#{branch} #{pipeline_endpoint}`
29
- end
30
-
31
- if options.proactive_config
32
- UI.important("Requesting to pull database for proactive config")
33
- process_request = `curl -X POST -F token=#{private_token} -F ref=master -F variables[DB_PULL_CONFIG]=true -F variables[REMOTE_BRANCH_NAME]=#{branch} #{pipeline_endpoint}`
26
+ if options.all
27
+ UI.important("Requesting to pull database changes for proactive frame and proactive config")
28
+ process_request = `curl -X POST -F token=#{private_token} -F ref=master -F variables[DB_PULL_FRAME]=true -F variables[DB_PULL_CONFIG]=true -F variables[REMOTE_BRANCH_NAME]=#{branch} #{pipeline_endpoint}`
29
+ else
30
+ db_pull_frame = ""
31
+ if options.proactive_frame
32
+ UI.important("Requesting to pull database for proactive frame")
33
+ db_pull_frame = "-F variables[DB_PULL_FRAME]=true"
34
+ end
35
+
36
+ db_pull_config = ""
37
+ if options.proactive_config
38
+ UI.important("Requesting to pull database for proactive config")
39
+ db_pull_config = "-F variables[DB_PULL_CONFIG]=true"
40
+ end
41
+
42
+ if db_pull_frame != "" or db_pull_config != ""
43
+ process_request = `curl -X POST -F token=#{private_token} -F ref=master #{db_pull_frame} #{db_pull_config} -F variables[REMOTE_BRANCH_NAME]=#{branch} #{pipeline_endpoint}`
44
+ else
45
+ error "Missing options. Use --help to see the available options"
46
+ end
34
47
  end
35
48
  end
36
49
  end
@@ -57,6 +57,7 @@ module Sct
57
57
  command :'database-pull' do |c|
58
58
  c.syntax = 'sct database pull'
59
59
  c.description = 'pull database changes for proactive frame and proactive config'
60
+ c.option '--all', 'pull the database changes for all repositories'
60
61
  c.option '--proactive-frame', 'pull the database changes from proactive-frame'
61
62
  c.option '--proactive-config', 'pull the database changes from proactive-config'
62
63
 
@@ -1,3 +1,3 @@
1
1
  module Sct
2
- VERSION = "1.0.9"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sct
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reshad Farid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-22 00:00:00.000000000 Z
11
+ date: 2021-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored