eventhub-command 0.0.1 → 0.0.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
  SHA1:
3
- metadata.gz: 14bd6614bdbbed40ed0e6fb52e7a2b46d9c68012
4
- data.tar.gz: a0913f61ab264055d277452efdb1cec4784daa3b
3
+ metadata.gz: 571eb57bbf2a247a20e81455cd6dd5f30e12f10d
4
+ data.tar.gz: 68f6e01a6a4aba26e21319c58716a4f20e237c38
5
5
  SHA512:
6
- metadata.gz: a56aeed1b2a050e7cf7026ad407b3dccf2da68d7b674f131183b2faaaac95bd7bb524afd0f675a8fe19cac52707b1e0a6cd2c1cd9d3d9012afe0c40a1dd21c1e
7
- data.tar.gz: c2aff2da200f025d5216cdb2484898c3be313e058b92bf39d834a9af931b987ffb6c049d150092969a2fd7dad07ef3604a3c06422c26534f164bbfd1d7d3b871
6
+ metadata.gz: 71173d4682b8780672d5257a947818973e9ad11a87bca6344571dc6953e15d79b3a63b5712f034a9b1f593d48531096afbf88e6fe2f50483ecbd38b18e59b239
7
+ data.tar.gz: faceacb4914b821bdbe40528c6668fd62d48b248ad254ceacc9057107043eb0dec99298c77720be61dc071047791e58f02341b5df94e04bfc09c4641d41fa04d
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
@@ -1,14 +1,14 @@
1
- eventhub-command
2
- ================
3
-
4
- Event Hub Command Line Tool to support you with
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
- gem 'eventhub-command'
13
-
14
- ## 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
+ gem 'eventhub-command'
13
+
14
+ ## Usage
data/bin/eh CHANGED
@@ -1,16 +1,39 @@
1
1
  #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'eh' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
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
8
6
 
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
7
+ include GLI::App
12
8
 
13
- require 'rubygems'
14
- require 'bundler/setup'
9
+ program_desc 'Command line tools for EventHub'
15
10
 
16
- load Gem.bin_path('eventhub-command', 'eh')
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,25 +1,25 @@
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 = 'EventHub Command Line Tool which supports you with various Event Hub related administrative development features.'
11
- s.summary = 'EventHub 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.rdoc','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
- 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
+ end
data/lib/eh/settings.rb CHANGED
@@ -1,39 +1,38 @@
1
- require 'json'
2
- class Eh::Settings
3
- attr_reader :data
4
- def self.load(file)
5
- data = File.read(file)
6
- json = JSON.parse(data)
7
- Eh::Settings.new(json)
8
- end
9
-
10
- def self.current=(value)
11
- Thread.current[:eh_settings] = value
12
- end
13
-
14
- def self.current
15
- Thread.current[:eh_settings]
16
- end
17
-
18
- def initialize(data)
19
- @data = data
20
- end
21
-
22
-
23
- def repository_root_dir
24
- File.expand_path(data['repository_root_dir'])
25
- end
26
-
27
- def release_dir
28
- File.join(repository_root_dir, 'branches', 'master', 'releases', 'ruby')
29
- end
30
-
31
- def processes_src_dir
32
- File.join(repository_root_dir, 'branches', 'master', 'src', 'process')
33
- end
34
-
35
- def package_tmp_dir
36
- './tmp'
37
- end
38
-
1
+ class Eh::Settings
2
+ attr_reader :data
3
+ def self.load(file)
4
+ data = File.read(file)
5
+ json = JSON.parse(data)
6
+ Eh::Settings.new(json)
7
+ end
8
+
9
+ def self.current=(value)
10
+ Thread.current[:eh_settings] = value
11
+ end
12
+
13
+ def self.current
14
+ Thread.current[:eh_settings]
15
+ end
16
+
17
+ def initialize(data)
18
+ @data = data
19
+ end
20
+
21
+
22
+ def repository_root_dir
23
+ File.expand_path(data['repository_root_dir'])
24
+ end
25
+
26
+ def release_dir
27
+ File.join(repository_root_dir, 'releases', 'ruby')
28
+ end
29
+
30
+ def processes_src_dir
31
+ File.join(repository_root_dir, 'src', 'process')
32
+ end
33
+
34
+ def package_tmp_dir
35
+ './tmp'
36
+ end
37
+
39
38
  end
data/lib/eh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eh
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -0,0 +1,3 @@
1
+ # All commands are required here
2
+ require 'eh/commands/release'
3
+ require 'eh/commands/package'
data/lib/eh.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  module Eh
2
2
  end
3
3
  require 'eh/version'
4
- require 'eh/settings'
5
- require 'eh/commands/release'
6
- require 'eh/commands/package'
4
+ require 'eh/settings'
data/todo.txt CHANGED
@@ -1,9 +1,9 @@
1
- -- -------------------------------------
2
- -- to do
3
- -- -------------------------------------
4
-
5
- - eh relase -r or --repository plate_store or http path -u user -p password
6
- - folder filter, default and customize
7
- - extension filter, default and custmize
8
- - it could take config settings from a local .ehconfig file
1
+ -- -------------------------------------
2
+ -- to do
3
+ -- -------------------------------------
4
+
5
+ - eh relase -r or --repository plate_store or http path -u user -p password
6
+ - folder filter, default and customize
7
+ - extension filter, default and custmize
8
+ - it could take config settings from a local .ehconfig file
9
9
  - would be nice to have a release all feature
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.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pascal Betz
@@ -15,42 +15,42 @@ dependencies:
15
15
  name: rake
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ~>
19
19
  - !ruby/object:Gem::Version
20
20
  version: '10.1'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ~>
26
26
  - !ruby/object:Gem::Version
27
27
  version: '10.1'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rdoc
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ~>
33
33
  - !ruby/object:Gem::Version
34
34
  version: '4.1'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ~>
40
40
  - !ruby/object:Gem::Version
41
41
  version: '4.1'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: aruba
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ~>
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0.5'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ~>
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0.5'
56
56
  - !ruby/object:Gem::Dependency
@@ -67,7 +67,7 @@ dependencies:
67
67
  - - '='
68
68
  - !ruby/object:Gem::Version
69
69
  version: 2.12.0
70
- description: EventHub Command Line Tool which supports you with various Event Hub
70
+ description: Event Hub Command Line Tool which supports you with various Event Hub
71
71
  related administrative development features.
72
72
  email:
73
73
  - pascal.betz@simplificator.com
@@ -76,12 +76,12 @@ executables:
76
76
  - eh
77
77
  extensions: []
78
78
  extra_rdoc_files:
79
- - README.rdoc
79
+ - README.md
80
80
  - eh.rdoc
81
81
  files:
82
- - ".gitignore"
82
+ - .gitignore
83
83
  - Gemfile
84
- - README.rdoc
84
+ - README.md
85
85
  - Rakefile
86
86
  - bin/eh
87
87
  - eh.gemspec
@@ -89,6 +89,7 @@ files:
89
89
  - features/eh.feature
90
90
  - features/step_definitions/eh_steps.rb
91
91
  - features/support/env.rb
92
+ - lib/eh-commands.rb
92
93
  - lib/eh.rb
93
94
  - lib/eh/commands/package.rb
94
95
  - lib/eh/commands/release.rb
@@ -103,22 +104,22 @@ licenses:
103
104
  metadata: {}
104
105
  post_install_message:
105
106
  rdoc_options:
106
- - "--title"
107
+ - --title
107
108
  - eh
108
- - "--main"
109
+ - --main
109
110
  - README.rdoc
110
- - "-ri"
111
+ - -ri
111
112
  require_paths:
112
113
  - lib
113
114
  - lib
114
115
  required_ruby_version: !ruby/object:Gem::Requirement
115
116
  requirements:
116
- - - ">="
117
+ - - '>='
117
118
  - !ruby/object:Gem::Version
118
119
  version: '0'
119
120
  required_rubygems_version: !ruby/object:Gem::Requirement
120
121
  requirements:
121
- - - ">="
122
+ - - '>='
122
123
  - !ruby/object:Gem::Version
123
124
  version: '0'
124
125
  requirements: []
@@ -126,5 +127,5 @@ rubyforge_project:
126
127
  rubygems_version: 2.2.2
127
128
  signing_key:
128
129
  specification_version: 4
129
- summary: EventHub Command Line Tool
130
+ summary: Event Hub Command Line Tool
130
131
  test_files: []