calicli 1.0.0 → 1.0.2

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: abdf97de12c5f1f0c7ecac361f8955471f943fb7b5a55e0d34799e5fed316ffe
4
- data.tar.gz: 1a17c026ee300bca76dbe2bfcee1e5d87566f0a784ad5fa859f7ac09cd2b0d59
3
+ metadata.gz: b5e7a1abdf606bb1785759e764516787810ba8c1d35458ecd72b4bdd9933c791
4
+ data.tar.gz: c9120535ac3e9240df2943cbe5f71f40659bb441b3f5e203eab2b0a5b06da1f6
5
5
  SHA512:
6
- metadata.gz: 2a62903c8535df9704b13bcd4e42c3684b8db20700f5cccacdef2896e2860ceb2d7c67b48706c415e96168372aec94065f8ba40ac36b459180a56d77508de60c
7
- data.tar.gz: b787e299ece3725eb6c9680907949d4cd61a24de9b9a6f99975fa5e1d600ac20452f53074a737ba7dd3a8fd9d5540ba30d92098a580cb01c0ad96eb31da3bd87
6
+ metadata.gz: f0c383c4b1054cc3f5e34173494b00c23f720ac366fee3b04ec0318218185b563a33e22d303e511fa83f1aeef28a5e87bfd0893b2a5025f2056cb6ee5a78ba7d
7
+ data.tar.gz: 5b1d65bc2460a34c175acc2960108705aab58fea89d7e343879c4573dd0acbbed0b1aa1663e00cdbaef66c12e8a8223b019239ee4233c1b6df7dbe5b8c9607df
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- calicli (1.0.0)
4
+ calicli (1.0.1)
5
5
  activerecord (~> 5.0.0)
6
6
  activesupport (~> 5.0.0)
7
7
  awesome_print
data/lib/calicli/cli.rb CHANGED
@@ -116,18 +116,21 @@ module Calicli
116
116
  end
117
117
 
118
118
 
119
-
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))
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
- puts "OK".green
128
- puts "last_id=#{last_id}, run_number=#{last_run}".green
129
- rescue => e
130
- puts "Error: #{e.message}".red
132
+ else
133
+ puts "No new data"
131
134
  end
132
135
 
133
136
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Calicli
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calicli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Sauter
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2023-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  - !ruby/object:Gem::Version
209
209
  version: '0'
210
210
  requirements: []
211
- rubygems_version: 3.1.4
211
+ rubygems_version: 3.2.3
212
212
  signing_key:
213
213
  specification_version: 4
214
214
  summary: Calinda Sync Ops