openwsman 2.4.12.1 → 2.4.13

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: 05d9166f187b741d314e0dcef1425925cad610e7
4
- data.tar.gz: 3b9dac7671f734ecc1f11596b0d8edf124b622a2
3
+ metadata.gz: ea8b2bb54370996fa17e721f0b4d4799ee1eec92
4
+ data.tar.gz: 4d5d2bf42941d72417e4d26bb025597c3abf68ba
5
5
  SHA512:
6
- metadata.gz: 56aea7009ab94074582ff95c7666e3d9fead0a5b2c4ace7062e075fec7ab34f8f0029817349a5e6f3b8bbe8eb6779a71e2e053afe66104394c968a334d838c9c
7
- data.tar.gz: ab60cc7cb66e9721c7c2d8463465084f9fb423fc6aebe775bc5e71bdb3e416cfa370a56ed154d50b1b21a0c7225f9d618553773112977ffb4748dbbefa6aaf92
6
+ metadata.gz: 2999379c6b54aebf1e11c60ca4fd86a8d9ce0dbb3c0e9cf6092eebe22d7441dcfd80c97674e681ad102b4407ff4c40bd184caa5f6177119c1ce377015212d6bc
7
+ data.tar.gz: b49df1870d997d399a38f2c83bef72aedbed0de260ac3e5fdf8415c9ccaf16c24ca17f1a3cd69ff9337055ddefc979c0c5e9c93ee65843418c26b37ab9cc58ab
@@ -6,6 +6,6 @@
6
6
 
7
7
  #define OPENWSMAN_MAJOR 2
8
8
  #define OPENWSMAN_MINOR 4
9
- #define OPENWSMAN_PATCH 12
10
- #define OPENWSMAN_VERSION "2.4.12"
9
+ #define OPENWSMAN_PATCH 13
10
+ #define OPENWSMAN_VERSION "2.4.13"
11
11
 
@@ -92,6 +92,7 @@ typedef struct _WsManClient {
92
92
  return wsmc_get_response_code( $self );
93
93
  }
94
94
 
95
+ %newobject scheme;
95
96
  /*
96
97
  * String representation of the transport scheme
97
98
  *
@@ -103,6 +104,7 @@ typedef struct _WsManClient {
103
104
  return wsmc_get_scheme( $self );
104
105
  }
105
106
 
107
+ %newobject host;
106
108
  /*
107
109
  * The host part of the client URL
108
110
  *
@@ -119,6 +121,7 @@ typedef struct _WsManClient {
119
121
  return wsmc_get_port( $self );
120
122
  }
121
123
 
124
+ %newobject path;
122
125
  /*
123
126
  * The path of the clien URL
124
127
  *
@@ -127,6 +130,7 @@ typedef struct _WsManClient {
127
130
  return wsmc_get_path( $self );
128
131
  }
129
132
 
133
+ %newobject user;
130
134
  /*
131
135
  * The user name used for authentication
132
136
  *
@@ -135,6 +139,7 @@ typedef struct _WsManClient {
135
139
  return wsmc_get_user( $self );
136
140
  }
137
141
 
142
+ %newobject password;
138
143
  /*
139
144
  * The password used for authentication
140
145
  *
@@ -474,20 +474,6 @@ typedef struct {} client_opt_t;
474
474
  #endif
475
475
 
476
476
  #if defined(SWIGRUBY)
477
- %rename( "properties=" ) set_properties(VALUE hash);
478
- /*
479
- * Set properties from Hash
480
- * * Input parameters to 'invoke'd methods are represented as ClientOption properties
481
- *
482
- * call-seq:
483
- * options.properties = { "Key" => "Value", ...}
484
- *
485
- */
486
- void set_properties(VALUE hash)
487
- {
488
- $self->properties = value2hash(NULL, hash, 0);
489
- }
490
-
491
477
  %rename( "properties" ) get_properties(void);
492
478
  /*
493
479
  * Get properties as Hash
@@ -499,7 +485,22 @@ typedef struct {} client_opt_t;
499
485
  */
500
486
  VALUE get_properties(void)
501
487
  {
502
- return hash2value($self->properties);
488
+ VALUE v = Qnil;
489
+ if (!list_isempty($self->properties)) {
490
+ v = rb_hash_new();
491
+ lnode_t *node = list_first($self->properties);
492
+ while (node) {
493
+ client_property_t *property = (client_property_t *)node->list_data;
494
+ if (property->value.type == 0) {
495
+ rb_hash_aset( v, makestring(property->key), makestring(property->value.entry.text));
496
+ }
497
+ else {
498
+ rb_hash_aset( v, makestring(property->key), makestring(epr_to_string(property->value.entry.eprp)));
499
+ }
500
+ node = list_next($self->properties, node);
501
+ }
502
+ }
503
+ return v;
503
504
  }
504
505
  #endif
505
506
 
@@ -38,6 +38,14 @@ require 'openwsman/xmldoc'
38
38
  # response and dig down through its XmlNode and XmlAttr objects.
39
39
 
40
40
  module Openwsman
41
+ class ClientOption
42
+ # assign hash to properties
43
+ def properties= value
44
+ value.each do |k,v|
45
+ self.add_property k.to_s, v.to_s
46
+ end
47
+ end
48
+ end
41
49
  class Transport
42
50
  # called when authentication credentials missing or wrong
43
51
  def Transport.auth_request_callback client, auth_type
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Openwsman
4
4
  require 'rbconfig'
5
- OPENWSMAN_RUBY_VERSION = "2.1"
5
+ OPENWSMAN_RUBY_VERSION = "2.2"
6
6
  SYSTEM_RUBY_VERSION = "#{RbConfig::CONFIG['MAJOR']}.#{RbConfig::CONFIG['MINOR']}"
7
7
  if SYSTEM_RUBY_VERSION != OPENWSMAN_RUBY_VERSION
8
8
  STDERR.puts "** Warning: Ruby version mismatch: Openwsman Ruby #{OPENWSMAN_RUBY_VERSION}, Runtime Ruby #{SYSTEM_RUBY_VERSION}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openwsman
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.12.1
4
+ version: 2.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Klaus Kämpf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-28 00:00:00.000000000 Z
11
+ date: 2015-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: 1.3.6
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 2.2.0
119
+ rubygems_version: 2.4.5
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Ruby client bindings for Openwsman