indirect 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
  SHA256:
3
- metadata.gz: 60369d41e255aa8031709f6d103fbbfe542d8ae99486046b9f84188acb67c7c3
4
- data.tar.gz: 176f39153efbc4200ac1d7f6a846e8657dc2c338075ffcf0c8fbca6c399eb766
3
+ metadata.gz: f94de6d873a44a37ea7d29e67bcd15e990a961fdae63d55d2f243bd836dfb04c
4
+ data.tar.gz: 2284a92d3e5083812a1a62197b81025ded7a2ead2912330d5f12acbac39aff32
5
5
  SHA512:
6
- metadata.gz: 615d79f607c369a72737b6f4d8e699224629c2e81e5d67642c277bb18a6a743996b760d9ba602cfd945ef7db8aed648a7b9d489655f021e87c656adb18c4fbdf
7
- data.tar.gz: abc16b9f1580fe7015671a434e40e7da614c023f1f6f54d6b967565fc4b885c8769b4747ad3179fc7ca3ad05c03085de90aced9f528631b10e327e3b04c5fede
6
+ metadata.gz: ad47be25844c6c59ae5ce84fe2fc18b716035b265e2020f609d3b603b1797fd1ba81b50a104ea3dd69375522a791af025838ad412fd4e8a1a4df913319e326f7
7
+ data.tar.gz: d944d1afd41d74e8252b7a733a2c1036b1537515546ae7628e6ff8f3e7cb15c6b5001a7803f0f34219927454e3c2164995eb82188e69442ea867548a4df4d90f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- indirect (1.1.0)
4
+ indirect (1.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -36,4 +36,4 @@ DEPENDENCIES
36
36
  rspec (~> 3.0)
37
37
 
38
38
  BUNDLED WITH
39
- 2.5.0.dev
39
+ 2.6.9
@@ -1,3 +1,3 @@
1
1
  module Indirect
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
data/lib/indirect.rb CHANGED
@@ -1,19 +1,30 @@
1
1
  require "indirect/version"
2
- require "ostruct"
3
2
 
4
3
  module Indirect
5
4
  class Error < StandardError; end
6
5
 
6
+ class Info
7
+ def initialize(**args)
8
+ @args = args
9
+ end
10
+
11
+ def method_missing(name)
12
+ @args[name.to_sym]
13
+ end
14
+ end
15
+
7
16
  def self.info
8
- OpenStruct.new(
17
+ Info.new(
9
18
  name: "André Arko",
10
- handle: "indirect",
11
- job: "Vice Minister of Computation at cloudcity.io",
12
- oss: "RubyGems Coordinator at Ruby Central",
19
+ handle: "@indirect",
20
+ job: "Founder at Spinel Cooperative",
21
+ job_website: "spinel.coop",
22
+ oss: "Member at The Gem Cooperative",
23
+ oss_website: "gem.coop",
13
24
  email: "andre@arko.net",
14
25
  website: "arko.net",
15
26
  blog: "andre.arko.net",
16
- twitter: "indirect",
27
+ bluesky: "@indirect.io",
17
28
  github: "indirect",
18
29
  linkedin: "andrearko",
19
30
  mastodon: "fiasco.social/@indirect",
@@ -28,13 +39,18 @@ module Indirect
28
39
 
29
40
  def self.generate_card
30
41
  require "colorize"
31
- colors = [:cyan, :red, :blue, :green].cycle
42
+ colors = [:cyan, :green, :blue, :magenta].cycle
43
+
44
+ title = [info.name, "/".green, info.handle].join(" ")
32
45
 
33
- title = [info.name.white, "/".green, info.handle.white].join(" ")
46
+ job = {
47
+ "Work" => info.job,
48
+ "" => "https://" << info.job_website.send(colors.next),
49
+ }.select{|k,v| v }
34
50
 
35
- work = {
36
- "Work" => info.job.white,
37
- "Open Source" => info.oss.white,
51
+ oss = {
52
+ "Open Source" => info.oss,
53
+ "" => "https://" << info.oss_website.send(colors.next),
38
54
  }.select{|k,v| v }
39
55
 
40
56
  contact = {
@@ -43,20 +59,21 @@ module Indirect
43
59
  "Blog" => info.blog ? "https://" << info.blog.send(colors.next) : nil,
44
60
  "GitHub" => info.github ? "https://github.com/" << info.github.send(colors.next) : nil,
45
61
  "Mastodon" => info.twitter ? "https://" << info.mastodon.send(colors.next) : nil,
46
- "Twitter" => info.twitter ? "https://twitter.com/" << info.twitter.send(colors.next) : nil,
62
+ "Bluesky" => info.bluesky ? "https://bsky.app/profile/" << info.bluesky.send(colors.next) : nil,
47
63
  "LinkedIn" => info.linkedin ? "https://linkedin.com/in/" << info.linkedin.send(colors.next) : nil,
48
64
  }.select{|k,v| v }
49
65
 
50
66
  card = {
51
- "Card" => info.card ? "gem exec ".red << info.card.white : nil
67
+ "Card" => info.card ? "gem exec " << info.card.send(colors.next) : nil
52
68
  }.select{|k,v| v }
53
69
 
54
- sections = [work, contact, card]
70
+ sections = [job, oss, contact, card]
55
71
  label_size = sections.map(&:keys).flatten.map(&:length).max
56
72
 
57
73
  body = sections.map do |section|
58
74
  section.map do |name, value|
59
- label = sprintf("%#{label_size}s", name) << ": "
75
+ label = sprintf("%#{label_size}s", name)
76
+ label << (name.empty? ? " " : ": ")
60
77
  [label.white.bold, value].join
61
78
  end.join("\n")
62
79
  end.join("\n\n")
data/lib/output CHANGED
@@ -1,18 +1,20 @@
1
- ╭────────────────────────────────────────────────────────────────╮
2
-
3
- André Arko / indirect
4
-
5
- │  Work: Vice Minister of Computation at cloudcity.io
6
- │ Open Source: RubyGems Coordinator at Ruby Central
7
-
8
- │  Email: andre@arko.net
9
- │  Website: https://arko.net
10
-  Blog: https://andre.arko.net
11
- │  GitHub: https://github.com/indirect
12
- │  Mastodon: https://fiasco.social/@indirect
13
- │  Twitter: https://twitter.com/indirect
14
- │  LinkedIn: https://linkedin.com/in/andrearko
15
-
16
- │  Card: gem exec indirect
17
-
18
- ╰────────────────────────────────────────────────────────────────╯
1
+ ╭─────────────────────────────────────────────────────────╮
2
+
3
+ André Arko / @indirect
4
+
5
+ │  Work: Founder at Spinel Cooperative
6
+ │  https://spinel.coop
7
+
8
+ │ Open Source: Member at The Gem Cooperative
9
+ │  https://gem.coop
10
+
11
+ │  Email: andre@arko.net
12
+ │  Website: https://arko.net
13
+ │  Blog: https://andre.arko.net
14
+ │  GitHub: https://github.com/indirect
15
+  Bluesky: https://bsky.app/profile/@indirect.io
16
+ │  LinkedIn: https://linkedin.com/in/andrearko
17
+
18
+ │  Card: gem exec indirect │
19
+ │ │
20
+ ╰─────────────────────────────────────────────────────────╯
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indirect
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
  - Andre Arko
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-02-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -66,7 +65,6 @@ dependencies:
66
65
  - - "~>"
67
66
  - !ruby/object:Gem::Version
68
67
  version: '0.8'
69
- description:
70
68
  email:
71
69
  - andre@arko.net
72
70
  executables:
@@ -100,7 +98,6 @@ metadata:
100
98
  homepage_uri: https://github.com/indirect/indirect
101
99
  source_code_uri: https://github.com/indirect/indirect
102
100
  changelog_uri: https://github.com/indirect/indirect/blob/master/CHANGELOG.md
103
- post_install_message:
104
101
  rdoc_options: []
105
102
  require_paths:
106
103
  - lib
@@ -115,8 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
112
  - !ruby/object:Gem::Version
116
113
  version: '0'
117
114
  requirements: []
118
- rubygems_version: 3.5.0.dev
119
- signing_key:
115
+ rubygems_version: 3.6.9
120
116
  specification_version: 4
121
117
  summary: A CLI business card
122
118
  test_files: []