string_wizard 0.1.0 → 0.1.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: 77a377b78f738c3a61b4b851407971dca945528bf2b6107e741219c91ff126c4
4
- data.tar.gz: 6bb673e6a74c0996fe1f5432bd36c7315f3960ac2139f4d6b113c920e028bd6f
3
+ metadata.gz: a1f0ec9132a345c89478c3d5bf8813b5e4ef2171c1c26cdb0dc1469130a6caaa
4
+ data.tar.gz: d576bf4d76910b65537b259167015904ab222f3e5961fa34e6676b33f3c006d9
5
5
  SHA512:
6
- metadata.gz: aef54bddf1d3424e24d9901dedbe651325c12dcaffd53fb2d86d2b2cb8af48e68303d6152364459258c12565c081079864c54cb10abf8212f5ab4979717d0659
7
- data.tar.gz: 8dd77cf902dc0f192904c8558eb27cfe5bbd5c34465f637b1feb6839d06d02f324334d8b285cf65650f749659d0e04fccb47265dee2b4f6e3eaf36684e5b15cb
6
+ metadata.gz: ec4f9fa8ac899397f5d11d7dc309fab1993935fd59b4b14251f31167c633135e8abfc8d4bde27be14d4397e6eb154c5d9a06881c5427c8e4d1ef8d0e9d6b29e0
7
+ data.tar.gz: 405b8744d26d4d157fbcddf47bf8fb056759d904c2674e7c14d6fe557dcffc9bd3d61ab338ad4ce2109577b35bc8b51f78e5e18c6d0cbf3bad9edac9330c7c16
@@ -1,156 +1,156 @@
1
1
  class String
2
2
  # Returns a string with the first letter of each word capitalized
3
3
  def titleize
4
- StringEnhancer.titleize(self)
4
+ StringWizard.titleize(self)
5
5
  end
6
6
 
7
7
  # Returns a string with all vowels removed
8
8
  def remove_vowels
9
- StringEnhancer.remove_vowels(self)
9
+ StringWizard.remove_vowels(self)
10
10
  end
11
11
 
12
12
  # Returns a string with all consonants removed
13
13
  def remove_consonants
14
- StringEnhancer.remove_consonants(self)
14
+ StringWizard.remove_consonants(self)
15
15
  end
16
16
 
17
17
  # Returns true if the string is a palindrome
18
18
  def palindrome?
19
- StringEnhancer.palindrome?(self)
19
+ StringWizard.palindrome?(self)
20
20
  end
21
21
 
22
22
  # Returns a string with alternating case
23
23
  def alternating_case
24
- StringEnhancer.alternating_case(self)
24
+ StringWizard.alternating_case(self)
25
25
  end
26
26
 
27
27
  # Returns a string with words in reverse order
28
28
  def reverse_words
29
- StringEnhancer.reverse_words(self)
29
+ StringWizard.reverse_words(self)
30
30
  end
31
31
 
32
32
  # Advanced string analysis
33
33
  def analyze
34
- StringEnhancer.analyze(self)
34
+ StringWizard.analyze(self)
35
35
  end
36
36
 
37
37
  # Pattern matching
38
38
  def match_pattern(pattern)
39
- StringEnhancer.match_pattern(self, pattern)
39
+ StringWizard.match_pattern(self, pattern)
40
40
  end
41
41
 
42
42
  def matches_pattern?(pattern_name)
43
- StringEnhancer::PatternMatcher.match_pattern(self, pattern_name)
43
+ StringWizard::PatternMatcher.match_pattern(self, pattern_name)
44
44
  end
45
45
 
46
46
  def extract_patterns
47
- StringEnhancer::PatternMatcher.extract_patterns(self)
47
+ StringWizard::PatternMatcher.extract_patterns(self)
48
48
  end
49
49
 
50
50
  def validate_format(pattern_name)
51
- StringEnhancer::PatternMatcher.validate_format(self, pattern_name)
51
+ StringWizard::PatternMatcher.validate_format(self, pattern_name)
52
52
  end
53
53
 
54
54
  def sanitize(pattern_name)
55
- StringEnhancer::PatternMatcher.sanitize(self, pattern_name)
55
+ StringWizard::PatternMatcher.sanitize(self, pattern_name)
56
56
  end
57
57
 
58
58
  # String transformation chain
59
59
  def transform
60
- StringEnhancer::Transformer.transform(self)
60
+ StringWizard::Transformer.transform(self)
61
61
  end
62
62
 
63
63
  # String similarity
64
64
  def similarity(other)
65
- StringEnhancer.similarity(self, other)
65
+ StringWizard.similarity(self, other)
66
66
  end
67
67
 
68
68
  # Parallel processing
69
69
  def self.process_batch(strings, batch_size: 100, &block)
70
- StringEnhancer.process_batch(strings, batch_size: batch_size, &block)
70
+ StringWizard.process_batch(strings, batch_size: batch_size, &block)
71
71
  end
72
72
 
73
73
  def self.analyze_batch(strings, batch_size: 100)
74
- StringEnhancer.analyze_batch(strings, batch_size: batch_size)
74
+ StringWizard.analyze_batch(strings, batch_size: batch_size)
75
75
  end
76
76
 
77
77
  def self.transform_batch(strings, transformations, batch_size: 100)
78
- StringEnhancer.transform_batch(strings, transformations, batch_size: batch_size)
78
+ StringWizard.transform_batch(strings, transformations, batch_size: batch_size)
79
79
  end
80
80
 
81
81
  def self.similarity_matrix(strings, batch_size: 100)
82
- StringEnhancer.similarity_matrix(strings, batch_size: batch_size)
82
+ StringWizard.similarity_matrix(strings, batch_size: batch_size)
83
83
  end
84
84
 
85
85
  # Encryption
86
86
  def encrypt(key, algorithm: 'AES-256-CBC')
87
- StringEnhancer.encrypt(self, key, algorithm: algorithm)
87
+ StringWizard.encrypt(self, key, algorithm: algorithm)
88
88
  end
89
89
 
90
90
  def self.decrypt(encrypted_str, key, algorithm: 'AES-256-CBC')
91
- StringEnhancer.decrypt(encrypted_str, key, algorithm: algorithm)
91
+ StringWizard.decrypt(encrypted_str, key, algorithm: algorithm)
92
92
  end
93
93
 
94
94
  def hash(algorithm: :sha256)
95
- StringEnhancer.hash(self, algorithm: algorithm)
95
+ StringWizard.hash(self, algorithm: algorithm)
96
96
  end
97
97
 
98
98
  def secure_compare(other)
99
- StringEnhancer.secure_compare(self, other)
99
+ StringWizard.secure_compare(self, other)
100
100
  end
101
101
 
102
102
  # Fuzzy matching
103
103
  def fuzzy_match(candidates, threshold: 0.8)
104
- StringEnhancer.fuzzy_match(self, candidates, threshold: threshold)
104
+ StringWizard.fuzzy_match(self, candidates, threshold: threshold)
105
105
  end
106
106
 
107
107
  def best_match(candidates, threshold: 0.8)
108
- StringEnhancer.best_match(self, candidates, threshold: threshold)
108
+ StringWizard.best_match(self, candidates, threshold: threshold)
109
109
  end
110
110
 
111
111
  # Validation methods
112
112
  def valid_email?
113
- StringEnhancer.valid_email?(self)
113
+ StringWizard.valid_email?(self)
114
114
  end
115
115
 
116
116
  def valid_url?
117
- StringEnhancer.valid_url?(self)
117
+ StringWizard.valid_url?(self)
118
118
  end
119
119
 
120
120
  def valid_phone?
121
- StringEnhancer.valid_phone?(self)
121
+ StringWizard.valid_phone?(self)
122
122
  end
123
123
 
124
124
  def valid_date?(format: '%Y-%m-%d')
125
- StringEnhancer.valid_date?(self, format: format)
125
+ StringWizard.valid_date?(self, format: format)
126
126
  end
127
127
 
128
128
  def valid_time?
129
- StringEnhancer.valid_time?(self)
129
+ StringWizard.valid_time?(self)
130
130
  end
131
131
 
132
132
  def valid_ip?
133
- StringEnhancer.valid_ip?(self)
133
+ StringWizard.valid_ip?(self)
134
134
  end
135
135
 
136
136
  def valid_credit_card?
137
- StringEnhancer.valid_credit_card?(self)
137
+ StringWizard.valid_credit_card?(self)
138
138
  end
139
139
 
140
140
  def valid_hex_color?
141
- StringEnhancer.valid_hex_color?(self)
141
+ StringWizard.valid_hex_color?(self)
142
142
  end
143
143
 
144
144
  def valid_json?
145
- StringEnhancer.valid_json?(self)
145
+ StringWizard.valid_json?(self)
146
146
  end
147
147
 
148
148
  def valid_xml?
149
- StringEnhancer.valid_xml?(self)
149
+ StringWizard.valid_xml?(self)
150
150
  end
151
151
 
152
152
  # Clear memoization cache
153
153
  def self.clear_cache
154
- StringEnhancer.clear_cache
154
+ StringWizard.clear_cache
155
155
  end
156
156
  end
@@ -1,4 +1,4 @@
1
- module StringEnhancer
1
+ module StringWizard
2
2
  module Encryption
3
3
  require 'openssl'
4
4
  require 'base64'
@@ -1,4 +1,4 @@
1
- module StringEnhancer
1
+ module StringWizard
2
2
  module PatternMatcher
3
3
  # Predefined patterns for common use cases
4
4
  PATTERNS = {
@@ -1,4 +1,4 @@
1
- module StringEnhancer
1
+ module StringWizard
2
2
  module Transformer
3
3
  class Chain
4
4
  def initialize(str)
@@ -62,7 +62,7 @@ module StringEnhancer
62
62
  if transformation.is_a?(Proc)
63
63
  result = transformation.call(result)
64
64
  else
65
- result = StringEnhancer.transform(result, transformation)
65
+ result = StringWizard.transform(result, transformation)
66
66
  end
67
67
  end
68
68
  result
@@ -1,4 +1,4 @@
1
- module StringEnhancer
1
+ module StringWizard
2
2
  module Validator
3
3
  class << self
4
4
  def valid_email?(str)
@@ -1,3 +1,3 @@
1
1
  module StringWizard
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: string_wizard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hassan Tahir
@@ -102,18 +102,18 @@ executables: []
102
102
  extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
- - lib/string_enhancer/core_ext.rb
106
- - lib/string_enhancer/encryption.rb
107
- - lib/string_enhancer/pattern_matcher.rb
108
- - lib/string_enhancer/transformer.rb
109
- - lib/string_enhancer/validator.rb
110
- - lib/string_enhancer/version.rb
111
105
  - lib/string_wizard.rb
106
+ - lib/string_wizard/core_ext.rb
107
+ - lib/string_wizard/encryption.rb
108
+ - lib/string_wizard/pattern_matcher.rb
109
+ - lib/string_wizard/transformer.rb
110
+ - lib/string_wizard/validator.rb
112
111
  - lib/string_wizard/version.rb
113
- homepage: https://github.com/hassantahir176/string_wizard
112
+ homepage: https://rubygems.org/gems/string_wizard
114
113
  licenses:
115
114
  - MIT
116
- metadata: {}
115
+ metadata:
116
+ source_code_uri: https://github.com/hassantahir176/string-wizard
117
117
  post_install_message:
118
118
  rdoc_options: []
119
119
  require_paths:
@@ -1,3 +0,0 @@
1
- module StringEnhancer
2
- VERSION = "0.1.0"
3
- end