eac_ruby_utils 0.57.0 → 0.57.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eac_ruby_utils/fs/traverser.rb +0 -2
- data/lib/eac_ruby_utils/inflector.rb +4 -1
- data/lib/eac_ruby_utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6469a891b6aa484b994c98c3617fc63508607703f7eeb85106d543bdfb5a17e2
|
4
|
+
data.tar.gz: 8724c432235e501b3e3a645caee3ac3eb42ba2d0430d870db8b06dcd5c5b2afc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7138140617aba1656eeaf68cce2a3a1895d9cc7f6bf9702c2d5630d71d4ca20022cb63c97bdefaae31815aaf7bfbb35d40ee2c139093c097c43f1f5819703bf8
|
7
|
+
data.tar.gz: f509f49102ff7360aa6d368a2558876d808d5cd78f419886304acfcadb219a54ec9a4ecaad988fad7c38f992e77d087d6b8580cb80df9a8b59ad9fc55ca30314
|
@@ -1,12 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'active_support/inflector'
|
4
|
+
|
3
5
|
module EacRubyUtils
|
4
6
|
class Inflector
|
5
7
|
class << self
|
6
8
|
VARIABLE_NAME_PATTERN = /[_a-z][_a-z0-9]*/i.freeze
|
7
9
|
|
8
10
|
def variableize(string)
|
9
|
-
r = string.gsub(/[^_a-z0-9]/i, '_')
|
11
|
+
r = ::ActiveSupport::Inflector.transliterate(string).gsub(/[^_a-z0-9]/i, '_')
|
12
|
+
.gsub(/_+/, '_').gsub(/_\z/, '').gsub(/\A_/, '').downcase
|
10
13
|
m = VARIABLE_NAME_PATTERN.match(r)
|
11
14
|
return r if m
|
12
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_ruby_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.57.
|
4
|
+
version: 0.57.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|