Commit d92227a

mokha <mokha@cisco.com>
2018-03-10 02:38:41
add a version command.
1 parent f2bc33e
Changed files (2)
lib
saml
spec
saml
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
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