octoauth 0.0.1 → 0.0.2
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 +4 -4
- data/.gitignore +2 -0
- data/README.md +38 -1
- data/lib/octoauth.rb +3 -37
- data/lib/octoauth/auth.rb +74 -0
- data/lib/octoauth/configfile.rb +41 -0
- data/octoauth.gemspec +3 -3
- data/spec/examples/conf_a.yml +3 -0
- data/spec/octoauth/auth_spec.rb +146 -0
- data/spec/octoauth/configfile_spec.rb +68 -0
- data/spec/octoauth_spec.rb +7 -9
- metadata +36 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e662d2be3726ad6da9d18f4404199106052aa599
|
4
|
+
data.tar.gz: f139f60f766463b2ee0ecdd0aa17ae6464e18573
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a9e4b20659320da55cc9f913be5e7fd151dfd2bbff4328716555e1e393b343bea4e0eae16e784785c9daea172039dbc5846697a8b881bf6fd60c3bd3d254980
|
7
|
+
data.tar.gz: 8344027f6637f8f54cc4691ea7b171e6511a11f82b2ff6e922b8a250883b9f5262b579a1c3f82f3d9f7f12facd698d8575500b762284a8c31c58f24dbcb4fd6f
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -8,10 +8,47 @@ octoauth
|
|
8
8
|
[](https://travis-ci.org/akerl/octoauth)
|
9
9
|
[](https://tldrlegal.com/license/mit-license)
|
10
10
|
|
11
|
-
|
11
|
+
Authentication wrapper for GitHub's API
|
12
12
|
|
13
13
|
## Usage
|
14
14
|
|
15
|
+
Get your authentication token quickly and simply:
|
16
|
+
|
17
|
+
```
|
18
|
+
require 'octoauth'
|
19
|
+
|
20
|
+
auth = Octoauth.new note: 'my_cool_app'
|
21
|
+
puts "My token is #{auth.token}"
|
22
|
+
```
|
23
|
+
|
24
|
+
This will prompt the user for a username/password and potentially 2FA token using [userinput](https://github.com/akerl/userinput). A note is required, and is what the token will appear as in the user's GitHub tokens list.
|
25
|
+
|
26
|
+
If you want to store this token and reuse it, just drop it into a file. The default file is ~/.octoauth.yml. Subsequent runs with the same file and note will load the same token without prompting the user:
|
27
|
+
|
28
|
+
```
|
29
|
+
auth = Octoauth.new note: 'my_cooler_app', file: :default
|
30
|
+
puts "My token is #{auth.token}"
|
31
|
+
auth.save
|
32
|
+
|
33
|
+
other_auth = Octoauth.new note: 'other_nice_app', file: '~/.other_app_config.yml'
|
34
|
+
puts "The other token is #{other_auth.token}"
|
35
|
+
other_auth.save
|
36
|
+
```
|
37
|
+
|
38
|
+
The above examples get us the basic scope, which means some read-only public access. For other scopes, specify them when creating the token:
|
39
|
+
|
40
|
+
```
|
41
|
+
auth = Octoauth.new note: 'my_app', scopes: ['gist', 'delete_repo']
|
42
|
+
```
|
43
|
+
|
44
|
+
If you're trying to use this with a GitHub Enterprise deployment, you can specify an alternate API endpoint:
|
45
|
+
|
46
|
+
```
|
47
|
+
auth = Octoauth.new note: 'enterprise_app', api_endpoint: 'https://sekrit.codez.com/api/v3/'
|
48
|
+
```
|
49
|
+
|
50
|
+
If an alternate endpoint is provided, that string is included as part of the saved config, so you can generate a token for GitHub and multiple alternate endpoints with the same note in the same config file.
|
51
|
+
|
15
52
|
## Installation
|
16
53
|
|
17
54
|
gem install octoauth
|
data/lib/octoauth.rb
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
require 'octokit'
|
2
|
-
require 'userinput'
|
3
|
-
|
4
1
|
##
|
5
2
|
# Octokit wrapper for simplifying authentication
|
6
3
|
module Octoauth
|
@@ -11,38 +8,7 @@ module Octoauth
|
|
11
8
|
self::Auth.new(*args)
|
12
9
|
end
|
13
10
|
end
|
14
|
-
|
15
|
-
##
|
16
|
-
# Define some sane defaults
|
17
|
-
DEFAULTS = {
|
18
|
-
file: '~/.octoauth.yml'
|
19
|
-
}
|
20
|
-
|
21
|
-
##
|
22
|
-
# Authentication object
|
23
|
-
class Auth
|
24
|
-
attr_reader :user, :note, :file
|
25
|
-
|
26
|
-
def initialize(params = {})
|
27
|
-
@user = nil
|
28
|
-
@file = params.delete(:file) || DEFAULTS[:file]
|
29
|
-
@note = params.delete(:note)
|
30
|
-
fail ArgumentError, 'Must provide a note for GitHub token' if @note.nil?
|
31
|
-
@api = Octokit::Client.new params
|
32
|
-
end
|
33
|
-
|
34
|
-
def authenticate!(params = {})
|
35
|
-
end
|
36
|
-
|
37
|
-
private
|
38
|
-
|
39
|
-
def login
|
40
|
-
end
|
41
|
-
|
42
|
-
def password
|
43
|
-
end
|
44
|
-
|
45
|
-
def twofactor
|
46
|
-
end
|
47
|
-
end
|
48
11
|
end
|
12
|
+
|
13
|
+
require 'octoauth/configfile'
|
14
|
+
require 'octoauth/auth'
|
@@ -0,0 +1,74 @@
|
|
1
|
+
require 'octokit'
|
2
|
+
require 'userinput'
|
3
|
+
|
4
|
+
##
|
5
|
+
# Define Auth object and related info for Octoauth
|
6
|
+
module Octoauth
|
7
|
+
##
|
8
|
+
# Default OAuth scopes for tokens
|
9
|
+
DEFAULT_SCOPES = []
|
10
|
+
|
11
|
+
##
|
12
|
+
# Prompt information for collecting user info
|
13
|
+
PROMPTS = {
|
14
|
+
login: UserInput.new(message: 'GitHub username', validation: /\w+/),
|
15
|
+
password: UserInput.new(message: 'Password', secret: true),
|
16
|
+
twofactor: UserInput.new(message: '2FA token', validation: /\d+/)
|
17
|
+
}
|
18
|
+
|
19
|
+
##
|
20
|
+
# Authentication object
|
21
|
+
class Auth
|
22
|
+
attr_reader :token
|
23
|
+
|
24
|
+
def initialize(params = {})
|
25
|
+
params[:config_note] = params[:note].dup
|
26
|
+
if params.include? :api_endpoint
|
27
|
+
params[:config_note] << "--#{params[:api_endpoint]}"
|
28
|
+
end
|
29
|
+
@config = ConfigFile.new file: params[:file], note: params[:config_note]
|
30
|
+
@token = load_token params
|
31
|
+
end
|
32
|
+
|
33
|
+
def save
|
34
|
+
fail 'No token to save' unless @token
|
35
|
+
@config.token = @token
|
36
|
+
@config.write
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def load_token(params = {})
|
42
|
+
return @config.token if @config.token
|
43
|
+
params[:login] ||= PROMPTS[:login].ask
|
44
|
+
params[:password] ||= PROMPTS[:password].ask
|
45
|
+
params[:twofactor] ||= PROMPTS[:twofactor].ask if params[:needs2fa]
|
46
|
+
params[:scopes] ||= DEFAULT_SCOPES
|
47
|
+
if params[:twofactor]
|
48
|
+
params[:headers] = { 'X-GitHub-OTP' => params[:twofactor] }
|
49
|
+
end
|
50
|
+
authenticate! params
|
51
|
+
end
|
52
|
+
|
53
|
+
def authenticate!(params = {})
|
54
|
+
client = Octokit::Client.new(
|
55
|
+
params.subset(:login, :password, :api_endpoint)
|
56
|
+
)
|
57
|
+
client.create_authorization(
|
58
|
+
params.subset(:note, :scopes, :headers)
|
59
|
+
).token
|
60
|
+
rescue Octokit::OneTimePasswordRequired
|
61
|
+
load_token params.merge(needs2fa: true)
|
62
|
+
rescue Octokit::UnprocessableEntity
|
63
|
+
client.authorizations.find { |x| x[:note] == params[:note] }.token
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# Add .subset to Hash for selecting a subhash
|
70
|
+
class Hash
|
71
|
+
def subset(*keys)
|
72
|
+
select { |k| keys.include? k }
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
##
|
4
|
+
# Define Config spec
|
5
|
+
module Octoauth
|
6
|
+
##
|
7
|
+
# Define default file path
|
8
|
+
DEFAULT_FILE = '~/.octoauth.yml'
|
9
|
+
|
10
|
+
##
|
11
|
+
# Configuration object
|
12
|
+
class ConfigFile
|
13
|
+
attr_reader :file
|
14
|
+
attr_accessor :token
|
15
|
+
|
16
|
+
##
|
17
|
+
# Create new Config object, either ephemerally or from a file
|
18
|
+
def initialize(params = {})
|
19
|
+
@file = params[:file] == :default ? DEFAULT_FILE : params[:file]
|
20
|
+
@note = params[:note] || fail(ArgumentError, 'A note must be provided')
|
21
|
+
@token = parse
|
22
|
+
end
|
23
|
+
|
24
|
+
def write
|
25
|
+
new = get
|
26
|
+
new[@note] = @token
|
27
|
+
File.open(@file, 'w', 0400) { |fh| fh.write new.to_yaml }
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def get
|
33
|
+
return {} unless @file && File.exist?(@file)
|
34
|
+
YAML.load File.read(File.expand_path(@file))
|
35
|
+
end
|
36
|
+
|
37
|
+
def parse
|
38
|
+
get[@note]
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/octoauth.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'octoauth'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.2'
|
4
4
|
s.date = Time.now.strftime("%Y-%m-%d")
|
5
5
|
|
6
6
|
s.summary = ''
|
@@ -13,11 +13,11 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = `git ls-files`.split
|
14
14
|
s.test_files = `git ls-files spec/*`.split
|
15
15
|
|
16
|
-
s.add_dependency 'octokit', '~> 3.
|
16
|
+
s.add_dependency 'octokit', '~> 3.1.0'
|
17
17
|
s.add_dependency 'userinput', '~> 0.0.2'
|
18
18
|
|
19
19
|
s.add_development_dependency 'rubocop', '~> 0.20.0'
|
20
|
-
s.add_development_dependency 'rake', '~> 10.
|
20
|
+
s.add_development_dependency 'rake', '~> 10.3.0'
|
21
21
|
s.add_development_dependency 'coveralls', '~> 0.7.0'
|
22
22
|
s.add_development_dependency 'rspec', '~> 2.14.1'
|
23
23
|
s.add_development_dependency 'fuubar', '~> 1.3.2'
|
@@ -0,0 +1,146 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
##
|
5
|
+
# Shim object for mocking auth resources
|
6
|
+
AuthShim = Struct.new(:note, :token)
|
7
|
+
|
8
|
+
module UserInput
|
9
|
+
##
|
10
|
+
# Mask prints from UserInput
|
11
|
+
class Prompt
|
12
|
+
def print(*args)
|
13
|
+
end
|
14
|
+
|
15
|
+
def puts(*args)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe Octoauth do
|
21
|
+
describe Octoauth::Auth do
|
22
|
+
describe '#initialize' do
|
23
|
+
context 'if the file and note already exist' do
|
24
|
+
it 'loads the existing token' do
|
25
|
+
auth = Octoauth::Auth.new(
|
26
|
+
note: 'foo',
|
27
|
+
file: 'spec/examples/conf_a.yml'
|
28
|
+
)
|
29
|
+
expect(auth.token).to eql 'bcdebcdebcdebcdebcdebcdebcde'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
context 'if there is a note conflict' do
|
33
|
+
it 'returns the existing token' do
|
34
|
+
stub_request(:post, 'https://user:pw@api.github.com/authorizations')
|
35
|
+
.with(body: "{\"note\":\"existing\",\"scopes\":[]}")
|
36
|
+
.to_return(status: 422)
|
37
|
+
stub_request(:get, 'https://user:pw@api.github.com/authorizations')
|
38
|
+
.to_return(
|
39
|
+
status: 200,
|
40
|
+
body: [
|
41
|
+
AuthShim.new('not_match', 'bad'),
|
42
|
+
AuthShim.new('existing', 'existing_token')
|
43
|
+
]
|
44
|
+
)
|
45
|
+
auth = Octoauth::Auth.new(
|
46
|
+
note: 'existing',
|
47
|
+
login: 'user',
|
48
|
+
password: 'pw'
|
49
|
+
)
|
50
|
+
expect(auth.token).to eql 'existing_token'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
context 'if the file does not exist' do
|
54
|
+
it 'requests user input to create token' do
|
55
|
+
stub_request(:post, 'https://user:pw@api.github.com/authorizations')
|
56
|
+
.with(body: "{\"note\":\"foo\",\"scopes\":[]}")
|
57
|
+
.to_return(
|
58
|
+
status: 200,
|
59
|
+
body: AuthShim.new('foo', 'qwertyqwertyqwertyqwerty')
|
60
|
+
)
|
61
|
+
auth = Octoauth::Auth.new(
|
62
|
+
note: 'foo',
|
63
|
+
login: 'user',
|
64
|
+
password: 'pw'
|
65
|
+
)
|
66
|
+
expect(auth.token).to eql 'qwertyqwertyqwertyqwerty'
|
67
|
+
end
|
68
|
+
it 'handles users with 2 factor auth enabled' do
|
69
|
+
stub_request(:post, 'https://user:pw@api.github.com/authorizations')
|
70
|
+
.with(body: "{\"note\":\"foo\",\"scopes\":[]}")
|
71
|
+
.to_return(
|
72
|
+
status: 401,
|
73
|
+
headers: { 'X-GitHub-OTP' => 'required; app' }
|
74
|
+
)
|
75
|
+
stub_request(:post, 'https://user:pw@api.github.com/authorizations')
|
76
|
+
.with(
|
77
|
+
body: "{\"note\":\"foo\",\"scopes\":[]}",
|
78
|
+
headers: { 'X-GitHub-OTP' => '1234' }
|
79
|
+
)
|
80
|
+
.to_return(
|
81
|
+
status: 200,
|
82
|
+
body: AuthShim.new('foo', 'qwertyqwertyqwertyqwerty')
|
83
|
+
)
|
84
|
+
allow(STDIN).to receive(:gets).and_return("user\n", "pw\n", "1234\n")
|
85
|
+
auth = Octoauth::Auth.new(note: 'foo')
|
86
|
+
expect(auth.token).to eql 'qwertyqwertyqwertyqwerty'
|
87
|
+
end
|
88
|
+
end
|
89
|
+
it 'supports alternate endpoints' do
|
90
|
+
stub_request(:post, 'https://user:pw@sekrit.com/api/v3/authorizations')
|
91
|
+
.with(body: "{\"note\":\"foo\",\"scopes\":[]}")
|
92
|
+
.to_return(
|
93
|
+
status: 200,
|
94
|
+
body: AuthShim.new('foo', 'qwertyqwertyqwertyqwerty')
|
95
|
+
)
|
96
|
+
auth = Octoauth::Auth.new(
|
97
|
+
note: 'foo',
|
98
|
+
login: 'user',
|
99
|
+
password: 'pw',
|
100
|
+
api_endpoint: 'https://sekrit.com/api/v3/'
|
101
|
+
)
|
102
|
+
expect(auth.token).to eql 'qwertyqwertyqwertyqwerty'
|
103
|
+
end
|
104
|
+
it 'supports requesting scopes' do
|
105
|
+
stub_request(:post, 'https://user:pw@api.github.com/authorizations')
|
106
|
+
.with(body: '{"note":"foo","scopes":["gist","delete_repo"]}')
|
107
|
+
.to_return(
|
108
|
+
status: 200,
|
109
|
+
body: AuthShim.new('foo', 'qwertyqwertyqwertyqwerty')
|
110
|
+
)
|
111
|
+
auth = Octoauth::Auth.new(
|
112
|
+
note: 'foo',
|
113
|
+
login: 'user',
|
114
|
+
password: 'pw',
|
115
|
+
scopes: %w(gist delete_repo)
|
116
|
+
)
|
117
|
+
expect(auth.token).to eql 'qwertyqwertyqwertyqwerty'
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
describe '#save' do
|
122
|
+
it 'saves the config to disk' do
|
123
|
+
random = rand(36**30).to_s(30)
|
124
|
+
FileUtils.rm_f 'spec/examples/tmp.yml'
|
125
|
+
stub_request(:post, 'https://user:pw@api.github.com/authorizations')
|
126
|
+
.with(body: "{\"note\":\"write_test\",\"scopes\":[]}")
|
127
|
+
.to_return(
|
128
|
+
status: 200,
|
129
|
+
body: AuthShim.new('foo', random)
|
130
|
+
)
|
131
|
+
auth = Octoauth::Auth.new(
|
132
|
+
note: 'write_test',
|
133
|
+
file: 'spec/examples/tmp.yml',
|
134
|
+
login: 'user',
|
135
|
+
password: 'pw'
|
136
|
+
)
|
137
|
+
auth.save
|
138
|
+
new_auth = Octoauth::Auth.new(
|
139
|
+
note: 'write_test',
|
140
|
+
file: 'spec/examples/tmp.yml'
|
141
|
+
)
|
142
|
+
expect(new_auth.token).to eql random
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
describe Octoauth do
|
5
|
+
describe Octoauth::ConfigFile do
|
6
|
+
describe '#initialize' do
|
7
|
+
it 'requires a note' do
|
8
|
+
expect { Octoauth::ConfigFile.new }.to raise_error ArgumentError
|
9
|
+
end
|
10
|
+
context 'when given a file path' do
|
11
|
+
it 'loads that config' do
|
12
|
+
config = Octoauth::ConfigFile.new(
|
13
|
+
note: 'foo',
|
14
|
+
file: 'spec/examples/conf_a.yml'
|
15
|
+
)
|
16
|
+
expect(config.token).to eql 'bcdebcdebcdebcdebcdebcdebcde'
|
17
|
+
end
|
18
|
+
it 'returns nil if the file does not exist' do
|
19
|
+
config = Octoauth::ConfigFile.new(note: 'foo', file: 'wat')
|
20
|
+
expect(config.token).to be_nil
|
21
|
+
end
|
22
|
+
end
|
23
|
+
context 'when give :default' do
|
24
|
+
it 'uses the default file' do
|
25
|
+
config = Octoauth::ConfigFile.new(note: 'foo', file: :default)
|
26
|
+
expect(config.file).to eql Octoauth::DEFAULT_FILE
|
27
|
+
end
|
28
|
+
end
|
29
|
+
context 'when given no file' do
|
30
|
+
it 'returns an empty hash' do
|
31
|
+
config = Octoauth::ConfigFile.new(note: 'foo')
|
32
|
+
expect(config.token).to be_nil
|
33
|
+
expect(config.file).to be_nil
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe '#write' do
|
39
|
+
it 'saves a config to disk' do
|
40
|
+
FileUtils.rm_f 'spec/examples/tmp.yml'
|
41
|
+
random = rand(36**30).to_s(30)
|
42
|
+
config = Octoauth::ConfigFile.new(
|
43
|
+
note: 'bar',
|
44
|
+
file: 'spec/examples/tmp.yml'
|
45
|
+
)
|
46
|
+
config.token = random
|
47
|
+
config.write
|
48
|
+
new_config = Octoauth::ConfigFile.new(
|
49
|
+
note: 'bar',
|
50
|
+
file: 'spec/examples/tmp.yml'
|
51
|
+
)
|
52
|
+
expect(new_config.token).to eql random
|
53
|
+
end
|
54
|
+
it 'makes the config file owner-readable' do
|
55
|
+
FileUtils.rm_f 'spec/examples/priv_test.yml'
|
56
|
+
random = rand(36**30).to_s(30)
|
57
|
+
config = Octoauth::ConfigFile.new(
|
58
|
+
note: 'bar',
|
59
|
+
file: 'spec/examples/priv_test.yml'
|
60
|
+
)
|
61
|
+
config.token = random
|
62
|
+
config.write
|
63
|
+
privs = File.stat('spec/examples/priv_test.yml').mode.to_s(8)
|
64
|
+
expect(privs).to eql '100400'
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
data/spec/octoauth_spec.rb
CHANGED
@@ -3,15 +3,13 @@ require 'spec_helper'
|
|
3
3
|
describe Octoauth do
|
4
4
|
describe '#new' do
|
5
5
|
it 'creates auth objects' do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
it 'creates an auth object' do
|
14
|
-
expect(subject).to be_an_instance_of Octoauth::Auth
|
6
|
+
stub_request(:post, 'https://good:sekrit@api.github.com/authorizations')
|
7
|
+
.to_return(
|
8
|
+
status: 200,
|
9
|
+
body: Struct.new(:token).new('abcdabcdabcdabcdabcdabcdabcdabcdabcd')
|
10
|
+
)
|
11
|
+
auth = Octoauth.new note: 'testing', login: 'good', password: 'sekrit'
|
12
|
+
expect(auth).to be_an_instance_of Octoauth::Auth
|
15
13
|
end
|
16
14
|
end
|
17
15
|
end
|
metadata
CHANGED
@@ -1,125 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octoauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
19
|
+
version: 3.1.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.
|
26
|
+
version: 3.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: userinput
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.0.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.0.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rubocop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 0.20.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.20.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 10.
|
61
|
+
version: 10.3.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 10.
|
68
|
+
version: 10.3.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: coveralls
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.7.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.7.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 2.14.1
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 2.14.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: fuubar
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - ~>
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 1.3.2
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - ~>
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 1.3.2
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: webmock
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - ~>
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 1.17.4
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - ~>
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 1.17.4
|
125
125
|
description: ''
|
@@ -128,16 +128,21 @@ executables: []
|
|
128
128
|
extensions: []
|
129
129
|
extra_rdoc_files: []
|
130
130
|
files:
|
131
|
-
- .gitignore
|
132
|
-
- .rspec
|
133
|
-
- .rubocop.yml
|
134
|
-
- .travis.yml
|
131
|
+
- ".gitignore"
|
132
|
+
- ".rspec"
|
133
|
+
- ".rubocop.yml"
|
134
|
+
- ".travis.yml"
|
135
135
|
- Gemfile
|
136
136
|
- LICENSE
|
137
137
|
- README.md
|
138
138
|
- Rakefile
|
139
139
|
- lib/octoauth.rb
|
140
|
+
- lib/octoauth/auth.rb
|
141
|
+
- lib/octoauth/configfile.rb
|
140
142
|
- octoauth.gemspec
|
143
|
+
- spec/examples/conf_a.yml
|
144
|
+
- spec/octoauth/auth_spec.rb
|
145
|
+
- spec/octoauth/configfile_spec.rb
|
141
146
|
- spec/octoauth_spec.rb
|
142
147
|
- spec/spec_helper.rb
|
143
148
|
homepage: https://github.com/akerl/octoauth
|
@@ -150,12 +155,12 @@ require_paths:
|
|
150
155
|
- lib
|
151
156
|
required_ruby_version: !ruby/object:Gem::Requirement
|
152
157
|
requirements:
|
153
|
-
- -
|
158
|
+
- - ">="
|
154
159
|
- !ruby/object:Gem::Version
|
155
160
|
version: '0'
|
156
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
162
|
requirements:
|
158
|
-
- -
|
163
|
+
- - ">="
|
159
164
|
- !ruby/object:Gem::Version
|
160
165
|
version: '0'
|
161
166
|
requirements: []
|
@@ -165,5 +170,8 @@ signing_key:
|
|
165
170
|
specification_version: 4
|
166
171
|
summary: ''
|
167
172
|
test_files:
|
173
|
+
- spec/examples/conf_a.yml
|
174
|
+
- spec/octoauth/auth_spec.rb
|
175
|
+
- spec/octoauth/configfile_spec.rb
|
168
176
|
- spec/octoauth_spec.rb
|
169
177
|
- spec/spec_helper.rb
|