calicli 1.0.0 → 1.0.1
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/lib/calicli/cli.rb +14 -11
- data/lib/calicli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53dcc55bb0890dc8c600948646c60f29e9e02f02862bd46236ce91e36d28cd3b
|
4
|
+
data.tar.gz: 3529400215c076c2e7422f790ac64840fe82d138f539ad7d25fd2332b946876a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adf62a12597d88e8feef9ef9e88c9fa51e547ea3c7fb6a87f5d273db356a496acb163f4988c234ac1ddb33a5aa9250588add806ce74bc54dfab487fdd8e638f4
|
7
|
+
data.tar.gz: 841f116b19ac1444722690e8511d26c4a00b19ec1997de27128fb824153c5d994466d3b39576e167d0e837e8ae029b3ad36018f0066ce14854fefae2fa574498
|
data/Gemfile.lock
CHANGED
data/lib/calicli/cli.rb
CHANGED
@@ -116,18 +116,21 @@ module Calicli
|
|
116
116
|
end
|
117
117
|
|
118
118
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
119
|
+
if data.any?
|
120
|
+
begin
|
121
|
+
url = Calicli.config.erp_api_base + "/data"
|
122
|
+
resp = RestClient.post url, {data: data, data_type: "harvest"}.to_json, {content_type: :json, accept: :json, 'x-auth-token' => Calicli.config.erp_api_token}
|
123
|
+
if options[:store]
|
124
|
+
QuickStore.store.set(:harvest_id, last_id)
|
125
|
+
QuickStore.store.set(:run_number, (last_run + 1))
|
126
|
+
end
|
127
|
+
puts "OK".green
|
128
|
+
puts "last_id=#{last_id}, run_number=#{last_run}".green
|
129
|
+
rescue => e
|
130
|
+
puts "Error: #{e.message}".red
|
126
131
|
end
|
127
|
-
|
128
|
-
puts "
|
129
|
-
rescue => e
|
130
|
-
puts "Error: #{e.message}".red
|
132
|
+
else
|
133
|
+
puts "No new data"
|
131
134
|
end
|
132
135
|
|
133
136
|
|
data/lib/calicli/version.rb
CHANGED