lite-ruby 1.0.12 → 1.0.13

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: 7a93f838ee323d06f138b7c772efaae0c46de3cd4696bf1fbc29cae1a2efd137
4
- data.tar.gz: 947a451f87050a7b1106f78c963808b545b8f856906129f6b1e43b41c8d558dc
3
+ metadata.gz: e8475c37b89cebc23a2b6c8d45c05a9faaa05cd707559d3e1c9dbc671b5b9eb6
4
+ data.tar.gz: 543306b15474788c1ddefbc45ee6038d4bfea80fd04cb897fa5d4db41d812bce
5
5
  SHA512:
6
- metadata.gz: bcf39979e280eac618e9357849596112cd00e809f076f25de51ae1624256e5d72cccda41345b7b07df0582644c6d9fe884f50ccf10f62059c3f48092aba17ced
7
- data.tar.gz: 58b863fec65b549bf3cbb0d1f2ead1c2696b3848f3020d8979aa5eb0fff55c839c63897ce46c5ef3dfa641da2d27f18ea3a3a1978e9cf6d9bde2e0d2b3b085b8
6
+ metadata.gz: 5742b8fdd4dea13ee9b760c2e1bb79a45557bfad5797732bf9f68c23e66c2a6145ec89a1a53804cc352974f4f51b1df1c62ea2a78d35a3ab4b17a9304b5ea6e0
7
+ data.tar.gz: 6892d76587eab981d031b1f3bb59421878b9e2fa44a2e74537462bad5748f17a77298e42d4b504c3282f2b4bc92d289585beb4bb7ea9049ffcccd3559155cb9b
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.13] - 2019-08-16
10
+ ### Changed
11
+ - Revert constantize function
12
+
9
13
  ## [1.0.12] - 2019-08-15
10
14
  ### Changed
11
15
  - Changed how string underscore works
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-ruby (1.0.12)
4
+ lite-ruby (1.0.13)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -84,30 +84,9 @@ class String
84
84
  camelize!
85
85
  end
86
86
 
87
- # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
88
- # rubocop:disable Metrics/MethodLength, Metrics/PerceivedComplexity
89
87
  def constantize
90
- names = split('::')
91
- Object.const_get(self) if names.empty?
92
- names.shift if names.size > 1 && names.first.empty?
93
-
94
- names.inject(Object) do |constant, name|
95
- return constant.const_get(name) if constant == Object
96
-
97
- candidate = constant.const_get(name)
98
- next candidate if constant.const_defined?(name, false)
99
- next candidate unless Object.const_defined?(name)
100
-
101
- constant = constant.ancestors.each_with_object(constant) do |ancestor, const|
102
- break const if ancestor == Object
103
- break ancestor if ancestor.const_defined?(name, false)
104
- end
105
-
106
- constant.const_get(name, false)
107
- end
88
+ Object.const_get(camelize)
108
89
  end
109
- # rubocop:enable Metrics/MethodLength, Metrics/PerceivedComplexity
110
- # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity
111
90
 
112
91
  def dasherize
113
92
  underscore.tr('_', '-')
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Ruby
5
5
 
6
- VERSION ||= '1.0.12'
6
+ VERSION ||= '1.0.13'
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez