eco-helpers 2.0.52 → 2.0.53

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: c6424664c072321d2d1c45388fea06cfe16e8e42f4949e202be31555e8e052fa
4
- data.tar.gz: 7b18ae74a24157949fbb80b26320b31312ef91c43eb73f1384c8c964da52e79c
3
+ metadata.gz: 71ac6b334999283d1bab07efdb1ece3fdbbfaa56052f292010a3741faad92351
4
+ data.tar.gz: e432429671478dcca99ef444f1db0eeab66d9ad2dc7150cfc12577fb06f5b1e7
5
5
  SHA512:
6
- metadata.gz: 6d1e57dc41b76a01bc80cf08108b4e50a456976dbe05bb33a4620cccb2ae745c76e88ce5af0c43795171ac758f6f55465835e22373a484967dd5a4f3ed57e318
7
- data.tar.gz: 901007d2346ef608b67011e6f49f560c16a5cb6f0010b16fa24441bf2cfd06a8f8aa82dfd4ba78b86e50cd0aca340047173f6e80800f56340dad668bb27f1516
6
+ metadata.gz: ff99f0de94a2e87730f2d6b8496d4d556cbfe7ec3bb99289f3e27cf30512e0644b33f142f0664ee2c5f9f91e7fc13b83bc62178af26f3e0929668acd94f95088
7
+ data.tar.gz: 3b9b43011552a1cb9f37a46c18cabab8ad2892b3634908895ddd99b2269151c65bd3a4c5a6281ab080396ea3ec0890f29fd5f1e37c8427d80bbdb2c2e240b91f
data/CHANGELOG.md CHANGED
@@ -1,12 +1,22 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [2.0.52] - 2022-02-xx
4
+ ## [2.0.53] - 2022-03-xx
5
5
 
6
6
  ### Added
7
- - `Eco::API::UseCases::DefaultCases::CleanUnknownTags` include `default_tag` refresh
7
+ - `Eco::API::MicroCases#set_supervisor` prevent to set someone as supervisor of themselves.
8
+ - `Eco::API::UseCases::DefaultCases::Samples::Sftp` integration to modify the `source_folder`
8
9
 
9
10
  ### Changed
11
+ - upgrade `ecoportal-api` and `ecoportal-api-v2` dependencies
12
+
13
+ ### Fixed
14
+
15
+ ## [2.0.52] - 2022-03-04
16
+
17
+ ### Added
18
+ - `Eco::API::UseCases::DefaultCases::CleanUnknownTags` include `default_tag` refresh
19
+
10
20
  ### Fixed
11
21
  - `Eco::Data::Files::Directory#dir_files` to be returned in alphabetic order
12
22
 
data/eco-helpers.gemspec CHANGED
@@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency "yard", ">= 0.9.26", "< 0.10"
31
31
  spec.add_development_dependency "redcarpet", ">= 3.5.1", "< 3.6"
32
32
 
33
- spec.add_dependency 'ecoportal-api', '>= 0.8.4', '< 0.9'
34
- spec.add_dependency 'ecoportal-api-v2', '>= 0.8.25', '< 0.9'
33
+ spec.add_dependency 'ecoportal-api', '>= 0.8.5', '< 0.9'
34
+ spec.add_dependency 'ecoportal-api-v2', '>= 0.8.26', '< 0.9'
35
35
  spec.add_dependency 'aws-sdk-s3', '>= 1.83.0', '< 2'
36
36
  spec.add_dependency 'aws-sdk-ses', '>= 1.36.0', '< 2'
37
37
  spec.add_dependency 'dotenv', '>= 2.7.6', '< 2.8'
@@ -2,6 +2,8 @@ module Eco
2
2
  module API
3
3
  class MicroCases
4
4
  # Unique access point to set the `supervisor_id` value on a person.
5
+ # @note
6
+ # - It prevents the basic cyclic supervisor case (supervisor to be supervisor of hemselves)
5
7
  # @param person [Ecoportal::API::V1::Person] the person we want to update, carrying the changes to be done.
6
8
  # @param sup_id [nil, String] the **supervisor id** we should set on the `person`.
7
9
  # @param people [Eco::API::Organization::People] _People_ involved in the current update.
@@ -10,6 +12,7 @@ module Eco
10
12
  # @yieldparam supervisor_id [String] the **unknown** `supervisor_id`.
11
13
  def set_supervisor(person, sup_id, people, options)
12
14
  unless options.dig(:exclude, :core) || options.dig(:exclude, :supervisor)
15
+ return false if sup_id && ((person.id == sup_id) || (person.external_id == sup_id))
13
16
  cur_id = person.supervisor_id
14
17
  cur_super = cur_id && with_supervisor(cur_id, people)
15
18
  micro.with_supervisor(sup_id, people) do |new_super|
@@ -2,10 +2,10 @@ class Eco::API::UseCases::DefaultCases::Samples::Sftp < Eco::API::Common::Loader
2
2
  name "sftp-sample"
3
3
  type :other
4
4
 
5
- attr_reader :session
5
+ attr_reader :session, :options
6
6
 
7
7
  def main(session, options, usecase)
8
- @session = session
8
+ @session = session; @options = options
9
9
  options[:end_get] = false
10
10
  raise "The SFTP is not configured" unless session.sftp?
11
11
  case options.dig(:sftp, :command)
@@ -92,7 +92,7 @@ class Eco::API::UseCases::DefaultCases::Samples::Sftp < Eco::API::Common::Loader
92
92
  end
93
93
 
94
94
  def local_folder
95
- "."
95
+ options.dig(:sftp, :local_folder) || "."
96
96
  end
97
97
 
98
98
  def remote_folder
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = "2.0.52"
2
+ VERSION = "2.0.53"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eco-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.52
4
+ version: 2.0.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura
@@ -116,7 +116,7 @@ dependencies:
116
116
  requirements:
117
117
  - - ">="
118
118
  - !ruby/object:Gem::Version
119
- version: 0.8.4
119
+ version: 0.8.5
120
120
  - - "<"
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0.9'
@@ -126,7 +126,7 @@ dependencies:
126
126
  requirements:
127
127
  - - ">="
128
128
  - !ruby/object:Gem::Version
129
- version: 0.8.4
129
+ version: 0.8.5
130
130
  - - "<"
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0.9'
@@ -136,7 +136,7 @@ dependencies:
136
136
  requirements:
137
137
  - - ">="
138
138
  - !ruby/object:Gem::Version
139
- version: 0.8.25
139
+ version: 0.8.26
140
140
  - - "<"
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0.9'
@@ -146,7 +146,7 @@ dependencies:
146
146
  requirements:
147
147
  - - ">="
148
148
  - !ruby/object:Gem::Version
149
- version: 0.8.25
149
+ version: 0.8.26
150
150
  - - "<"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.9'