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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b1cb37cfbfaac4ca9808e7e376679915740783be63ba84507eeb5bd61006652
4
- data.tar.gz: 3df01f8763b6e20e27aeca3070321f6075e6841a2b9fe7f5dfe49aef19b90875
3
+ metadata.gz: 484fc9b5ba81835c60c8577578726c548dea573b997f028ac2dcc4b5d2a55c77
4
+ data.tar.gz: 02d65b9252633b691ee87076566a429f3763e47dcbba28d04ce439dfbfa78609
5
5
  SHA512:
6
- metadata.gz: 7086fb6f67c3c192cee87da4787c18f56dfed30ad0190dfe245eee31fc9857bcebec9dd6b0c61f16c90a1a102ef23e29a349257abce4126c0a3ae63eec96b563
7
- data.tar.gz: 3cfc491ace7c26c6ea571cb303c9da41e8492ae9ba329247e339231a4c9235ffe9912c19603c3fe4ea9cbd5f621d69de35b10e7f6d6a6421842646ffab31cd62
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.5] - 2021-02-xx
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
@@ -1,7 +1,7 @@
1
1
  module Ecoportal
2
2
  module API
3
3
  class V2
4
- GEM_VERSION = "0.8.5"
4
+ GEM_VERSION = "0.8.6"
5
5
  end
6
6
  end
7
7
  end
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.5
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-21 00:00:00.000000000 Z
11
+ date: 2021-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler