Skip to content

Commit 374b0e1

Browse files
committed
Release v3.0
1 parent 5d3c18f commit 374b0e1

File tree

8 files changed

+13
-15
lines changed

8 files changed

+13
-15
lines changed

lua_cliargs-3.0.rc-1.rockspec renamed to lua_cliargs-3.0.rockspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package = "lua_cliargs"
2-
version = "3.0.rc-1"
2+
version = "3.0"
33
source = {
44
url = "git://github.com/amireh/lua_cliargs.git",
55
branch = "3.0"

spec/cliargs_parsing_spec.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe("Testing cliargs library parsing commandlines", function()
3939
it("tests required argument callback returning error", function()
4040
cli:argument("ARG", "arg description", callback_fail)
4141

42-
local args, err = cli:parse({ "arg_val" })
42+
local _, err = cli:parse({ "arg_val" })
4343
assert.matches('bad argument for ARG', err)
4444
end)
4545

@@ -68,7 +68,7 @@ describe("Testing cliargs library parsing commandlines", function()
6868
cli:set_name('myapp')
6969
cli:splat("OPTARG", "optinoal arg description", nil, 1, callback_fail)
7070

71-
local args, err = cli:parse({ "opt_arg" })
71+
local _, err = cli:parse({ "opt_arg" })
7272
assert.matches('bad argument for OPTARG', err)
7373
end)
7474

spec/features/argument_spec.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe("cliargs - arguments", function()
4545
it('works with a single argument', function()
4646
cli:argument('PATH', 'path to a file')
4747

48-
local args, err = helpers.parse(cli, '/some/where')
48+
local args = helpers.parse(cli, '/some/where')
4949

5050
assert.equal(args.PATH, '/some/where')
5151
end)
@@ -64,14 +64,14 @@ describe("cliargs - arguments", function()
6464
cli:argument('INPUT', 'path to the input file')
6565
cli:argument('OUTPUT', 'path to the output file')
6666

67-
local args, err = helpers.parse(cli, '/some/where')
67+
local _, err = helpers.parse(cli, '/some/where')
6868
assert.matches('bad number of arguments', err)
6969
end)
7070

7171
it('bails on too many arguments', function()
7272
cli:argument('INPUT', 'path to the input file')
7373

74-
local args, err = helpers.parse(cli, 'foo bar')
74+
local _, err = helpers.parse(cli, 'foo bar')
7575

7676
assert.matches('bad number of arguments', err)
7777
end)

spec/features/flag_spec.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe("cliargs - flags", function()
8686

8787
context('given an unknown flag', function()
8888
it('bails', function()
89-
local res, err = helpers.parse(cli, '--asdf', true)
89+
local _, err = helpers.parse(cli, '--asdf', true)
9090
assert.matches('unknown', err)
9191
end)
9292
end)
@@ -131,7 +131,7 @@ describe("cliargs - flags", function()
131131
end)
132132

133133
it('bails', function()
134-
local res, err = helpers.parse(cli, '--no-quiet')
134+
local _, err = helpers.parse(cli, '--no-quiet')
135135
assert.matches('may not be negated', err)
136136
end)
137137
end)

spec/features/option_spec.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ describe("cliargs - options", function()
134134

135135
context('given an unknown option', function()
136136
it('bails', function()
137-
local args, err = helpers.parse(cli, '--asdf=jkl;', true)
137+
local _, err = helpers.parse(cli, '--asdf=jkl;', true)
138138
assert.matches('unknown', err)
139139
end)
140140
end)
141141

142142
it('bails if no value was passed', function()
143-
local args, err = helpers.parse(cli, '-s')
143+
local _, err = helpers.parse(cli, '-s')
144144
assert.matches("option %-s requires a value to be set", err)
145145
end)
146146
end)
@@ -219,7 +219,7 @@ describe("cliargs - options", function()
219219
return nil, ">>> bad argument <<<"
220220
end)
221221

222-
local args, err = helpers.parse(cli, '-c lzma', true)
222+
local _, err = helpers.parse(cli, '-c lzma', true)
223223
assert.equal('>>> bad argument <<<', err)
224224
end)
225225
end)

spec/features/splatarg_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe("cliargs - splat arguments", function()
8484
it('bails if more values were passed than acceptable', function()
8585
cli:splat('SPLAT', 'foobar', nil, 2)
8686

87-
local args, err = helpers.parse(cli, 'a b c')
87+
local _, err = helpers.parse(cli, 'a b c')
8888
assert.matches("bad number of arguments", err)
8989
end)
9090
end)

src/cliargs.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ function cli:cleanup()
2727
cli = nil
2828
end
2929

30-
cli.VERSION = "3.0.rc-1"
30+
cli.VERSION = "3.0"
3131

3232
return cli

src/cliargs/parser.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,6 @@ function p.collect_results(cli_values, options)
256256
else
257257
return entry_values
258258
end
259-
260-
return entry_values
261259
end
262260

263261
local function write(entry, value)

0 commit comments

Comments
 (0)