net-ssh-kerberos 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -14,6 +14,7 @@ EOTEXT
14
14
  gem.authors = ["Joe Khoobyar"]
15
15
  gem.rubyforge_project = 'net-ssh-krb'
16
16
  gem.add_runtime_dependency(%q<net-ssh>, [">= 2.0"])
17
+ gem.required_ruby_version = Gem::Requirement.new("< 1.9")
17
18
 
18
19
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
19
20
  end
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 0
4
+ :patch: 1
@@ -6,7 +6,7 @@ module Net; module SSH; module Kerberos;
6
6
  module Drivers
7
7
 
8
8
  # Some useful DL extensions.
9
- module DLExtensions
9
+ module DLDriver
10
10
  PTR_ENC = proc{|v| v && (DL::PtrData===v ? v : v.to_ptr) }
11
11
  PTR_REF_ENC = proc{|v| (v.nil? ? DL::PtrData.new(v) : (DL::PtrData===v ? v : v.to_ptr)).ref }
12
12
 
@@ -30,12 +30,20 @@ module Net; module SSH; module Kerberos;
30
30
  end
31
31
  end
32
32
 
33
- def self.included(base)
34
- base.extend ClassMethods
35
- end
36
- end
37
-
38
- @@available = []
33
+ if RUBY_VERSION =~ /^1\.8/
34
+ def self.included(base)
35
+ base.extend DL::Importable
36
+ base.extend ClassMethods
37
+ end
38
+ else
39
+ def self.included(base)
40
+ base.extend DL::Importer
41
+ base.extend ClassMethods
42
+ end
43
+ end
44
+ end
45
+
46
+ @@available = []
39
47
  def self.available; @@available end
40
48
 
41
49
  if RUBY_PLATFORM.include?('win') && ! RUBY_PLATFORM.include?('dar'); then
@@ -36,8 +36,7 @@ module Net; module SSH; module Kerberos; module Drivers;
36
36
  GSS_C_MECH_CODE = 2
37
37
 
38
38
  module API
39
- extend DL::Importable
40
- include DLExtensions
39
+ include DLDriver
41
40
 
42
41
  def self.gss_func(sym, sig)
43
42
  extern "OM_uint32 #{sym} (OM_uint32_ref, #{sig})"
@@ -52,10 +51,10 @@ module Net; module SSH; module Kerberos; module Drivers;
52
51
  EOCODE
53
52
  end
54
53
 
55
- if RUBY_PLATFORM =~ /cygwin/
56
- dlload('cyggss-1.dll')
57
- else
58
- dlload('libgssapi_krb5.so')
54
+ case RUBY_PLATFORM
55
+ when /cygwin/; dlload('cyggss-1.dll')
56
+ when /darwin/; dlload('libgssapi_krb5.dylib')
57
+ else dlload('libgssapi_krb5.so')
59
58
  end
60
59
 
61
60
  typealias "void **", "p", PTR_REF_ENC, proc{|v| v.ptr}
@@ -43,8 +43,7 @@ module Net; module SSH; module Kerberos; module Drivers
43
43
  ISC_REQ_INTEGRITY = 0x00010000
44
44
 
45
45
  module API
46
- extend DL::Importable
47
- include DLExtensions
46
+ include DLDriver
48
47
 
49
48
  dlload 'secur32'
50
49
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh-kerberos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Khoobyar
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-18 00:00:00 -04:00
12
+ date: 2009-10-19 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -65,9 +65,9 @@ require_paths:
65
65
  - lib
66
66
  required_ruby_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - ">="
68
+ - - <
69
69
  - !ruby/object:Gem::Version
70
- version: "0"
70
+ version: "1.9"
71
71
  version:
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements: