openwsman 2.2.7 → 2.3.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.
@@ -30,4 +30,4 @@ find_header 'libxml/parser.h', '/usr/include/libxml2'
30
30
 
31
31
  $CPPFLAGS = "-I/usr/include/openwsman -I.."
32
32
 
33
- create_makefile('openwsman')
33
+ create_makefile('_openwsman')
File without changes
@@ -1883,7 +1883,6 @@ SWIGEXPORT void Init__openwsman(void) {
1883
1883
  }
1884
1884
  #endif
1885
1885
  #if defined(SWIGPYTHON)
1886
- void init_pywsman(void);
1887
1886
  #include <python/helpers.h>
1888
1887
  #endif
1889
1888
  #if defined(SWIGJAVA)
@@ -15233,9 +15232,9 @@ SWIGEXPORT void Init_openwsman(void) {
15233
15232
 
15234
15233
  SWIG_RubyInitializeTrackings();
15235
15234
  rb_define_const(mOpenwsman, "OPENWSMAN_MAJOR", SWIG_From_int((int)(2)));
15236
- rb_define_const(mOpenwsman, "OPENWSMAN_MINOR", SWIG_From_int((int)(2)));
15237
- rb_define_const(mOpenwsman, "OPENWSMAN_PATCH", SWIG_From_int((int)(7)));
15238
- rb_define_const(mOpenwsman, "OPENWSMAN_VERSION", SWIG_FromCharPtr("2.2.7"));
15235
+ rb_define_const(mOpenwsman, "OPENWSMAN_MINOR", SWIG_From_int((int)(3)));
15236
+ rb_define_const(mOpenwsman, "OPENWSMAN_PATCH", SWIG_From_int((int)(0)));
15237
+ rb_define_const(mOpenwsman, "OPENWSMAN_VERSION", SWIG_FromCharPtr("2.3.0"));
15239
15238
 
15240
15239
  SwigClassXmlNs.klass = rb_define_class_under(mOpenwsman, "XmlNs", rb_cObject);
15241
15240
  SWIG_TypeClientData(SWIGTYPE_p___WsXmlNs, (void *) &SwigClassXmlNs);
@@ -0,0 +1,10 @@
1
+ # openwsman/version.rb
2
+
3
+ module Openwsman
4
+ require 'rbconfig'
5
+ OPENWSMAN_RUBY_VERSION = "1.8"
6
+ SYSTEM_RUBY_VERSION = "#{RbConfig::CONFIG['MAJOR']}.#{RbConfig::CONFIG['MINOR']}"
7
+ if SYSTEM_RUBY_VERSION != OPENWSMAN_RUBY_VERSION
8
+ STDERR.puts "** Warning: Ruby version mismatch: Openwsman Ruby #{OPENWSMAN_RUBY_VERSION}, Runtime Ruby #{SYSTEM_RUBY_VERSION}"
9
+ end
10
+ end
metadata CHANGED
@@ -1,93 +1,126 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: openwsman
3
- version: !ruby/object:Gem::Version
4
- version: 2.2.7
3
+ version: !ruby/object:Gem::Version
4
+ hash: 3
5
5
  prerelease:
6
+ segments:
7
+ - 2
8
+ - 3
9
+ - 0
10
+ version: 2.3.0
6
11
  platform: ruby
7
- authors:
8
- - Klaus Kämpf
12
+ authors:
13
+ - "Klaus K\xC3\xA4mpf"
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-02-02 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-02-07 00:00:00 +01:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
15
22
  name: rake-compiler
16
- requirement: &7069220 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
17
25
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
22
33
  type: :development
23
- prerelease: false
24
- version_requirements: *7069220
25
- - !ruby/object:Gem::Dependency
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
26
36
  name: mocha
27
- requirement: &7068740 !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
28
39
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0.9'
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 25
44
+ segments:
45
+ - 0
46
+ - 9
47
+ version: "0.9"
33
48
  type: :development
34
- prerelease: false
35
- version_requirements: *7068740
36
- - !ruby/object:Gem::Dependency
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
37
51
  name: yard
38
- requirement: &7068260 !ruby/object:Gem::Requirement
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
39
54
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0.5'
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ hash: 1
59
+ segments:
60
+ - 0
61
+ - 5
62
+ version: "0.5"
44
63
  type: :development
45
- prerelease: false
46
- version_requirements: *7068260
47
- description: ! 'The openwsman gem provides a Ruby API to manage
48
-
49
- systems using the WS-Management protocol.'
50
- email:
64
+ version_requirements: *id003
65
+ description: |-
66
+ The openwsman gem provides a Ruby API to manage
67
+ systems using the WS-Management protocol.
68
+ email:
51
69
  - kkaempf@suse.de
52
70
  executables: []
53
- extensions:
71
+
72
+ extensions:
54
73
  - ext/openwsman/extconf.rb
55
74
  extra_rdoc_files: []
56
- files:
75
+
76
+ files:
77
+ - lib/openwsman.rb
57
78
  - lib/openwsman/xmlnode.rb
58
79
  - lib/openwsman/xmldoc.rb
59
80
  - lib/openwsman/openwsman.rb
60
- - lib/openwsman.rb
81
+ - lib/openwsman/version.rb
61
82
  - ext/openwsman/openwsman.h
62
- - ext/openwsman/helpers.h
63
83
  - ext/ruby/helpers.h
64
84
  - ext/openwsman/openwsman_wrap.c
65
- - ext/openwsman.c
85
+ - ext/openwsman/openwsman.c
66
86
  - ext/openwsman/extconf.rb
87
+ has_rdoc: true
67
88
  homepage: http://www.github.com/openwsman/openwsman
68
89
  licenses: []
69
- post_install_message: ! " ____\n/@ ~-.\n/ __ .- | remember to have fun! \n //
70
- // @ \n\n"
90
+
91
+ post_install_message: " ____\n\
92
+ /@ ~-.\n\
93
+ / __ .- | remember to have fun! \n // // @ \n\n"
71
94
  rdoc_options: []
72
- require_paths:
95
+
96
+ require_paths:
73
97
  - lib
74
- required_ruby_version: !ruby/object:Gem::Requirement
98
+ required_ruby_version: !ruby/object:Gem::Requirement
75
99
  none: false
76
- requirements:
77
- - - ! '>='
78
- - !ruby/object:Gem::Version
79
- version: '0'
80
- required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ hash: 3
104
+ segments:
105
+ - 0
106
+ version: "0"
107
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
108
  none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ hash: 23
113
+ segments:
114
+ - 1
115
+ - 3
116
+ - 6
85
117
  version: 1.3.6
86
118
  requirements: []
119
+
87
120
  rubyforge_project:
88
- rubygems_version: 1.8.10
121
+ rubygems_version: 1.5.0
89
122
  signing_key:
90
123
  specification_version: 3
91
124
  summary: Ruby client bindings for Openwsman
92
125
  test_files: []
93
- has_rdoc:
126
+
@@ -1,170 +0,0 @@
1
- #ifndef RUBY_HELPERS_H
2
- #define RUBY_HELPERS_H
3
-
4
- /*
5
- * openwsman-ruby.c
6
- *
7
- * helper functions to convert between ruby and openwsman values
8
- *
9
- * Author: Klaus Kaempf <kkaempf@suse.de>
10
- *
11
- */
12
-
13
- /*****************************************************************************
14
- * Copyright (C) 2008 Novell Inc. All rights reserved.
15
- * Copyright (C) 2008 SUSE Linux Products GmbH. All rights reserved.
16
- *
17
- * Redistribution and use in source and binary forms, with or without
18
- * modification, are permitted provided that the following conditions are met:
19
- *
20
- * - Redistributions of source code must retain the above copyright notice,
21
- * this list of conditions and the following disclaimer.
22
- *
23
- * - Redistributions in binary form must reproduce the above copyright notice,
24
- * this list of conditions and the following disclaimer in the documentation
25
- * and/or other materials provided with the distribution.
26
- *
27
- * - Neither the name of Novell Inc. nor of SUSE Linux Products GmbH nor the
28
- * names of its contributors may be used to endorse or promote products
29
- * derived from this software without specific prior written permission.
30
- *
31
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
32
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34
- * ARE DISCLAIMED. IN NO EVENT SHALL Novell Inc. OR SUSE Linux Products GmbH OR
35
- * THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
36
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
37
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
38
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
39
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
40
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
41
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42
- *****************************************************************************/
43
-
44
- /* convert char* to string VALUE */
45
- static VALUE
46
- makestring( const char *s )
47
- {
48
- if (s) return rb_str_new2( s );
49
- return Qnil;
50
- }
51
-
52
-
53
- /* convert VALUE to char* */
54
- static const char *
55
- as_string( VALUE v )
56
- {
57
- const char *str;
58
- if (SYMBOL_P(v)) {
59
- str = rb_id2name(SYM2ID(v));
60
- }
61
- else if (TYPE(v) == T_STRING) {
62
- str = StringValuePtr(v);
63
- }
64
- else if (v == Qnil) {
65
- str = NULL;
66
- }
67
- else {
68
- VALUE v_s = rb_funcall(v, rb_intern("to_s"), 0 );
69
- str = StringValuePtr(v_s);
70
- }
71
- return str;
72
- }
73
-
74
-
75
- /* convert openwsman hash_t* to hash VALUE (string pairs) */
76
- static VALUE
77
- hash2value( hash_t *hash )
78
- {
79
- VALUE v;
80
- hnode_t *node;
81
- hscan_t ptr;
82
-
83
- if (!hash) return Qnil;
84
-
85
- hash_scan_begin( &ptr, hash );
86
-
87
- v = rb_hash_new();
88
- while ((node = hash_scan_next( &ptr )) ) {
89
- rb_hash_aset( v, makestring( hnode_getkey( node ) ), makestring( hnode_get( node ) ) );
90
- }
91
- return v;
92
- }
93
-
94
-
95
- /* add key,value VALUE pair to hash_t*
96
- * (used as callback for value2hash)
97
- */
98
- static int
99
- add_i( VALUE key, VALUE value, hash_t *h )
100
- {
101
- if (key != Qundef) {
102
- const char *k = as_string( key );
103
- const char *v = as_string( value );
104
-
105
- if (!hash_lookup( h, k ) ) {
106
- if ( !hash_alloc_insert( h, k, v ) ) {
107
- rb_raise( rb_eException, "hash_alloc_insert failed" );
108
- }
109
- }
110
- }
111
- return 0;
112
- }
113
-
114
-
115
- /* create hash (h == NULL) or add to hash (h != NULL) from hash VALUE */
116
- static hash_t *
117
- value2hash( hash_t *h, VALUE v )
118
- {
119
- if (NIL_P(v)) return NULL;
120
-
121
- Check_Type( v, T_HASH );
122
-
123
- if (!h) h = hash_create(HASHCOUNT_T_MAX, 0, 0);
124
-
125
- rb_hash_foreach( v, add_i, (unsigned long)h );
126
-
127
- return h;
128
- }
129
-
130
-
131
- /*
132
- * callback function if client authentication fails
133
- *
134
- */
135
- static void
136
- auth_request_callback( WsManClient *client, wsman_auth_type_t t, char **username, char **password )
137
- {
138
-
139
- /*
140
- * Uhm, swig 1.3.40 (or earlier) renamed its internal class variables from
141
- * cFoo to SwigClassFoo
142
- * 1.3.36 certainly used cFoo
143
- *
144
- */
145
-
146
- #if SWIG_VERSION < 0x010340
147
- #define TRANSPORT_CLASS cTransport
148
- #else
149
- #define TRANSPORT_CLASS SwigClassTransport
150
- #endif
151
-
152
- extern swig_class TRANSPORT_CLASS;
153
- VALUE c = SWIG_NewPointerObj((void*) client, SWIGTYPE_p__WsManClient, 0);
154
-
155
- /* ruby callback */
156
- VALUE result = rb_funcall( TRANSPORT_CLASS.klass, rb_intern( "auth_request_callback" ), 2, c, INT2NUM( t ) );
157
-
158
- if (CLASS_OF( result ) == rb_cArray) {
159
- if (RARRAY_LEN(result) == 2 ) {
160
- *username = strdup(as_string( rb_ary_entry( result, 0 ) ));
161
- *password= strdup(as_string( rb_ary_entry( result, 1 ) ));
162
- return;
163
- }
164
- }
165
-
166
- *username = NULL; /* abort authentication */
167
- return;
168
- }
169
-
170
- #endif /* RUBY_HELPERS_H */