bogo-cli 0.1.2 → 0.1.4

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: 2ad8bbf88496037b16abc19652c7881b8aa40a0e
4
- data.tar.gz: 1c21e0bbbf84670e30c2abd946645fa59e5ee2a6
3
+ metadata.gz: 3b01bbff8ee153a763c6d8e1b9e8eb1ee909b5e0
4
+ data.tar.gz: 812895d1225324fdc72550628d797d99c423b334
5
5
  SHA512:
6
- metadata.gz: 173312f328d75b2b63518b19c1628fc1ab3d78994dce38abaecd42826d4556265ea9e66a850d92f41fa7669fa2626cfd1c1d09362e12ca4d992ab8ad1dff29e9
7
- data.tar.gz: c98979978d48909806eb881a0c9ffa915c683e5cdbb079e94a6819c8ec1009beaa6a3d396e69e03cad1e64f2e7003e6bae0a27727df5a7134f66cd0ed0fd4a93
6
+ metadata.gz: b07e0bd539268efaadadbc242681665ba12deb00890bf7a2b2c54edee5ad7ce530fe1615debc7f0ff0b3954a8d172c55a18fdab29b73e3abae2575cd563d393a
7
+ data.tar.gz: 8d1bb2e5973ecee71daeb3b3259e2508f681a3f6523ebed2d1085b1b82549c83fa271e78b4f53f9cb3dac2f708a1b5725bd16e447e9b0bf27c8d38dc48d9f600
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## v0.1.4
2
+ * Force passed options to Hash type and covert to Smash
3
+ * Force passed options keys to snake case
4
+ * Include slim error message on unexpected errors when not in debug
5
+
1
6
  ## v0.1.2
2
7
  * Add version restriction to slop
3
8
  * Allow usage of pre-built Ui instance
data/bogo-cli.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.description = 'CLI Helper libraries'
11
11
  s.require_path = 'lib'
12
12
  s.license = 'Apache 2.0'
13
- s.add_dependency 'bogo'
13
+ s.add_dependency 'bogo', '>= 0.1.6'
14
14
  s.add_dependency 'bogo-config'
15
15
  s.add_dependency 'bogo-ui'
16
16
  s.add_dependency 'slop', '~> 3'
@@ -18,10 +18,10 @@ module Bogo
18
18
  #
19
19
  # @return [self]
20
20
  def initialize(opts, args)
21
- @options = opts.to_smash
21
+ @options = opts.to_hash.to_smash(:snake)
22
22
  @arguments = args
23
- @ui = opts.delete(:ui) || Ui.new(
24
- :app_name => opts.fetch(:app_name,
23
+ @ui = options.delete(:ui) || Ui.new(
24
+ :app_name => options.fetch(:app_name,
25
25
  self.class.name.split('::').first
26
26
  )
27
27
  )
@@ -18,8 +18,10 @@ module Bogo
18
18
  rescue => e
19
19
  if(ENV['DEBUG'])
20
20
  $stderr.puts "ERROR: #{e.class}: #{e}\n#{e.backtrace.join("\n")}"
21
+ else
22
+ $stderr.puts "ERROR: #{e.class}: #{e}"
21
23
  end
22
- exit -1
24
+ exit e.respond_to?(:exit_code) ? e.exit_code : -1
23
25
  end
24
26
  true
25
27
  end
@@ -1,5 +1,5 @@
1
1
  module Bogo
2
2
  module Cli
3
- VERSION = Gem::Version.new('0.1.2')
3
+ VERSION = Gem::Version.new('0.1.4')
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bogo-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-13 00:00:00.000000000 Z
11
+ date: 2015-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bogo
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 0.1.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 0.1.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bogo-config
29
29
  requirement: !ruby/object:Gem::Requirement