diff options
| author | mokha <mokha@cisco.com> | 2018-03-09 19:38:41 -0700 |
|---|---|---|
| committer | mokha <mokha@cisco.com> | 2018-03-09 19:38:41 -0700 |
| commit | d92227a99ad5527ae0e0a378ce17dbce9e68cbae (patch) | |
| tree | 2c66443a6781b99e248bdbb5a8198135a9d3f250 | |
| parent | f2bc33e559289d0a339fcbe5e1ac1181d8e1d636 (diff) | |
add a version command.
| -rw-r--r-- | lib/saml/kit/cli.rb | 5 | ||||
| -rw-r--r-- | spec/saml/kit/cli_spec.rb | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/saml/kit/cli.rb b/lib/saml/kit/cli.rb index 0336ad9..9627e7c 100644 --- a/lib/saml/kit/cli.rb +++ b/lib/saml/kit/cli.rb @@ -35,6 +35,11 @@ module Saml desc 'xmldsig SUBCOMMAND ...ARGS', 'Check XML digital signatures.' subcommand 'xmldsig', Commands::XmlDigitalSignature + + desc 'version', 'Display the current version' + def version + say Saml::Kit::Cli::VERSION + end end end end diff --git a/spec/saml/kit/cli_spec.rb b/spec/saml/kit/cli_spec.rb index cc18f85..55998df 100644 --- a/spec/saml/kit/cli_spec.rb +++ b/spec/saml/kit/cli_spec.rb @@ -2,4 +2,11 @@ RSpec.describe Saml::Kit::Cli do it 'has a version number' do expect(Saml::Kit::Cli::VERSION).not_to be_nil end + + describe "version" do + let(:command) { "version" } + + specify { expect(status).to be_success } + specify { expect(output).to include(Saml::Kit::Cli::VERSION) } + end end |
