ecoportal-api-v2 0.8.7 → 0.8.8
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 +12 -1
- data/lib/ecoportal/api/v2/page.rb +1 -0
- data/lib/ecoportal/api/v2/page/component/chart_field.rb +4 -0
- data/lib/ecoportal/api/v2/page/component/chart_field/benchmark.rb +28 -0
- data/lib/ecoportal/api/v2/page/component/selection_field.rb +6 -4
- data/lib/ecoportal/api/v2/page/component/selection_option.rb +10 -1
- data/lib/ecoportal/api/v2/page/permit.rb +14 -0
- data/lib/ecoportal/api/v2/page/stage.rb +5 -1
- data/lib/ecoportal/api/v2/page/stages.rb +5 -5
- data/lib/ecoportal/api/v2/pages/page_stage.rb +4 -3
- data/lib/ecoportal/api/v2_version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d7fd0373344854c22b4397e7e2d2645dd799695424f3fa30d006fca2081676d
|
|
4
|
+
data.tar.gz: 2d839f8ecb67512c2c5d00a2bd6832e53d304334f2c5a6bbc291958661e21130
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27425f592041428b0d07f9593c78f2a80095311e4890a3569ce212e37f067a3b36f2a3b147459e7dca368f7a737671ac9325df6ed40cec3d4a18f75d0ea18d28
|
|
7
|
+
data.tar.gz: c4cee01feb2c89179da4eda1d3699e5900812b52fb7d198a1447935ac4e89c347bee56ba69c5f6d1a407f968da21112cf0a490855811ddfd5048caace430c422
|
data/CHANGELOG.md
CHANGED
|
@@ -1,9 +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.8] - 2021-06-xx
|
|
5
5
|
|
|
6
6
|
### Added
|
|
7
|
+
- `Ecoportal::API::V2::Page::Component::ChartField::Benchmark`
|
|
8
|
+
- Support to convert selection options between numeric and text type.
|
|
9
|
+
- Add `Permit` object to `Page` and `Stage`
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- Removed `Stages.ordered_stages`: detected bug with Enumerable iteration
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
## [0.8.7] - 2021-05-25
|
|
17
|
+
|
|
7
18
|
### Changed
|
|
8
19
|
- Upgrade `ecoportal-api` gem
|
|
9
20
|
|
|
@@ -16,6 +16,7 @@ module Ecoportal
|
|
|
16
16
|
embeds_one :sankey_config, klass: "Ecoportal::API::V2::Page::Component::ChartField::Sankey"
|
|
17
17
|
embeds_one :indicator_config, klass: "Ecoportal::API::V2::Page::Component::ChartField::Indicator"
|
|
18
18
|
embeds_one :faceted_series_config, klass: "Ecoportal::API::V2::Page::Component::ChartField::Multiseries"
|
|
19
|
+
embeds_one :benchmark_config, klass: "Ecoportal::API::V2::Page::Component::ChartField::Benchmark"
|
|
19
20
|
|
|
20
21
|
embeds_many :series, klass: "Ecoportal::API::V2::Page::Component::ChartField::Serie"
|
|
21
22
|
|
|
@@ -35,6 +36,8 @@ module Ecoportal
|
|
|
35
36
|
indicator_config
|
|
36
37
|
when "faceted_series"
|
|
37
38
|
faceted_series_config
|
|
39
|
+
when "benchmark"
|
|
40
|
+
benchmark_config
|
|
38
41
|
end
|
|
39
42
|
end
|
|
40
43
|
|
|
@@ -52,3 +55,4 @@ require 'ecoportal/api/v2/page/component/chart_field/heatmap'
|
|
|
52
55
|
require 'ecoportal/api/v2/page/component/chart_field/sankey'
|
|
53
56
|
require 'ecoportal/api/v2/page/component/chart_field/indicator'
|
|
54
57
|
require 'ecoportal/api/v2/page/component/chart_field/multiseries'
|
|
58
|
+
require 'ecoportal/api/v2/page/component/chart_field/benchmark'
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class V2
|
|
4
|
+
class Page
|
|
5
|
+
class Component
|
|
6
|
+
class ChartField
|
|
7
|
+
class Benchmark < Common::Content::DoubleModel
|
|
8
|
+
passkey :id
|
|
9
|
+
passthrough :patch_ver
|
|
10
|
+
|
|
11
|
+
passthrough :register_id
|
|
12
|
+
passthrough :source_type
|
|
13
|
+
passthrough :benchmark_field, :benchmark_label
|
|
14
|
+
passthrough :across, :across_field
|
|
15
|
+
passthrough :against_field, :against_label
|
|
16
|
+
passthrough :grouped, :group_field
|
|
17
|
+
|
|
18
|
+
passthrough :calculation_mode
|
|
19
|
+
passthrough :min, :max
|
|
20
|
+
|
|
21
|
+
passthrough :filters
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -10,12 +10,14 @@ module Ecoportal
|
|
|
10
10
|
|
|
11
11
|
embeds_many :options, klass: "Ecoportal::API::V2::Page::Component::SelectionOption", order_key: :weight
|
|
12
12
|
|
|
13
|
-
def numeric!
|
|
14
|
-
|
|
13
|
+
def numeric!(&block)
|
|
14
|
+
ordered_options.each {|opt| opt.numeric!(&block)}
|
|
15
|
+
self.data_type = "num"
|
|
15
16
|
end
|
|
16
17
|
|
|
17
|
-
def text!
|
|
18
|
-
|
|
18
|
+
def text!(&block)
|
|
19
|
+
ordered_options.each {|opt| opt.text!(&block)}
|
|
20
|
+
self.data_type = "str"
|
|
19
21
|
end
|
|
20
22
|
|
|
21
23
|
def select(value)
|
|
@@ -4,7 +4,7 @@ module Ecoportal
|
|
|
4
4
|
class Page
|
|
5
5
|
class Component
|
|
6
6
|
class SelectionOption < Common::Content::DoubleModel
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
class << self
|
|
9
9
|
def new_doc
|
|
10
10
|
{
|
|
@@ -17,6 +17,15 @@ module Ecoportal
|
|
|
17
17
|
passkey :id
|
|
18
18
|
passthrough :patch_ver, :name, :value
|
|
19
19
|
passthrough :weight, :selected
|
|
20
|
+
|
|
21
|
+
def numeric!
|
|
22
|
+
self.value = block_given?? yield(value) : value.to_i
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def text!
|
|
26
|
+
self.value = block_given?? yield(value) : value.to_s
|
|
27
|
+
end
|
|
28
|
+
|
|
20
29
|
end
|
|
21
30
|
end
|
|
22
31
|
end
|
|
@@ -5,9 +5,13 @@ module Ecoportal
|
|
|
5
5
|
class Stage < Common::Content::DoubleModel
|
|
6
6
|
passkey :id
|
|
7
7
|
passthrough :patch_ver
|
|
8
|
-
passthrough :
|
|
8
|
+
passthrough :namem, :ordering
|
|
9
9
|
passarray :subtags, order_matters: false
|
|
10
10
|
passarray :section_ids
|
|
11
|
+
passthrough :complete, :status, :lock_after_completion
|
|
12
|
+
embeds_many :permits, klass: "Ecoportal::API::V2::Page::Permit"
|
|
13
|
+
passthrough :disable_direct_permissions
|
|
14
|
+
passthrough :creator_enabled, :creator_editable, :creator_flags
|
|
11
15
|
passthrough :can
|
|
12
16
|
|
|
13
17
|
def sections
|
|
@@ -13,11 +13,11 @@ module Ecoportal
|
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
end
|
|
16
|
+
#def ordered
|
|
17
|
+
# self.each_with_index.sort_by do |stage, index|
|
|
18
|
+
# (stage.ordering >= 9999) ? [index, index] : [stage.ordering, index]
|
|
19
|
+
# end.map(&:first)
|
|
20
|
+
#end
|
|
21
21
|
|
|
22
22
|
end
|
|
23
23
|
end
|
|
@@ -4,11 +4,12 @@ module Ecoportal
|
|
|
4
4
|
class Pages
|
|
5
5
|
class PageStage < V2::Page
|
|
6
6
|
passthrough :mould_counter, :archive
|
|
7
|
-
passthrough :task_priority, :state
|
|
7
|
+
passthrough :task_priority, :state, :status
|
|
8
8
|
passthrough :votes_enabled, :upvotes, :downvotes
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
embeds_many :permits, klass: "Ecoportal::API::V2::Page::Permit"
|
|
11
|
+
passarray :force_errors, :subtags, order_matters: false
|
|
12
|
+
#passthrough :evolution
|
|
12
13
|
end
|
|
13
14
|
end
|
|
14
15
|
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.
|
|
4
|
+
version: 0.8.8
|
|
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-
|
|
11
|
+
date: 2021-08-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -184,6 +184,7 @@ files:
|
|
|
184
184
|
- lib/ecoportal/api/v2/page/component/action.rb
|
|
185
185
|
- lib/ecoportal/api/v2/page/component/action_field.rb
|
|
186
186
|
- lib/ecoportal/api/v2/page/component/chart_field.rb
|
|
187
|
+
- lib/ecoportal/api/v2/page/component/chart_field/benchmark.rb
|
|
187
188
|
- lib/ecoportal/api/v2/page/component/chart_field/frequency.rb
|
|
188
189
|
- lib/ecoportal/api/v2/page/component/chart_field/heatmap.rb
|
|
189
190
|
- lib/ecoportal/api/v2/page/component/chart_field/indicator.rb
|
|
@@ -213,6 +214,7 @@ files:
|
|
|
213
214
|
- lib/ecoportal/api/v2/page/component/signature_field.rb
|
|
214
215
|
- lib/ecoportal/api/v2/page/component/tag_field.rb
|
|
215
216
|
- lib/ecoportal/api/v2/page/components.rb
|
|
217
|
+
- lib/ecoportal/api/v2/page/permit.rb
|
|
216
218
|
- lib/ecoportal/api/v2/page/section.rb
|
|
217
219
|
- lib/ecoportal/api/v2/page/sections.rb
|
|
218
220
|
- lib/ecoportal/api/v2/page/stage.rb
|