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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65af57191dbd9317c68eb8e171e53e4c39877f88d7ce212e0701703b6ff83d11
4
- data.tar.gz: c6caa9d9461c8055f1977cfb9ea4446bc2cef0fd2c1c0e919fcde296512aff30
3
+ metadata.gz: 6469a891b6aa484b994c98c3617fc63508607703f7eeb85106d543bdfb5a17e2
4
+ data.tar.gz: 8724c432235e501b3e3a645caee3ac3eb42ba2d0430d870db8b06dcd5c5b2afc
5
5
  SHA512:
6
- metadata.gz: e1e8ed1d73a37aff540712171468c9f03107cf956a1d52ef0b66a4518e679bc0f156ba06027afd0a450a94995445f6806432f2295f774d81442f76467b34180e
7
- data.tar.gz: cbd75d3662cc207ac95750b3248d1904c96886c62b55494dedfbd1de22238359801cc8d49c01e51c075a376a95da445022def8546e3672401dc41796d136e3cd
6
+ metadata.gz: 7138140617aba1656eeaf68cce2a3a1895d9cc7f6bf9702c2d5630d71d4ca20022cb63c97bdefaae31815aaf7bfbb35d40ee2c139093c097c43f1f5819703bf8
7
+ data.tar.gz: f509f49102ff7360aa6d368a2558876d808d5cd78f419886304acfcadb219a54ec9a4ecaad988fad7c38f992e77d087d6b8580cb80df9a8b59ad9fc55ca30314
@@ -57,8 +57,6 @@ module EacRubyUtils
57
57
  user_check_file(path)
58
58
  elsif path.directory?
59
59
  inner_check_directory(path, level)
60
- else
61
- raise "Unknown filesystem object: #{path}"
62
60
  end
63
61
  end
64
62
 
@@ -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, '_').gsub(/_+/, '_').gsub(/_\z/, '').gsub(/\A_/, '').downcase
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.57.0'
4
+ VERSION = '0.57.1'
5
5
  end
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.0
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-02 00:00:00.000000000 Z
11
+ date: 2021-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport