baf 0.9.1 → 0.10.0

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: 614382e90edcf72530678f4e090e363bd58a8fa7
4
- data.tar.gz: 6476cb0efc65a0ea652cf22221bb5ed6e0b07910
3
+ metadata.gz: 68a55ae3de806571fd45ae9d85c810a34e831b50
4
+ data.tar.gz: 3cf2f785dd185410dfdbed6c695b7bb3b02c3d17
5
5
  SHA512:
6
- metadata.gz: 319e1139399e2142c444162f4a3f222d9d6a037ab245d678be31139d94133b3af0d81028b56d77bd9b01e93ec8153c5dc3df71679b1620c33cef5c724a690406
7
- data.tar.gz: 46c6b563b9551faae1451df647350af99a1c6a9487a9e443883195d38e00f9ed7de61ecbf7201b65f87ae637130c6deea60c77c19ea78becdcd0a3f223f5b92d
6
+ metadata.gz: 6123ed05f4dc3999b15c9e55f930d5e4151cbd6078c726b01e9a6fe920a00f71b67e4023fa8a4599a4d5e2375752cd462dd31a5c3d22075abaedc7aed697e971
7
+ data.tar.gz: 2a133158337ee65a02accb9654e94fb9c388342322a0feaffcd4eee507eac8cac2faa39867facc2425adf1f66cf0ff8f62b644a94caafd9bc68795ade0fe7710
@@ -50,6 +50,10 @@ module Baf
50
50
  def setup
51
51
  end
52
52
 
53
+ def banner arg
54
+ registrant.banner = arg
55
+ end
56
+
53
57
  def flag *args
54
58
  registrant.flag *args
55
59
  end
@@ -10,6 +10,8 @@ module Baf
10
10
  print\ this\ message
11
11
  ].freeze.each &:freeze
12
12
 
13
+ attr_writer :banner
14
+
13
15
  def initialize options = []
14
16
  @options = options
15
17
  end
@@ -24,6 +26,7 @@ module Baf
24
26
 
25
27
  def register env, parser
26
28
  yield if block_given?
29
+ parser.banner = banner if banner
27
30
  parser.separator SUMMARY_HEADER
28
31
  options_tail, options_standard = options.partition &:tail?
29
32
  options_standard.each { |opt| register_option env, parser, opt }
@@ -33,7 +36,7 @@ module Baf
33
36
 
34
37
  private
35
38
 
36
- attr_reader :options
39
+ attr_reader :banner, :options
37
40
 
38
41
  def define_env_accessor env, name
39
42
  (class << env; self end).send :attr_accessor, name
@@ -14,6 +14,10 @@ def expect_output content, stream: :output
14
14
  end
15
15
 
16
16
 
17
+ Then /^the output must contain:$/ do |content|
18
+ expect(last_command_started.output).to include unescape_text content
19
+ end
20
+
17
21
  Then /^the output must contain "([^"]+)"$/ do |content|
18
22
  expect(last_command_started.output).to include unescape_text content
19
23
  end
@@ -1,3 +1,3 @@
1
1
  module Baf
2
- VERSION = '0.9.1'.freeze
2
+ VERSION = '0.10.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.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: 2017-02-12 00:00:00.000000000 Z
11
+ date: 2017-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: baf-testing
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.0'
19
+ version: '0'
20
20
  type: :development
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.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.4'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.4'
40
+ version: '0'
41
41
  description: Basic Application Framework
42
42
  email: tj@a13.fr
43
43
  executables: []
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.6.10
79
+ rubygems_version: 2.6.11
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Basic Application Framework