killbill-client 0.27.0 → 0.28.0

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
  SHA1:
3
- metadata.gz: a49812d05b67bdf2b846de1f68ba81fa8c387147
4
- data.tar.gz: 0be346ac35f5f5d606884c6040e12b8029f40dcb
3
+ metadata.gz: 24d79717bdfdce7cb7b3b91ff83405cff0695c1b
4
+ data.tar.gz: 20cda0a4d54728a6ef3c01eacdab24dc480b91c1
5
5
  SHA512:
6
- metadata.gz: 94caeff2d6d6ed26d673311383262ceecc3c71eff63955e00158e1b3259cdaa1d4b3cb27cd06a1246563de06e5fa0288f330e54bd646620c6ca02d2991bb9202
7
- data.tar.gz: 472d4a199426482d19f5a3d25c6c2607ca096ef19eca988b85c8da5a9480f2420bb190b050aa7277d2c37c627447913ce93119c0c048bd7f9e2510fab37361f1
6
+ metadata.gz: a5934cc70e770fbbf965f1a4c1e839a5254e3cce41254aea835de37634e4dcf705ec662d5d31f459eea95eff2bb8a1234d1fc160ab82c300619bb807f08ae468
7
+ data.tar.gz: 7946963faa0b28e8526c11a79da9a4fadb28d4a990d0948bd37867da47d372e0fc87039d20b8cd8ef4ed2181ca3a9618aa06c6d3cb5cf926e3705a419cc31b8a
@@ -17,34 +17,34 @@ module KillBillClient
17
17
  end
18
18
 
19
19
 
20
- def start_plugin_wait_for_plugin_command_completion(plugin_name, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=10, sleep_sec=1)
20
+ def start_plugin(plugin_key, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=10, sleep_sec=1)
21
21
 
22
- proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_name, plugin_version, "RUNNING")
22
+ proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_key, plugin_version, "RUNNING")
23
23
 
24
- trigger_node_command_wait_for_plugin_command_completion(:START_PLUGIN, nil, plugin_name, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
24
+ trigger_node_command_wait_for_plugin_command_completion(:START_PLUGIN, plugin_key, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
25
25
  end
26
26
 
27
- def stop_plugin_wait_for_plugin_command_completion(plugin_name, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=10, sleep_sec=1)
27
+ def stop_plugin(plugin_key, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=10, sleep_sec=1)
28
28
 
29
- proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_name, plugin_version, "STOPPED")
29
+ proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_key, plugin_version, "STOPPED")
30
30
 
31
- trigger_node_command_wait_for_plugin_command_completion(:STOP_PLUGIN, nil, plugin_name, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
31
+ trigger_node_command_wait_for_plugin_command_completion(:STOP_PLUGIN, plugin_key, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
32
32
  end
33
33
 
34
34
 
35
- def install_plugin_wait_for_plugin_command_completion(plugin_key, plugin_name, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=20, sleep_sec=1)
35
+ def install_plugin(plugin_key, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=20, sleep_sec=1)
36
36
 
37
- proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_name, plugin_version, nil)
37
+ proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_key, plugin_version, nil)
38
38
 
39
- trigger_node_command_wait_for_plugin_command_completion(:INSTALL_PLUGIN, plugin_key, plugin_name, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
39
+ trigger_node_command_wait_for_plugin_command_completion(:INSTALL_PLUGIN, plugin_key, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
40
40
  end
41
41
 
42
- def uninstall_plugin_wait_for_plugin_command_completion(plugin_name, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=10, sleep_sec=1)
42
+ def uninstall_plugin(plugin_key, plugin_version=nil, local_node_only=false, user = nil, reason = nil, comment = nil, options = {}, timeout_sec=10, sleep_sec=1)
43
43
 
44
44
  is_negate = true # We are looking for absence of plugin_info from result (after plugin got successfully uninstalled)
45
- proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_name, plugin_version, nil, is_negate)
45
+ proc_condition = create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_key, plugin_version, nil, is_negate)
46
46
 
47
- trigger_node_command_wait_for_plugin_command_completion(:UNINSTALL_PLUGIN, nil, plugin_name, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
47
+ trigger_node_command_wait_for_plugin_command_completion(:UNINSTALL_PLUGIN, plugin_key, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
48
48
  end
49
49
 
50
50
 
@@ -61,7 +61,7 @@ module KillBillClient
61
61
 
62
62
  private
63
63
 
64
- def trigger_node_command_wait_for_plugin_command_completion(node_command_type, plugin_key, plugin_name, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
64
+ def trigger_node_command_wait_for_plugin_command_completion(node_command_type, plugin_key, plugin_version, local_node_only, user, reason, comment, options, timeout_sec, sleep_sec, &proc_condition)
65
65
  # Idempotency : Check if already installed
66
66
  res = proc_condition.call
67
67
  return res if res
@@ -70,23 +70,22 @@ module KillBillClient
70
70
  node_command.system_command_type = true
71
71
  node_command.node_command_type = node_command_type
72
72
  node_command.node_command_properties = []
73
- node_command.node_command_properties << {:key => 'pluginName', :value => plugin_name} if plugin_name
74
73
  node_command.node_command_properties << {:key => 'pluginKey', :value => plugin_key} if plugin_key
75
74
  node_command.node_command_properties << {:key => 'pluginVersion', :value => plugin_version} if plugin_version
76
75
 
77
76
  KillBillClient::Model::NodesInfo.trigger_node_command(node_command, local_node_only, user, reason, comment, options)
78
77
 
79
- wait_for_plugin_command_completion(node_command_type, plugin_key || plugin_name,timeout_sec, sleep_sec, &proc_condition)
78
+ wait_for_plugin_command_completion(node_command_type, plugin_key ,timeout_sec, sleep_sec, &proc_condition)
80
79
  end
81
80
 
82
- def create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_name, plugin_version, state=nil, is_negate=false)
81
+ def create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_key, plugin_version, state=nil, is_negate=false)
83
82
  proc_condition = Proc.new {
84
83
  node_infos = KillBillClient::Model::NodesInfo.nodes_info(options)
85
84
 
86
85
  res = true
87
86
  node_infos.each do |info|
88
87
  raw_node_res = info.plugins_info.find do |e|
89
- e.plugin_name == plugin_name && ((plugin_version.nil? && e.is_selected_for_start) || plugin_version == e.plugin_version) && (state.nil? || e.state == state)
88
+ e.plugin_key == plugin_key && ((plugin_version.nil? && e.is_selected_for_start) || plugin_version == e.plugin_version) && (state.nil? || e.state == state)
90
89
  end
91
90
  node_res = is_negate ? !raw_node_res : raw_node_res
92
91
  res = res & node_res
@@ -1,7 +1,7 @@
1
1
  module KillBillClient
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 27
4
+ MINOR = 28
5
5
  PATCH = 0
6
6
  PRE = nil
7
7
 
metadata CHANGED
@@ -1,65 +1,65 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Killbill core team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-17 00:00:00.000000000 Z
11
+ date: 2015-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
15
- requirement: !ruby/object:Gem::Requirement
15
+ version_requirements: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.2.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
20
+ requirement: !ruby/object:Gem::Requirement
23
21
  requirements:
24
- - - ">="
22
+ - - '>='
25
23
  - !ruby/object:Gem::Version
26
24
  version: 1.2.0
25
+ prerelease: false
26
+ type: :runtime
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
- requirement: !ruby/object:Gem::Requirement
29
+ version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 10.0.0
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
34
+ requirement: !ruby/object:Gem::Requirement
37
35
  requirements:
38
- - - ">="
36
+ - - '>='
39
37
  - !ruby/object:Gem::Version
40
38
  version: 10.0.0
39
+ prerelease: false
40
+ type: :development
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
- requirement: !ruby/object:Gem::Requirement
43
+ version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.12.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
51
49
  requirements:
52
- - - "~>"
50
+ - - ~>
53
51
  - !ruby/object:Gem::Version
54
52
  version: 2.12.0
53
+ prerelease: false
54
+ type: :development
55
55
  description: An API client library for Kill Bill.
56
56
  email: killbilling-users@googlegroups.com
57
57
  executables: []
58
58
  extensions: []
59
59
  extra_rdoc_files: []
60
60
  files:
61
- - ".gitignore"
62
- - ".travis.yml"
61
+ - .gitignore
62
+ - .travis.yml
63
63
  - Gemfile
64
64
  - README.md
65
65
  - Rakefile
@@ -185,33 +185,26 @@ homepage: http://www.killbilling.org
185
185
  licenses:
186
186
  - Apache License (2.0)
187
187
  metadata: {}
188
- post_install_message:
188
+ post_install_message:
189
189
  rdoc_options:
190
- - "--exclude"
191
- - "."
190
+ - --exclude
191
+ - .
192
192
  require_paths:
193
193
  - lib
194
194
  required_ruby_version: !ruby/object:Gem::Requirement
195
195
  requirements:
196
- - - ">="
196
+ - - '>='
197
197
  - !ruby/object:Gem::Version
198
198
  version: 1.8.6
199
199
  required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  requirements:
201
- - - ">="
201
+ - - '>='
202
202
  - !ruby/object:Gem::Version
203
203
  version: '0'
204
204
  requirements: []
205
- rubyforge_project:
206
- rubygems_version: 2.2.2
207
- signing_key:
205
+ rubyforge_project:
206
+ rubygems_version: 2.1.9
207
+ signing_key:
208
208
  specification_version: 4
209
209
  summary: Kill Bill client library.
210
- test_files:
211
- - spec/killbill_client/base_uri_spec.rb
212
- - spec/killbill_client/model_relation_spec.rb
213
- - spec/killbill_client/remote/api_spec.rb
214
- - spec/killbill_client/remote/model_spec.rb
215
- - spec/killbill_client/resource_spec.rb
216
- - spec/killbill_client/resources_spec.rb
217
- - spec/spec_helper.rb
210
+ test_files: []