clasp-ruby 0.23.0.2 → 0.23.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.
@@ -10,122 +10,122 @@ require 'stringio'
10
10
 
11
11
  class Test_Usage < Test::Unit::TestCase
12
12
 
13
- def test_empty_default
13
+ def test_empty_default
14
14
 
15
- specifications = []
15
+ specifications = []
16
16
 
17
- stream = StringIO.new
17
+ stream = StringIO.new
18
18
 
19
- CLASP.show_usage specifications, stream: stream, program_name: 'myprog'
19
+ CLASP.show_usage specifications, stream: stream, program_name: 'myprog'
20
20
 
21
- expected = <<EOF_output
21
+ expected = <<EOF_output
22
22
  USAGE: myprog [ ... flags and options ... ]
23
23
 
24
24
  EOF_output
25
- actual = stream.string
25
+ actual = stream.string
26
26
 
27
- assert_equal expected, actual
28
- end
27
+ assert_equal expected, actual
28
+ end
29
29
 
30
- def test_empty_all
30
+ def test_empty_all
31
31
 
32
- specifications = []
32
+ specifications = []
33
33
 
34
- stream = StringIO.new
34
+ stream = StringIO.new
35
35
 
36
- CLASP.show_usage specifications, stream: stream, program_name: 'myprog', flags_and_options: ''
36
+ CLASP.show_usage specifications, stream: stream, program_name: 'myprog', flags_and_options: ''
37
37
 
38
- expected = <<EOF_output
38
+ expected = <<EOF_output
39
39
  USAGE: myprog
40
40
 
41
41
  EOF_output
42
- actual = stream.string
42
+ actual = stream.string
43
43
 
44
- assert_equal expected, actual
45
- end
44
+ assert_equal expected, actual
45
+ end
46
46
 
47
- def test_empty_all_with_info_line_of_one_string
47
+ def test_empty_all_with_info_line_of_one_string
48
48
 
49
- specifications = []
49
+ specifications = []
50
50
 
51
- stream = StringIO.new
51
+ stream = StringIO.new
52
52
 
53
- info = 'myprog version'.freeze
53
+ info = 'myprog version'.freeze
54
54
 
55
- CLASP.show_usage specifications, stream: stream, program_name: 'myprog', flags_and_options: '', info_lines: info
55
+ CLASP.show_usage specifications, stream: stream, program_name: 'myprog', flags_and_options: '', info_lines: info
56
56
 
57
- expected = <<EOF_output
57
+ expected = <<EOF_output
58
58
  myprog version
59
59
  USAGE: myprog
60
60
 
61
61
  EOF_output
62
- actual = stream.string
62
+ actual = stream.string
63
63
 
64
- assert_equal expected, actual
65
- end
64
+ assert_equal expected, actual
65
+ end
66
66
 
67
- def test_empty_all_with_info_lines
67
+ def test_empty_all_with_info_lines
68
68
 
69
- specifications = []
69
+ specifications = []
70
70
 
71
- stream = StringIO.new
71
+ stream = StringIO.new
72
72
 
73
- info_lines = [
73
+ info_lines = [
74
74
 
75
- 'Synesis Software My Program',
76
- 'version 1',
77
- ].freeze
75
+ 'Synesis Software My Program',
76
+ 'version 1',
77
+ ].freeze
78
78
 
79
- CLASP.show_usage specifications, stream: stream, program_name: 'myprog', flags_and_options: '', info_lines: info_lines
79
+ CLASP.show_usage specifications, stream: stream, program_name: 'myprog', flags_and_options: '', info_lines: info_lines
80
80
 
81
- expected = <<EOF_output
81
+ expected = <<EOF_output
82
82
  Synesis Software My Program
83
83
  version 1
84
84
  USAGE: myprog
85
85
 
86
86
  EOF_output
87
- actual = stream.string
87
+ actual = stream.string
88
88
 
89
- assert_equal expected, actual
90
- end
89
+ assert_equal expected, actual
90
+ end
91
91
 
92
- def test_empty_all_with_info_lines_including_version
92
+ def test_empty_all_with_info_lines_including_version
93
93
 
94
- specifications = []
94
+ specifications = []
95
95
 
96
- stream = StringIO.new
96
+ stream = StringIO.new
97
97
 
98
- info_lines = [
98
+ info_lines = [
99
99
 
100
- 'Synesis Software My Program',
101
- :version
102
- ].freeze
100
+ 'Synesis Software My Program',
101
+ :version
102
+ ].freeze
103
103
 
104
- CLASP.show_usage specifications, stream: stream, program_name: 'myprog', flags_and_options: '', info_lines: info_lines, version: [ 1, 0, 1], version_prefix: 'v'
104
+ CLASP.show_usage specifications, stream: stream, program_name: 'myprog', flags_and_options: '', info_lines: info_lines, version: [ 1, 0, 1], version_prefix: 'v'
105
105
 
106
- expected = <<EOF_output
106
+ expected = <<EOF_output
107
107
  Synesis Software My Program
108
108
  myprog v1.0.1
109
109
  USAGE: myprog
110
110
 
111
111
  EOF_output
112
- actual = stream.string
112
+ actual = stream.string
113
113
 
114
- assert_equal expected, actual
115
- end
114
+ assert_equal expected, actual
115
+ end
116
116
 
117
- def test_one_alias_default
117
+ def test_one_alias_default
118
118
 
119
- specifications = [
119
+ specifications = [
120
120
 
121
- CLASP::Flag.Version
122
- ]
121
+ CLASP::Flag.Version
122
+ ]
123
123
 
124
- stream = StringIO.new
124
+ stream = StringIO.new
125
125
 
126
- CLASP.show_usage specifications, stream: stream, program_name: 'myprog'
126
+ CLASP.show_usage specifications, stream: stream, program_name: 'myprog'
127
127
 
128
- expected = <<EOF_output
128
+ expected = <<EOF_output
129
129
  USAGE: myprog [ ... flags and options ... ]
130
130
 
131
131
  flags/options:
@@ -134,23 +134,23 @@ flags/options:
134
134
  \t\t#{CLASP::Flag.Version.help}
135
135
 
136
136
  EOF_output
137
- actual = stream.string
137
+ actual = stream.string
138
138
 
139
- assert_equal expected, actual
140
- end
139
+ assert_equal expected, actual
140
+ end
141
141
 
142
- def test_one_alias_all
142
+ def test_one_alias_all
143
143
 
144
- specifications = [
144
+ specifications = [
145
145
 
146
- CLASP::Flag.Version
147
- ]
146
+ CLASP::Flag.Version
147
+ ]
148
148
 
149
- stream = StringIO.new
149
+ stream = StringIO.new
150
150
 
151
- CLASP.show_usage specifications, stream: stream, program_name: 'myprog', flags_and_options: ''
151
+ CLASP.show_usage specifications, stream: stream, program_name: 'myprog', flags_and_options: ''
152
152
 
153
- expected = <<EOF_output
153
+ expected = <<EOF_output
154
154
  USAGE: myprog
155
155
 
156
156
  flags/options:
@@ -159,9 +159,9 @@ flags/options:
159
159
  \t\t#{CLASP::Flag.Version.help}
160
160
 
161
161
  EOF_output
162
- actual = stream.string
162
+ actual = stream.string
163
163
 
164
- assert_equal expected, actual
165
- end
164
+ assert_equal expected, actual
165
+ end
166
166
  end
167
167
 
@@ -10,40 +10,40 @@ require 'test/unit'
10
10
 
11
11
  class Test_WithAction < Test::Unit::TestCase
12
12
 
13
- def test_flag_with_action
13
+ def test_flag_with_action
14
14
 
15
- debug = false
15
+ debug = false
16
16
 
17
- specifications = [
17
+ specifications = [
18
18
 
19
- CLASP.Flag('--debug', alias: '-d') { debug = true }
20
- ]
21
- argv = []
22
- args = CLASP.parse argv, specifications
19
+ CLASP.Flag('--debug', alias: '-d') { debug = true }
20
+ ]
21
+ argv = []
22
+ args = CLASP.parse argv, specifications
23
23
 
24
- assert_equal 0, args.flags.size
25
- assert_equal 0, args.options.size
26
- assert_equal 0, args.values.size
24
+ assert_equal 0, args.flags.size
25
+ assert_equal 0, args.options.size
26
+ assert_equal 0, args.values.size
27
27
 
28
- assert_false debug
28
+ assert_false debug
29
29
 
30
- argv2 = [ '--debug' ]
31
- args2 = CLASP.parse argv2, specifications
30
+ argv2 = [ '--debug' ]
31
+ args2 = CLASP.parse argv2, specifications
32
32
 
33
- assert_equal 1, args2.flags.size
34
- assert_equal 0, args2.options.size
35
- assert_equal 0, args2.values.size
33
+ assert_equal 1, args2.flags.size
34
+ assert_equal 0, args2.options.size
35
+ assert_equal 0, args2.values.size
36
36
 
37
- assert_false debug
37
+ assert_false debug
38
38
 
39
- if ix = args2.flags.index('--debug')
39
+ if ix = args2.flags.index('--debug')
40
40
 
41
- flag = args2.flags[ix]
41
+ flag = args2.flags[ix]
42
42
 
43
- flag.argument_specification.action.call(flag, flag.argument_specification)
44
- end
45
-
46
- assert_true debug
43
+ flag.argument_specification.action.call(flag, flag.argument_specification)
47
44
  end
45
+
46
+ assert_true debug
47
+ end
48
48
  end
49
49
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clasp-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0.2
4
+ version: 0.23.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: 2024-01-20 00:00:00.000000000 Z
11
+ date: 2025-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xqsr3
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.38'
19
+ version: '0.39'
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.38'
26
+ version: '0.39'
27
27
  description: |
28
28
  Command-Line Argument Sorting and Parsing library that provides a powerful abstraction of command-line interpretation facilities.
29
29
 
@@ -78,7 +78,7 @@ homepage: http://github.com/synesissoftware/CLASP.Ruby
78
78
  licenses:
79
79
  - BSD-3-Clause
80
80
  metadata: {}
81
- post_install_message:
81
+ post_install_message:
82
82
  rdoc_options: []
83
83
  require_paths:
84
84
  - lib
@@ -96,8 +96,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  requirements: []
99
- rubygems_version: 3.3.7
100
- signing_key:
99
+ rubyforge_project:
100
+ rubygems_version: 2.7.6.3
101
+ signing_key:
101
102
  specification_version: 4
102
103
  summary: CLASP.Ruby
103
104
  test_files: []