eventhub-command 0.2.4 → 0.2.5

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
  SHA1:
3
- metadata.gz: 21058f1a7c996bc089d6d4cea06009030a496b3c
4
- data.tar.gz: 9dcf4349e8db699183c43d479d40e8da1ca32c47
3
+ metadata.gz: c0b920542ef0e71b47e152efd9dad9908686712e
4
+ data.tar.gz: 36505269048412c2150c626c85f17c4b600b2f95
5
5
  SHA512:
6
- metadata.gz: 3e75e51d9fe7d212fa92cac92471097d63e30c19332ceb75e235637aed5d112fb178d3bbdb33ce87bd9ec2a12f4b2e0505d1b598641c1ed058abb4e289e216d7
7
- data.tar.gz: 7bc2674d105881e46897f738709c7a83adf781704f68809763506d71dd09404a7e9788d5ad53925cf6501c2894ffbdf32de40c93ce12d1191cc3cbe6d9654bc2
6
+ metadata.gz: 566f9b7a6ac7bb482986fa9f01cdf29ed062baf1e3c2d7998459742371ff49a6aea441af54bd0413989106b9385e2da6be89bb3c938956ea9ddab1d2bdb230a1
7
+ data.tar.gz: dfa3efda2aab166c816a6b812c4148d6b10204bf11bd4a3420cc0979f5d5b62869b288c4ad99890a010a54956bf3a55a0b8987d6d1bb39950f90591c764b6fc0
data/bin/eh CHANGED
@@ -17,7 +17,7 @@ else
17
17
  File.open(config_file, 'w') do |file|
18
18
  file.write(JSON.dump({}))
19
19
  end
20
- puts "Created empty config file. Please run 'eh repository add'"
20
+ puts "No config File found. Created empty config file for you. You can run 'eh repository add/select' to manage repositories"
21
21
  exit
22
22
  end
23
23
 
data/lib/eh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eh
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
data/lib/eh-commands.rb CHANGED
@@ -10,7 +10,8 @@ else
10
10
  # remove unused settings for this version
11
11
  Eh::Settings.current.data.delete('repository_root_dir')
12
12
  Eh::Settings.current.write
13
- puts "No current repository defined. Please run 'eh repository add' and/or 'eh repository select'"
13
+ puts "No current repository found."
14
+ puts "You can configure other repositories by running 'eh repository add' and/or 'eh repository select'"
14
15
  end
15
16
 
16
17
  require 'eh/commands/repository'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventhub-command
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pascal Betz
@@ -152,7 +152,6 @@ files:
152
152
  - lib/deployer/stage.rb
153
153
  - lib/eh-commands.rb
154
154
  - lib/eh.rb
155
- - lib/eh/commands/copy_config.rb
156
155
  - lib/eh/commands/deploy_config.rb
157
156
  - lib/eh/commands/deploy_mule.rb
158
157
  - lib/eh/commands/deploy_ruby.rb
@@ -1,51 +0,0 @@
1
- desc 'Copies the config directory of a given processor to remote'
2
- command :copy_config do |c|
3
- c.flag([:s, :source], :desc => "Source config directory", :default_value => Eh::Settings.current.source_config_dir, :long_desc => "A local directory containing subfolders for each of the processors")
4
- c.flag([:p, :processors], :desc => "Specify what processors' configs to copy", :type => Array, :long_desc => "You can specify multiple processors by providing a comma-separated list.")
5
-
6
- c.action do |global_options, options, args|
7
- source_config_dir = options['s']
8
- repository_deployment_dir = File.join(Eh::Settings.current.repository_root_dir, "branches", "master", "src", "deployment")
9
-
10
- processor_names = Dir["#{source_config_dir}/*"].map do |dir|
11
- File.basename(dir)
12
- end
13
-
14
- included_processor_names = processor_names
15
-
16
- # only include processors specified by -p option, if option is given
17
- if options['p']
18
- included_processor_names = included_processor_names.select do |processor_name|
19
- options['p'].include?(processor_name)
20
- end
21
- end
22
-
23
- # make sure we have at least one processor
24
- if included_processor_names.empty?
25
- raise "There are no processor configs to copy. Either there is nothing in #{source_config_dir} or the processor(s) specified with -p don't exist."
26
- end
27
-
28
- included_processor_names.each do |processor_name|
29
- processor_config_source_dir = File.join(source_config_dir, processor_name)
30
-
31
- cmd = "cd #{repository_deployment_dir} && COPY_FROM_DIR=#{processor_config_source_dir} bundle exec cap event_hub:scp_copy_config"
32
-
33
- puts "Will copy config files from #{processor_config_source_dir} to remote."
34
- puts "WARNING: This will overwrite any existing files with the same name!"
35
- puts "Do you really want to do this?"
36
- input = STDIN.gets.chomp
37
-
38
- unless ['y', 'Y'].include?(input)
39
- raise "Not confirmed. Stop."
40
- end
41
-
42
- puts "Command: #{cmd}" if global_options['v']
43
-
44
- Bundler.with_clean_env do
45
- system cmd
46
- end
47
- end
48
-
49
- puts "Done."
50
- end
51
- end