ru.Bee 2.6.5 → 2.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d7004443a68344f9fd24df9a4a3381e7191b2ced2cc9ed3c9c793a9aa96c7dd
4
- data.tar.gz: 1e6692e0b3a6e83956d283f768c7d16bc148546c509fc32dc085f35b8bdc9234
3
+ metadata.gz: caf6d0df294f7afd884d148b0949352686b23b82c4f9f870fbaddbfc50a57b8b
4
+ data.tar.gz: 5d0de409af07b3f66fd88812834ff931fec088887d8072c7c941ed4a6faaa725
5
5
  SHA512:
6
- metadata.gz: 6138d471e1fab6a8ba89911c039cc25ce288268f1cd08ccabbd5fca05aa1a39f09c394364021a588008aab272dc1adba32a08e320542216e1dd25fd7c522fb01
7
- data.tar.gz: 2ed721ff4543db57497aeb4265ecbbe079b05e7f45799550d14d0e0506dd0c228eada92957842bf0de63890c2105c8672a3ceb4b1a97e6765c3aeefe36a5693b
6
+ metadata.gz: caf1433926dc4c7e7f162fe62666dffcf543c13d72084c3a6c806ccb8c90eb797e8e5ea7cdb08f0c49da25c1d063f7f4bf8ab3a17fc47b46d001a27a0ca5910f
7
+ data.tar.gz: 0026ae4837453567fc1c6b6d2a2bf4bbc1f24a4cbe08447597437929fbb326daf4c330f2ee6f1902f8add6e47caa76811e61e3409af97a8e35f646ffd5a4e6c2
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Oleg Saltykov
3
+ Copyright (c) 2026 Oleg Saltykov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,26 +1,26 @@
1
- # Rubee system file
2
- # WARNING: DO NOT EDIT THIS FILE UNLESS YOU FEEL STRONG DESIRE
3
- # Unpreditable behaviour may happen. Take it as your own risk.
4
- def color_puts(text, color: :nil, background: :nil, style: :normal)
1
+ def color_puts(text, color: :nil, background: :nil, style: :normal, inline: false)
5
2
  colors = {
6
3
  black: 30, red: 31, green: 32, yellow: 33,
7
4
  blue: 34, magenta: 35, cyan: 36, white: 37,
8
5
  gray: 90
9
6
  }
10
-
11
7
  backgrounds = {
12
8
  black: 40, red: 41, green: 42, yellow: 43,
13
9
  blue: 44, magenta: 45, cyan: 46, white: 47,
14
10
  gray: 100
15
11
  }
16
-
17
12
  styles = {
18
13
  normal: 0, bold: 1, underline: 4, blink: 5
19
14
  }
20
-
21
15
  color_code = colors[color]
22
16
  bg_code = backgrounds[background]
23
17
  style_code = styles[style]
24
18
  options = [style_code, color_code, bg_code].compact.join(';')
25
- puts "\e[#{options}m#{text}\e[0m"
19
+
20
+ # If inline is true, use print instead of puts
21
+ if inline
22
+ print "\e[#{options}m#{text}\e[0m"
23
+ else
24
+ puts "\e[#{options}m#{text}\e[0m"
25
+ end
26
26
  end