dvla-herodotus 2.0.0 → 2.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: 6e3ef91707cd06f7a091f1648f34606d50e88feac527ba1addf96dfe9b9fd0cd
4
- data.tar.gz: 96f8a2e8b39f34c3552e7ad7f5824c8facbd1af79b29a76fc9254f465d9c8d6a
3
+ metadata.gz: 2eb770ebff3f1d698f1498ae9d09f6ce70735fe4a0b4e8fb48047db6fffa9497
4
+ data.tar.gz: 3b32cbac5261b3f04831b455f0bdc1e12d7579ba3006b32fedf7a0214b6c1219
5
5
  SHA512:
6
- metadata.gz: 357756d95d6774075440eba3f1cc7f7c38d1980586a0e0d82cefae36e959b6a3ba18406b77a87617ccc34cb320e0d3e9e3ded369b5f8db1bae62f97b30f2e809
7
- data.tar.gz: e32fe8df4155456455e275601a7f885c8596b9c6700aa73e00169b67b63658fc49f3c8799e6d09a18048c0f4eff61ce17d4a55b37f09e15a102c08d9badccc89
6
+ metadata.gz: e79ed58e9d0b3bbce41cc04c61ba6ffac86faee95ef257bc1be5f38c14cd9c2606c3452b13fb4f2aae5411137827aa29e70e4a2b038b8f8bf18f74dcc4f95793
7
+ data.tar.gz: 9fceaf98cfc77253cf2f772367698486a250ca3659d4b5d0399ab7d18b4b95274951c1e7cda5820e3f8019e8941f34f1554208bbc5d0fdda85bd3a5ffa085547
data/README.md CHANGED
@@ -88,29 +88,38 @@ Also included is a series of additional methods on `String` that allow you to mo
88
88
  example_string = 'Multicoloured String'.blue.bg_red.bold
89
89
  ```
90
90
 
91
- | Method | Function |
92
- |---------------|------------------------------------------------|
93
- | blue | Sets the string's colour to blue |
94
- | red | Sets the string's colour to red |
95
- | green | Sets the string's colour to green |
96
- | brown | Sets the string's colour to brown |
97
- | blue | Sets the string's colour to blue |
98
- | magenta | Sets the string's colour to magenta |
99
- | cyan | Sets the string's colour to cyan |
100
- | gray | Sets the string's colour to gray |
101
- | bg_blue | Sets the string's background colour to blue |
102
- | bg_red | Sets the string's background colour to red |
103
- | bg_green | Sets the string's background colour to green |
104
- | bg_brown | Sets the string's background colour to brown |
105
- | bg_blue | Sets the string's background colour to blue |
106
- | bg_magenta | Sets the string's background colour to magenta |
107
- | bg_cyan | Sets the string's background colour to cyan |
108
- | bg_gray | Sets the string's background colour to gray |
109
- | bold | Sets the string to be bold |
110
- | italic | Sets the string to be italic |
111
- | underline | Sets the string to be underline |
112
- | blink | Sets the string to blink |
113
- | reverse_color | Reverses the colour of the string |
91
+ | Method | Function |
92
+ |---------------|--------------------------------------------------|
93
+ | blue | Sets the string's colour to blue |
94
+ | red | Sets the string's colour to red |
95
+ | green | Sets the string's colour to green |
96
+ | brown | Sets the string's colour to brown |
97
+ | blue | Sets the string's colour to blue |
98
+ | magenta | Sets the string's colour to magenta |
99
+ | cyan | Sets the string's colour to cyan |
100
+ | gray | Sets the string's colour to gray |
101
+ | grey | Sets the string's colour to grey (alias of gray) |
102
+ | bright_blue | Sets the string's colour to bright blue |
103
+ | bright_red | Sets the string's colour to bright red |
104
+ | bright_green | Sets the string's colour to bright green |
105
+ | bright_yellow | Sets the string's colour to bright yellow |
106
+ | bright_blue | Sets the string's colour to bright blue |
107
+ | bright_magenta| Sets the string's colour to bright magenta |
108
+ | bright_cyan | Sets the string's colour to bright cyan |
109
+ | white | Sets the string's colour to white |
110
+ | bg_blue | Sets the string's background colour to blue |
111
+ | bg_red | Sets the string's background colour to red |
112
+ | bg_green | Sets the string's background colour to green |
113
+ | bg_brown | Sets the string's background colour to brown |
114
+ | bg_blue | Sets the string's background colour to blue |
115
+ | bg_magenta | Sets the string's background colour to magenta |
116
+ | bg_cyan | Sets the string's background colour to cyan |
117
+ | bg_gray | Sets the string's background colour to gray |
118
+ | bold | Sets the string to be bold |
119
+ | italic | Sets the string to be italic |
120
+ | underline | Sets the string to be underline |
121
+ | blink | Sets the string to blink |
122
+ | reverse_color | Reverses the colour of the string |
114
123
 
115
124
  ## Development
116
125
 
@@ -1,43 +1,43 @@
1
1
  class String
2
- def black = "\e[30m#{self}\e[0m"
3
-
4
- def red = "\e[31m#{self}\e[0m"
5
-
6
- def green = "\e[32m#{self}\e[0m"
7
-
8
- def brown = "\e[33m#{self}\e[0m"
9
-
10
- def blue = "\e[34m#{self}\e[0m"
11
-
12
- def magenta = "\e[35m#{self}\e[0m"
13
-
14
- def cyan = "\e[36m#{self}\e[0m"
15
-
16
- def gray = "\e[37m#{self}\e[0m"
17
-
18
- def bg_black = "\e[40m#{self}\e[0m"
19
-
20
- def bg_red = "\e[41m#{self}\e[0m"
21
-
22
- def bg_green = "\e[42m#{self}\e[0m"
23
-
24
- def bg_brown = "\e[43m#{self}\e[0m"
25
-
26
- def bg_blue = "\e[44m#{self}\e[0m"
27
-
28
- def bg_magenta = "\e[45m#{self}\e[0m"
29
-
30
- def bg_cyan = "\e[46m#{self}\e[0m"
31
-
32
- def bg_gray = "\e[47m#{self}\e[0m"
33
-
34
- def bold = "\e[1m#{self}\e[22m"
35
-
36
- def italic = "\e[3m#{self}\e[23m"
37
-
38
- def underline = "\e[4m#{self}\e[24m"
39
-
40
- def blink = "\e[5m#{self}\e[25m"
41
-
42
- def reverse_color = "\e[7m#{self}\e[27m"
2
+ def colourise(code, reset_code = 39)
3
+ "\e[#{code}m#{self}\e[#{reset_code}m"
4
+ end
5
+ alias colorize colourise
6
+
7
+ def black = colourise(30)
8
+ def red = colourise(31)
9
+ def green = colourise(32)
10
+ def brown = colourise(33)
11
+ alias yellow brown
12
+
13
+ def blue = colourise(34)
14
+ def magenta = colourise(35)
15
+ def cyan = colourise(36)
16
+ def gray = colourise(37)
17
+ alias grey gray
18
+
19
+ def bright_black = colourise(90)
20
+ def bright_red = colourise(91)
21
+ def bright_green = colourise(92)
22
+ def bright_yellow = colourise(93)
23
+ def bright_blue = colourise(94)
24
+ def bright_magenta = colourise(95)
25
+ def bright_cyan = colourise(96)
26
+ def white = colourise(97)
27
+
28
+ def bg_black = colourise(40, 49)
29
+ def bg_red = colourise(41, 49)
30
+ def bg_green = colourise(42, 49)
31
+ def bg_brown = colourise(43, 49)
32
+ def bg_blue = colourise(44, 49)
33
+ def bg_magenta = colourise(45, 49)
34
+ def bg_cyan = colourise(46, 49)
35
+ def bg_gray = colourise(47, 49)
36
+
37
+ def bold = colourise(1, 22)
38
+ def italic = colourise(3, 23)
39
+ def underline = colourise(4, 24)
40
+ def blink = colourise(5, 25)
41
+ def reverse_color = colourise(7, 27)
42
+ alias reverse_colour reverse_color
43
43
  end
@@ -1,5 +1,5 @@
1
1
  module DVLA
2
2
  module Herodotus
3
- VERSION = '2.0.0'.freeze
3
+ VERSION = '2.2.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dvla-herodotus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Driver and Vehicle Licensing Agency (DVLA)
8
8
  - George Bell
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-04-25 00:00:00.000000000 Z
12
+ date: 2025-09-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dvla-lint
@@ -39,7 +39,7 @@ dependencies:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '3.8'
42
- description:
42
+ description:
43
43
  email:
44
44
  - george.bell.contractor@dvla.gov.uk
45
45
  executables: []
@@ -67,7 +67,7 @@ homepage: https://github.com/dvla/herodotus
67
67
  licenses:
68
68
  - MIT
69
69
  metadata: {}
70
- post_install_message:
70
+ post_install_message:
71
71
  rdoc_options: []
72
72
  require_paths:
73
73
  - lib
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  version: '0'
84
84
  requirements: []
85
85
  rubygems_version: 3.5.3
86
- signing_key:
86
+ signing_key:
87
87
  specification_version: 4
88
88
  summary: Provides a lightweight logger with a common format
89
89
  test_files: []