hammer_cli_katello_bridge 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -78,9 +78,9 @@ module HammerCLIKatelloBridge
78
78
  end
79
79
 
80
80
 
81
-
82
- json_file = HammerCLI::Settings.get(:katello_bridge, :cli_description)
83
- raise "Path to katello CLI description is not set or file does not exist" unless (json_file && File.exist?(json_file))
81
+ spec = Gem::Specification.find_by_name("hammer_cli_katello_bridge")
82
+ json_file = HammerCLI::Settings.get(:katello_bridge, :cli_description) || File.join(spec.gem_dir, 'katello.json')
83
+ raise RuntimeError.new("Path to katello CLI description is not set or file does not exist") unless (json_file && File.exist?(json_file))
84
84
  self.load_commands(File.read(json_file)).each do |command|
85
85
  HammerCLI::MainCommand.subcommand!(command[:name], command[:desc], command[:cls])
86
86
  end
@@ -1,5 +1,5 @@
1
1
  module HammerCLIKatelloBridge
2
2
  def self.version
3
- @version ||= Gem::Version.new '0.0.5'
3
+ @version ||= Gem::Version.new '0.0.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli_katello_bridge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Bačovský
@@ -47,6 +47,7 @@ extra_rdoc_files: []
47
47
  files:
48
48
  - lib/hammer_cli_katello_bridge.rb
49
49
  - lib/hammer_cli_katello_bridge/version.rb
50
+ - katello.json
50
51
  homepage: http://github.com/theforeman/hammer-cli-katello-bridge
51
52
  licenses: []
52
53
  metadata: {}