eco-rake 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/eco-rake/lib/people/sync_launch.rb +9 -4
- data/lib/eco-rake/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: eaa9efa0121486bc4e88b9c91473ebdad6145eada491766aa4ce3277a43d5bb4
|
4
|
+
data.tar.gz: f189228e9977f86569dcb8b72718985a0ae17d7a64d718474e7b2682ab80bb99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed2f943623d33891761131946871f10b60c7f45e7bfcf83c33f94981b7791f1a3f24d56471a38cd2d029f3e9a4c39eb4857c2080936d1578a673a53ef4e25707
|
7
|
+
data.tar.gz: d996604ce393872ee4c97390fea86cc014cbc3701412accdcd10e02187e252aeeb1e7f1dd35cbd88e34114673ae98a38cdaf93922c3d9cc57d89c4283a7901a8
|
data/CHANGELOG.md
CHANGED
@@ -29,13 +29,13 @@ class EcoRake
|
|
29
29
|
def task(*_args)
|
30
30
|
return missing_files_notify unless latest_file
|
31
31
|
return process_deltas if delta?
|
32
|
-
return process_full_file if full?
|
32
|
+
return process_full_file if full? || delta_last?
|
33
33
|
end
|
34
34
|
|
35
35
|
private
|
36
36
|
|
37
37
|
def process_full_file
|
38
|
-
sh people_get_command unless options[:no_get]
|
38
|
+
sh people_get_command unless options[:no_get] || delta_last?
|
39
39
|
sh_continue sync_command(latest_file)
|
40
40
|
clear_files unless options[:simulate]
|
41
41
|
end
|
@@ -44,6 +44,7 @@ class EcoRake
|
|
44
44
|
target_files.each do |file|
|
45
45
|
sh sync_command(file)
|
46
46
|
next if options[:simulate]
|
47
|
+
|
47
48
|
puts "Deleting file #{file}"
|
48
49
|
File.delete(file)
|
49
50
|
end
|
@@ -66,7 +67,7 @@ class EcoRake
|
|
66
67
|
cmd << ruby_runner
|
67
68
|
cmd << forward_option(:enviro)
|
68
69
|
cmd << forward_option(:schema)
|
69
|
-
cmd << '-get-partial' if delta?
|
70
|
+
cmd << '-get-partial' if delta? || delta_last?
|
70
71
|
cmd << base_command(file)
|
71
72
|
cmd.concat(forward_options(*self.class::ADDITIONAL_OPTIONS))
|
72
73
|
cmd = yield(cmd) if block_given?
|
@@ -87,7 +88,7 @@ class EcoRake
|
|
87
88
|
when :hris
|
88
89
|
msg = "Inconsistent configuration in #{self.class}. BASE_USECASE is '#{usecase}', "
|
89
90
|
msg << "but file SNAPSHOT_MODE is '#{snapshot_mode}'"
|
90
|
-
raise msg if delta?
|
91
|
+
raise msg if delta? || delta_last?
|
91
92
|
"-hris-from #{double_quote(file_or_folder)}"
|
92
93
|
when :upsert
|
93
94
|
"-upsert-from #{double_quote(file_or_folder)}"
|
@@ -105,6 +106,10 @@ class EcoRake
|
|
105
106
|
%i[partial delta].any? {|m| m == mode}
|
106
107
|
end
|
107
108
|
|
109
|
+
def last_delta?
|
110
|
+
snapshot_mode.to_s.downcase.to_sym == :delta_last
|
111
|
+
end
|
112
|
+
|
108
113
|
# Amont the `target_files` the last in alphabetic order.
|
109
114
|
def latest_file
|
110
115
|
@latest_file ||= target_files.last
|
data/lib/eco-rake/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eco-rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oscar Segura Samper
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|