network_profile 0.3.1 → 0.3.3
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/Gemfile.lock +2 -2
- data/lib/network_profile/extractors/default_profile.rb +1 -1
- data/lib/network_profile/extractors/github_graphql.rb +4 -0
- data/lib/network_profile/extractors/github_profile.rb +7 -3
- data/lib/network_profile/extractors/github_project.rb +7 -2
- data/lib/network_profile/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5bc67189b8111e863610023b3fc4540bee618ec5ceb06d1f2a2b07ca4739d289
|
|
4
|
+
data.tar.gz: 3c1df1bd3d11975a1bb71b78a12c71626b34fc2e120cc2de0e444ef731f19906
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb4bea5ae9e060dfeb78003044e33bdc08121af2ffaac5761e11cff30c3e98b3b02f35f28fecdf4e47da87adb65a14dbe7a5ed4c44a787209644891c03e7c0db
|
|
7
|
+
data.tar.gz: 9ee7441b481a0e4052e641dc496ea5263665a0b888154e086f39560b788be861bc8528e6e0f4e54fcc5d8e10abbb0ae17d1f36fe3c365659d959ccde5e205309
|
data/Gemfile.lock
CHANGED
|
@@ -10,7 +10,7 @@ module NetworkProfile
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def query
|
|
13
|
-
username = @link[%r{github.com/([
|
|
13
|
+
username = @link[%r{github.com/([^/?#]+)}, 1]
|
|
14
14
|
<<~DOC
|
|
15
15
|
query {
|
|
16
16
|
organization(login:"#{username}") {
|
|
@@ -63,6 +63,10 @@ module NetworkProfile
|
|
|
63
63
|
json.dig('data', 'organization') || json.dig('data', 'user')
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
+
def data
|
|
67
|
+
super if profile_data
|
|
68
|
+
end
|
|
69
|
+
|
|
66
70
|
def title
|
|
67
71
|
profile_data['name']
|
|
68
72
|
end
|
|
@@ -86,8 +90,8 @@ module NetworkProfile
|
|
|
86
90
|
n = i['node']
|
|
87
91
|
{ name: n['nameWithOwner'],
|
|
88
92
|
url: n['url'],
|
|
89
|
-
created:
|
|
90
|
-
updated:
|
|
93
|
+
created: parse_date(n['createdAt']),
|
|
94
|
+
updated: parse_date(n['updatedAt']),
|
|
91
95
|
language: n.dig('primaryLanguage', 'name'),
|
|
92
96
|
stars: n['stargazers']['totalCount'],
|
|
93
97
|
watchers: n['watchers']['totalCount'] }
|
|
@@ -55,6 +55,11 @@ module NetworkProfile
|
|
|
55
55
|
DOC
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
# unknown repos come back as repository: null
|
|
59
|
+
def data
|
|
60
|
+
super if json.dig('data', 'repository')
|
|
61
|
+
end
|
|
62
|
+
|
|
58
63
|
def title
|
|
59
64
|
json.dig('data', 'repository', 'nameWithOwner')
|
|
60
65
|
end
|
|
@@ -64,7 +69,7 @@ module NetworkProfile
|
|
|
64
69
|
end
|
|
65
70
|
|
|
66
71
|
def last_commit
|
|
67
|
-
|
|
72
|
+
parse_date(json.dig('data', 'repository', 'defaultBranchRef', 'target', 'committedDate'))
|
|
68
73
|
end
|
|
69
74
|
|
|
70
75
|
def image
|
|
@@ -79,7 +84,7 @@ module NetworkProfile
|
|
|
79
84
|
issue_count: json.dig('data', 'repository', 'issues', 'totalCount'),
|
|
80
85
|
commits: json.dig('data', 'repository', 'defaultBranchRef', 'target', 'history', 'totalCount'),
|
|
81
86
|
license: json.dig('data', 'repository', 'licenseInfo', 'name'),
|
|
82
|
-
created:
|
|
87
|
+
created: parse_date(json.dig('data', 'repository', 'createdAt')),
|
|
83
88
|
language_bytes: json.dig('data', 'repository', 'languages', 'edges')&.map { |l| [l.dig('node', 'name'), l['size']] }&.sort_by { |_a, b| -b },
|
|
84
89
|
last_commit: last_commit
|
|
85
90
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: network_profile
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stefan Wienert
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: typhoeus
|
|
@@ -125,7 +124,6 @@ licenses:
|
|
|
125
124
|
metadata:
|
|
126
125
|
homepage_uri: https://github.com/pludoni/network_profile
|
|
127
126
|
source_code_uri: https://github.com/pludoni/network_profile
|
|
128
|
-
post_install_message:
|
|
129
127
|
rdoc_options: []
|
|
130
128
|
require_paths:
|
|
131
129
|
- lib
|
|
@@ -140,8 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
140
138
|
- !ruby/object:Gem::Version
|
|
141
139
|
version: '0'
|
|
142
140
|
requirements: []
|
|
143
|
-
rubygems_version: 3.
|
|
144
|
-
signing_key:
|
|
141
|
+
rubygems_version: 3.6.9
|
|
145
142
|
specification_version: 4
|
|
146
143
|
summary: Extract profile metadata from various social-media-profiles
|
|
147
144
|
test_files: []
|