ecoportal-api-v2 0.8.5 → 0.8.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 +4 -4
- data/CHANGELOG.md +11 -1
- data/lib/ecoportal/api/v2/page/component/selection_field.rb +10 -1
- data/lib/ecoportal/api/v2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 484fc9b5ba81835c60c8577578726c548dea573b997f028ac2dcc4b5d2a55c77
|
4
|
+
data.tar.gz: 02d65b9252633b691ee87076566a429f3763e47dcbba28d04ce439dfbfa78609
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 258ba907986e16b304f69ca903a7aba2b3daf3ea8d44b1af819e08bd63dfbce5ee2d904cc94bab14f84ecaa0f9d980f498378b53f8bbc35a237e62621f3ea7fd
|
7
|
+
data.tar.gz: 7340b168c888be83c2c2798614b55bb7893bc1fb3819914f99e207805ef4b709f5f34a0b743e31f0345ce2f0d59ebdf3d3154c6a5e6c30b12e8910b2403486e5
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,20 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
## [0.8.
|
4
|
+
## [0.8.6] - 2021-02-xx
|
5
|
+
|
6
|
+
### Added
|
7
|
+
- `Ecoportal::API::V2::Page::Component::SelectionField` added methods `#numeric!` `#text!`
|
8
|
+
|
9
|
+
### Changed
|
10
|
+
### Fixed
|
11
|
+
|
12
|
+
|
13
|
+
## [0.8.5] - 2021-02-22
|
5
14
|
|
6
15
|
### Added
|
7
16
|
### Changed
|
17
|
+
- upgrade
|
8
18
|
### Fixed
|
9
19
|
|
10
20
|
|
@@ -6,9 +6,18 @@ module Ecoportal
|
|
6
6
|
class SelectionField < Page::Component
|
7
7
|
passthrough :multiple, :flat
|
8
8
|
passthrough :other, :other_desc
|
9
|
+
passthrough :data_type
|
9
10
|
|
10
11
|
embeds_many :options, klass: "Ecoportal::API::V2::Page::Component::SelectionOption", order_key: :weight
|
11
12
|
|
13
|
+
def numeric!
|
14
|
+
data_type = "num"
|
15
|
+
end
|
16
|
+
|
17
|
+
def text!
|
18
|
+
data_type = "str"
|
19
|
+
end
|
20
|
+
|
12
21
|
def select(value)
|
13
22
|
opt = options.find {|opt| opt.value == value}
|
14
23
|
sel = selected
|
@@ -34,7 +43,7 @@ module Ecoportal
|
|
34
43
|
end
|
35
44
|
|
36
45
|
def add_option(name:, value:, pos: NOT_USED, before: NOT_USED, after: NOT_USED)
|
37
|
-
opt_doc = options.items_class.new_doc
|
46
|
+
opt_doc = options.items_class.new_doc
|
38
47
|
options.upsert!(opt_doc, pos: pos, before: before, after: after) do |option|
|
39
48
|
option.name = name
|
40
49
|
option.value = value
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecoportal-api-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oscar Segura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|