ecoportal-api-v2 0.9.2 → 0.9.3

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: 172ffff0cc645bf064114c90364ee2a0593ebc6e1d6e1ac4fd5095774c538cc6
4
- data.tar.gz: bde0a6b28097ddc8bb971a6f0f1ad622da4d87298651122952bc90cf4686cd10
3
+ metadata.gz: 44e2e864edc50d00dc9bf4f0d76f75904c518b46e2bd66fea8326329d1056e6a
4
+ data.tar.gz: bef29f826e284736b16c5c6587039822b17052abee27da1764b9c46b3cf2c13b
5
5
  SHA512:
6
- metadata.gz: 9e5f80eb2dfb8623dde76445f5c85e86baa9a14327c3599840e6ef1a3de822cc40b61ba9dad7b6749c40c9cde11af43643571a61003609b9b51571d81c366a2a
7
- data.tar.gz: 909755671b618ebe4187ac016ca0c1ea9b75837f70c29639bb0fbdde8ecba39f0855e0c1527de558fce5c4f20754a36bfa03a565bed99704d034f39d630ff074
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.3] - 2022-09-xx
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, page_class)
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}"
@@ -1,5 +1,5 @@
1
1
  module Ecoportal
2
2
  module API
3
- GEM2_VERSION = "0.9.2"
3
+ GEM2_VERSION = "0.9.3"
4
4
  end
5
5
  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.9.2
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-09-29 00:00:00.000000000 Z
11
+ date: 2022-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler