ecoportal-api-oozes 0.5.8 → 0.7.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: 22485d9290fed472c85b2871b538385efa432395714b2fa9f2395d5ca3dfc73e
4
- data.tar.gz: 6d2c0590daac42d7ad69dc117de7fb188e8ed5eff480a38dfc7ec00759c7f639
3
+ metadata.gz: cdfc554887534bb009e625711354bbe3fd54f6f1b78df896a0d69a2b6d1f6de1
4
+ data.tar.gz: 82b8f879b6b53e9e196aa3cf33b9db75332501662f2b97a84c0863222c8e5cbd
5
5
  SHA512:
6
- metadata.gz: ee03ed1ac3f843fcf4dfdb38fccde9389fa909cb8fd3f9285f1c22c9a308d995f75ba8e329945999e1fcb47c61c72e1d4c199594daa63b00fc5c19e5477e6777
7
- data.tar.gz: d3e35673499d33c8322afd2eda3d1dc43f70dce238650b8acd192830e41f9f8fd65a8f5df89c727b8a933967e13a53c824ac80a40660912ad675405b46f48cad
6
+ metadata.gz: 486f69f48b5c8ad718c255d0c392ae73e4a61f35fca00b11adf661b4992e365ab96c724ee38523575f8440ba49411aaf26512578732852ddce7f2357b4689c8b
7
+ data.tar.gz: 42371082bb5579ec9402641299ab87a3f0dc0dbe48f5867e8306c1b4911f5fee52349d83e33cabaf699539460a1990eeb42bb8e3610b9ca75d6e81dd9e65be7f
@@ -0,0 +1,39 @@
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ ## [0.7.1] - 2020-10-07
5
+
6
+ ### Added
7
+ ### Changed
8
+ - updated dependencies
9
+ ### Fixed
10
+
11
+
12
+ ## [0.7.0] - 2020-09-10
13
+
14
+ ### Added
15
+ ### Changed
16
+ - updated dependencies
17
+ ### Fixed
18
+
19
+ ## [0.6.1] - 2020-07-11
20
+
21
+ ### Added
22
+ - `Ecoportal::API::Common::Content::DoubleModel#pretty_print`
23
+ ### Changed
24
+ ### Fixed
25
+
26
+ ## [0.6.0] - 2020-07-11
27
+
28
+ ### Added
29
+ ### Changed
30
+ - upgraded `ecoportal-api` gem
31
+ ### Fixed
32
+
33
+ ## [0.5.9] - 2020-07-02
34
+
35
+ ### Added
36
+ - helper `Ecoportal::API::Common::Content::StringDigest#indexable_label`: to see the part of a label that gets indexed
37
+ - this `CHANGELOG.md` file
38
+ ### Changed
39
+ ### Fixed
@@ -20,12 +20,12 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_development_dependency "bundler", "~> 2.1"
24
- spec.add_development_dependency "rake", "~> 12.0"
25
- spec.add_development_dependency "rspec", "~> 3.0"
26
- spec.add_development_dependency "yard", "~> 0.9", ">= 0.9.18"
27
- spec.add_development_dependency "redcarpet", "~> 3.5", ">= 3.5.0"
23
+ spec.add_development_dependency "bundler", ">= 2.1.3", "< 2.2"
24
+ spec.add_development_dependency "rspec", ">= 3.9", "< 4"
25
+ spec.add_development_dependency "rake", ">= 12.3.0", "< 13"
26
+ spec.add_development_dependency "yard", ">= 0.9.18", "< 0.10"
27
+ spec.add_development_dependency "redcarpet", ">= 3.5.0", "< 3.6"
28
28
  spec.add_development_dependency "pry"
29
29
 
30
- spec.add_dependency 'ecoportal-api', '~> 0.5', '>= 0.5.5'
30
+ spec.add_dependency 'ecoportal-api', '>= 0.7.1', '< 0.8'
31
31
  end
@@ -252,10 +252,10 @@ module Ecoportal
252
252
  end
253
253
  end
254
254
 
255
- #def print
256
- # puts JSON.pretty_generate(as_json)
257
- # self
258
- #end
255
+ def pretty_print
256
+ puts JSON.pretty_generate(as_json)
257
+ self
258
+ end
259
259
 
260
260
  def replace_doc(new_doc)
261
261
  raise UnlinkedModel.new(from: "#{self.class}#replace_doc", key: _key) unless linked?
@@ -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 false unless str
13
- label = str.downcase.gsub(/[^A-Za-z]+/,"-").slice(0, MAX_HASH_LABEL)
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
@@ -88,6 +88,10 @@ module Ecoportal
88
88
  root.sections.find {|sec| sec.component?(id)}
89
89
  end
90
90
 
91
+ def indexable_label
92
+ self.class.indexable_label(label)
93
+ end
94
+
91
95
  end
92
96
  end
93
97
  end
@@ -1,7 +1,7 @@
1
1
  module Ecoportal
2
2
  module API
3
3
  class V2
4
- GEM_VERSION = "0.5.8"
4
+ GEM_VERSION = "0.7.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,77 +1,95 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecoportal-api-oozes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.7.1
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-06-23 00:00:00.000000000 Z
11
+ date: 2020-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.1.3
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '2.1'
22
+ version: '2.2'
20
23
  type: :development
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: '2.1'
29
+ version: 2.1.3
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.2'
27
33
  - !ruby/object:Gem::Dependency
28
- name: rake
34
+ name: rspec
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '3.9'
40
+ - - "<"
32
41
  - !ruby/object:Gem::Version
33
- version: '12.0'
42
+ version: '4'
34
43
  type: :development
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
37
46
  requirements:
38
- - - "~>"
47
+ - - ">="
39
48
  - !ruby/object:Gem::Version
40
- version: '12.0'
49
+ version: '3.9'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '4'
41
53
  - !ruby/object:Gem::Dependency
42
- name: rspec
54
+ name: rake
43
55
  requirement: !ruby/object:Gem::Requirement
44
56
  requirements:
45
- - - "~>"
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 12.3.0
60
+ - - "<"
46
61
  - !ruby/object:Gem::Version
47
- version: '3.0'
62
+ version: '13'
48
63
  type: :development
49
64
  prerelease: false
50
65
  version_requirements: !ruby/object:Gem::Requirement
51
66
  requirements:
52
- - - "~>"
67
+ - - ">="
53
68
  - !ruby/object:Gem::Version
54
- version: '3.0'
69
+ version: 12.3.0
70
+ - - "<"
71
+ - !ruby/object:Gem::Version
72
+ version: '13'
55
73
  - !ruby/object:Gem::Dependency
56
74
  name: yard
57
75
  requirement: !ruby/object:Gem::Requirement
58
76
  requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '0.9'
62
77
  - - ">="
63
78
  - !ruby/object:Gem::Version
64
79
  version: 0.9.18
80
+ - - "<"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.10'
65
83
  type: :development
66
84
  prerelease: false
67
85
  version_requirements: !ruby/object:Gem::Requirement
68
86
  requirements:
69
- - - "~>"
70
- - !ruby/object:Gem::Version
71
- version: '0.9'
72
87
  - - ">="
73
88
  - !ruby/object:Gem::Version
74
89
  version: 0.9.18
90
+ - - "<"
91
+ - !ruby/object:Gem::Version
92
+ version: '0.10'
75
93
  - !ruby/object:Gem::Dependency
76
94
  name: redcarpet
77
95
  requirement: !ruby/object:Gem::Requirement
@@ -79,9 +97,9 @@ dependencies:
79
97
  - - ">="
80
98
  - !ruby/object:Gem::Version
81
99
  version: 3.5.0
82
- - - "~>"
100
+ - - "<"
83
101
  - !ruby/object:Gem::Version
84
- version: '3.5'
102
+ version: '3.6'
85
103
  type: :development
86
104
  prerelease: false
87
105
  version_requirements: !ruby/object:Gem::Requirement
@@ -89,9 +107,9 @@ dependencies:
89
107
  - - ">="
90
108
  - !ruby/object:Gem::Version
91
109
  version: 3.5.0
92
- - - "~>"
110
+ - - "<"
93
111
  - !ruby/object:Gem::Version
94
- version: '3.5'
112
+ version: '3.6'
95
113
  - !ruby/object:Gem::Dependency
96
114
  name: pry
97
115
  requirement: !ruby/object:Gem::Requirement
@@ -110,22 +128,22 @@ dependencies:
110
128
  name: ecoportal-api
111
129
  requirement: !ruby/object:Gem::Requirement
112
130
  requirements:
113
- - - "~>"
114
- - !ruby/object:Gem::Version
115
- version: '0.5'
116
131
  - - ">="
117
132
  - !ruby/object:Gem::Version
118
- version: 0.5.5
133
+ version: 0.7.1
134
+ - - "<"
135
+ - !ruby/object:Gem::Version
136
+ version: '0.8'
119
137
  type: :runtime
120
138
  prerelease: false
121
139
  version_requirements: !ruby/object:Gem::Requirement
122
140
  requirements:
123
- - - "~>"
124
- - !ruby/object:Gem::Version
125
- version: '0.5'
126
141
  - - ">="
127
142
  - !ruby/object:Gem::Version
128
- version: 0.5.5
143
+ version: 0.7.1
144
+ - - "<"
145
+ - !ruby/object:Gem::Version
146
+ version: '0.8'
129
147
  description:
130
148
  email:
131
149
  - rien@ecoportal.co.nz
@@ -140,6 +158,7 @@ files:
140
158
  - ".rubocop.yml"
141
159
  - ".travis.yml"
142
160
  - ".yardopts"
161
+ - CHANGELOG.md
143
162
  - Gemfile
144
163
  - LICENSE
145
164
  - README.md