tsks 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/build +3 -0
- data/lib/tsks/actions.rb +1 -1
- data/lib/tsks/cli.rb +15 -4
- data/lib/tsks/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eba37aa1a580178be1d1a37dfa7aac67ee5d133b047a53b186be514ff047b8f4
|
4
|
+
data.tar.gz: 6cf976319e8e70cab7dab0529d3c34cfea6428eb559d03ca1f0115d5e296af1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b1e46d8649e769ad5d74e0c0f46628f15cf725faf96838d446afaf9cc5eafa2c25abbab5ab8e7bbb306ac240df42b3d3e58e7fea8fc1712517972a09092af77
|
7
|
+
data.tar.gz: 95c1406756b470b2417e3615937ccad9bc3b2ff9622f1e63e8098c6ad55e8d19f80d244d75466627704f997f742d401423588494bf837ee0efec80ce102af409
|
data/Gemfile.lock
CHANGED
data/bin/build
ADDED
data/lib/tsks/actions.rb
CHANGED
data/lib/tsks/cli.rb
CHANGED
@@ -168,10 +168,20 @@ module Tsks
|
|
168
168
|
|
169
169
|
if get_res[:tsks]
|
170
170
|
if get_res[:ok] == true
|
171
|
-
|
171
|
+
raw_local_tsks = local_tsks.map {|t| t.reject{|k,_| k == :rowid}}
|
172
|
+
local_tsks_to_post = raw_local_tsks - remote_tsks
|
173
|
+
|
174
|
+
tsks_to_post = []
|
175
|
+
for local_tsk in local_tsks
|
176
|
+
for local_tsk_to_post in local_tsks_to_post
|
177
|
+
if local_tsk[:tsk] == local_tsk_to_post[:tsk]
|
178
|
+
tsks_to_post.append local_tsk
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
172
182
|
|
173
|
-
if
|
174
|
-
for tsk in
|
183
|
+
if tsks_to_post.count > 0
|
184
|
+
for tsk in tsks_to_post
|
175
185
|
post_res = Tsks::Request.post "/tsks", token, {tsk: tsk}
|
176
186
|
posted_tsk = post_res[:tsk]
|
177
187
|
|
@@ -183,7 +193,8 @@ module Tsks
|
|
183
193
|
|
184
194
|
# TODO: review this process
|
185
195
|
updated_local_tsks = Tsks::Storage.select_all
|
186
|
-
|
196
|
+
raw_updated_local_tsks = updated_local_tsks.map {|t| t.reject{|k,_| k == :rowid}}
|
197
|
+
remote_tsks_to_storage = remote_tsks - raw_updated_local_tsks
|
187
198
|
|
188
199
|
if remote_tsks_to_storage.count > 0
|
189
200
|
Tsks::Storage.insert_many remote_tsks_to_storage
|
data/lib/tsks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tsks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luan Ramos Vicente
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- Gemfile.lock
|
97
97
|
- README.md
|
98
98
|
- Rakefile
|
99
|
+
- bin/build
|
99
100
|
- bin/console
|
100
101
|
- bin/install
|
101
102
|
- bin/release
|