constancy 0.3.1 → 0.3.2

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: d19ad8be143bf52f84efca8bcbec9b3883bba3b840ea77583179a41c03de514c
4
- data.tar.gz: 6b403727f5ef73b943b09b33e127b701bf52b95fcfb287900a992198ae0cbbca
3
+ metadata.gz: 4caa570d63de3a812aa89cf86ffe5317f09dc744fa467bf51e8d27a208946613
4
+ data.tar.gz: 31c183bec299d4d49d25dcae189bd1a42cf3e76cb0eadf17d13323be019f1a5f
5
5
  SHA512:
6
- metadata.gz: 865d4c79c77a83070381ecc61e7cad153bc4c8d540907d15d6798437615171cd061b36816ef0e2327cc7419f6a1f24cb61388e225ffb1646943058025befef5d
7
- data.tar.gz: f07b781b03b708fe48c3ff010efcfc2e2df652848561af8bd332651b21368c6454602d52d7058c2600e16ead78f50a9d305e932c724b0f9c2404b05454c9a005
6
+ metadata.gz: ab1fa53d02ca6e2dd7dbeca153d3f9b8fc503af197f258879a5f60c83d9584662c74f583e62a3ef5235b70ea23707a55aa1a199310221f80d9a0b953c1d6d77d
7
+ data.tar.gz: 7559a582aae4740591d98ce8da8a021c16ccf87b5b38941df81798d08b847fdd1c5a3be79051ec1a482d12a32840a565473eed18ea1dac392326d26848b5e58b
@@ -67,6 +67,12 @@ General options:
67
67
  Options for 'check' command:
68
68
  --pull Perform dry run in pull mode
69
69
 
70
+ Options for 'pull' command:
71
+ --yes Skip confirmation prompt
72
+
73
+ Options for 'push' command:
74
+ --yes Skip confirmation prompt
75
+
70
76
  USAGE
71
77
  exit 1
72
78
  end
@@ -124,8 +130,8 @@ USAGE
124
130
  when :command
125
131
  case self.command
126
132
  when 'check' then Constancy::CLI::CheckCommand.run(self.extra_args)
127
- when 'push' then Constancy::CLI::PushCommand.run
128
- when 'pull' then Constancy::CLI::PullCommand.run
133
+ when 'push' then Constancy::CLI::PushCommand.run(self.extra_args)
134
+ when 'pull' then Constancy::CLI::PullCommand.run(self.extra_args)
129
135
  when 'config' then Constancy::CLI::ConfigCommand.run
130
136
  when 'targets' then Constancy::CLI::TargetsCommand.run
131
137
  when nil then self.print_usage
@@ -4,7 +4,7 @@ class Constancy
4
4
  class CLI
5
5
  class PullCommand
6
6
  class << self
7
- def run
7
+ def run(args)
8
8
  Constancy::CLI.configure
9
9
  STDOUT.sync = true
10
10
 
@@ -22,7 +22,7 @@ class Constancy
22
22
  puts
23
23
  puts "Do you want to pull these changes?"
24
24
  print " Enter '" + "yes".bold + "' to continue: "
25
- answer = gets.chomp
25
+ answer = args.include?('--yes') ? 'yes' : gets.chomp
26
26
 
27
27
  if answer.downcase != "yes"
28
28
  puts
@@ -4,7 +4,7 @@ class Constancy
4
4
  class CLI
5
5
  class PushCommand
6
6
  class << self
7
- def run
7
+ def run(args)
8
8
  Constancy::CLI.configure
9
9
  STDOUT.sync = true
10
10
 
@@ -22,7 +22,7 @@ class Constancy
22
22
  puts
23
23
  puts "Do you want to push these changes?"
24
24
  print " Enter '" + "yes".bold + "' to continue: "
25
- answer = gets.chomp
25
+ answer = args.include?('--yes') ? 'yes' : gets.chomp
26
26
 
27
27
  if answer.downcase != "yes"
28
28
  puts
@@ -1,5 +1,5 @@
1
1
  # This software is public domain. No rights are reserved. See LICENSE for more information.
2
2
 
3
3
  class Constancy
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: constancy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Adams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-09 00:00:00.000000000 Z
11
+ date: 2019-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: imperium
@@ -107,8 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
- rubyforge_project:
111
- rubygems_version: 2.7.6
110
+ rubygems_version: 3.0.3
112
111
  signing_key:
113
112
  specification_version: 4
114
113
  summary: Simple filesystem-to-Consul KV synchronization