trk 0.1.2 → 0.1.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/lib/trk/cli.rb +15 -1
- data/lib/trk/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3da7a8df4179a04353de1da8f56b71fd084ea0b7323509669a033b5bbe0cd427
|
4
|
+
data.tar.gz: dcfe27b52720e39081f6c834e8b98becd7b142ccd033da7c59844c1ad10aa737
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40d509303d7f61454e4d9c369c7600e7b6626bb2775160a27c69f2afe7709a4b256d393d4169592f791f7b8cdfba0b90ea88e151a1cc5c6bd532640214ea1241
|
7
|
+
data.tar.gz: 17d7a7f32106d78233e56a426d86000f7b08d53a6f161de9bc5d073409c7640eff887d15a9ace02434cff9019f232c60e0c691ea51b1937c37718104f8023381
|
data/lib/trk/cli.rb
CHANGED
@@ -1,10 +1,24 @@
|
|
1
1
|
require "thor"
|
2
2
|
require "open3"
|
3
|
+
require "net/http"
|
4
|
+
require "uri"
|
3
5
|
|
4
6
|
module Trk
|
5
7
|
class CLI < Thor
|
6
|
-
desc "
|
8
|
+
desc "add_github_keys USERNAME", "Add Github user public keys to .ssh/authorized_keys"
|
9
|
+
def add_github_keys(username)
|
10
|
+
uri = URI "https://trk.tools/sh/ssh-tips/-/raw/main/add_github_keys_to_authorized_keys.sh"
|
11
|
+
script = Net::HTTP.get uri
|
12
|
+
stdout, stderr, status = Open3.capture3 "bash -s -- #{username}", stdin_data: script
|
13
|
+
puts stdout
|
14
|
+
if status.success?
|
15
|
+
puts "#{CHECK_ICON} add_github_keys #{username} done"
|
16
|
+
else
|
17
|
+
puts "#{UNCHECK_ICON} add_github_keys #{username} failed:\n#{stderr}"
|
18
|
+
end
|
19
|
+
end
|
7
20
|
|
21
|
+
desc "pull", "Pulls Git repositories inside sub-sub directories"
|
8
22
|
def pull
|
9
23
|
base_dir = File.expand_path("~/trk.tools")
|
10
24
|
sub_sub_dirs = Dir.glob("#{base_dir}/*/*").select { |d| File.directory?(d) }
|
data/lib/trk/version.rb
CHANGED
metadata
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dusan Orlovic
|
8
|
+
autorequire:
|
8
9
|
bindir: exe
|
9
10
|
cert_chain: []
|
10
11
|
date: 2025-03-11 00:00:00.000000000 Z
|
@@ -48,6 +49,7 @@ licenses:
|
|
48
49
|
metadata:
|
49
50
|
homepage_uri: https://trk.tools
|
50
51
|
source_code_uri: https://trk.tools/app/trk-readme-source-links
|
52
|
+
post_install_message:
|
51
53
|
rdoc_options: []
|
52
54
|
require_paths:
|
53
55
|
- lib
|
@@ -62,7 +64,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
64
|
- !ruby/object:Gem::Version
|
63
65
|
version: '0'
|
64
66
|
requirements: []
|
65
|
-
rubygems_version: 3.
|
67
|
+
rubygems_version: 3.5.16
|
68
|
+
signing_key:
|
66
69
|
specification_version: 4
|
67
70
|
summary: CLI tools to manipulate https://trk.tools README files and projects.
|
68
71
|
test_files: []
|