simple_symbolize 2.0.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/.github/workflows/ruby_gem.yml +1 -1
- data/.rubocop.yml +28 -3
- data/.ruby-version +1 -0
- data/Gemfile +2 -0
- data/README.md +33 -14
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/lib/simple_symbolize/string.rb +12 -0
- data/lib/simple_symbolize/translations.rb +55 -30
- data/lib/simple_symbolize/version.rb +3 -1
- data/lib/simple_symbolize.rb +30 -17
- data/simple_symbolize.gemspec +6 -4
- metadata +10 -10
- data/.rubocop_todo.yml +0 -72
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcd4f78253aed92cf1895fd948418deac6fe69f2e3ce80efae55eb79556b157c
|
4
|
+
data.tar.gz: 7cefb49253c485e825b05e27bf6fcf020f4ef24f1995cc0ab1590e76a5ef0aed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fee566211bb3708c7f3225897008f9f5434fbaa8840f3fcab3b50d7031e74263a4b14a39fbf383834bbd3948cb4020457e00c6d83777f3235fa7d3d77877f312
|
7
|
+
data.tar.gz: a453a5a9be5d81ea8198f21b5fbd0fc1663f71f58f6051a9aa3ebc7c87893d76413d7b1c38b3e184032a7b773ed9ecabe92374f88fb467853ab986a55d17e57b
|
data/.github/workflows/ruby.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,5 +1,30 @@
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
2
|
-
|
3
1
|
AllCops:
|
4
2
|
NewCops: enable
|
5
|
-
SuggestExtensions: false
|
3
|
+
SuggestExtensions: false
|
4
|
+
TargetRubyVersion: 3.0
|
5
|
+
|
6
|
+
Gemspec/DevelopmentDependencies:
|
7
|
+
EnforcedStyle: gemspec
|
8
|
+
|
9
|
+
Gemspec/RequireMFA:
|
10
|
+
Enabled: false
|
11
|
+
|
12
|
+
Metrics/BlockLength:
|
13
|
+
Max: 120
|
14
|
+
Exclude:
|
15
|
+
- spec/**/*.rb
|
16
|
+
|
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
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.2
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -64,40 +64,59 @@ No sweat, you can configure this gem to underscore and remove to your hearts con
|
|
64
64
|
|
65
65
|
```ruby
|
66
66
|
SimpleSymbolize.translate do |trans|
|
67
|
-
trans.to_underscore
|
68
|
-
trans.to_remove
|
69
|
-
trans.to_omit
|
67
|
+
trans.to_underscore = '!'
|
68
|
+
trans.to_remove = ' '
|
69
|
+
trans.to_omit = '@'
|
70
70
|
end
|
71
71
|
```
|
72
72
|
|
73
73
|
## Updates!
|
74
74
|
|
75
|
-
|
75
|
+
### V3
|
76
|
+
#### String to_snake_case
|
77
|
+
|
78
|
+
`#to_snake_case` extends the String class to return you your String object in snake_case format.
|
79
|
+
|
80
|
+
#### Handle camelCase with Symbolize
|
81
|
+
|
82
|
+
```ruby
|
83
|
+
symbolize('helloWorld!') # => :hello_world
|
84
|
+
```
|
85
|
+
|
86
|
+
This is the default behaviour and can be switched off by setting `#handle_camel_case` to `false`
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
SimpleSymbolize.translate { |trans| trans.handle_camel_case = false }
|
90
|
+
```
|
91
|
+
|
92
|
+
#### Additional ways to configure SimpleSymbolize
|
93
|
+
|
94
|
+
Arrays are now supported when configuring the gem
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
SimpleSymbolize.translate { |trans| trans.to_underscore = %w[!&*] }
|
98
|
+
```
|
99
|
+
|
100
|
+
### V2
|
101
|
+
|
102
|
+
SimpleSymbolize has got new friends!
|
76
103
|
|
77
104
|
Introducing `elementize` and `camelize`.
|
78
105
|
|
79
|
-
|
106
|
+
#### Elementize
|
80
107
|
|
81
108
|
Sometimes you just want a simple String obj without all the fuss. Elementize takes your String obj, removes that fuss
|
82
109
|
and returns you a simple-to-use String.
|
83
110
|
|
84
|
-
#### Example
|
85
|
-
|
86
111
|
```ruby
|
87
112
|
elementize('hello world!') # => "hello_world"
|
88
113
|
```
|
89
114
|
|
90
|
-
|
115
|
+
#### Camelize
|
91
116
|
|
92
117
|
Great for working with APIs that require fields in a JSON format. Camelize clears away the clutter and returns you
|
93
118
|
a Symbolized object in camelCase.
|
94
119
|
|
95
|
-
#### Example
|
96
|
-
|
97
|
-
```ruby
|
98
|
-
camelize('hello world!') # => :helloWorld
|
99
|
-
```
|
100
|
-
|
101
120
|
[comment]: <> (## Contributing)
|
102
121
|
|
103
122
|
[comment]: <> (Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/simple_symbolize.)
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'simple_symbolize'
|
2
4
|
|
3
5
|
# Extends the String class by mixing in the symbolize module.
|
@@ -7,4 +9,14 @@ class String
|
|
7
9
|
def symbolize
|
8
10
|
SimpleSymbolize.symbolize(self)
|
9
11
|
end
|
12
|
+
|
13
|
+
# @example Turns a String into it's snake_case equivalent
|
14
|
+
# "helloWorld".to_snake_case => 'hello_word'
|
15
|
+
def to_snake_case
|
16
|
+
# rubocop:disable Style/RedundantSelf
|
17
|
+
self.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
18
|
+
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
19
|
+
.downcase
|
20
|
+
# rubocop:enable Style/RedundantSelf
|
21
|
+
end
|
10
22
|
end
|
@@ -1,68 +1,93 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module SimpleSymbolize
|
2
4
|
# The translations class holds the attributes used to transform a String object.
|
3
5
|
# It also provides helper methods to manipulate those attributes.
|
4
6
|
class Translations
|
5
7
|
# @return [Array] the characters to be transformed into underscores.
|
6
|
-
|
8
|
+
attr_reader :underscore
|
7
9
|
# @return [Array] the characters to be removed from the String.
|
8
|
-
|
10
|
+
attr_reader :remove
|
9
11
|
# @return [Array] the characters to be untouched from the String.
|
10
|
-
|
12
|
+
attr_reader :omit
|
13
|
+
|
14
|
+
attr_reader :handle_camel_case
|
11
15
|
|
12
16
|
# Creates an instance of the Translations class.
|
13
17
|
#
|
14
18
|
# Sets the class variables to a default state.
|
15
19
|
def initialize
|
16
|
-
|
17
|
-
@remove = %w[\' ( ) , . : "]
|
18
|
-
@omit = []
|
20
|
+
reset!
|
19
21
|
end
|
20
22
|
|
21
23
|
# Merges the String passed with the @underscore Array omitting duplicates.
|
22
|
-
# Removes those characters from the @remove
|
24
|
+
# Removes those characters from the @remove and @omit Arrays to avoid the change being over-written.
|
23
25
|
#
|
24
|
-
# @param
|
26
|
+
# @param chars [Array] an object containing characters to be underscored.
|
25
27
|
#
|
26
28
|
# @return [Array] the Array of characters to be underscored.
|
27
|
-
|
28
|
-
|
29
|
-
def to_underscore(t)
|
30
|
-
raise ArgumentError 'needs to be a String or respond to #to_s' unless t.respond_to?(:to_s)
|
29
|
+
def to_underscore=(chars)
|
30
|
+
chars = sanitise_chars(chars)
|
31
31
|
|
32
|
-
@remove -=
|
33
|
-
@omit -=
|
34
|
-
@underscore |=
|
32
|
+
@remove -= chars
|
33
|
+
@omit -= chars
|
34
|
+
@underscore |= chars
|
35
35
|
end
|
36
36
|
|
37
37
|
# Merges the String passed with the @remove Array omitting duplicates.
|
38
38
|
# Removes those characters from the @underscore and @omit Arrays to avoid the change being over-written.
|
39
39
|
#
|
40
|
-
# @param
|
40
|
+
# @param chars [String] a String object containing characters to be removed.
|
41
41
|
#
|
42
42
|
# @return [Array] the Array of characters to be removed.
|
43
|
-
|
44
|
-
|
45
|
-
def to_remove(t)
|
46
|
-
raise ArgumentError 'needs to be a String or respond to #to_s' unless t.respond_to?(:to_s)
|
43
|
+
def to_remove=(chars)
|
44
|
+
chars = sanitise_chars(chars)
|
47
45
|
|
48
|
-
@underscore -=
|
49
|
-
@omit -=
|
50
|
-
@remove |=
|
46
|
+
@underscore -= chars
|
47
|
+
@omit -= chars
|
48
|
+
@remove |= chars
|
51
49
|
end
|
52
50
|
|
53
51
|
# Removes characters within the String passed from the @remove and @underscore Arrays.
|
54
52
|
#
|
55
|
-
# @param
|
53
|
+
# @param chars [String] a String object containing characters to be removed.
|
56
54
|
#
|
57
55
|
# @return [Array] the Array of characters to be omitted.
|
56
|
+
def to_omit=(chars)
|
57
|
+
chars = sanitise_chars(chars)
|
58
|
+
|
59
|
+
@underscore -= chars
|
60
|
+
@remove -= chars
|
61
|
+
@omit += chars
|
62
|
+
end
|
63
|
+
|
64
|
+
def handle_camel_case=(handle)
|
65
|
+
handle = handle.to_s.downcase
|
66
|
+
raise ArgumentError 'needs to be either `true` or `false`' unless %w[true false].include?(handle)
|
67
|
+
|
68
|
+
@handle_camel_case = handle.eql?('true')
|
69
|
+
end
|
70
|
+
|
71
|
+
def reset!
|
72
|
+
@underscore = [' ', '::', '-']
|
73
|
+
@remove = %w[' ( ) , . : " ! @ £ $ % ^ & * / { } [ ] < > ; = #]
|
74
|
+
@omit = []
|
75
|
+
@handle_camel_case = true
|
76
|
+
end
|
77
|
+
|
78
|
+
private
|
79
|
+
|
80
|
+
# Converts chars into Array of Strings
|
81
|
+
#
|
82
|
+
# @param arg Arg to be converted
|
83
|
+
#
|
84
|
+
# @return Array of Strings
|
58
85
|
#
|
59
|
-
# @raise [ArgumentError] if the
|
60
|
-
def
|
61
|
-
raise ArgumentError 'needs to be a String or
|
86
|
+
# @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)
|
62
89
|
|
63
|
-
|
64
|
-
@remove -= t.to_s.chars
|
65
|
-
@omit += t.to_s.chars
|
90
|
+
arg.respond_to?(:chars) ? arg.chars : arg.map(&:to_s)
|
66
91
|
end
|
67
92
|
end
|
68
93
|
end
|
data/lib/simple_symbolize.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'simple_symbolize/version'
|
2
4
|
|
3
5
|
require_relative 'simple_symbolize/string'
|
@@ -5,6 +7,8 @@ require_relative 'simple_symbolize/translations'
|
|
5
7
|
|
6
8
|
include SimpleSymbolize
|
7
9
|
|
10
|
+
# Main module for the gem
|
11
|
+
# Contains the base methods and allows configuration
|
8
12
|
module SimpleSymbolize
|
9
13
|
class Error < StandardError; end
|
10
14
|
|
@@ -18,46 +22,55 @@ module SimpleSymbolize
|
|
18
22
|
# Configures the Symbolize environment.
|
19
23
|
#
|
20
24
|
# @yieldparam [Translations] config the translations object yielded to the block.
|
21
|
-
def self.translate
|
22
|
-
yield
|
25
|
+
def self.translate
|
26
|
+
yield(translations) if block_given?
|
23
27
|
end
|
24
28
|
|
25
29
|
# Symbolizes a String object.
|
26
30
|
#
|
27
|
-
# @param
|
31
|
+
# @param obj [Object] the String object to be symbolized.
|
28
32
|
#
|
29
33
|
# @example Symbolize a string using the symbolize method
|
30
34
|
# symbolize("hello world!") #=> :hello_world
|
31
|
-
def symbolize(
|
32
|
-
return
|
35
|
+
def symbolize(obj)
|
36
|
+
return obj unless obj.respond_to?(:to_s)
|
37
|
+
return obj if [Hash, Array, NilClass].include?(obj.class)
|
38
|
+
|
39
|
+
str = obj.to_s
|
40
|
+
str = str.to_snake_case if SimpleSymbolize.translations.handle_camel_case
|
33
41
|
|
34
|
-
str.downcase
|
35
|
-
|
42
|
+
str.downcase
|
43
|
+
.gsub(Regexp.union(SimpleSymbolize.translations.underscore), '_')
|
44
|
+
.gsub(Regexp.union(SimpleSymbolize.translations.remove), '')
|
45
|
+
.to_sym
|
36
46
|
end
|
37
47
|
|
38
48
|
# Symbolizes a String object and returns it as a String object.
|
39
49
|
#
|
40
|
-
# @param
|
50
|
+
# @param obj [Object] the object to be symbolized.
|
41
51
|
#
|
42
52
|
# @example Elementize a string using the elementize method
|
43
53
|
# elementize("hello world!") #=> "helloWorld"
|
44
|
-
def elementize(
|
45
|
-
return
|
54
|
+
def elementize(obj)
|
55
|
+
return obj unless obj.respond_to?(:to_s)
|
56
|
+
return obj if [Hash, Array, NilClass].include?(obj.class)
|
46
57
|
|
47
|
-
symbolize(
|
58
|
+
symbolize(obj).to_s
|
48
59
|
end
|
49
60
|
|
50
61
|
# Turns a String object into a camelCase Symbol.
|
51
62
|
#
|
52
|
-
# @param
|
63
|
+
# @param obj [Object] the String object to be camelized.
|
53
64
|
#
|
54
65
|
# @example Camelize a string using the camelize method
|
55
66
|
# camelize("hello world!") #=> :helloWorld
|
56
|
-
def camelize(
|
57
|
-
return
|
58
|
-
return
|
67
|
+
def camelize(obj)
|
68
|
+
return obj unless obj.respond_to?(:to_s)
|
69
|
+
return obj if [Hash, Array, NilClass].include?(obj.class)
|
70
|
+
|
71
|
+
first, *rest = elementize(obj).split('_')
|
72
|
+
return obj if first.nil?
|
59
73
|
|
60
|
-
|
61
|
-
rest ? (first << rest.map(&:capitalize).join).to_sym : symbolize(first)
|
74
|
+
rest.size.positive? ? (first << rest.map(&:capitalize).join).to_sym : symbolize(first)
|
62
75
|
end
|
63
76
|
end
|
data/simple_symbolize.gemspec
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'lib/simple_symbolize/version'
|
2
4
|
|
3
5
|
Gem::Specification.new do |spec|
|
@@ -14,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
14
16
|
spec.homepage = 'https://github.com/dvla/simple-symbolize'
|
15
17
|
|
16
18
|
spec.license = 'MIT'
|
17
|
-
spec.required_ruby_version = Gem::Requirement.new('>=
|
19
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.0')
|
18
20
|
|
19
21
|
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
20
22
|
|
@@ -32,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
32
34
|
spec.require_paths = ['lib']
|
33
35
|
|
34
36
|
spec.add_development_dependency 'pry', '~> 0.14'
|
35
|
-
spec.add_development_dependency 'rake', '~>
|
36
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
37
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
37
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
38
|
+
spec.add_development_dependency 'rspec', '~> 3.12'
|
39
|
+
spec.add_development_dependency 'rubocop', '~> 1.54'
|
38
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_symbolize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alexo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -30,42 +30,42 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
47
|
+
version: '3.12'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3.
|
54
|
+
version: '3.12'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: '1.54'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: '1.54'
|
69
69
|
description: 'simple_symbolize will remove special characters from a String, replacing
|
70
70
|
whitespace with an underscore, down-casing and finally calling the #to_sym String
|
71
71
|
method. Configure this gem to your hearts content!'
|
@@ -80,7 +80,7 @@ files:
|
|
80
80
|
- ".gitignore"
|
81
81
|
- ".rspec"
|
82
82
|
- ".rubocop.yml"
|
83
|
-
- ".
|
83
|
+
- ".ruby-version"
|
84
84
|
- Gemfile
|
85
85
|
- LICENSE.txt
|
86
86
|
- README.md
|
@@ -106,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
106
|
requirements:
|
107
107
|
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: '3.0'
|
110
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
112
|
- - ">="
|
data/.rubocop_todo.yml
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2022-05-20 09:59:54 UTC using RuboCop version 1.29.1.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 1
|
10
|
-
# This cop supports safe auto-correction (--auto-correct).
|
11
|
-
# Configuration parameters: Include.
|
12
|
-
# Include: **/*.gemspec
|
13
|
-
Gemspec/RequireMFA:
|
14
|
-
Exclude:
|
15
|
-
- 'simple_symbolize.gemspec'
|
16
|
-
|
17
|
-
# Offense count: 1
|
18
|
-
# Configuration parameters: Include.
|
19
|
-
# Include: **/*.gemspec
|
20
|
-
Gemspec/RequiredRubyVersion:
|
21
|
-
Exclude:
|
22
|
-
- 'simple_symbolize.gemspec'
|
23
|
-
|
24
|
-
# Offense count: 1
|
25
|
-
# This cop supports safe auto-correction (--auto-correct).
|
26
|
-
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
|
27
|
-
Lint/UnusedMethodArgument:
|
28
|
-
Exclude:
|
29
|
-
- 'lib/simple_symbolize.rb'
|
30
|
-
|
31
|
-
# Offense count: 1
|
32
|
-
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
33
|
-
# IgnoredMethods: refine
|
34
|
-
Metrics/BlockLength:
|
35
|
-
Max: 88
|
36
|
-
|
37
|
-
# Offense count: 3
|
38
|
-
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
39
|
-
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
|
40
|
-
Naming/MethodParameterName:
|
41
|
-
Exclude:
|
42
|
-
- 'lib/simple_symbolize/translations.rb'
|
43
|
-
|
44
|
-
# Offense count: 1
|
45
|
-
# Configuration parameters: AllowedConstants.
|
46
|
-
Style/Documentation:
|
47
|
-
Exclude:
|
48
|
-
- 'spec/**/*'
|
49
|
-
- 'test/**/*'
|
50
|
-
- 'lib/simple_symbolize.rb'
|
51
|
-
|
52
|
-
# Offense count: 10
|
53
|
-
# This cop supports safe auto-correction (--auto-correct).
|
54
|
-
# Configuration parameters: EnforcedStyle.
|
55
|
-
# SupportedStyles: always, always_true, never
|
56
|
-
Style/FrozenStringLiteralComment:
|
57
|
-
Exclude:
|
58
|
-
- 'Gemfile'
|
59
|
-
- 'Rakefile'
|
60
|
-
- 'bin/console'
|
61
|
-
- 'lib/simple_symbolize.rb'
|
62
|
-
- 'lib/simple_symbolize/string.rb'
|
63
|
-
- 'lib/simple_symbolize/translations.rb'
|
64
|
-
- 'lib/simple_symbolize/version.rb'
|
65
|
-
- 'simple_symbolize.gemspec'
|
66
|
-
- 'spec/simple_symbolize_spec.rb'
|
67
|
-
- 'spec/spec_helper.rb'
|
68
|
-
|
69
|
-
# Offense count: 1
|
70
|
-
Style/MixinUsage:
|
71
|
-
Exclude:
|
72
|
-
- 'lib/simple_symbolize.rb'
|