simple_symbolize 4.0.0 → 5.0.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: 69d7f99fc0ead5eeda918161fe2995fb4b58bcd39e297dae0af8d7efceb0b030
4
- data.tar.gz: e5685b751c32abb542e6599f9677a785d7584be97d0c47a45067125192e0687e
3
+ metadata.gz: 1da0a7a552ad0fd3c5901bbf7141a0cb03437b96379df5506690d65f1424592b
4
+ data.tar.gz: 4725b7b1c52b62649b683369856d9eb37d66b9569db9e283acfaa426fdad4be9
5
5
  SHA512:
6
- metadata.gz: 196774c36c21335f2699a7db17dbe10e7df3727533b9d53b401c852371d8347aaf900dbea9811e948b23d333b344d44b11bfff4dbce99888e0ac70557f67304d
7
- data.tar.gz: c7e76fa9f182ad23ccef97ab8e47a40626316369dd2bf187609a292043c0f91a432455399d086b79eb61daf0aa2ba46accc23bab72946a7dd3b47de5d922400e
6
+ metadata.gz: ebaeea1ca71fb7532b98e6b9c020ac35432e0c17eeedb908081f6e7dc0656e38471a9bf98f37fee1f87cafb1e4d185d49d51ad6c4f4b7c89b79e985a0b127c3a
7
+ data.tar.gz: 5cc276021f11076c11f3ac704388b67e37451acdc0d0eab68bc11f6fcf007c94d321e6d5acf253e5ff7382e943008122a4f9ca835bf709db05b125ad34da7fd6
@@ -18,10 +18,10 @@ jobs:
18
18
  runs-on: ubuntu-latest
19
19
  strategy:
20
20
  matrix:
21
- ruby-version: [ '3.0', '3.1', '3.2' ]
21
+ ruby-version: [ '3.2', '3.3', '3.4' ]
22
22
 
23
23
  steps:
24
- - uses: actions/checkout@v2
24
+ - uses: actions/checkout@v4
25
25
  - name: Set up Ruby
26
26
  uses: ruby/setup-ruby@v1
27
27
  with:
@@ -9,10 +9,10 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  strategy:
11
11
  matrix:
12
- ruby-version: [ '3.0', '3.1', '3.2' ]
12
+ ruby-version: [ '3.2', '3.3', '3.4' ]
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v2
15
+ - uses: actions/checkout@v4
16
16
  - name: Set up Ruby
17
17
  uses: ruby/setup-ruby@v1
18
18
  with:
@@ -31,11 +31,11 @@ jobs:
31
31
  contents: read
32
32
 
33
33
  steps:
34
- - uses: actions/checkout@v2
35
- - name: Set up Ruby 3.0.1
34
+ - uses: actions/checkout@v4
35
+ - name: Set up Ruby 3.4
36
36
  uses: ruby/setup-ruby@v1
37
37
  with:
38
- ruby-version: 3.0.1
38
+ ruby-version: 3.4
39
39
  bundler-cache: true
40
40
 
41
41
  - name: Publish to RubyGems
data/.rubocop.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  AllCops:
2
2
  NewCops: enable
3
3
  SuggestExtensions: false
4
- TargetRubyVersion: 3.0
4
+ TargetRubyVersion: 3.2
5
5
 
6
6
  Gemspec/DevelopmentDependencies:
7
7
  EnforcedStyle: gemspec
@@ -15,19 +15,4 @@ Metrics/BlockLength:
15
15
  - spec/**/*.rb
16
16
 
17
17
  Style/MixinUsage:
18
- Enabled: false
19
-
20
- Lint/BooleanSymbol:
21
- Enabled: false
22
-
23
- Metrics/AbcSize:
24
- Enabled: false
25
-
26
- Metrics/MethodLength:
27
- Max: 25
28
-
29
- Layout/LineLength:
30
- Max: 130
31
-
32
- Metrics/CyclomaticComplexity:
33
- Max: 8
18
+ Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.2
1
+ 3.4.5
data/Gemfile CHANGED
@@ -4,3 +4,8 @@ source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in simple_symbolize.gemspec
6
6
  gemspec
7
+
8
+ gem 'rake', '~> 13.3'
9
+ gem 'rspec', '~> 3.13'
10
+ gem 'rubocop', '~> 1.80'
11
+ gem 'simplecov', '~> 0.22'
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # SimpleSymbolize
2
2
 
3
- SimpleSymbolize takes a string and transforms it into a symbol. Why? Because working with symbols in Ruby makes for a
3
+ SimpleSymbolize takes a string and transforms it into a symbol. Why? Because working with symbols in Ruby makes for a
4
4
  good time.
5
5
 
6
6
  Wait, doesn't String already have a `to_sym` method?
7
7
 
8
- Correct! However, this gem takes it one step further by transforming special characters and whitespace to give you a
8
+ Correct! However, this gem takes it one step further by transforming special characters and whitespace to give you a
9
9
  simple easy to work with Symbol.
10
10
 
11
11
  It works by removing special characters in a String like `'!'` and underscoring any whitespace.
@@ -38,9 +38,9 @@ Or install it yourself as:
38
38
 
39
39
  ## Usage
40
40
 
41
- There are two ways to symbolize your String.
41
+ There are three ways to use this gem.
42
42
 
43
- ### Call the symbolize method and pass it your String
43
+ ### SimpleSymbolize
44
44
 
45
45
  ```ruby
46
46
  require 'simple_symbolize'
@@ -48,7 +48,16 @@ require 'simple_symbolize'
48
48
  SimpleSymbolize.symbolize('hello world!') # => :hello_world
49
49
  ```
50
50
 
51
- ### Call the symbolize method on your String object
51
+ Available methods:
52
+
53
+ | Method | What does it do? |
54
+ |------------|------------------------------------------------------------------------------------------------------------------------------------------|
55
+ | symbolize | Returns your object as a plain old symbol |
56
+ | elementize | Returns your object as a plain old String |
57
+ | camelize | Returns your object as a plain old camelCase symbol |
58
+ | snakeize | Returns your object as a plain old snake_case symbol (very similar to symbolize, only it does not respect the handle_camel_case setting) | |
59
+
60
+ ### Mixing into String
52
61
 
53
62
  ```ruby
54
63
  require 'simple_symbolize'
@@ -58,9 +67,37 @@ String.include SimpleSymbolize::CoreExt::String
58
67
  'hello world!'.simple_symbolize # => :hello_world
59
68
  ```
60
69
 
70
+ Available methods:
71
+
72
+ | Method | What does it do? |
73
+ |------------|------------------------------------------------------------------------------------------------------------------------------------------|
74
+ | simple_symbolize | Returns your object as a plain old symbol |
75
+ | simple_elementize | Returns your object as a plain old String |
76
+ | simple_camelize | Returns your object as a plain old camelCase symbol |
77
+ | simple_snakeize | Returns your object as a plain old snake_case symbol (very similar to symbolize, only it does not respect the handle_camel_case setting) | |
78
+
79
+ ### Mixing into Symbol
80
+
81
+ ```ruby
82
+ require 'simple_symbolize'
83
+
84
+ Symbol.include SimpleSymbolize::CoreExt::Symbol
85
+
86
+ :hello_world!.simple_symbolize # => :hello_world
87
+ ```
88
+
89
+ Available methods:
90
+
91
+ | Method | What does it do? |
92
+ |------------|------------------------------------------------------------------------------------------------------------------------------------------|
93
+ | simple_symbolize | Returns your object as a plain old symbol |
94
+ | simple_elementize | Returns your object as a plain old String |
95
+ | simple_camelize | Returns your object as a plain old camelCase symbol |
96
+ | simple_snakeize | Returns your object as a plain old snake_case symbol (very similar to symbolize, only it does not respect the handle_camel_case setting) | |
97
+
61
98
  ## Configuration
62
99
 
63
- Something not underscored or removed? Or even something underscored/removed that you didn't want transformed?
100
+ Something not underscored or removed? Or even something underscored/removed that you didn't want transformed?
64
101
 
65
102
  No sweat, you can configure this gem to underscore and remove to your hearts content!
66
103
 
@@ -74,13 +111,54 @@ end
74
111
 
75
112
  ## Updates!
76
113
 
114
+ ### V5
115
+
116
+ #### Dropped support for Ruby < 3.2
117
+
118
+ Ruby 3.1 reached EOL in 2024, as such this gem no longer supports versions older than 3.2.
119
+
120
+ #### Only deals with Strings and Symbols
121
+
122
+ In previous iterations, certain non String/Symbol objects would be handled `SimpleSymbolize.symbolze(true)` returned
123
+ `:true`.
124
+
125
+ To be consistent, SimpleSymbolize now only accepts String/Symbols, everything else will be returned.
126
+
127
+ #### Uppercase acronyms when camelizing
128
+
129
+ Sometimes you want certain phrases to be in uppercase when camelizing, SimpleSymbolize now supports this.
130
+
131
+ ```ruby
132
+ SimpleSymbolize.translate { |t| t.camel_case_acronym = ['gb'] }
133
+
134
+ SimpleSymbolize.camelize('from gb') # => :fromGB (without setting the camel_case_acronym this would return :fromGb)
135
+ ```
136
+
137
+ ---
138
+
139
+ ### V4.1
140
+
141
+ #### Symbol methods can now be Mixed in
142
+
143
+ SimpleSymbolize now supports mixing in the methods on the Symbol class, allowing you to call `simple_symbolize` directly
144
+ on a Symbol object.
145
+
146
+ ```ruby
147
+ Symbol.include SimpleSymbolize::CoreExt::Symbol
148
+ :hello_world!.simple_symbolize # => :hello_world
149
+ ```
150
+
151
+ ---
152
+
77
153
  ### V4
154
+
78
155
  #### String methods now need to be Mixed in
79
156
 
80
- SimpleSymbolize is safe to use with other gems, particularly the popular ActiveSupport gem which SimpleSymbolize use to share
157
+ SimpleSymbolize is safe to use with other gems, particularly the popular ActiveSupport gem which SimpleSymbolize use to
158
+ share
81
159
  certain methods names with.
82
160
 
83
- You now need to deliberatly mixin the methods on the String class:
161
+ You now need to deliberately mixin the methods on the String class:
84
162
 
85
163
  ```ruby
86
164
  String.include SimpleSymbolize::CoreExt::String
@@ -98,9 +176,13 @@ To make them easier to spot, the method names on the String class have been pref
98
176
  #### Introducing #snakeize
99
177
 
100
178
  The `#snakeize` method will return your object in snake_case.
101
- This is the default behaviour of the `#symbolize` method however `#snakeize` will always return thr Symbol in snake_case.
179
+ This is the default behaviour of the `#symbolize` method however `#snakeize` will always return thr Symbol in
180
+ snake_case.
181
+
182
+ ---
102
183
 
103
184
  ### V3
185
+
104
186
  #### String to_snake_case [DEPRECATED - replaced with `#simple_snakeize` in v4]
105
187
 
106
188
  `#to_snake_case` extends the String class to return you your String object in snake_case format.
@@ -125,6 +207,8 @@ Arrays are now supported when configuring the gem
125
207
  SimpleSymbolize.translate { |trans| trans.to_underscore = %w[!&*] }
126
208
  ```
127
209
 
210
+ ---
211
+
128
212
  ### V2
129
213
 
130
214
  SimpleSymbolize has got new friends!
@@ -142,7 +226,7 @@ SimpleSymbolize.elementize('hello world!') # => "hello_world"
142
226
 
143
227
  #### Camelize
144
228
 
145
- Great for working with APIs that require fields in a JSON format. Camelize clears away the clutter and returns you
229
+ Great for working with APIs that require fields in a JSON format. Camelize clears away the clutter and returns you
146
230
  a Symbolized object in camelCase.
147
231
 
148
232
  [comment]: <> (## Contributing)
data/bin/console CHANGED
@@ -3,7 +3,6 @@
3
3
 
4
4
  require 'bundler/setup'
5
5
  require 'simple_symbolize'
6
- require 'pry'
7
6
 
8
7
  # You can add fixtures and/or initialization code here to make experimenting
9
8
  # with your gem easier. You can also use a different console, if you like.
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Extends the Symbol class by mixing in the symbolize module.
4
+ # @example Mixin the methods to the Symbol class
5
+ # Symbol.include SimpleSymbolize::CoreExt::Symbol
6
+
7
+ module SimpleSymbolize
8
+ module CoreExt
9
+ # Contains methods to be mixed into the String class
10
+ module Symbol
11
+ # @example Symbolize a string using the String object method
12
+ # :hello_world!.symbolize #=> :hello_world
13
+ def simple_symbolize
14
+ SimpleSymbolize.symbolize(self)
15
+ end
16
+
17
+ # @example Turns a String into a camelCase Symbol
18
+ # :hello_world.simple_camelize => :helloWorld
19
+ def simple_camelize
20
+ SimpleSymbolize.camelize(self)
21
+ end
22
+
23
+ # @example Symbolizes a String then calls #to_s
24
+ # :helloWorld!.simple_elementize => 'hello_word'
25
+ def simple_elementize
26
+ SimpleSymbolize.elementize(self)
27
+ end
28
+
29
+ # @example Turns a String into it's snake_case equivalent
30
+ # :helloWorld.simple_snakeize => :hello_word
31
+ def simple_snakeize
32
+ SimpleSymbolize.snakeize(self)
33
+ end
34
+ end
35
+ end
36
+ end
@@ -10,8 +10,10 @@ module SimpleSymbolize
10
10
  attr_reader :remove
11
11
  # @return [Array] the characters to be untouched from the String.
12
12
  attr_reader :omit
13
-
13
+ # @return [Boolean] whether to handle camelCase strings during symbolisation.
14
14
  attr_reader :handle_camel_case
15
+ # @return [Array] the characters to be transformed into uppercase during camelisation.
16
+ attr_reader :camel_case_acronyms
15
17
 
16
18
  # Creates an instance of the Translations class.
17
19
  #
@@ -21,44 +23,44 @@ module SimpleSymbolize
21
23
  end
22
24
 
23
25
  # Merges the String passed with the @underscore Array omitting duplicates.
24
- # Removes those characters from the @remove and @omit Arrays to avoid the change being over-written.
26
+ # Removes those characters from @remove and @omit Arrays to avoid the change being over-written.
25
27
  #
26
- # @param chars [Array] an object containing characters to be underscored.
28
+ # @param input [Array] an object containing characters to be underscored.
27
29
  #
28
30
  # @return [Array] the Array of characters to be underscored.
29
- def to_underscore=(chars)
30
- chars = sanitise_chars(chars)
31
+ def to_underscore=(input)
32
+ arr = sanitise(input)
31
33
 
32
- @remove -= chars
33
- @omit -= chars
34
- @underscore |= chars
34
+ @remove -= arr
35
+ @omit -= arr
36
+ @underscore |= arr
35
37
  end
36
38
 
37
39
  # Merges the String passed with the @remove Array omitting duplicates.
38
- # Removes those characters from the @underscore and @omit Arrays to avoid the change being over-written.
40
+ # Removes those characters from @underscore and @omit Arrays to avoid the change being over-written.
39
41
  #
40
- # @param chars [String] a String object containing characters to be removed.
42
+ # @param input [String] a String object containing characters to be removed.
41
43
  #
42
44
  # @return [Array] the Array of characters to be removed.
43
- def to_remove=(chars)
44
- chars = sanitise_chars(chars)
45
+ def to_remove=(input)
46
+ arr = sanitise(input)
45
47
 
46
- @underscore -= chars
47
- @omit -= chars
48
- @remove |= chars
48
+ @underscore -= arr
49
+ @omit -= arr
50
+ @remove |= arr
49
51
  end
50
52
 
51
- # Removes characters within the String passed from the @remove and @underscore Arrays.
53
+ # Removes characters within the String passed from @remove and @underscore Arrays.
52
54
  #
53
- # @param chars [String] a String object containing characters to be removed.
55
+ # @param input [String] a String object containing characters to be removed.
54
56
  #
55
57
  # @return [Array] the Array of characters to be omitted.
56
- def to_omit=(chars)
57
- chars = sanitise_chars(chars)
58
+ def to_omit=(input)
59
+ arr = sanitise(input)
58
60
 
59
- @underscore -= chars
60
- @remove -= chars
61
- @omit += chars
61
+ @underscore -= arr
62
+ @remove -= arr
63
+ @omit += arr
62
64
  end
63
65
 
64
66
  def handle_camel_case=(handle)
@@ -68,26 +70,37 @@ module SimpleSymbolize
68
70
  @handle_camel_case = handle.eql?('true')
69
71
  end
70
72
 
73
+ def camel_case_acronyms=(input)
74
+ arr = sanitise(input)
75
+
76
+ @camel_case_acronyms = arr.map { |word| word.is_a?(String) ? word.to_s.downcase : nil }.compact.uniq
77
+ end
78
+
71
79
  def reset!
72
80
  @underscore = [' ', '::', '-']
73
81
  @remove = %w[' ( ) , . : " ! @ £ $ % ^ & * / { } [ ] < > ; = #]
74
82
  @omit = []
75
83
  @handle_camel_case = true
84
+ @camel_case_acronyms = []
76
85
  end
77
86
 
78
87
  private
79
88
 
80
- # Converts chars into Array of Strings
89
+ # Sanitises the input into an Array of Strings
81
90
  #
82
- # @param arg Arg to be converted
91
+ # @param input [String, Array] to be converted
83
92
  #
84
93
  # @return Array of Strings
85
94
  #
86
95
  # @raise [ArgumentError] if the arg is not either a String or an Array.
87
- def sanitise_chars(arg)
88
- raise ArgumentError 'needs to be a String or an Array of characters' unless [String, Array].include?(arg.class)
96
+ def sanitise(input)
97
+ raise ArgumentError 'needs to be a String or an Array' unless [String, Array].include?(input.class)
89
98
 
90
- arg.respond_to?(:chars) ? arg.chars : arg.map(&:to_s)
99
+ if input.respond_to?(:chars)
100
+ input.chars
101
+ else
102
+ input.map { |obj| obj.respond_to?(:to_s) ? obj.to_s.downcase : nil }.compact.uniq
103
+ end
91
104
  end
92
105
  end
93
106
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleSymbolize
4
- VERSION = '4.0.0'
4
+ VERSION = '5.0.0'
5
5
  end
@@ -4,6 +4,7 @@ require 'simple_symbolize/version'
4
4
 
5
5
  require_relative 'simple_symbolize/translations'
6
6
  require_relative 'simple_symbolize/core_ext/string/symbolize'
7
+ require_relative 'simple_symbolize/core_ext/symbol/symbolize'
7
8
 
8
9
  # Main module for the gem
9
10
  # Contains the base methods and allows configuration
@@ -31,9 +32,7 @@ module SimpleSymbolize
31
32
  # @example Symbolize a string using the symbolize method
32
33
  # SimpleSymbolize.symbolize("hello world!") #=> :hello_world
33
34
  def self.symbolize(obj)
34
- return obj unless obj.respond_to?(:to_s)
35
- return obj if [Hash, Array, NilClass].include?(obj.class)
36
- return obj if obj.respond_to?(:empty?) && obj.empty?
35
+ return obj unless valid_input?(obj)
37
36
 
38
37
  obj = if SimpleSymbolize.translations.handle_camel_case
39
38
  snakeize(obj)
@@ -53,9 +52,7 @@ module SimpleSymbolize
53
52
  # @example Elementize a string using the elementize method
54
53
  # SimpleSymbolize.elementize("hello world!") #=> "helloWorld"
55
54
  def self.elementize(obj)
56
- return obj unless obj.respond_to?(:to_s)
57
- return obj if [Hash, Array, NilClass].include?(obj.class)
58
- return obj if obj.respond_to?(:empty?) && obj.empty?
55
+ return obj unless valid_input?(obj)
59
56
 
60
57
  symbolize(obj).to_s
61
58
  end
@@ -67,14 +64,12 @@ module SimpleSymbolize
67
64
  # @example Camelize a string using the camelize method
68
65
  # SimpleSymbolize.camelize("hello world!") #=> :helloWorld
69
66
  def self.camelize(obj)
70
- return obj unless obj.respond_to?(:to_s)
71
- return obj if [Hash, Array, NilClass].include?(obj.class)
72
- return obj if obj.respond_to?(:empty?) && obj.empty?
67
+ return obj unless valid_input?(obj)
73
68
 
74
69
  first, *rest = elementize(obj).split('_')
75
70
  return obj if first.nil?
76
71
 
77
- rest.size.positive? ? (first << rest.map(&:capitalize).join).to_sym : symbolize(first)
72
+ assemble_came_case_string(first, rest)
78
73
  end
79
74
 
80
75
  # Turns a String || Symbol into a snake_case Symbol
@@ -84,9 +79,7 @@ module SimpleSymbolize
84
79
  # @example Snakeize an object using the snakeize method
85
80
  # SimpleSymbolize.snakeize('Hello World!') #=> :hello_world
86
81
  def self.snakeize(obj)
87
- return obj unless obj.respond_to?(:to_s)
88
- return obj if [Hash, Array, NilClass].include?(obj.class)
89
- return obj if obj.respond_to?(:empty?) && obj.empty?
82
+ return obj unless valid_input?(obj)
90
83
 
91
84
  obj.to_s
92
85
  .gsub(Regexp.union(SimpleSymbolize.translations.underscore), '_')
@@ -96,4 +89,41 @@ module SimpleSymbolize
96
89
  .downcase
97
90
  .to_sym
98
91
  end
92
+
93
+ class << self
94
+ private
95
+
96
+ # Validates if the input object should be processed
97
+ #
98
+ # @param obj [Object] the object to validate
99
+ #
100
+ # @return [Boolean] true if the object should be processed, false otherwise
101
+ def valid_input?(obj)
102
+ return false unless [String, Symbol].include?(obj.class)
103
+ return false unless obj.respond_to?(:to_s)
104
+ return false if obj.to_s.empty?
105
+
106
+ true
107
+ end
108
+
109
+ # Abstracts the complicated building of the camelCase String
110
+ #
111
+ # @param first [String] the first part of the camelCase String
112
+ # @param rest [Array] the rest of the camelCase String
113
+ #
114
+ # @return [Symbol] camelCase representation of the input
115
+ def assemble_came_case_string(first, rest)
116
+ return symbolize(first) unless rest.size.positive?
117
+
118
+ acronyms = SimpleSymbolize.translations.camel_case_acronyms
119
+ rest = if acronyms.empty?
120
+ rest.map(&:capitalize)
121
+ else
122
+ rest.map { |word| acronyms.include?(word) ? word.upcase : word.capitalize }
123
+ end
124
+
125
+ word = first + rest.join
126
+ word.to_sym
127
+ end
128
+ end
99
129
  end
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.homepage = 'https://github.com/dvla/simple-symbolize'
17
17
 
18
18
  spec.license = 'MIT'
19
- spec.required_ruby_version = Gem::Requirement.new('>= 3.0')
19
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.2')
20
20
 
21
21
  spec.metadata['homepage_uri'] = spec.homepage
22
22
  spec.metadata['source_code_uri'] = spec.homepage
@@ -29,10 +29,4 @@ Gem::Specification.new do |spec|
29
29
  spec.bindir = 'exe'
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ['lib']
32
-
33
- spec.add_development_dependency 'pry', '~> 0.14'
34
- spec.add_development_dependency 'rake', '~> 13.0'
35
- spec.add_development_dependency 'rspec', '~> 3.12'
36
- spec.add_development_dependency 'rubocop', '~> 1.54'
37
- spec.add_development_dependency 'simplecov', '~> 0.22'
38
32
  end
metadata CHANGED
@@ -1,86 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_symbolize
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - alexo
8
8
  - Driver and Vehicle Licensing Agency (DVLA)
9
- autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2024-01-12 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: pry
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '0.14'
21
- type: :development
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "~>"
26
- - !ruby/object:Gem::Version
27
- version: '0.14'
28
- - !ruby/object:Gem::Dependency
29
- name: rake
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
33
- - !ruby/object:Gem::Version
34
- version: '13.0'
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - "~>"
40
- - !ruby/object:Gem::Version
41
- version: '13.0'
42
- - !ruby/object:Gem::Dependency
43
- name: rspec
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: '3.12'
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: '3.12'
56
- - !ruby/object:Gem::Dependency
57
- name: rubocop
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: '1.54'
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: '1.54'
70
- - !ruby/object:Gem::Dependency
71
- name: simplecov
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - "~>"
75
- - !ruby/object:Gem::Version
76
- version: '0.22'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: '0.22'
11
+ date: 1980-01-02 00:00:00.000000000 Z
12
+ dependencies: []
84
13
  description: 'simple_symbolize will remove special characters from a String, replacing
85
14
  whitespace with an underscore, down-casing and finally calling the #to_sym String
86
15
  method. Configure this gem to your hearts content!'
@@ -104,6 +33,7 @@ files:
104
33
  - bin/setup
105
34
  - lib/simple_symbolize.rb
106
35
  - lib/simple_symbolize/core_ext/string/symbolize.rb
36
+ - lib/simple_symbolize/core_ext/symbol/symbolize.rb
107
37
  - lib/simple_symbolize/translations.rb
108
38
  - lib/simple_symbolize/version.rb
109
39
  - simple_symbolize.gemspec
@@ -113,7 +43,6 @@ licenses:
113
43
  metadata:
114
44
  homepage_uri: https://github.com/dvla/simple-symbolize
115
45
  source_code_uri: https://github.com/dvla/simple-symbolize
116
- post_install_message:
117
46
  rdoc_options: []
118
47
  require_paths:
119
48
  - lib
@@ -121,15 +50,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
121
50
  requirements:
122
51
  - - ">="
123
52
  - !ruby/object:Gem::Version
124
- version: '3.0'
53
+ version: '3.2'
125
54
  required_rubygems_version: !ruby/object:Gem::Requirement
126
55
  requirements:
127
56
  - - ">="
128
57
  - !ruby/object:Gem::Version
129
58
  version: '0'
130
59
  requirements: []
131
- rubygems_version: 3.2.15
132
- signing_key:
60
+ rubygems_version: 3.6.9
133
61
  specification_version: 4
134
62
  summary: Turns Strings into Symbols.
135
63
  test_files: []