fue 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +14 -0
- data/lib/fue/auth.rb +2 -2
- data/lib/fue/finder.rb +11 -13
- data/lib/fue/security.rb +2 -2
- data/lib/fue/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6784a7e45c93b1e0622f4e719f58c541246a15fd64927245c97bd0f03574252a
|
4
|
+
data.tar.gz: ce2c2b1ef2f06c9cdd56d638ab4bbd7df8e1497ffb26190514d1e4b9f0ab621f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d503619065aab23dfd208305f1aafd9b8869538662397e6e471008be90c9713d510ac6e6af3ac5bfe2f1c392514749fa7eee8bd175aac2604da6e2223bb41ff4
|
7
|
+
data.tar.gz: 4d9ee34e80d5d031b291c4318fdab7733f95a5f5cf19e956078212b0a83e3700f54ee0e5227ee1635dcc2e0169e3d2a74d605a5db118f42d061e3ff0f17631b5
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
### 0.3.1 (Next)
|
2
|
+
|
3
|
+
* [#29](https://github.com/dblock/fue/issues/29): Fix: `error: can't modify frozen String` - [@dblock](https://github.com/dblock).
|
4
|
+
|
1
5
|
### 0.3.0 (2020/05/22)
|
2
6
|
|
3
7
|
* [#25](https://github.com/dblock/fue/pull/25): Added `contributors`, find repo contributors' e-mails - [@dblock](https://github.com/dblock).
|
data/README.md
CHANGED
@@ -78,6 +78,20 @@ The access token will be generated with `public_repo` scope and stored in the ke
|
|
78
78
|
|
79
79
|
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
80
|
|
81
|
+
## Debugging
|
82
|
+
|
83
|
+
If you run into an unexpected error, try getting a stack trace with `GLI_DEBUG=true`.
|
84
|
+
|
85
|
+
```
|
86
|
+
$ GLI_DEBUG=true fue find dblock
|
87
|
+
|
88
|
+
FrozenError: can't modify frozen String
|
89
|
+
/Users/dblock/source/dblock/fue/lib/fue/auth.rb:97:in `get_secure'
|
90
|
+
/Users/dblock/source/dblock/fue/lib/fue/auth.rb:80:in `get_password'
|
91
|
+
/Users/dblock/source/dblock/fue/lib/fue/auth.rb:50:in `password'
|
92
|
+
/Users/dblock/source/dblock/fue/lib/fue/auth.rb:59:in `block in github'
|
93
|
+
```
|
94
|
+
|
81
95
|
## Contributing
|
82
96
|
|
83
97
|
There are [a few feature requests and known issues](https://github.com/dblock/fue/issues). Please contribute! See [CONTRIBUTING](CONTRIBUTING.md).
|
data/lib/fue/auth.rb
CHANGED
@@ -28,7 +28,7 @@ module Fue
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def get_git_username
|
31
|
-
Fue::Shell.system!('git config
|
31
|
+
Fue::Shell.system!('git config user.name')
|
32
32
|
rescue RuntimeError
|
33
33
|
nil
|
34
34
|
end
|
@@ -88,7 +88,7 @@ module Fue
|
|
88
88
|
def get_secure
|
89
89
|
current_tty = `stty -g`
|
90
90
|
system 'stty raw -echo -icanon isig' if $CHILD_STATUS.success?
|
91
|
-
input =
|
91
|
+
input = String.new
|
92
92
|
while (char = $stdin.getbyte) && !((char == 13) || (char == 10))
|
93
93
|
if (char == 127) || (char == 8)
|
94
94
|
input[-1, 1] = '' unless input.empty?
|
data/lib/fue/finder.rb
CHANGED
@@ -58,7 +58,7 @@ module Fue
|
|
58
58
|
depth: options[:depth] || 1
|
59
59
|
}
|
60
60
|
|
61
|
-
|
61
|
+
$stdout.write "Searching for emails for #{options[:username]} ." if options[:verbose]
|
62
62
|
|
63
63
|
emails = Set.new
|
64
64
|
|
@@ -67,8 +67,8 @@ module Fue
|
|
67
67
|
response = graphql_client.query(query, query_options)
|
68
68
|
repositories = response&.data&.user&.repositories
|
69
69
|
repositories&.nodes&.each do |history|
|
70
|
-
|
71
|
-
|
70
|
+
default_history = history.default_branch_ref&.target&.history
|
71
|
+
default_history&.nodes&.each do |node|
|
72
72
|
emails << "#{node.author.name} <#{node.author.email}>"
|
73
73
|
end
|
74
74
|
end
|
@@ -78,7 +78,7 @@ module Fue
|
|
78
78
|
max_breadth -= 100
|
79
79
|
break if max_breadth <= 0
|
80
80
|
|
81
|
-
|
81
|
+
$stdout.write '.' if options[:verbose]
|
82
82
|
end
|
83
83
|
|
84
84
|
puts " found #{emails.size} email address#{emails.size == 1 ? '' : 'es'}." if options[:verbose]
|
@@ -121,7 +121,7 @@ module Fue
|
|
121
121
|
|
122
122
|
logins = Set.new
|
123
123
|
|
124
|
-
|
124
|
+
$stdout.write 'Fetching contributors .' if options[:verbose]
|
125
125
|
|
126
126
|
loop do
|
127
127
|
response = graphql_client.query(query, query_options)
|
@@ -131,19 +131,17 @@ module Fue
|
|
131
131
|
logins << login if login
|
132
132
|
end
|
133
133
|
query_options[:cursor] = history&.page_info.end_cursor
|
134
|
-
|
134
|
+
$stdout.write '.' if options[:verbose]
|
135
135
|
break unless query_options[:cursor]
|
136
136
|
end
|
137
137
|
|
138
138
|
puts " found #{logins.size} contributor#{logins.size == 1 ? '' : 's'}." if options[:verbose]
|
139
139
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
end
|
146
|
-
end.compact]
|
140
|
+
logins.map do |login|
|
141
|
+
[login, emails(options.merge(username: login))]
|
142
|
+
rescue StandardError => e
|
143
|
+
warn e.to_s
|
144
|
+
end.compact.to_h
|
147
145
|
end
|
148
146
|
|
149
147
|
private
|
data/lib/fue/security.rb
CHANGED
data/lib/fue/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Doubrovkine
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github_api
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.3.2
|
55
|
-
description:
|
55
|
+
description:
|
56
56
|
email: dblock@dblock.org
|
57
57
|
executables:
|
58
58
|
- fue
|
@@ -74,7 +74,7 @@ homepage: http://github.com/dblock/fue
|
|
74
74
|
licenses:
|
75
75
|
- MIT
|
76
76
|
metadata: {}
|
77
|
-
post_install_message:
|
77
|
+
post_install_message:
|
78
78
|
rdoc_options: []
|
79
79
|
require_paths:
|
80
80
|
- lib
|
@@ -82,15 +82,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: '
|
85
|
+
version: '2.5'
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: 1.3.6
|
91
91
|
requirements: []
|
92
|
-
rubygems_version: 3.
|
93
|
-
signing_key:
|
92
|
+
rubygems_version: 3.0.4
|
93
|
+
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: Find an e-mail address of a GitHub user.
|
96
96
|
test_files: []
|