eventhub-command 0.0.22 → 0.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
  SHA1:
3
- metadata.gz: 642f1aff81a30ccaf366596d3528757bf67b6a44
4
- data.tar.gz: 363caaba84ff1a4eacc047d8e8f3ac5bd4ce3680
3
+ metadata.gz: 681052add8ae19dcdca290ccada7a4f3b21679e9
4
+ data.tar.gz: fb927c1dc5f17a13ea9aa10fa55a1ca46bf8bf07
5
5
  SHA512:
6
- metadata.gz: 5d0382dc3458fceae9b36dc34561358d45c59262d3e7ed36bc08c5dd43c780c2f441f9ee7c894ea462de574b0e63a4995d6803ca80529b9d364f5f02dfa8e8a2
7
- data.tar.gz: e517ec2771fc20ea1a58fa6a8715e2197607c9a56a929d85ee710a3c9be2fcf9938d9b320919f9f23b75f57e50587de2e187fc6761e2a2babe9839cef99867b0
6
+ metadata.gz: 3b9ec031408d9241e70ae8adc6e67483d3e8020ab62810c88f60a08da402605acb24439b63e188354c25a94ddc244cfd990e3690b5449d3c1cbb7e97fbedc367
7
+ data.tar.gz: 674259528d5a35bd7c2b7efc7346089fd297bcb1f95354578a96bfa71e6c2e72b626a63c25e189bfdc8f7df7efe0a8ae3f306c2a9241275999e38e493f424c0c
data/.gitignore CHANGED
@@ -1,18 +1,18 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
18
  .DS_Store
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
- source 'https://rubygems.org'
2
- gemspec
1
+ source 'https://rubygems.org'
2
+ gemspec
data/README.md CHANGED
@@ -1,29 +1,52 @@
1
- eventhub-command
2
- ================
3
-
4
- Event Hub Command Line Tool includes the following features
5
-
6
- * Packaging Event Hub Processor's
7
- * Pushing Channel Adapter and Processor configuration files to servers
8
- * Scaffold your Event Hub Processor
9
-
10
- ## Installation
11
-
12
- Install gem and make command provided by this gem available
13
-
14
- ~~~ sh
15
- $ gem i eventhub-command
16
- $ rbenv rehash
17
- ~~~
18
-
19
- First time running the command
20
- ~~~ sh
21
- $ eh
22
- Config file missing: ~/.eh, will create it now...
23
- Please specify the Eventhub SVN root directory (i.e. the directory which contains the 'src', 'release', ... directories
24
- /Users/username/dev/event_hub
25
- Config file written to /Users/username/.eh. Please try again.
26
- $
27
- ~~~
28
-
29
- ## Usage
1
+ eventhub-command
2
+ ================
3
+
4
+ Event Hub Command Line Tool includes the following features
5
+
6
+ * Packaging Event Hub Processor's
7
+ * Pushing Channel Adapter and Processor configuration files to servers
8
+ * Scaffold your Event Hub Processor
9
+
10
+ ## Installation
11
+
12
+ Install gem and make command provided by this gem available
13
+
14
+ ~~~ sh
15
+ $ gem i eventhub-command
16
+ $ rbenv rehash
17
+ ~~~
18
+
19
+ First time running the command
20
+ ~~~ sh
21
+ $ eh
22
+ Config file missing: ~/.eh, will create it now...
23
+ Please specify the Eventhub SVN root directory (i.e. the directory which contains the 'src', 'release', ... directories
24
+ /Users/username/dev/event_hub
25
+ Config file written to /Users/username/.eh. Please try again.
26
+ $
27
+ ~~~
28
+
29
+ For some deploy commands you'll need a file describing the target servers (stages).
30
+ Put them into
31
+
32
+ ~~~
33
+ ~/.eh-stages
34
+ ~~~
35
+
36
+ The file name is the name of the stage, the content describes environments, hosts, ports and users to use.
37
+ Content looks like this:
38
+
39
+ ~~~
40
+ localhost:
41
+ node_env: development
42
+ hosts:
43
+ - host: localhost
44
+ port: 2222
45
+ user: s_cme
46
+ ~~~
47
+
48
+
49
+
50
+
51
+
52
+ ## Usage
data/Rakefile CHANGED
@@ -1,44 +1,44 @@
1
- require 'rake/clean'
2
- require 'rubygems'
3
- require 'rubygems/package_task'
4
- require 'rdoc/task'
5
- require 'cucumber'
6
- require 'cucumber/rake/task'
7
- Rake::RDocTask.new do |rd|
8
- rd.main = "README.rdoc"
9
- rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
10
- rd.title = 'Your application title'
11
- end
12
-
13
- spec = eval(File.read('eh.gemspec'))
14
-
15
- Gem::PackageTask.new(spec) do |pkg|
16
- end
17
- CUKE_RESULTS = 'results.html'
18
- CLEAN << CUKE_RESULTS
19
- desc 'Run features'
20
- Cucumber::Rake::Task.new(:features) do |t|
21
- opts = "features --format html -o #{CUKE_RESULTS} --format progress -x"
22
- opts += " --tags #{ENV['TAGS']}" if ENV['TAGS']
23
- t.cucumber_opts = opts
24
- t.fork = false
25
- end
26
-
27
- desc 'Run features tagged as work-in-progress (@wip)'
28
- Cucumber::Rake::Task.new('features:wip') do |t|
29
- tag_opts = ' --tags ~@pending'
30
- tag_opts = ' --tags @wip'
31
- t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty -x -s#{tag_opts}"
32
- t.fork = false
33
- end
34
-
35
- task :cucumber => :features
36
- task 'cucumber:wip' => 'features:wip'
37
- task :wip => 'features:wip'
38
- require 'rake/testtask'
39
- Rake::TestTask.new do |t|
40
- t.libs << "test"
41
- t.test_files = FileList['test/*_test.rb']
42
- end
43
-
44
- task :default => [:test,:features]
1
+ require 'rake/clean'
2
+ require 'rubygems'
3
+ require 'rubygems/package_task'
4
+ require 'rdoc/task'
5
+ require 'cucumber'
6
+ require 'cucumber/rake/task'
7
+ Rake::RDocTask.new do |rd|
8
+ rd.main = "README.rdoc"
9
+ rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
10
+ rd.title = 'Your application title'
11
+ end
12
+
13
+ spec = eval(File.read('eh.gemspec'))
14
+
15
+ Gem::PackageTask.new(spec) do |pkg|
16
+ end
17
+ CUKE_RESULTS = 'results.html'
18
+ CLEAN << CUKE_RESULTS
19
+ desc 'Run features'
20
+ Cucumber::Rake::Task.new(:features) do |t|
21
+ opts = "features --format html -o #{CUKE_RESULTS} --format progress -x"
22
+ opts += " --tags #{ENV['TAGS']}" if ENV['TAGS']
23
+ t.cucumber_opts = opts
24
+ t.fork = false
25
+ end
26
+
27
+ desc 'Run features tagged as work-in-progress (@wip)'
28
+ Cucumber::Rake::Task.new('features:wip') do |t|
29
+ tag_opts = ' --tags ~@pending'
30
+ tag_opts = ' --tags @wip'
31
+ t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty -x -s#{tag_opts}"
32
+ t.fork = false
33
+ end
34
+
35
+ task :cucumber => :features
36
+ task 'cucumber:wip' => 'features:wip'
37
+ task :wip => 'features:wip'
38
+ require 'rake/testtask'
39
+ Rake::TestTask.new do |t|
40
+ t.libs << "test"
41
+ t.test_files = FileList['test/*_test.rb']
42
+ end
43
+
44
+ task :default => [:test,:features]
data/bin/eh CHANGED
@@ -1,39 +1,39 @@
1
- #!/usr/bin/env ruby
2
- require 'gli'
3
- require 'fileutils'
4
- require 'json'
5
- require 'eh' # eh needs to be required in advance so we can access Eh::Settings
6
- require 'bundler'
7
- include GLI::App
8
-
9
- program_desc 'Command line tools for EventHub'
10
-
11
- version Eh::VERSION
12
- config_file = File.expand_path(File.join('~', '.eh'))
13
- if File.readable?(config_file)
14
- settings = Eh::Settings.load(config_file)
15
- Eh::Settings.current = settings
16
- else
17
- puts "Config file missing: ~/.eh, will create it now..."
18
- puts "Please specify the Eventhub SVN root directory (i.e. the directory which contains the 'src', 'release', ... directories"
19
- input = STDIN.gets.chomp
20
- data = {'repository_root_dir' => input}
21
- File.open(config_file, 'w') do |file|
22
- file.write(JSON.dump(data))
23
- end
24
- puts "Config file written to #{config_file}. Please try again."
25
- exit
26
- end
27
-
28
-
29
- require 'eh-commands'
30
-
31
- # Use argument validation
32
- arguments :strict
33
-
34
- accept Array do |value|
35
- value.split(/,/).map(&:strip)
36
- end
37
-
38
- switch([:v, :verbose], :desc => "Show additional output.")
39
- exit run(ARGV)
1
+ #!/usr/bin/env ruby
2
+ require 'gli'
3
+ require 'fileutils'
4
+ require 'json'
5
+ require 'eh' # eh needs to be required in advance so we can access Eh::Settings
6
+ require 'bundler'
7
+ include GLI::App
8
+
9
+ program_desc 'Command line tools for EventHub'
10
+
11
+ version Eh::VERSION
12
+ config_file = File.expand_path(File.join('~', '.eh'))
13
+ if File.readable?(config_file)
14
+ settings = Eh::Settings.load(config_file)
15
+ Eh::Settings.current = settings
16
+ else
17
+ puts "Config file missing: ~/.eh, will create it now..."
18
+ puts "Please specify the Eventhub SVN root directory (i.e. the directory which contains the 'src', 'release', ... directories"
19
+ input = STDIN.gets.chomp
20
+ data = {'repository_root_dir' => input}
21
+ File.open(config_file, 'w') do |file|
22
+ file.write(JSON.dump(data))
23
+ end
24
+ puts "Config file written to #{config_file}. Please try again."
25
+ exit
26
+ end
27
+
28
+
29
+ require 'eh-commands'
30
+
31
+ # Use argument validation
32
+ arguments :strict
33
+
34
+ accept Array do |value|
35
+ value.split(/,/).map(&:strip)
36
+ end
37
+
38
+ switch([:v, :verbose], :desc => "Show additional output.")
39
+ exit run(ARGV)
data/eh.gemspec CHANGED
@@ -1,28 +1,31 @@
1
- # Ensure we require the local version and not one we might have installed already
2
- require File.join([File.dirname(__FILE__),'lib','eh','version.rb'])
3
- spec = Gem::Specification.new do |s|
4
- s.name = 'eventhub-command'
5
- s.version = Eh::VERSION
6
- s.author = ['Pascal Betz','Thomas Steiner']
7
- s.email = ['pascal.betz@simplificator.com','thomas.steiner@ikey.ch']
8
- s.homepage = 'http://github.com/thomis/eventhub-command'
9
- s.platform = Gem::Platform::RUBY
10
- s.description = 'Event Hub Command Line Tool which supports you with various Event Hub related administrative development features.'
11
- s.summary = 'Event Hub Command Line Tool'
12
- s.license = "MIT"
13
- s.files = `git ls-files`.split("
14
- ")
15
- s.require_paths << 'lib'
16
- s.has_rdoc = true
17
- s.extra_rdoc_files = ['README.md','eh.rdoc']
18
- s.rdoc_options << '--title' << 'eh' << '--main' << 'README.rdoc' << '-ri'
19
- s.bindir = 'bin'
20
- s.executables << 'eh'
21
- s.add_development_dependency('rake', '~> 10.1')
22
- s.add_development_dependency('rdoc', '~> 4.1')
23
- s.add_development_dependency('aruba', '~> 0.5')
24
- s.add_runtime_dependency('gli','2.12.0')
25
- s.add_runtime_dependency('rubyzip', '~> 1.0')
26
- s.add_runtime_dependency('activesupport', '~> 4.1')
27
-
28
- end
1
+ # Ensure we require the local version and not one we might have installed already
2
+ require File.join([File.dirname(__FILE__),'lib','eh','version.rb'])
3
+ spec = Gem::Specification.new do |s|
4
+ s.name = 'eventhub-command'
5
+ s.version = Eh::VERSION
6
+ s.author = ['Pascal Betz','Thomas Steiner']
7
+ s.email = ['pascal.betz@simplificator.com','thomas.steiner@ikey.ch']
8
+ s.homepage = 'http://github.com/thomis/eventhub-command'
9
+ s.platform = Gem::Platform::RUBY
10
+ s.description = 'Event Hub Command Line Tool which supports you with various Event Hub related administrative development features.'
11
+ s.summary = 'Event Hub Command Line Tool'
12
+ s.license = "MIT"
13
+ s.files = `git ls-files`.split("
14
+ ")
15
+ s.require_paths << 'lib'
16
+ s.has_rdoc = true
17
+ s.extra_rdoc_files = ['README.md','eh.rdoc']
18
+ s.rdoc_options << '--title' << 'eh' << '--main' << 'README.rdoc' << '-ri'
19
+ s.bindir = 'bin'
20
+ s.executables << 'eh'
21
+ s.add_development_dependency('rake', '~> 10.1')
22
+ s.add_development_dependency('rdoc', '~> 4.1')
23
+ s.add_development_dependency('aruba', '~> 0.5')
24
+ s.add_runtime_dependency('gli','2.12.0')
25
+ s.add_runtime_dependency('rubyzip', '~> 1.0')
26
+ s.add_runtime_dependency('activesupport', '~> 4.1')
27
+ #s.add_runtime_dependency('net-ssh-open3')
28
+ s.add_runtime_dependency('net-ssh')
29
+ s.add_runtime_dependency('colorize')
30
+ #s.add_runtime_dependency('pry')
31
+ end
data/eh.rdoc CHANGED
@@ -1,5 +1,5 @@
1
- = eh
2
-
3
- Generate this with
4
- eh rdoc
1
+ = eh
2
+
3
+ Generate this with
4
+ eh rdoc
5
5
  After you have described your command line interface
data/features/eh.feature CHANGED
@@ -1,8 +1,8 @@
1
- Feature: My bootstrapped app kinda works
2
- In order to get going on coding my awesome app
3
- I want to have aruba and cucumber setup
4
- So I don't have to do it myself
5
-
6
- Scenario: App just runs
7
- When I get help for "eh"
8
- Then the exit status should be 0
1
+ Feature: My bootstrapped app kinda works
2
+ In order to get going on coding my awesome app
3
+ I want to have aruba and cucumber setup
4
+ So I don't have to do it myself
5
+
6
+ Scenario: App just runs
7
+ When I get help for "eh"
8
+ Then the exit status should be 0
@@ -1,6 +1,6 @@
1
- When /^I get help for "([^"]*)"$/ do |app_name|
2
- @app_name = app_name
3
- step %(I run `#{app_name} help`)
4
- end
5
-
6
- # Add more step definitions here
1
+ When /^I get help for "([^"]*)"$/ do |app_name|
2
+ @app_name = app_name
3
+ step %(I run `#{app_name} help`)
4
+ end
5
+
6
+ # Add more step definitions here
@@ -1,15 +1,15 @@
1
- require 'aruba/cucumber'
2
-
3
- ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
4
- LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
5
-
6
- Before do
7
- # Using "announce" causes massive warnings on 1.9.2
8
- @puts = true
9
- @original_rubylib = ENV['RUBYLIB']
10
- ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
11
- end
12
-
13
- After do
14
- ENV['RUBYLIB'] = @original_rubylib
15
- end
1
+ require 'aruba/cucumber'
2
+
3
+ ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
4
+ LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
5
+
6
+ Before do
7
+ # Using "announce" causes massive warnings on 1.9.2
8
+ @puts = true
9
+ @original_rubylib = ENV['RUBYLIB']
10
+ ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
11
+ end
12
+
13
+ After do
14
+ ENV['RUBYLIB'] = @original_rubylib
15
+ end
data/lib/deployer.rb ADDED
@@ -0,0 +1,6 @@
1
+ module Deployer
2
+ end
3
+
4
+ require_relative 'deployer/executor'
5
+ require_relative 'deployer/net_ssh_extension'
6
+ require_relative 'deployer/stage'