eventhub-command 0.2.2 → 0.2.3

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: 971f6f14cdfc183bda044d8a885d7b17165f5fe7
4
- data.tar.gz: 56ef0d1c3caa63d9c6097e83f12f7038c57069a5
3
+ metadata.gz: 839b65b06697558a8b6309cfc7ce45c146922b89
4
+ data.tar.gz: b4de830f583056d04890bb9ce1cd11ba5cda129a
5
5
  SHA512:
6
- metadata.gz: ef1773a0cc1c8be19b9551ef0931895749f17845b8244a4a3ab857915704844ce138c32e2c666d92f3f98093372659ed2f31557c2c793bf9b619b56e89a3769c
7
- data.tar.gz: b54ae51a28b329f613f7e4a8185a826d6fa0e7d62112bd4af6410ffc0881b09d576e11871931aa4a35fe7b52462fcb60a2f8126cd9448065773c0c3ad41f3dba
6
+ metadata.gz: c0f7f2d98af8f40d459cb098927127d8c7de0301dfa7e61a205f9142a6c24f92d9b29df3345ac97914b9014b54ea42340aa048b88d32709b96ba3260e337363b
7
+ data.tar.gz: c4f7f4cf85c32dc2c267e7e2f77a0d939a03d853918c9ad2e970be308461f167c1d4ab37f67ce401d3f16a494e2ae139ca6aec9a096dffc15529fb3ada17740f
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,91 +1,91 @@
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
- Created empty config file. Please run 'eh repository add'
23
- $
24
- ~~~
25
-
26
- Run again:
27
- ~~~ sh
28
- $ eh repository add http://something.com/project/svn /Users/foo/eventhub/branches/master username password
29
- $
30
- ~~~
31
-
32
- NOTE: username and password you specify here are from the deploy user.
33
-
34
- ### Stages
35
-
36
- Some commands (e.g. deploy commands) will use stages to determine where to deploy. Those stage files are now
37
- stored in the eventhub SVN repository under config/ directory
38
-
39
- The file name is the name of the stage, the content describes environments, hosts, ports and users to use.
40
- Content looks like this:
41
-
42
- ~~~
43
- localhost:
44
- hosts:
45
- - host: localhost
46
- port: 2222
47
- user: some_user
48
- ~~~
49
-
50
-
51
- ## Usage
52
-
53
- Help and description for the commands can be obtained through:
54
-
55
- ~~~
56
- eh --help
57
- ~~~
58
- and more specific for a single command
59
- ~~~
60
- eh <COMMAND> --help
61
- ~~~
62
-
63
- ### Common options
64
-
65
- Some common options are:
66
-
67
- * --stage (one of the names that are listed from list_stages command)
68
- * --deploy_via (use svn or scp for deployment. If scp, then the local release directory is used, otherwise svn)
69
- * --branch/--tag (specify a branch or tag to use for "deploy_via scp")
70
- * --verbose (enable verbose output)
71
-
72
- ### Commands
73
-
74
- * deploy_ruby: deploy a ruby processor to a stage. You can specify:
75
- * a processor name
76
- * multiple processor names spearated via commas
77
- * a pattern like something.*
78
- * a combination of above
79
- * deploy_mule: deploy a mule adapter to a stage
80
- * a adapter name
81
- * multiple adapter names spearated via commas
82
- * a pattern like something.*
83
- * a combination of above
84
- * deploy_config: checkout the latest version of config on target stage and copy to the config folder on stage.
85
- Those config files will be used uppon next deployment.
86
- * list_stages: list stages that are available for deploy_* commands
87
- * package_ruby: package ruby processors to zip files and copy to release directory on local machines. Those packages
88
- will be used upon next "deploy_via scp" or if you commit them to SVN then upon next "deploy_via svn"
89
- * generate_processor: generate a processor from a basic template
90
-
91
-
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
+ Created empty config file. Please run 'eh repository add'
23
+ $
24
+ ~~~
25
+
26
+ Run again:
27
+ ~~~ sh
28
+ $ eh repository add http://something.com/project/svn /Users/foo/eventhub/branches/master username password
29
+ $
30
+ ~~~
31
+
32
+ NOTE: username and password you specify here are from the deploy user.
33
+
34
+ ### Stages
35
+
36
+ Some commands (e.g. deploy commands) will use stages to determine where to deploy. Those stage files are now
37
+ stored in the eventhub SVN repository under config/ directory
38
+
39
+ The file name is the name of the stage, the content describes environments, hosts, ports and users to use.
40
+ Content looks like this:
41
+
42
+ ~~~
43
+ localhost:
44
+ hosts:
45
+ - host: localhost
46
+ port: 2222
47
+ user: some_user
48
+ ~~~
49
+
50
+
51
+ ## Usage
52
+
53
+ Help and description for the commands can be obtained through:
54
+
55
+ ~~~
56
+ eh --help
57
+ ~~~
58
+ and more specific for a single command
59
+ ~~~
60
+ eh <COMMAND> --help
61
+ ~~~
62
+
63
+ ### Common options
64
+
65
+ Some common options are:
66
+
67
+ * --stage (one of the names that are listed from list_stages command)
68
+ * --deploy_via (use svn or scp for deployment. If scp, then the local release directory is used, otherwise svn)
69
+ * --branch/--tag (specify a branch or tag to use for "deploy_via scp")
70
+ * --verbose (enable verbose output)
71
+
72
+ ### Commands
73
+
74
+ * deploy_ruby: deploy a ruby processor to a stage. You can specify:
75
+ * a processor name
76
+ * multiple processor names spearated via commas
77
+ * a pattern like something.*
78
+ * a combination of above
79
+ * deploy_mule: deploy a mule adapter to a stage
80
+ * a adapter name
81
+ * multiple adapter names spearated via commas
82
+ * a pattern like something.*
83
+ * a combination of above
84
+ * deploy_config: checkout the latest version of config on target stage and copy to the config folder on stage.
85
+ Those config files will be used uppon next deployment.
86
+ * list_stages: list stages that are available for deploy_* commands
87
+ * package_ruby: package ruby processors to zip files and copy to release directory on local machines. Those packages
88
+ will be used upon next "deploy_via scp" or if you commit them to SVN then upon next "deploy_via svn"
89
+ * generate_processor: generate a processor from a basic template
90
+
91
+
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,35 +1,35 @@
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
- File.open(config_file, 'w') do |file|
18
- file.write(JSON.dump({}))
19
- end
20
- puts "Created empty config file. Please run 'eh repository add'"
21
- exit
22
- end
23
-
24
-
25
- require 'eh-commands'
26
-
27
- # Use argument validation
28
- arguments :strict
29
-
30
- accept Array do |value|
31
- value.split(/,/).map(&:strip)
32
- end
33
-
34
- switch([:v, :verbose], :desc => "Show additional output.")
35
- 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
+ File.open(config_file, 'w') do |file|
18
+ file.write(JSON.dump({}))
19
+ end
20
+ puts "Created empty config file. Please run 'eh repository add'"
21
+ exit
22
+ end
23
+
24
+
25
+ require 'eh-commands'
26
+
27
+ # Use argument validation
28
+ arguments :strict
29
+
30
+ accept Array do |value|
31
+ value.split(/,/).map(&:strip)
32
+ end
33
+
34
+ switch([:v, :verbose], :desc => "Show additional output.")
35
+ exit run(ARGV)
data/eh.gemspec CHANGED
@@ -1,29 +1,29 @@
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', '~> 2.9')
28
- s.add_runtime_dependency('colorize', '~> 0.7')
29
- 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', '~> 2.9')
28
+ s.add_runtime_dependency('colorize', '~> 0.7')
29
+ 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