xmlsec 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ .idea
1
2
  *.gem
2
3
  *.rbc
3
4
  .bundle
@@ -1,7 +1,38 @@
1
1
  require 'mkmf'
2
2
 
3
- if pkg_config('xmlsec1-openssl')
4
- create_makefile('xmlsec/xmlsec_ext')
3
+ def crash(str)
4
+ printf(" extconf failure: %s\n", str)
5
+ exit 1
6
+ end
7
+
8
+ if (xc = with_config('xmlsec1-config')) or RUBY_PLATFORM.match(/darwin/i) then
9
+ xc = 'xmlsec1-config' if xc == true or xc.nil?
10
+ cflags = `#{xc} --cflags`.chomp
11
+ if $? != 0
12
+ cflags = nil
13
+ else
14
+ libs = `#{xc} --libs`.chomp
15
+ if $? != 0
16
+ libs = nil
17
+ else
18
+ $CFLAGS += ' ' + cflags
19
+ $libs = libs + " " + $libs
20
+ end
21
+ end
5
22
  else
6
- puts "xmlsec1 is not installed."
7
- end
23
+ pkg_config('xmlsec1')
24
+ end
25
+
26
+ unless (have_library('xmlsec1', 'xmlSecDSigCtxCreate') or
27
+ find_library('xmlsec1', 'xmlSecDSigCtxCreate', '/opt/lib', '/usr/local/lib', '/usr/lib')) and
28
+ (have_header('xmlsec/version.h') or
29
+ find_header('xmlsec/version.h',
30
+ '/opt/include/xmlsec1',
31
+ '/usr/local/include/xmlsec1',
32
+ '/usr/include/xmlsec1'))
33
+ crash(<<EOL)
34
+ need libxmlsec1.
35
+ EOL
36
+ end
37
+
38
+ create_makefile('xmlsec/xmlsec_ext')
@@ -1,3 +1,3 @@
1
1
  module XmlSec
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmlsec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-06-05 00:00:00.000000000 Z
15
+ date: 2012-12-04 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rake-compiler
@@ -95,7 +95,6 @@ files:
95
95
  - README.md
96
96
  - Rakefile
97
97
  - ext/xmlsec/extconf.rb
98
- - ext/xmlsec/mkmf.log
99
98
  - ext/xmlsec/sign.c
100
99
  - ext/xmlsec/sign.h
101
100
  - ext/xmlsec/verify.c
@@ -141,4 +140,14 @@ rubygems_version: 1.8.24
141
140
  signing_key:
142
141
  specification_version: 3
143
142
  summary: Ruby bindings for xmlsec
144
- test_files: []
143
+ test_files:
144
+ - spec/assets/csr.pem
145
+ - spec/assets/private.key.pem
146
+ - spec/assets/private.passw.key.pem
147
+ - spec/assets/public.key.pem
148
+ - spec/assets/signed.test.xml
149
+ - spec/assets/unsigned.test.xml
150
+ - spec/assets/x509.crt
151
+ - spec/spec_helper.rb
152
+ - spec/xmlsec/sign_spec.rb
153
+ - spec/xmlsec/verify_spec.rb
@@ -1,5 +0,0 @@
1
- package configuration for xmlsec1-openssl
2
- cflags: -DXMLSEC_CRYPTO=\"openssl\" -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_DL_LIBLTDL=1, -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2
3
- ldflags:
4
- libs: -lxmlsec1-openssl -lxmlsec1 -lltdl -lssl -lcrypto -ldl -lxslt -lz -lm -lxml2
5
-