dictable 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '02835d9f8c994076003744be112d39f570a2fecb12b3ac004d20998e44e504c0'
4
- data.tar.gz: d8e386094b2b1ac1645939c56a41a13bf6ae20ab71e44feaa4b99149be033554
3
+ metadata.gz: 5bce84832eecc44c3b43987ab5a20d95fad7b135f5b14febd2e0cccccb414654
4
+ data.tar.gz: f02c799cf5ee3928c6d26adac75f9c84bbc02a335cb8d89579e90cbd605152fb
5
5
  SHA512:
6
- metadata.gz: 0acea8d9309daf12232b5fdf32c95c0661ee35c597f8eda224d99e0df542ee6e47c7400eef39d2f846bb3593cab049ca441379c0db103dcc4a18879f29ca8e5d
7
- data.tar.gz: 3df4f4dcddd1adb270f4a878e6dc713c2f2943eef3da3ca2afddca0d48f5d4bb18421cc4fc5a9d8394fbd3110a8b9e7246b4a0886738f4f2e3b3c94ec5de9a78
6
+ metadata.gz: 1c8d79925d5b9495fb525c0d5d0c141aca3667c73ef37ae0f203a434f93e151fa30577e963463edf6b2b44572af712182c3acd0d78d44943b996764713acd275
7
+ data.tar.gz: f98accf83447ec44cd1162a5bd5b07b2ecd0b1bca26d4d1f957a47cab0285805b47ab097cce742f565a79595b3890163eaf2bc6155b0d456c7d129e4ef8e3a7d
data/CHANGELOG.md CHANGED
@@ -30,4 +30,8 @@
30
30
 
31
31
  - Refactor to simplify
32
32
  - Supporting leading zeroes is out of scope
33
- - Added dictionaries to explode address abbreviations
33
+ - Added dictionaries to explode address abbreviations
34
+
35
+ ## [0.1.6] - 2024-03-01
36
+
37
+ - Fix issue with dictionaries not loading when importing the gem in another project
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dictable
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
  end
data/lib/dictable.rb CHANGED
@@ -28,19 +28,7 @@ module Dictable
28
28
  end
29
29
 
30
30
  def self.load_dictionary(name, lang: :en)
31
- YAML.load_file("dictionaries/#{lang}/#{name}.yml")
31
+ dictionary_path = File.join(__dir__, '../dictionaries', lang.to_s, "#{name}.yml")
32
+ YAML.load_file(dictionary_path)
32
33
  end
33
34
  end
34
-
35
- #
36
- # module Number; end
37
- # class Number::Base; end
38
- #
39
- # Each language will have a dictionary
40
- # module Number::English; end
41
- # module Number::Spanish; end
42
- #
43
- # this is the explanation of the adapter pattern
44
- # https://refactoring.guru/design-patterns/adapter/ruby/example
45
- #
46
- #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dictable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Verges