ecoportal-api-v2 0.9.2 → 0.9.3
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/pages/page_stage.rb +10 -0
- data/lib/ecoportal/api/v2/pages.rb +2 -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: 44e2e864edc50d00dc9bf4f0d76f75904c518b46e2bd66fea8326329d1056e6a
|
4
|
+
data.tar.gz: bef29f826e284736b16c5c6587039822b17052abee27da1764b9c46b3cf2c13b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4497df74b329f61934ab456958aaf3a0f9cd2ede10ed488dda7dc003d1ac2f4f5ab637034ef30b6d726b7b7ca5c9f56140bb2f8ac865f759dc376b4ebb489e49
|
7
|
+
data.tar.gz: 0b13d22da55564d605283fc9a0a325dfc863f137079309f2989ee721fc3163a21fe94f9530610df293b1802fcc3d7127bba8d23f6390c4cde459209c6f3a5a45
|
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.9.
|
4
|
+
## [0.9.4] - 2022-10-xx
|
5
5
|
|
6
6
|
### Added
|
7
7
|
### Changed
|
8
|
+
### Fixed
|
9
|
+
|
10
|
+
## [0.9.3] - 2022-10-11
|
11
|
+
|
12
|
+
### Added
|
13
|
+
- `Ecoportal::API::V2::Page` **methods** `#mark_as_submit` and `#mark_as_sign_off`
|
14
|
+
|
15
|
+
### Changed
|
16
|
+
- `Ecoportal::API::V2::Pages#get_new`, to return an object of class `Ecoportal::API::V2::Pages::PageStage`
|
17
|
+
|
8
18
|
### Fixed
|
9
19
|
- Remove debugging message
|
10
20
|
|
@@ -60,6 +60,16 @@ module Ecoportal
|
|
60
60
|
end
|
61
61
|
msg.empty?? true : msg
|
62
62
|
end
|
63
|
+
|
64
|
+
def mark_as_submit
|
65
|
+
doc["submitted"] = true
|
66
|
+
doc["type"] = "complete_page"
|
67
|
+
end
|
68
|
+
|
69
|
+
def mark_as_sign_off
|
70
|
+
doc["sign_off"] = true
|
71
|
+
doc["type"] = "review_page"
|
72
|
+
end
|
63
73
|
end
|
64
74
|
end
|
65
75
|
end
|
@@ -9,6 +9,7 @@ module Ecoportal
|
|
9
9
|
|
10
10
|
class_resolver :stages_class, "Ecoportal::API::V2::Pages::Stages"
|
11
11
|
class_resolver :page_class, "Ecoportal::API::V2::Page"
|
12
|
+
class_resolver :page_stage_class, "Ecoportal::API::V2::Pages::PageStage"
|
12
13
|
class_resolver :create_page_response_class, "Ecoportal::API::V2::Pages::PageCreateResponse"
|
13
14
|
|
14
15
|
attr_reader :client
|
@@ -65,7 +66,7 @@ module Ecoportal
|
|
65
66
|
def get_new(from)
|
66
67
|
id = get_id(from)
|
67
68
|
response = client.get("/pages/new", params: {template_id: id})
|
68
|
-
wrapped = Common::Content::WrappedResponse.new(response,
|
69
|
+
wrapped = Common::Content::WrappedResponse.new(response, page_stage_class)
|
69
70
|
|
70
71
|
return wrapped.result if wrapped.success?
|
71
72
|
raise "Could not get new page from template #{id} - Error #{response.status}: #{response.body}"
|
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.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oscar Segura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|