ecoportal-api-oozes 0.5.8 → 0.5.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ed3bc0b2b7e4fdb51a9ebbf02ca946de0ac8fd7c71359ea8eb1ab545c5f6c9a
|
4
|
+
data.tar.gz: 7a0151c663ce59132955e5f91cbaed7ef2ff9c62d152c3f89ca233b4851e1c13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb2172b251d930c72f618576cfcbd17f58ddb4210e93644b01dd6568e2c44914d40c35d09777b86489e86eab0ed82e9c2de71f8396bbb33c9e16f7614ff9fea4
|
7
|
+
data.tar.gz: 1e3ca2bc12e2d3c077160ca25677ef880c32b8ecd1e66a241443df36950eb5f546d7b2bb1e6bf10caffbaa4e0b75a89f38b8607bb70f539796561af8fa1da5d2
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Change Log
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
## [0.5.9] - 2020-06-xx
|
5
|
+
|
6
|
+
### Added
|
7
|
+
- helper `Ecoportal::API::Common::Content::StringDigest#indexable_label`: to see the part of a label that gets indexed
|
8
|
+
- this `CHANGELOG.md` file
|
9
|
+
### Changed
|
10
|
+
### Fixed
|
@@ -7,12 +7,17 @@ module Ecoportal
|
|
7
7
|
module StringDigest
|
8
8
|
MAX_HASH_LABEL = 64
|
9
9
|
|
10
|
+
def indexable_label(str)
|
11
|
+
return nil unless str
|
12
|
+
lbl = str.downcase.gsub(/[^A-Za-z]+/,"-").slice(0, MAX_HASH_LABEL)
|
13
|
+
return nil unless lbl.length >= 3
|
14
|
+
lbl
|
15
|
+
end
|
16
|
+
|
10
17
|
# Calculates the Hash of the field based on label
|
11
18
|
def hash_label(str)
|
12
|
-
return
|
13
|
-
|
14
|
-
return false unless label.length >= 3
|
15
|
-
return "z" + Digest::MD5.hexdigest(label).slice(0, 8);
|
19
|
+
return nil unless lbl = indexable_label(str)
|
20
|
+
"z" + Digest::MD5.hexdigest(lbl).slice(0, 8);
|
16
21
|
end
|
17
22
|
|
18
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecoportal-api-oozes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oscar Segura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -140,6 +140,7 @@ files:
|
|
140
140
|
- ".rubocop.yml"
|
141
141
|
- ".travis.yml"
|
142
142
|
- ".yardopts"
|
143
|
+
- CHANGELOG.md
|
143
144
|
- Gemfile
|
144
145
|
- LICENSE
|
145
146
|
- README.md
|