zarby 0.1.6 → 0.2.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 +4 -4
- data/.env +2 -0
- data/.rubocop.yml +29 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +15 -0
- data/README.md +116 -12
- data/gem_info.txt +12 -0
- data/lib/zarby/anonymize.rb +52 -0
- data/lib/zarby/csv.rb +10 -11
- data/lib/zarby/errors.rb +6 -0
- data/lib/zarby/functions.rb +21 -0
- data/lib/zarby/normalize.rb +15 -12
- data/lib/zarby/version.rb +1 -1
- data/lib/zarby.rb +52 -6
- data/zarby-0.1.0.gem +0 -0
- data/zarby-0.1.1.gem +0 -0
- data/zarby-0.1.2.gem +0 -0
- data/zarby-0.1.3.gem +0 -0
- data/zarby-0.1.4.gem +0 -0
- data/zarby-0.1.5.gem +0 -0
- data/zarby-0.1.6.gem +0 -0
- data/zarby.gemspec +7 -10
- metadata +23 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f4ae19530d59bcdcb294a5be185531ebded6026d0a19604abe14983dcd0be439
|
|
4
|
+
data.tar.gz: 78dde798c1d737a19e30ed8878f36b97536c54f44b2543aa8edfacb62af49a52
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ae4664679eba882f4e2b095e78e51299fbe940eddc86bd02d522f45deb7dafbce859e1962bb1c37c6e33d62299d917365b2f935416692940b9b2e7b16697c13
|
|
7
|
+
data.tar.gz: a7db353db260819f47fba9253e5a87cecb47b37f9f1f162fc983e4c56091ca0125c27092c0e1e9fe4414420645f09cd3c578ca00c4d88dbd8264680a39d53f91
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# .rubocop.yml
|
|
2
|
+
|
|
3
|
+
AllCops:
|
|
4
|
+
TargetRubyVersion: 3.3
|
|
5
|
+
NewCops: enable
|
|
6
|
+
Exclude:
|
|
7
|
+
- "vendor/**/*"
|
|
8
|
+
|
|
9
|
+
Style/Documentation:
|
|
10
|
+
Enabled: false
|
|
11
|
+
|
|
12
|
+
Layout/LineLength:
|
|
13
|
+
Max: 100
|
|
14
|
+
|
|
15
|
+
Metrics/MethodLength:
|
|
16
|
+
Max: 15
|
|
17
|
+
|
|
18
|
+
Style/StringLiterals:
|
|
19
|
+
EnforcedStyle: double_quotes
|
|
20
|
+
|
|
21
|
+
Style/FrozenStringLiteralComment:
|
|
22
|
+
Enabled: false
|
|
23
|
+
EnforcedStyle: never
|
|
24
|
+
|
|
25
|
+
Metrics/AbcSize:
|
|
26
|
+
Max: 35
|
|
27
|
+
|
|
28
|
+
Layout/LineLength:
|
|
29
|
+
max: 120
|
data/.tool-versions
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby 3.3.8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# 0.2.1 / 2026-08-20
|
|
2
|
+
|
|
3
|
+
## Enhancements
|
|
4
|
+
|
|
5
|
+
* Perform anonymised email
|
|
6
|
+
|
|
7
|
+
# 0.2.0 / 2024-06-28
|
|
8
|
+
|
|
9
|
+
## Enhancements
|
|
10
|
+
|
|
11
|
+
* Poro class Csv and Normalize to symplify syntax
|
|
12
|
+
* Csv and Normalize class will be private and their method depreciated
|
|
13
|
+
* Use only instance of Zarby
|
|
14
|
+
* Add module to anonymize string value.
|
|
15
|
+
|
|
1
16
|
# 0.1.5 / 2023-10-24
|
|
2
17
|
|
|
3
18
|
## Enhancements
|
data/README.md
CHANGED
|
@@ -1,31 +1,135 @@
|
|
|
1
1
|
# Zarby
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](http://badge.fury.io/rb/zarby)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A library to Manipulate String with utiles methods.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Run:
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
bundle add zarby
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Or install it yourself as:
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
$ gem install zarby
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## WARNING
|
|
18
|
+
:warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning:
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
V 0.1.6 (methods used wase depreciated and removed on 10/2024) for version (V 0.2.0)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
:warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning:
|
|
18
25
|
|
|
19
26
|
## Usage
|
|
20
27
|
|
|
21
|
-
|
|
28
|
+
Three module are available: CSV, Normelize And Anonymize
|
|
29
|
+
|
|
30
|
+
### CSV
|
|
31
|
+
|
|
32
|
+
```ruby
|
|
33
|
+
detect_separator(content|string)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Method to detecte delimiter in csv!
|
|
37
|
+
|
|
38
|
+
Since V 0.1.6 (depreciated and removed on 10/2024) :warning: :warning: :warning: :warning: :warning: :warning::warning: :warning: :warning:
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
Zarby::Csv.detect_separator("aa,bb,cc") # => ","
|
|
42
|
+
Zarby::Csv.detect_separator("aa;bb;cc") # => ";"
|
|
43
|
+
Zarby::Csv.detect_separator("aa,bb;cc,dd") # => ","
|
|
44
|
+
Zarby::Csv.detect_separator("aa;bb;cc,dd") # => ";"
|
|
45
|
+
```
|
|
46
|
+
Since V 0.1.7 :heart_eyes: :heart_eyes: :heart_eyes: :heart_eyes:
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
Zarby.detect_separator("aa,bb,cc") # => ","
|
|
50
|
+
Zarby.detect_separator("aa;bb;cc") # => ";"
|
|
51
|
+
Zarby.detect_separator("aa,bb;cc,dd") # => ","
|
|
52
|
+
Zarby.detect_separator("aa;bb;cc,dd") # => ";"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`detect_separator`, render the separator, define in a csv on XXXX ms.
|
|
56
|
+
`[',', ';', ':', '|']`, is available by default.
|
|
57
|
+
|
|
58
|
+
### Normalize
|
|
59
|
+
|
|
60
|
+
```ruby
|
|
61
|
+
utf8(input|string)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Method to utf8 encode all caracters in a string (since widows , sweden enoding, etc ...).
|
|
65
|
+
|
|
66
|
+
Since V 0.1.6 (depreciated and removed on 10/2024) :warning: :warning: :warning: :warning: :warning: :warning::warning: :warning: :warning:
|
|
67
|
+
|
|
68
|
+
```ruby
|
|
69
|
+
Zarby::Normalize.utf8("Aa\xFCAa\xDF".force_encoding('Windows-1252')) # => "AaüAaß
|
|
70
|
+
# actually Windows-1252
|
|
71
|
+
Zarby::Normalize.utf8("Aa\xFCAa\xDF".force_encoding('ASCII-8BIT')) # => "AaüAaß"
|
|
72
|
+
# actually Windows-1252
|
|
73
|
+
Zarby::Normalize.utf8("Dur\xC3\xA9e".force_encoding('ASCII-8BIT')) # => "AaüAaß"
|
|
74
|
+
|
|
75
|
+
Zarby::Normalize.utf8("Aa\x80Aa\x81".force_encoding('ASCII-8BIT')) # => "AaüAaß"
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Since V 0.1.7 :heart_eyes: :heart_eyes: :heart_eyes: :heart_eyes:
|
|
80
|
+
|
|
81
|
+
```ruby
|
|
82
|
+
Zarby.utf8("Aa\xFCAa\xDF".force_encoding('Windows-1252')) # => "AaüAaß
|
|
83
|
+
# actually Windows-1252
|
|
84
|
+
Zarby.utf8("Aa\xFCAa\xDF".force_encoding('ASCII-8BIT')) # => "AaüAaß"
|
|
85
|
+
# actually Windows-1252
|
|
86
|
+
Zarby.utf8("Dur\xC3\xA9e".force_encoding('ASCII-8BIT')) # => "AaüAaß"
|
|
87
|
+
|
|
88
|
+
Zarby.utf8("Aa\x80Aa\x81".force_encoding('ASCII-8BIT')) # => "AaüAaß"
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Anonymize
|
|
93
|
+
|
|
94
|
+
```ruby
|
|
95
|
+
anonymize(input|string, nb_chars|int \ 2, mask_with|string \ '*')
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Method to anonymize a string.
|
|
99
|
+
|
|
100
|
+
```ruby
|
|
101
|
+
Zarby.anonymize("z") # => "**"
|
|
102
|
+
Zarby.anonymize("za") # => "**"
|
|
103
|
+
Zarby.anonymize("zar") # => "z*r"
|
|
104
|
+
Zarby.anonymize("zarb") # => "z**b"
|
|
105
|
+
Zarby.anonymize("zarby") # => "za*by"
|
|
106
|
+
Zarby.anonymize("mewtwo") # => "me**wo"
|
|
107
|
+
Zarby.anonymize("Ectoplasma") # => "Ec******ma"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`anonymize` try to set '\*' between two first and two last letter of the string if lenght greater than 4.
|
|
111
|
+
if string length between 1 to 2, return **.
|
|
112
|
+
if string length = 3 return a*a.
|
|
113
|
+
if string length = 4 return a**a.
|
|
114
|
+
|
|
115
|
+
if "@" is present, render `anonymize` string before and after "@", and kept "@" symbole.
|
|
116
|
+
exemple:
|
|
22
117
|
|
|
23
|
-
|
|
118
|
+
```ruby
|
|
119
|
+
Zarby.anonymize("z@z") # => "**@**"
|
|
120
|
+
Zarby.anonymize("za@za") # => "**@**"
|
|
121
|
+
Zarby.anonymize("zar@zar") # => "z*r@z*r"
|
|
122
|
+
Zarby.anonymize("zarb@zarb") # => "z**b@z**b"
|
|
123
|
+
Zarby.anonymize("zarby@zarby") # => "za*by@za*by"
|
|
124
|
+
Zarby.anonymize("mewtwo@mewtwo") # => "me**wo@me**wo"
|
|
125
|
+
Zarby.anonymize("Ectoplasma@Ectoplasma") # => "Ec******ma@Ec******ma"
|
|
24
126
|
|
|
25
|
-
|
|
127
|
+
## Using multiple "@"
|
|
26
128
|
|
|
27
|
-
|
|
129
|
+
Zarby.anonymize("pichu@pikachu@raichu") # => "pi*hu@pi***hu@ra**hu"
|
|
130
|
+
Zarby.anonymize("@fantominus@spectrum@ectoplasma@") # => "**@fa******us@sp****um@ec******ma"
|
|
131
|
+
```
|
|
28
132
|
|
|
29
133
|
## Contributing
|
|
30
134
|
|
|
31
|
-
Bug
|
|
135
|
+
Bug report and pull request are welcome on GitHub at https://github.com/zarby-ruby/zarby.
|
data/gem_info.txt
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Zarby
|
|
4
|
+
# this class is used to anonymize string on replace char with *
|
|
5
|
+
class Anonymize
|
|
6
|
+
def initialize(input:, nb_chars: 2, mask_with: "*")
|
|
7
|
+
@input = input
|
|
8
|
+
@nb_chars = nb_chars
|
|
9
|
+
@mask_with = mask_with
|
|
10
|
+
|
|
11
|
+
validate!
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# @return [String]
|
|
15
|
+
def call
|
|
16
|
+
return anonymize_email if email?
|
|
17
|
+
|
|
18
|
+
anonymize_segment(@input)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
private
|
|
22
|
+
|
|
23
|
+
def anonymize_email
|
|
24
|
+
local, domain = @input.split("@", 2)
|
|
25
|
+
domain_name, tld = domain.split(".", 2)
|
|
26
|
+
|
|
27
|
+
"#{anonymize_segment(local)}@#{anonymize_segment(domain_name)}.#{tld}"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def anonymize_segment(input, nbr = @nb_chars)
|
|
31
|
+
return @mask_with * 2 if input.length < 3
|
|
32
|
+
|
|
33
|
+
return anonymize_segment(input, nbr - 1) if input.length <= nbr * 2 && nbr.positive?
|
|
34
|
+
|
|
35
|
+
prefix = input[0, nbr]
|
|
36
|
+
suffix = input[-nbr, nbr]
|
|
37
|
+
masked = @mask_with * (input.length - (nbr * 2))
|
|
38
|
+
|
|
39
|
+
prefix + masked + suffix
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def email?
|
|
43
|
+
@input.match?(/\A[^\s@]+@[^\s@]+\.[^\s@]+\z/)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def validate!
|
|
47
|
+
raise Zarby::ArgumentZarby, "input must be a String" unless @input.is_a?(String)
|
|
48
|
+
raise Zarby::ArgumentZarby, "mask_with must be a String" unless @mask_with.is_a?(String)
|
|
49
|
+
raise Zarby::ArgumentZarby, "nb_chars must be >= 0" if @nb_chars.negative?
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
data/lib/zarby/csv.rb
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Zarby
|
|
4
|
-
class NoColSepDetected < StandardError; end
|
|
5
|
-
|
|
6
4
|
# this class is used to detect the column separator in a CSV file
|
|
7
5
|
class Csv
|
|
6
|
+
extend Gem::Deprecate
|
|
7
|
+
|
|
8
8
|
COMMON_DELIMITERS = ['","', '";"', '":"', '"|"'].freeze
|
|
9
9
|
|
|
10
10
|
# @param [String] content
|
|
11
11
|
# @return [Csv]
|
|
12
12
|
def initialize(content:)
|
|
13
|
-
@content = content
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# @param [String] content
|
|
17
|
-
# @return [String]
|
|
18
|
-
def self.detect_separator(content)
|
|
19
|
-
new(content: content).detect_separator
|
|
13
|
+
@content = content.to_s.each_line.first.to_s.strip
|
|
20
14
|
end
|
|
21
15
|
|
|
22
16
|
# @return [String]
|
|
23
|
-
def
|
|
24
|
-
valid?
|
|
17
|
+
def call
|
|
18
|
+
if valid?
|
|
19
|
+
delimiters[0][0][1]
|
|
20
|
+
else
|
|
21
|
+
raise(Zarby::ColSeparatorZarby,
|
|
22
|
+
"The content to be analyzed must have one of this list as a delimiter: ',' ';' ':' '|'")
|
|
23
|
+
end
|
|
25
24
|
end
|
|
26
25
|
|
|
27
26
|
private
|
data/lib/zarby/errors.rb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "rails"
|
|
4
|
+
|
|
5
|
+
module Zarby
|
|
6
|
+
module Functions
|
|
7
|
+
def zp(*_args)
|
|
8
|
+
IO.console.winsize
|
|
9
|
+
puts location caller_locations.first
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def location(call_loc)
|
|
13
|
+
" ⓩ Ⓐ Ⓡ Ⓑ ⓟ Ⓡ ⓘ ⓝ Ⓣ - from: #{name}##{call_loc.label} (in #{project_path call_loc.path}, at line: #{call_loc.lineno})" # rubocop:disable Layout/LineLength
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def project_path(full_path)
|
|
17
|
+
root_path = Rails.root.nil? ? File.expand_path("../../..", __dir__) : Rails.root.to_s
|
|
18
|
+
full_path.sub "#{root_path}/", ""
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/lib/zarby/normalize.rb
CHANGED
|
@@ -9,30 +9,33 @@ module Zarby
|
|
|
9
9
|
# @param input [String]
|
|
10
10
|
# @return [String]
|
|
11
11
|
def initialize(input:)
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
unless input.is_a?(String)
|
|
13
|
+
raise Zarby::ArgumentZarby, "input to normalise utf8 must be of type String, #{input.class} given"
|
|
14
|
+
end
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
# @return [String]
|
|
17
|
-
def self.utf8(input)
|
|
18
|
-
new(input: input).utf8
|
|
16
|
+
@input = input&.force_encoding(Encoding::UTF_8) || ""
|
|
19
17
|
end
|
|
20
18
|
|
|
21
19
|
# @return [String]
|
|
22
|
-
def
|
|
23
|
-
|
|
20
|
+
def call
|
|
21
|
+
return @input if valid?
|
|
24
22
|
|
|
23
|
+
@input.dup.force_encoding(Encoding::ISO_8859_1).encode!(Encoding::UTF_8)
|
|
24
|
+
end
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
class << self
|
|
27
|
+
# @param input [String]
|
|
28
|
+
# @return [String]
|
|
29
|
+
def utf8(input)
|
|
30
|
+
new(input: input).utf8
|
|
31
|
+
end
|
|
29
32
|
end
|
|
30
33
|
|
|
31
34
|
private
|
|
32
35
|
|
|
33
36
|
# @return [Boolean]
|
|
34
37
|
def valid?
|
|
35
|
-
@input.encoding.name ==
|
|
38
|
+
@input.encoding.name == "UTF-8" && @input.valid_encoding?
|
|
36
39
|
end
|
|
37
40
|
end
|
|
38
41
|
end
|
data/lib/zarby/version.rb
CHANGED
data/lib/zarby.rb
CHANGED
|
@@ -1,9 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
require_relative
|
|
4
|
-
require_relative
|
|
5
|
-
require_relative
|
|
1
|
+
require_relative "zarby/anonymize"
|
|
2
|
+
require_relative "zarby/csv"
|
|
3
|
+
require_relative "zarby/errors"
|
|
4
|
+
require_relative "zarby/functions"
|
|
5
|
+
require_relative "zarby/normalize"
|
|
6
|
+
require_relative "zarby/version"
|
|
6
7
|
|
|
7
8
|
module Zarby
|
|
8
|
-
|
|
9
|
+
def plop
|
|
10
|
+
zp "coucou ca va?"
|
|
11
|
+
puts inspect
|
|
12
|
+
puts self.class.inspect
|
|
13
|
+
puts self.class.name
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
class Foo
|
|
17
|
+
def self.plop
|
|
18
|
+
zp "ijijij"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Anonymizes a given input by masking the first `nb_chars` characters with `mask_with`.
|
|
23
|
+
#
|
|
24
|
+
# @param input [String] The string input to be anonymized.
|
|
25
|
+
# @param nb_chars [Integer] The number of characters from the input to be masked. Default is 2.
|
|
26
|
+
# @param mask_with [String] The character to mask the input with. Default is '*'.
|
|
27
|
+
# @return [String] The anonymized string with masked characters.
|
|
28
|
+
def anonymize(input, nb_chars: 2, mask_with: "*")
|
|
29
|
+
Anonymize.new(input:, nb_chars:, mask_with:).call
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Detects and returns the separator used in the provided CSV content.
|
|
33
|
+
#
|
|
34
|
+
# @param content [String] The CSV content to detect the separator for.
|
|
35
|
+
# @return [String] The detected separator (e.g., ',' or ';').
|
|
36
|
+
def detect_separator(content)
|
|
37
|
+
Csv.new(content:).call
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Normalizes the input string to UTF-8 encoding.
|
|
41
|
+
#
|
|
42
|
+
# @param input [String] The input string to normalize.
|
|
43
|
+
# @return [String] The normalized string in UTF-8 encoding.
|
|
44
|
+
def utf8(input)
|
|
45
|
+
Normalize.new(input:).call
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Expose methods as module functions for easy use without needing to instantiate.
|
|
49
|
+
module_function :anonymize, :detect_separator, :utf8, :plop
|
|
50
|
+
|
|
51
|
+
# Prevents direct access to the Anonymize class outside the module.
|
|
52
|
+
private_constant :Anonymize
|
|
9
53
|
end
|
|
54
|
+
|
|
55
|
+
module Kernel; include Zarby::Functions; end # rubocop:disable Style/OneClassPerFile
|
data/zarby-0.1.0.gem
ADDED
|
Binary file
|
data/zarby-0.1.1.gem
ADDED
|
Binary file
|
data/zarby-0.1.2.gem
ADDED
|
Binary file
|
data/zarby-0.1.3.gem
ADDED
|
Binary file
|
data/zarby-0.1.4.gem
ADDED
|
Binary file
|
data/zarby-0.1.5.gem
ADDED
|
Binary file
|
data/zarby-0.1.6.gem
ADDED
|
Binary file
|
data/zarby.gemspec
CHANGED
|
@@ -10,15 +10,16 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
|
|
11
11
|
spec.summary = "String encoding and decoding with Ruby."
|
|
12
12
|
# spec.description = "TODO: Write a longer description or delete this line."
|
|
13
|
-
spec.homepage = "https://
|
|
13
|
+
spec.homepage = "https://rubygems.org/gems/zarby"
|
|
14
14
|
spec.required_ruby_version = ">= 2.6.0"
|
|
15
|
-
spec.licenses = [
|
|
15
|
+
spec.licenses = ["MIT"]
|
|
16
16
|
|
|
17
|
-
spec.metadata = {
|
|
18
|
-
"source_code_uri" => "https://github.com/VianneySonneville/zarby",
|
|
19
|
-
"changelog_uri" => "https://github.com/VianneySonneville/zarby/blob/main/CHANGELOG.md"
|
|
17
|
+
spec.metadata = {
|
|
18
|
+
"source_code_uri" => "https://github.com/VianneySonneville/zarby",
|
|
19
|
+
"changelog_uri" => "https://github.com/VianneySonneville/zarby/blob/main/CHANGELOG.md",
|
|
20
|
+
"rubygems_mfa_required" => "true",
|
|
21
|
+
"allowed_push_host" => "https://rubygems.org"
|
|
20
22
|
}
|
|
21
|
-
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
22
23
|
|
|
23
24
|
# spec.metadata["homepage_uri"] = spec.homepage
|
|
24
25
|
# spec.metadata["source_code_uri"] = spec.homepage
|
|
@@ -36,8 +37,4 @@ Gem::Specification.new do |spec|
|
|
|
36
37
|
spec.bindir = "exe"
|
|
37
38
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
38
39
|
spec.require_paths = ["lib"]
|
|
39
|
-
|
|
40
|
-
# Uncomment to register a new dependency of your gem
|
|
41
|
-
# For more information and examples about making a new gem, check out our
|
|
42
|
-
# guide at: https://bundler.io/guides/creating_gem.html
|
|
43
40
|
end
|
metadata
CHANGED
|
@@ -1,40 +1,55 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zarby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- vianney.sonneville
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-08-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
|
-
description:
|
|
13
|
+
description:
|
|
14
14
|
email:
|
|
15
15
|
- vianneysonneville4@gmail.com
|
|
16
16
|
executables: []
|
|
17
17
|
extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
|
19
19
|
files:
|
|
20
|
+
- ".env"
|
|
21
|
+
- ".rubocop.yml"
|
|
22
|
+
- ".tool-versions"
|
|
20
23
|
- CHANGELOG.md
|
|
21
24
|
- LICENSE
|
|
22
25
|
- README.md
|
|
23
26
|
- Rakefile
|
|
27
|
+
- gem_info.txt
|
|
24
28
|
- lib/zarby.rb
|
|
29
|
+
- lib/zarby/anonymize.rb
|
|
25
30
|
- lib/zarby/csv.rb
|
|
31
|
+
- lib/zarby/errors.rb
|
|
32
|
+
- lib/zarby/functions.rb
|
|
26
33
|
- lib/zarby/normalize.rb
|
|
27
34
|
- lib/zarby/version.rb
|
|
28
35
|
- sig/zarby.rbs
|
|
36
|
+
- zarby-0.1.0.gem
|
|
37
|
+
- zarby-0.1.1.gem
|
|
38
|
+
- zarby-0.1.2.gem
|
|
39
|
+
- zarby-0.1.3.gem
|
|
40
|
+
- zarby-0.1.4.gem
|
|
41
|
+
- zarby-0.1.5.gem
|
|
42
|
+
- zarby-0.1.6.gem
|
|
29
43
|
- zarby.gemspec
|
|
30
|
-
homepage: https://
|
|
44
|
+
homepage: https://rubygems.org/gems/zarby
|
|
31
45
|
licenses:
|
|
32
46
|
- MIT
|
|
33
47
|
metadata:
|
|
34
48
|
source_code_uri: https://github.com/VianneySonneville/zarby
|
|
35
49
|
changelog_uri: https://github.com/VianneySonneville/zarby/blob/main/CHANGELOG.md
|
|
50
|
+
rubygems_mfa_required: 'true'
|
|
36
51
|
allowed_push_host: https://rubygems.org
|
|
37
|
-
post_install_message:
|
|
52
|
+
post_install_message:
|
|
38
53
|
rdoc_options: []
|
|
39
54
|
require_paths:
|
|
40
55
|
- lib
|
|
@@ -49,8 +64,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
49
64
|
- !ruby/object:Gem::Version
|
|
50
65
|
version: '0'
|
|
51
66
|
requirements: []
|
|
52
|
-
rubygems_version: 3.
|
|
53
|
-
signing_key:
|
|
67
|
+
rubygems_version: 3.5.22
|
|
68
|
+
signing_key:
|
|
54
69
|
specification_version: 4
|
|
55
70
|
summary: String encoding and decoding with Ruby.
|
|
56
71
|
test_files: []
|