baf 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/baf/cli.rb +9 -1
- data/lib/baf/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7091d7bfbb0d1d56888a9210f7585e8f6b5d3cac
|
4
|
+
data.tar.gz: ef092a44d2b3596f9814c19250f087430ff172b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69f39a7ff0f4bf2e05d184bc5e3c840a0eb8edd9e86b00f74f310a82ff94b5089935a16e81b17a8b90364f17762c0bd7a98d6241cb0ac3656b986853734f8096
|
7
|
+
data.tar.gz: 319caad20f725d0baf5b67dec5cb19d723403a33aa10b85af647a57f57d64ef225b5ff90ead9bb8d66000fe32ed07ef69aaa42c022612a86f105e8c5f1b1c415
|
data/lib/baf/cli.rb
CHANGED
@@ -15,7 +15,7 @@ module Baf
|
|
15
15
|
|
16
16
|
class << self
|
17
17
|
def run arguments, stdout: $stdout, stderr: $stderr
|
18
|
-
cli = new
|
18
|
+
cli = new env_class.new(stdout), arguments
|
19
19
|
cli.parse_arguments!
|
20
20
|
cli.run
|
21
21
|
rescue ArgumentError => e
|
@@ -26,6 +26,14 @@ module Baf
|
|
26
26
|
stderr.puts e.backtrace.map { |l| ' %s' % l }
|
27
27
|
exit EX_SOFTWARE
|
28
28
|
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def env_class
|
33
|
+
return Env unless parent_name = name =~ /::[^:]+\Z/ ? $` : nil
|
34
|
+
parent = Object.const_get(parent_name)
|
35
|
+
parent.const_defined?(:Env) ? parent.const_get(:Env) : Env
|
36
|
+
end
|
29
37
|
end
|
30
38
|
|
31
39
|
attr_reader :arguments, :env, :parser
|
data/lib/baf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: baf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thibault Jouan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: baf-testing
|
@@ -79,4 +79,3 @@ signing_key:
|
|
79
79
|
specification_version: 4
|
80
80
|
summary: Basic Application Framework
|
81
81
|
test_files: []
|
82
|
-
has_rdoc:
|