libclimate-ruby 0.17.0 → 0.17.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/examples/flag_and_option_specifications.from_DATA.rb +4 -4
- data/examples/flag_and_option_specifications.rb +22 -22
- data/examples/show_usage_and_version.rb +7 -7
- data/lib/libclimate/climate.rb +1000 -1000
- data/lib/libclimate/version.rb +14 -14
- data/test/scratch/blankzeroes.rb +14 -14
- data/test/scratch/specifications.rb +23 -23
- data/test/unit/tc_abort.rb +42 -42
- data/test/unit/tc_double_slash_index.rb +73 -73
- data/test/unit/tc_infer_version.rb +47 -47
- data/test/unit/tc_minimal.rb +516 -516
- data/test/unit/tc_minimal_CLASP.rb +323 -323
- data/test/unit/tc_parse.rb +104 -104
- data/test/unit/tc_parse_and_verify.rb +93 -93
- data/test/unit/tc_test_specifications.rb +48 -48
- data/test/unit/tc_values.rb +294 -294
- data/test/unit/tc_with_blocks.rb +18 -18
- data/test/unit/tc_with_blocks_CLASP.rb +18 -18
- metadata +6 -6
@@ -15,37 +15,37 @@ require 'stringio'
|
|
15
15
|
|
16
16
|
class Test_Climate_with_blocks_CLASP < Test::Unit::TestCase
|
17
17
|
|
18
|
-
|
18
|
+
def test_flag_with_block
|
19
19
|
|
20
|
-
|
20
|
+
is_verbose = false
|
21
21
|
|
22
|
-
|
22
|
+
climate = LibCLImate::Climate.new do |cl|
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
cl.add_flag('--verbose') { is_verbose = true }
|
25
|
+
end
|
26
26
|
|
27
|
-
|
27
|
+
argv = %w{ --verbose }
|
28
28
|
|
29
|
-
|
29
|
+
climate.run argv
|
30
30
|
|
31
|
-
|
32
|
-
|
31
|
+
assert is_verbose, "block associated with flag '--verbose' was not executed"
|
32
|
+
end
|
33
33
|
|
34
|
-
|
34
|
+
def test_option_with_block
|
35
35
|
|
36
|
-
|
36
|
+
flavour = nil
|
37
37
|
|
38
|
-
|
38
|
+
climate = LibCLImate::Climate.new do |cl|
|
39
39
|
|
40
|
-
|
41
|
-
|
40
|
+
cl.add_option('--flavour') { |o| flavour = o.value }
|
41
|
+
end
|
42
42
|
|
43
|
-
|
43
|
+
argv = %w{ --flavour=blueberry }
|
44
44
|
|
45
|
-
|
45
|
+
climate.run argv
|
46
46
|
|
47
|
-
|
48
|
-
|
47
|
+
assert_equal 'blueberry', flavour
|
48
|
+
end
|
49
49
|
end
|
50
50
|
|
51
51
|
# ############################## end of file ############################# #
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libclimate-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.0
|
4
|
+
version: 0.17.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Wilson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clasp-ruby
|
@@ -88,7 +88,7 @@ homepage: https://github.com/synesissoftware/libCLImate.Ruby
|
|
88
88
|
licenses:
|
89
89
|
- BSD-3-Clause
|
90
90
|
metadata: {}
|
91
|
-
post_install_message:
|
91
|
+
post_install_message:
|
92
92
|
rdoc_options: []
|
93
93
|
require_paths:
|
94
94
|
- lib
|
@@ -106,8 +106,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
|
-
rubygems_version: 3.
|
110
|
-
signing_key:
|
109
|
+
rubygems_version: 3.3.7
|
110
|
+
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: libCLImate.Ruby
|
113
113
|
test_files: []
|