gl-repos 0.0.1
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 +7 -0
- data/bin/gl-repos-cache +5 -0
- data/bin/gl-repos-list +5 -0
- data/lib/gl-repos/main.rb +27 -0
- metadata +47 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ff367c8be6cfd0d8d8587e94fec6094cdc077c7ddb1312b25d0f458d5b6bae05
|
4
|
+
data.tar.gz: 01c00716d98861c7d9ff8fefffac0e5dbe36301246d7ff6934f4a1adcab5f507
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: df5c882dc8ef73b7835c7c11039f2e31daa0b5d5971674fc8f740f2c1ede9323d5940b51c38691d1cfd43de1c6c7bb7be8561639a2fa67abfc656650fd6c3e27
|
7
|
+
data.tar.gz: a31cb33e06d3afd9eb7e24622b2a198e54436a3043649a3d4dcedeb8d541538276e8445d372fa9cad981f77c5e40ab9f8c3c287fe35f8b407f9375b3362987dd
|
data/bin/gl-repos-cache
ADDED
data/bin/gl-repos-list
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require "gitlab"
|
2
|
+
|
3
|
+
module Fetcher
|
4
|
+
|
5
|
+
def print()
|
6
|
+
if not File.exist? ENV["GITLAB_REPO_CACHE"]
|
7
|
+
fetch()
|
8
|
+
end
|
9
|
+
File.open(ENV["GITLAB_REPO_CACHE"], "r:UTF-8") do |file_handle|
|
10
|
+
file_handle.each_line do |repo|
|
11
|
+
if repo.length > 0
|
12
|
+
STDOUT.write "#{repo.split(":")[0]}\n"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def fetch()
|
19
|
+
cache = ""
|
20
|
+
Gitlab.endpoint = ENV["GITLAB_ENDPOINT"]
|
21
|
+
Gitlab.private_token = ENV["GITLAB_TOKEN"]
|
22
|
+
Gitlab.projects.auto_paginate do |project|
|
23
|
+
cache="#{cache}\n#{project.name_with_namespace}:#{project.web_url}"
|
24
|
+
end
|
25
|
+
File.write(ENV["GITLAB_REPO_CACHE"], cache)
|
26
|
+
end
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gl-repos
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andreas Kruhlmann
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-01-21 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: ''
|
14
|
+
email: kruhlmann@protonmail.com
|
15
|
+
executables:
|
16
|
+
- gl-repos-list
|
17
|
+
- gl-repos-cache
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- bin/gl-repos-cache
|
22
|
+
- bin/gl-repos-list
|
23
|
+
- lib/gl-repos/main.rb
|
24
|
+
homepage: https://github.com/Kruhlmann/gl-repos
|
25
|
+
licenses:
|
26
|
+
- GPL-3.0-or-later
|
27
|
+
metadata: {}
|
28
|
+
post_install_message:
|
29
|
+
rdoc_options: []
|
30
|
+
require_paths:
|
31
|
+
- lib
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
requirements: []
|
43
|
+
rubygems_version: 3.0.3
|
44
|
+
signing_key:
|
45
|
+
specification_version: 4
|
46
|
+
summary: Lists GitLab repos and their corresponding URLs
|
47
|
+
test_files: []
|