fue 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6784a7e45c93b1e0622f4e719f58c541246a15fd64927245c97bd0f03574252a
4
- data.tar.gz: ce2c2b1ef2f06c9cdd56d638ab4bbd7df8e1497ffb26190514d1e4b9f0ab621f
3
+ metadata.gz: 54dab7602f55078312dd06a2c78433c39729ba220c639cd8bf01f620a08777e8
4
+ data.tar.gz: aa7a4aa7462e4d830c17f62dd08c6c2895a0e36b887b93307d6d9bd70407bc97
5
5
  SHA512:
6
- metadata.gz: d503619065aab23dfd208305f1aafd9b8869538662397e6e471008be90c9713d510ac6e6af3ac5bfe2f1c392514749fa7eee8bd175aac2604da6e2223bb41ff4
7
- data.tar.gz: 4d9ee34e80d5d031b291c4318fdab7733f95a5f5cf19e956078212b0a83e3700f54ee0e5227ee1635dcc2e0169e3d2a74d605a5db118f42d061e3ff0f17631b5
6
+ metadata.gz: 23dd2b6150e44ce49a3a6a9b5ad7f478a155836e04a173daa09761c1c56cee1d3b510ac81f11e580bb48bfef16cc60a52490d87c18592c281c4a8e582a28d9a0
7
+ data.tar.gz: 62474f917d54a8a7e4b9448db53db1e920d282bbed501f6d55016704779995607f2e6ae75775c1302fee1703d48f99ae8f4ecca764d7bfefdfd37705f9660d65
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
- ### 0.3.1 (Next)
1
+ ### 0.4.0 (2022/12/31)
2
+
3
+ * [#31](https://github.com/dblock/fue/pull/31): Use Danger - [@dblock](https://github.com/dblock).
4
+ * [#31](https://github.com/dblock/fue/pull/31): Replace Travis CI with GHA - [@dblock](https://github.com/dblock).
5
+ * [#31](https://github.com/dblock/fue/pull/31): Remove deprecated GitHub PAT creation workflow - [@dblock](https://github.com/dblock).
6
+
7
+ ### 0.3.1 (2021/07/19)
2
8
 
3
9
  * [#29](https://github.com/dblock/fue/issues/29): Fix: `error: can't modify frozen String` - [@dblock](https://github.com/dblock).
4
10
 
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018-2020 Daniel Doubrovkine.
3
+ Copyright (c) 2018-2022 Daniel Doubrovkine.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -2,8 +2,7 @@ Fue
2
2
  ===
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/fue.svg)](https://badge.fury.io/rb/fue)
5
- [![Build Status](https://travis-ci.org/dblock/fue.svg)](https://travis-ci.org/dblock/fue)
6
- [![Build status](https://ci.appveyor.com/api/projects/status/github/dblock/fue?branch=master&svg=true)](https://ci.appveyor.com/project/dblock/fue)
5
+ [![Tests](https://github.com/dblock/fue/actions/workflows/test.yml/badge.svg)](https://github.com/dblock/fue/actions/workflows/test.yml)
7
6
 
8
7
  Find e-mail addresses of a Github users from their commit logs.
9
8
 
@@ -11,6 +10,20 @@ Fue is short for "Finding Unicorn Engineers".
11
10
 
12
11
  ![](images/fue.gif)
13
12
 
13
+ ## Table of Contents
14
+
15
+ - [Usage](#usage)
16
+ - [Commands](#commands)
17
+ - [Find Someone’s Email](#find-someones-email)
18
+ - [Find All Repo Contributors’ Emails](#find-all-repo-contributors-emails)
19
+ - [Options](#options)
20
+ - [Specify More Depth](#specify-more-depth)
21
+ - [Get Help](#get-help)
22
+ - [Access Tokens](#access-tokens)
23
+ - [Debugging](#debugging)
24
+ - [Contributing](#contributing)
25
+ - [Copyright and License](#copyright-and-license)
26
+
14
27
  ## Usage
15
28
 
16
29
  ```
@@ -65,16 +78,7 @@ Displays additional options.
65
78
 
66
79
  ### Access Tokens
67
80
 
68
- Fue will prompt you for Github credentials and 2FA, if enabled.
69
-
70
- ```
71
- $ fue find defunkt
72
- Enter dblock's GitHub password (never stored): ******************
73
- Enter GitHub 2FA code: ******
74
- Token saved to keychain.
75
- ```
76
-
77
- The access token will be generated with `public_repo` scope and stored in the keychain. It can be later deleted from [here](https://github.com/settings/tokens). You can also skip the prompts and use a previously obtained token with `-t` or by setting the `GITHUB_ACCESS_TOKEN` environment variable.
81
+ Fue will ask you to create a personal access token and will store it in the keychain. The access token should be created with `public_repo` scope [here](https://github.com/settings/tokens). You can also skip the prompts and use a previously obtained token with `-t` or by setting the `GITHUB_ACCESS_TOKEN` environment variable.
78
82
 
79
83
  See [Creating a Personal Access Token for the Command Line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line) for more information about personal tokens.
80
84
 
@@ -98,6 +102,6 @@ There are [a few feature requests and known issues](https://github.com/dblock/fu
98
102
 
99
103
  ## Copyright and License
100
104
 
101
- Copyright (c) 2018-2020, Daniel Doubrovkine, [Artsy](http://artsy.github.io), with help from [Orta](https://github.com/orta).
105
+ Copyright (c) 2018-2022, Daniel Doubrovkine, [Artsy](http://artsy.github.io), with help from [Orta](https://github.com/orta).
102
106
 
103
107
  This project is licensed under the [MIT License](LICENSE.md).
data/bin/fue CHANGED
@@ -11,7 +11,7 @@ class App
11
11
  version Fue::VERSION
12
12
 
13
13
  switch %i[v verbose], desc: 'Produce verbose output.', default_value: false
14
- flag %i[t token], desc: 'GitHub access token.', default_value: ENV['GITHUB_ACCESS_TOKEN']
14
+ flag %i[t token], desc: 'GitHub access token.', default_value: ENV.fetch('GITHUB_ACCESS_TOKEN', nil)
15
15
  flag %i[u username], desc: 'GitHub username.', default_value: Fue::Auth.instance.username
16
16
 
17
17
  arguments :strict
data/lib/fue/auth.rb CHANGED
@@ -27,46 +27,17 @@ module Fue
27
27
 
28
28
  private
29
29
 
30
+ def github_token(_code = nil)
31
+ puts 'Create a personal access token on https://github.com/settings/tokens: '
32
+ get_secure
33
+ end
34
+
30
35
  def get_git_username
31
36
  Fue::Shell.system!('git config user.name')
32
37
  rescue RuntimeError
33
38
  nil
34
39
  end
35
40
 
36
- def github_token(code = nil)
37
- github(code).auth.create(scopes: ['public_repo'], note: note).token
38
- rescue Github::Error::Unauthorized => e
39
- case e.response_headers['X-GitHub-OTP']
40
- when /required/
41
- github_token(get_code)
42
- else
43
- raise e
44
- end
45
- rescue Github::Error::UnprocessableEntity => e
46
- raise e, 'A fue token already exists! Please revoke all previously-generated fue personal access tokens at https://github.com/settings/tokens.'
47
- end
48
-
49
- def password
50
- @password ||= get_password
51
- end
52
-
53
- def note
54
- "Fui (https://github.com/dblock/fue) on #{Socket.gethostname}"
55
- end
56
-
57
- def github(code = nil)
58
- Github.new do |config|
59
- config.basic_auth = [username, password].join(':')
60
- if code
61
- config.connection_options = {
62
- headers: {
63
- 'X-GitHub-OTP' => code
64
- }
65
- }
66
- end
67
- end
68
- end
69
-
70
41
  def get_username
71
42
  print 'Enter GitHub username: '
72
43
  username = $stdin.gets
@@ -75,16 +46,6 @@ module Fue
75
46
  raise e, 'ctrl + c'
76
47
  end
77
48
 
78
- def get_password
79
- print "Enter #{username}'s GitHub password (never stored): "
80
- get_secure
81
- end
82
-
83
- def get_code
84
- print 'Enter GitHub 2FA code: '
85
- get_secure
86
- end
87
-
88
49
  def get_secure
89
50
  current_tty = `stty -g`
90
51
  system 'stty raw -echo -icanon isig' if $CHILD_STATUS.success?
data/lib/fue/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fue
4
- VERSION = '0.3.1'
4
+ VERSION = '0.4.0'
5
5
  end
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2022-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "<"
18
+ - !ruby/object:Gem::Version
19
+ version: '2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "<"
25
+ - !ruby/object:Gem::Version
26
+ version: '2'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: github_api
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - "~>"
18
32
  - !ruby/object:Gem::Version
19
- version: 0.18.2
33
+ version: 0.19.0
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
38
  - - "~>"
25
39
  - !ruby/object:Gem::Version
26
- version: 0.18.2
40
+ version: 0.19.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: gli
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +58,14 @@ dependencies:
44
58
  requirements:
45
59
  - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: 0.3.2
61
+ version: 0.6.0
48
62
  type: :runtime
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: 0.3.2
68
+ version: 0.6.0
55
69
  description:
56
70
  email: dblock@dblock.org
57
71
  executables:
@@ -73,7 +87,8 @@ files:
73
87
  homepage: http://github.com/dblock/fue
74
88
  licenses:
75
89
  - MIT
76
- metadata: {}
90
+ metadata:
91
+ rubygems_mfa_required: 'true'
77
92
  post_install_message:
78
93
  rdoc_options: []
79
94
  require_paths:
@@ -82,14 +97,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
97
  requirements:
83
98
  - - ">="
84
99
  - !ruby/object:Gem::Version
85
- version: '2.5'
100
+ version: '2.7'
86
101
  required_rubygems_version: !ruby/object:Gem::Requirement
87
102
  requirements:
88
103
  - - ">="
89
104
  - !ruby/object:Gem::Version
90
105
  version: 1.3.6
91
106
  requirements: []
92
- rubygems_version: 3.0.4
107
+ rubygems_version: 3.3.7
93
108
  signing_key:
94
109
  specification_version: 4
95
110
  summary: Find an e-mail address of a GitHub user.