client-api 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56cea28cdde5dcef7b6e8868da9742c210a1a27bb49b10776dd91933add2b074
4
- data.tar.gz: 0c8faf1fdca359218fda52efdc662fc0792462781b3f95b5eddeec8812b17e7a
3
+ metadata.gz: c9d76436428c8aad960531bcab906a0f11c2d9ac6ac6499494b5b2917072b013
4
+ data.tar.gz: f4445a5374a8f4e5cfad1396cba33f24e186ad62f7dabd5df923f0e3b6a3fd70
5
5
  SHA512:
6
- metadata.gz: 0f3e0d21191728013ce77b7707c26ee3db2428e9541eccece5b257b9e5bdbe7d727d2aad785adca2273892cfb6ab768a6aa6084c87d2c545d80090b8a02a625d
7
- data.tar.gz: be941d838436bba64364b0b23fd5a305ba45cd89dfaea2714b32fb56742d6fcc2ff1b41cdbd1b8b1b21fad7ab5e283edc7af6ec64a8c86263a336a32229f99fe
6
+ metadata.gz: a40ac974a88b7d8e7aa519b5eb874dbbf1cc36851587b2cae39e3fadd1932db9da670352e0d282eeae55f46fae56085a80ff9fef8ca3db5fe8c707eba3039390
7
+ data.tar.gz: ae541e94d6fc22356bf5be72d5bf78d1fbe4e6bfdd186449b0a69f062f09604f49d6c00f772a3ccf675a39196e0db96c1dc7a95afc702706f10a27b86af2639a
@@ -44,7 +44,11 @@ module ClientApi
44
44
  unless json_output['Dirname'] == nil
45
45
  FileUtils.mkdir_p "#{json_output['Dirname']}"
46
46
  time_now = (Time.now.to_f).to_s.gsub('.','')
47
- File.open("./#{json_output['Dirname']}/#{json_output['Filename']+"_"+time_now}""#{time_now}"".json", "wb") {|file| file.puts JSON.pretty_generate(JSON.parse(@output.body))}
47
+ begin
48
+ File.open("./#{json_output['Dirname']}/#{json_output['Filename']+"_"+time_now}""#{time_now}"".json", "wb") {|file| file.puts JSON.pretty_generate(JSON.parse(@output.body))}
49
+ rescue StandardError => e
50
+ raise("\n"+" Not a compatible (or) Invalid JSON response => [kindly check the uri & request details]".brown + " \n\n #{e.message}")
51
+ end
48
52
  end
49
53
  JSON.parse(@output.body)
50
54
  end
@@ -1,3 +1,5 @@
1
+ require "net/http"
2
+
1
3
  module ClientApi
2
4
 
3
5
  class Request
@@ -1,5 +1,3 @@
1
- require 'logger'
2
-
3
1
  module ClientApi
4
2
 
5
3
  def self.configure
@@ -1,3 +1,3 @@
1
1
  module ClientApi
2
- VERSION = "0.1.6".freeze
2
+ VERSION = "0.1.7".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: client-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Prashanth Sams