eventhub-command 0.2.4 → 0.2.5
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 +4 -4
- data/bin/eh +1 -1
- data/lib/eh/version.rb +1 -1
- data/lib/eh-commands.rb +2 -1
- metadata +1 -2
- data/lib/eh/commands/copy_config.rb +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0b920542ef0e71b47e152efd9dad9908686712e
|
4
|
+
data.tar.gz: 36505269048412c2150c626c85f17c4b600b2f95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
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
|
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
|
+
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
|