eco-helpers 2.0.23 → 2.0.24

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: 2fb1adac01fbf3e34dfc80ca54c8254f660fc12deb3be3b20b395e3fc84fb8a7
4
- data.tar.gz: b6d8d61a28333eb7446654589e32725b22c875741df08f9a2401315b6ef6b1b5
3
+ metadata.gz: a2d943cd8ff8df507a2285548d7bf0c8fffa4009df45de1c26f38e4c966c747f
4
+ data.tar.gz: 14cdb53085deec51b406000048aa00199478ef9458290061cb47d324957ec1f2
5
5
  SHA512:
6
- metadata.gz: c45a670a64f0e2a725542aa47776800b1a013dbc222a676b1ed813c5cb6aad425b8e0d0b906a06a8fce37fc89de2b329998a0c5ec9861bf2b3de42d10b560b47
7
- data.tar.gz: df2f0fc1e776bbdc8dbf8de622944444b84b8b1cf9446002299fbd60d4f062b73e42d1828403996be0f42251d21db27c6bdb227a1d3b9dd979cde4799148915e
6
+ metadata.gz: 8563f5eaac3f8b650b62138fd31252d990467be498f9620bf7276a430ab8470acf1f2a8ab7b3e6ebcb9accedc1af94ac7168e6acdf3eb94de516259069a49c80
7
+ data.tar.gz: 881d6742b555d4b3cf42addef76470b35764684cbca0f903252ae5a39f503dc6a89d9bd7f7f774c587c0b6a23a6f898274af227baf14090d40ae30a16144eecc
data/CHANGELOG.md CHANGED
@@ -1,7 +1,16 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [2.0.23] - 2021-06-xx
4
+ ## [2.0.24] - 2021-06-xx
5
+
6
+ ### Added
7
+ - `Eco::API::Session::Batch::Job` made **native** `-include-excluded`
8
+ * also added new option `-include-only-excluded` to be able to only target people HRIS excluded
9
+ ### Changed
10
+ ### Fixed
11
+
12
+
13
+ ## [2.0.23] - 2021-06-22
5
14
 
6
15
  ### Added
7
16
  - `Eco::API::Session::Batch::Job` **new** option (`-save-requests`) to save requests even if in `dry-run` (`-simulate`)
@@ -9,9 +18,6 @@ All notable changes to this project will be documented in this file.
9
18
  - `Eco::API::Session::Batch::Job` new people won't create updates unless they have either details or account
10
19
  * because that entry is not supposed to be created unless has account or details
11
20
 
12
- ### Fixed
13
-
14
-
15
21
  ## [2.0.22] - 2021-06-18
16
22
 
17
23
  ### Added
@@ -253,7 +253,13 @@ module Eco
253
253
  def api_included(full_queue)
254
254
  return full_queue if type == :create
255
255
  return full_queue unless excluded = session.config.people.api_excluded
256
- full_queue.select {|entry| !excluded.call(entry, session, options, self)}
256
+ if options.dig(:include, :only_excluded)
257
+ full_queue.select {|entry| excluded.call(entry, session, options, self)}
258
+ elsif options.dig(:include, :excluded)
259
+ full_queue
260
+ else
261
+ full_queue.select {|entry| !excluded.call(entry, session, options, self)}
262
+ end
257
263
  end
258
264
 
259
265
  # Applies the changes introduced by api policies
@@ -87,6 +87,17 @@ ASSETS.cli.config do |cnf|
87
87
  session.config.dry_run!
88
88
  end
89
89
 
90
+ desc = "(careful with this option) This will include everybody as part of the update (including those that are api excluded). "
91
+ desc += "Only launch with this option when only api excluded people are included in your update."
92
+ options_set.add("-include-excluded", desc) do |options|
93
+ options.deep_merge!(include: {excluded: true})
94
+ end
95
+
96
+ desc = "Includes in API updates ONLY people that evaluate true as people excluded from periodic upates."
97
+ options_set.add("-include-only-excluded", desc) do |options|
98
+ options.deep_merge!(include: {only_excluded: true})
99
+ end
100
+
90
101
  desc = "Ignores threshold limitations on requests for this session (skip batch belt)"
91
102
  options_set.add("-skip-batch-policy", desc) do |options|
92
103
  options.deep_merge!(skip: {batch_policy: true})
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = "2.0.23"
2
+ VERSION = "2.0.24"
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.23
4
+ version: 2.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura