eitil 1.3.3 → 1.3.4

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: 9e09221af058e64779e66dc191c93be16a85592f7abc9fb3baca2c758732f04d
4
- data.tar.gz: bc3548f2643a9880cda0a9b78c82581afae5413ff09bfe6cd6b01ec6d34a2b43
3
+ metadata.gz: 2249e8b19220f03df98daad2d625c434b46c3eb54982afce5b71098eb2ec7561
4
+ data.tar.gz: f651112c073d1263919418904359cbdb03c39f232a216754c78da910b610e7d0
5
5
  SHA512:
6
- metadata.gz: df035ec77f87a82d84c55a98e4862a83a7f3696c70e9bdafc61df7c93c1c2c0ff002b554e0ae05b2f623bc100dfda09bd17d099293e13c70f54b59e327f2e1f1
7
- data.tar.gz: 53995982137b13b5d2c23701748b79d443de3807f150e677af544b1b36301c5e530aafe9f13ec0e3c0dcb43d3d43145fa78f0248e526a5532e46a35db97a8a53
6
+ metadata.gz: 851e8992abcf099c7cb23e2fed760a37278d606b6d328b4a20d0444b93986a4fef3760ea5cad242d9e6bedc15b7e71620070ec2d80ec6c32b6a44bc253cf789f
7
+ data.tar.gz: 1918147e3399a9a3e6fd363fb509bc55880f1dde592ef88cc072e2943ebb7f046db2ac312120cf48823338352a1cbe7bab06cdf5fed751419efba0581ddc5b75
@@ -0,0 +1,21 @@
1
+
2
+ # require "eitil_core/kernel/always_require_relative"
3
+
4
+ Kernel.module_eval do
5
+
6
+ def always_require_relative(current_path, relative_path, extension = '.rb')
7
+
8
+ unless Object.const_defined?('Rails')
9
+ return require_relative(path)
10
+ end
11
+
12
+ absolute_path = File.expand_path(relative_path, current_path).concat(extension)
13
+
14
+ if Rails.env.development?
15
+ load(absolute_path)
16
+ else
17
+ require(absolute_path)
18
+ end
19
+ end
20
+
21
+ end
@@ -0,0 +1,2 @@
1
+
2
+ require "eitil_core/kernel/always_require_relative"
@@ -7,6 +7,7 @@ require "eitil_core/array"
7
7
  require "eitil_core/hash"
8
8
  require "eitil_core/float"
9
9
  require "eitil_core/datetime"
10
+ require "eitil_core/kernel"
10
11
 
11
12
  # multi class patches
12
13
  require "eitil_core/type_checkers"
data/lib/eitil/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Eitil
2
2
 
3
- VERSION = '1.3.3'
3
+ VERSION = '1.3.4'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eitil
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurriaan Schrofer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-15 00:00:00.000000000 Z
11
+ date: 2021-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -206,6 +206,8 @@ files:
206
206
  - eitil_core/lib/eitil_core/hash.rb
207
207
  - eitil_core/lib/eitil_core/hash/auto_dig.rb
208
208
  - eitil_core/lib/eitil_core/hash/transform_string_values.rb
209
+ - eitil_core/lib/eitil_core/kernel.rb
210
+ - eitil_core/lib/eitil_core/kernel/always_require_relative.rb
209
211
  - eitil_core/lib/eitil_core/lookups.rb
210
212
  - eitil_core/lib/eitil_core/lookups/all_methods.rb
211
213
  - eitil_core/lib/eitil_core/lookups/gem_path.rb