cloudstack_client 1.2.3 → 1.3.0

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
  SHA1:
3
- metadata.gz: 0921c7eeb5229893005cc11e6910024b0ddb6a9b
4
- data.tar.gz: 31967afe8b669bc7356fe65e0f529da6c672a6dc
3
+ metadata.gz: 33f88f209142dbb3fb845ae73e5b1c8d873b3bcb
4
+ data.tar.gz: fca70d09c0f2879944b0d50b4c7b923e15db7f87
5
5
  SHA512:
6
- metadata.gz: e758f622732829762ee5cc3b1978183aa5685f1c07bcc574fdfe4157f479327bf11c0161f4288b2ebe7b310431c3d851f51eca320059cdf2a6259d856d18bca6
7
- data.tar.gz: 368fbf30e876457c9e4db3e9e03c040bb2f7c58688d811f7234f2b14f945911bfc8c60e6b65dc2ed3c282d812abb8db085fa3167e5b733c44a4b66b68848ba97
6
+ metadata.gz: 3b5e73dc1f14e4198531f36717541536f0de79081d212a1d488420f22ba1b19a9543cf8367ff741a5776a097e88402275c3fde048a24dfd69b83b126f1bc21ac
7
+ data.tar.gz: 5677ee055243e7002ccbfb4114fdbb3694dfa712e7385ccbf35126155824c84f0d3060c35ae19a1f7b6cbd5698c1874898826c71bbfc04e3fec8f810f836edb8
data/Gemfile.lock CHANGED
@@ -1,16 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cloudstack_client (1.2.3)
5
- multi_json (~> 1.11)
4
+ cloudstack_client (1.3.0)
6
5
 
7
6
  GEM
8
7
  remote: https://rubygems.org/
9
8
  specs:
10
9
  bond (0.5.1)
11
- minitest (5.8.3)
12
- multi_json (1.11.2)
13
- rake (10.5.0)
10
+ minitest (5.8.4)
11
+ rake (11.1.1)
14
12
  ripl (0.7.1)
15
13
  bond (~> 0.5.1)
16
14
  thor (0.19.1)
@@ -21,7 +19,7 @@ PLATFORMS
21
19
  DEPENDENCIES
22
20
  cloudstack_client!
23
21
  minitest (~> 5.8)
24
- rake (~> 10.4)
22
+ rake (~> 11.1)
25
23
  ripl (~> 0.7)
26
24
  thor (~> 0.19)
27
25
 
@@ -20,10 +20,8 @@ Gem::Specification.new do |gem|
20
20
  gem.require_paths = ["lib"]
21
21
  gem.rdoc_options = %w[--line-numbers --inline-source]
22
22
 
23
- gem.add_development_dependency('rake', '~> 10.4')
23
+ gem.add_development_dependency('rake', '~> 11.1')
24
24
  gem.add_development_dependency('thor', '~> 0.19')
25
25
  gem.add_development_dependency('ripl', '~> 0.7')
26
26
  gem.add_development_dependency('minitest', '~> 5.8')
27
-
28
- gem.add_dependency('multi_json', '~> 1.11')
29
27
  end
@@ -1,5 +1,5 @@
1
1
  require "zlib"
2
- require "multi_json"
2
+ require "json"
3
3
 
4
4
  module CloudstackClient
5
5
  class Api
@@ -87,7 +87,7 @@ module CloudstackClient
87
87
  def load_commands
88
88
  @commands = {}
89
89
  Zlib::GzipReader.open(@api_file) do |gz|
90
- MultiJson.load(gz.read)
90
+ JSON.parse(gz.read)
91
91
  end.each {|cmd| @commands[cmd["name"]] = cmd }
92
92
  rescue => e
93
93
  raise "Error: Unable to read file '#{@api_file}': #{e.message}"
@@ -1,6 +1,6 @@
1
1
  require "cloudstack_client/client"
2
2
  require "yaml"
3
- require "multi_json"
3
+ require "json"
4
4
 
5
5
  begin
6
6
  require "thor"
@@ -63,7 +63,7 @@ module CloudstackClient
63
63
  when "yaml"
64
64
  apis.to_yaml
65
65
  else
66
- MultiJson.dump(apis, pretty: options[:pretty_print])
66
+ options[:pretty_print] ? JSON.pretty_generate(apis) : JSON.generate(apis)
67
67
  end
68
68
  end
69
69
 
@@ -4,7 +4,7 @@ require "uri"
4
4
  require "cgi"
5
5
  require "net/http"
6
6
  require "net/https"
7
- require "multi_json"
7
+ require "json"
8
8
 
9
9
  module CloudstackClient
10
10
  class Connection
@@ -43,7 +43,7 @@ module CloudstackClient
43
43
  end
44
44
  end
45
45
 
46
- print_debug_output MultiJson.dump(params, pretty: true) if @debug
46
+ print_debug_output JSON.pretty_generate(params) if @debug
47
47
 
48
48
  data = params_arr.join('&')
49
49
  signature = OpenSSL::HMAC.digest('sha1', @secret_key, data.downcase)
@@ -67,8 +67,8 @@ module CloudstackClient
67
67
  end
68
68
 
69
69
  begin
70
- body = MultiJson.load(response.body).values.first
71
- rescue MultiJson::ParseError
70
+ body = JSON.parse(response.body).values.first
71
+ rescue JSON::ParserError
72
72
  raise ParseError,
73
73
  "Response from server is not readable. Check if the API endpoint (#{@api_url}) is valid and accessible."
74
74
  end
@@ -1,3 +1,3 @@
1
1
  module CloudstackClient
2
- VERSION = "1.2.3"
2
+ VERSION = "1.3.0"
3
3
  end
data/test/benchmark.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "cloudstack_client/api"
4
4
  require "benchmark"
5
- require "multi_json"
5
+ require "json"
6
6
 
7
7
  GC.disable
8
8
 
@@ -23,7 +23,7 @@ gc_stat_after = GC.stat
23
23
  memory_after = `ps -o rss= -p #{Process.pid}`.to_i/1024
24
24
 
25
25
  puts(
26
- MultiJson.dump(
26
+ JSON.generate(
27
27
  {
28
28
  time: time.round(2),
29
29
  gc_count: gc_stat_after[:count] - gc_stat_before[:count],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudstack_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nik Wolfgramm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-19 00:00:00.000000000 Z
11
+ date: 2016-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '10.4'
19
+ version: '11.1'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '10.4'
26
+ version: '11.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: thor
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '5.8'
69
- - !ruby/object:Gem::Dependency
70
- name: multi_json
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.11'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.11'
83
69
  description: CloudStack API client written in Ruby
84
70
  email:
85
71
  - nik.wolfgramm@gmail.com
@@ -134,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
120
  version: '0'
135
121
  requirements: []
136
122
  rubyforge_project:
137
- rubygems_version: 2.2.2
123
+ rubygems_version: 2.4.5
138
124
  signing_key:
139
125
  specification_version: 4
140
126
  summary: CloudStack API client written in Ruby