github-auth 0.3.0 → 0.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 112ea81b2134fd852537569815137af0aec98fc2
4
- data.tar.gz: a7a9f347a1ac0eb642b28516d82246c46975d17b
3
+ metadata.gz: ba2efedd769fc2ec5fc8aacfe3b4dc953bbb7452
4
+ data.tar.gz: 16c7b8ca303579763af15ad0a8a30da805f59708
5
5
  SHA512:
6
- metadata.gz: 49c8300123940bc4d127d128ef7ba8c29ad291a677e9ef3050109a691c8d1913284cf458e691c8699902f499701b0d3432bbae76865068e210373f5a9543b738
7
- data.tar.gz: 476040e680a640d521f3db05a20478200524bff868213cd7c1b570baf3a01ee7bb9266b1c2ca4117a98edce48e7cf6cb948e970e879d0bdbb44b50264e3b2417
6
+ metadata.gz: afa9ef34522861aee155e9fcbb2bc6b86c68ebcd5df7631b3b203a38007ba4a39c0297ee4ab524a1f9226a55d636b6a3d436b984ecc13cb655e5af1a58614c31
7
+ data.tar.gz: 15977ad54d76b221cc83e6c1874fa3f4e527007b9a4a6d43e3012d626bea94f0dd63802f03a1a98303391884c61fbf40a86231b271ab09f021057df3859df4d6
@@ -12,6 +12,8 @@ module Github::Auth
12
12
  def execute
13
13
  if COMMANDS.include?(command) && !usernames.empty?
14
14
  send command
15
+ elsif command == '--version'
16
+ print_version
15
17
  else
16
18
  print_usage
17
19
  end
@@ -43,7 +45,11 @@ module Github::Auth
43
45
  end
44
46
 
45
47
  def print_usage
46
- puts "usage: gh-auth [#{COMMANDS.join '|'}] <username>"
48
+ puts "usage: gh-auth [--version] [#{COMMANDS.join '|'}] <username>"
49
+ end
50
+
51
+ def print_version
52
+ puts "gh-auth version #{Github::Auth::VERSION}"
47
53
  end
48
54
 
49
55
  def print_permission_denied
@@ -1,5 +1,5 @@
1
1
  module Github
2
2
  module Auth
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -38,5 +38,14 @@ describe Github::Auth::CLI do
38
38
  subject.execute
39
39
  end
40
40
  end
41
+
42
+ context 'with the --version command' do
43
+ let(:argv) { ['--version'] }
44
+
45
+ it 'prints version information' do
46
+ subject.should_receive(:print_version)
47
+ subject.execute
48
+ end
49
+ end
41
50
  end
42
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Hunt