octoauth 1.4.0 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.prospectus +11 -0
- data/lib/octoauth/auth.rb +5 -2
- data/octoauth.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e8c86992bd5cef84c8d1a3462af909b7fd3695f
|
4
|
+
data.tar.gz: 6de6cc8b669f59fc2b341d130aa9ffe8bbe1482a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f43c355d4991c437689450490f5b5fd61a45b7de0ca3e010fa5794911fb55e77c3f09db0fca9dc31ae03f17ff7769e149bf287a67de0e4d29bdadf2a2c777a29
|
7
|
+
data.tar.gz: 04b06e93fa81a02cbf2a15f1b1c1302f60fecbe97194a73a1e4b9e095ba05f8a9082718b38375fbf853236a387379176ecfb0f77e49397a2cc79531b2e6fcf82
|
data/.prospectus
ADDED
data/lib/octoauth/auth.rb
CHANGED
@@ -29,6 +29,7 @@ module Octoauth
|
|
29
29
|
fail 'No token to save' unless token
|
30
30
|
fail 'No file given for config' unless config.file
|
31
31
|
config.token = token
|
32
|
+
return unless @token_changed
|
32
33
|
config.write
|
33
34
|
end
|
34
35
|
|
@@ -68,8 +69,9 @@ module Octoauth
|
|
68
69
|
|
69
70
|
def hostname
|
70
71
|
return @hostname if @hostname
|
71
|
-
|
72
|
-
|
72
|
+
@hostname ||= ENV['HOSTNAME'] || `hostname`.split.first || 'NULL'
|
73
|
+
rescue Errno::ENOENT
|
74
|
+
@hostname = 'NULL'
|
73
75
|
end
|
74
76
|
|
75
77
|
def prompt!(needs2fa = false)
|
@@ -83,6 +85,7 @@ module Octoauth
|
|
83
85
|
|
84
86
|
def load_token(needs2fa = false)
|
85
87
|
return config.token if config.token
|
88
|
+
@token_changed = true
|
86
89
|
prompt!(needs2fa)
|
87
90
|
authenticate(needs2fa)
|
88
91
|
end
|
data/octoauth.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octoauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -143,6 +143,7 @@ extensions: []
|
|
143
143
|
extra_rdoc_files: []
|
144
144
|
files:
|
145
145
|
- ".gitignore"
|
146
|
+
- ".prospectus"
|
146
147
|
- ".rspec"
|
147
148
|
- ".rubocop.yml"
|
148
149
|
- CHANGELOG.md
|
@@ -188,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
189
|
version: '0'
|
189
190
|
requirements: []
|
190
191
|
rubyforge_project:
|
191
|
-
rubygems_version: 2.
|
192
|
+
rubygems_version: 2.5.1
|
192
193
|
signing_key:
|
193
194
|
specification_version: 4
|
194
195
|
summary: Auth token helper for GitHub API
|