ghuls 1.1.0 → 1.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 57fd274e8ef0970e5b162dd964a03e0d300d6776
4
- data.tar.gz: 67102aa993294944e1a5a1c29438f4d2f0d0d7a8
3
+ metadata.gz: 9cf9667cf49fbc619a5208b6bf16380f68b9c332
4
+ data.tar.gz: ca53abc3ed35d3b8b4f59cf48eed9907a8e9f0fd
5
5
  SHA512:
6
- metadata.gz: e29f031fcbaf92e49ce774f96a8e3c3443c138bcf00c27a11602cdfdfe246f7ced2f79e38af11f9d244718e81dace07e6a520028ee7598ed527e2177a814aa8d
7
- data.tar.gz: e889f014e5b211e7d7faf488ba9fba4b791b7d17ec600d8e4ddccb006f41577b551ee3b8496562cabb5c6a90616905c1c4243ee325c30ce1c8e55f4ced6c6a33
6
+ metadata.gz: 419a9742c6733f3fe7158d55a1323b55460c1777fc883bcd420f1eb6ef245bfb157126439e66640dbbe6e44833d1649f01c3957febb932b49fe06209b28b23a9
7
+ data.tar.gz: fe911a8c53792cc10ea90561595e26db6dd706b0361e4481c87f32e604c5db5ecb26af17d0a3811452591487c470896931ebf675131f986fe28a7f310ae0d1a0
data/cli/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
  ## Version 1
3
+ ### Version 1.2.0
4
+ * Fix require_relative statement for utilities.rb, so it now actually works outside of the project root.
5
+ * Better error handling for authentication error (ProgramFOX)
6
+ * You can now get organization data for people other than yourself. It now checks if the user is a contributor to the org repos, rather than a collaborator, which was causing some issues. (#19.)
7
+
3
8
  ### Version 1.1.0
4
9
  * Organizations that the -g user contributed to are now supported.
5
10
  * Better error-type-thing reporting.
data/cli/lib/ghuls/cli.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'octokit'
2
2
  require 'base64'
3
3
  require 'rainbow'
4
- require_relative "#{Dir.pwd}/utils/utilities"
4
+ require_relative '../../../utils/utilities'
5
5
 
6
6
  module GHULS
7
7
  class CLI
@@ -41,6 +41,11 @@ module GHULS
41
41
 
42
42
  parse_options(args)
43
43
  config = Utilities.configure_stuff(@opts)
44
+ if config == false
45
+ puts 'Error: authentication failed, check your username/password ' \
46
+ ' or token'
47
+ exit
48
+ end
44
49
  @gh = config[:git]
45
50
  @colors = config[:colors]
46
51
  end
data/utils/utilities.rb CHANGED
@@ -57,16 +57,14 @@ module Utilities
57
57
  end
58
58
  true_repos = []
59
59
  repos.each do |r|
60
- begin
61
- is_collaborator = github.collaborator?(r[:full_name], username)
62
- rescue Octokit::Forbidden
63
- next
64
- end
65
- if is_collaborator
66
- next if r[:fork]
67
- true_repos.push(r[:full_name])
68
- else
69
- next
60
+ next if r[:fork]
61
+ contributors = github.contributors(r[:full_name])
62
+ contributors.each do |c|
63
+ if c[:login] == username
64
+ true_repos.push(r[:full_name])
65
+ else
66
+ next
67
+ end
70
68
  end
71
69
  end
72
70
  true_repos
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghuls
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eli Foster
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-30 00:00:00.000000000 Z
11
+ date: 2015-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit