right_hook 0.2.4 → 0.2.5

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.
@@ -30,7 +30,7 @@ module RightHook
30
30
 
31
31
  # Returns an array of all of the authorizations for the authenticated account.
32
32
  def list_authorizations
33
- _client.list_authorizations
33
+ _client.authorizations
34
34
  end
35
35
 
36
36
  # If there is already an authorization by this note, use it; otherwise create it
@@ -1,3 +1,3 @@
1
1
  module RightHook
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -38,7 +38,7 @@ describe RightHook::Authenticator do
38
38
  describe '#find_or_create_authorization_by_note' do
39
39
  let(:auth) { OpenStruct.new(token: 'a token', note: 'the note')}
40
40
  context 'when #list_authorizations has a note that is an exact match' do
41
- before { Octokit::Client.any_instance.should_receive(:list_authorizations).and_return([auth]) }
41
+ before { Octokit::Client.any_instance.should_receive(:authorizations).and_return([auth]) }
42
42
  it 'returns that authorization' do
43
43
  authenticator = described_class.build('octocat', 'pass')
44
44
  expect(authenticator.find_or_create_authorization_by_note('the note')).to eq('a token')
@@ -46,7 +46,7 @@ describe RightHook::Authenticator do
46
46
  end
47
47
 
48
48
  context 'when #list_authorizations does not have a note that matches' do
49
- before { Octokit::Client.any_instance.should_receive(:list_authorizations).and_return([]) }
49
+ before { Octokit::Client.any_instance.should_receive(:authorizations).and_return([]) }
50
50
  before { Octokit::Client.any_instance.should_receive(:create_authorization).and_return(auth) }
51
51
  it 'creates a new authorization' do
52
52
  authenticator = described_class.build('octocat', 'pass')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_hook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: